equal
deleted
inserted
replaced
353 elif s == 'r': |
353 elif s == 'r': |
354 remove.append(f) |
354 remove.append(f) |
355 else: |
355 else: |
356 self.ui.warn(_("%s not tracked!\n") % f) |
356 self.ui.warn(_("%s not tracked!\n") % f) |
357 else: |
357 else: |
358 (c, a, d, u) = self.changes(match=match) |
358 modified, added, removed, unknown = self.changes(match=match) |
359 commit = c + a |
359 commit = modified + added |
360 remove = d |
360 remove = removed |
361 |
361 |
362 p1, p2 = self.dirstate.parents() |
362 p1, p2 = self.dirstate.parents() |
363 c1 = self.changelog.read(p1) |
363 c1 = self.changelog.read(p1) |
364 c2 = self.changelog.read(p2) |
364 c2 = self.changelog.read(p2) |
365 m1 = self.manifest.read(c1[0]) |
365 m1 = self.manifest.read(c1[0]) |
1390 m2 = self.manifest.read(m2n) |
1390 m2 = self.manifest.read(m2n) |
1391 mf2 = self.manifest.readflags(m2n) |
1391 mf2 = self.manifest.readflags(m2n) |
1392 ma = self.manifest.read(man) |
1392 ma = self.manifest.read(man) |
1393 mfa = self.manifest.readflags(man) |
1393 mfa = self.manifest.readflags(man) |
1394 |
1394 |
1395 (c, a, d, u) = self.changes() |
1395 modified, added, removed, unknown = self.changes() |
1396 |
1396 |
1397 if allow and not forcemerge: |
1397 if allow and not forcemerge: |
1398 if c or a or d: |
1398 if modified or added or removed: |
1399 raise util.Abort(_("outstanding uncommited changes")) |
1399 raise util.Abort(_("outstanding uncommited changes")) |
1400 if not forcemerge and not force: |
1400 if not forcemerge and not force: |
1401 for f in u: |
1401 for f in unknown: |
1402 if f in m2: |
1402 if f in m2: |
1403 t1 = self.wread(f) |
1403 t1 = self.wread(f) |
1404 t2 = self.file(f).read(m2[f]) |
1404 t2 = self.file(f).read(m2[f]) |
1405 if cmp(t1, t2) != 0: |
1405 if cmp(t1, t2) != 0: |
1406 raise util.Abort(_("'%s' already exists in the working" |
1406 raise util.Abort(_("'%s' already exists in the working" |
1423 remove = [] |
1423 remove = [] |
1424 |
1424 |
1425 # construct a working dir manifest |
1425 # construct a working dir manifest |
1426 mw = m1.copy() |
1426 mw = m1.copy() |
1427 mfw = mf1.copy() |
1427 mfw = mf1.copy() |
1428 umap = dict.fromkeys(u) |
1428 umap = dict.fromkeys(unknown) |
1429 |
1429 |
1430 for f in a + c + u: |
1430 for f in added + modified + unknown: |
1431 mw[f] = "" |
1431 mw[f] = "" |
1432 mfw[f] = util.is_exec(self.wjoin(f), mfw.get(f, False)) |
1432 mfw[f] = util.is_exec(self.wjoin(f), mfw.get(f, False)) |
1433 |
1433 |
1434 if moddirstate: |
1434 if moddirstate: |
1435 wlock = self.wlock() |
1435 wlock = self.wlock() |
1436 |
1436 |
1437 for f in d: |
1437 for f in removed: |
1438 if f in mw: |
1438 if f in mw: |
1439 del mw[f] |
1439 del mw[f] |
1440 |
1440 |
1441 # If we're jumping between revisions (as opposed to merging), |
1441 # If we're jumping between revisions (as opposed to merging), |
1442 # and if neither the working directory nor the target rev has |
1442 # and if neither the working directory nor the target rev has |