equal
deleted
inserted
replaced
2275 elif p2 != nullid: |
2275 elif p2 != nullid: |
2276 raise util.Abort(_('working dir has two parents; ' |
2276 raise util.Abort(_('working dir has two parents; ' |
2277 'you must specify the revision to revert to')) |
2277 'you must specify the revision to revert to')) |
2278 else: |
2278 else: |
2279 node = parent |
2279 node = parent |
|
2280 pmf = None |
2280 mf = repo.manifest.read(repo.changelog.read(node)[0]) |
2281 mf = repo.manifest.read(repo.changelog.read(node)[0]) |
2281 |
2282 |
2282 wlock = repo.wlock() |
2283 wlock = repo.wlock() |
2283 |
2284 |
2284 # need all matching names in dirstate and manifest of target rev, |
2285 # need all matching names in dirstate and manifest of target rev, |
2357 # file has not changed in dirstate |
2358 # file has not changed in dirstate |
2358 if node == parent: |
2359 if node == parent: |
2359 if exact: ui.warn(_('no changes needed to %s\n' % rel)) |
2360 if exact: ui.warn(_('no changes needed to %s\n' % rel)) |
2360 continue |
2361 continue |
2361 if not in_mf: |
2362 if not in_mf: |
2362 handle(remove, False) |
2363 if pmf is None: |
|
2364 # only need parent manifest in this unlikely case, |
|
2365 # so do not read by default |
|
2366 pmf = repo.manifest.read(repo.changelog.read(parent)[0]) |
|
2367 if abs in pmf: |
|
2368 handle(remove, False) |
2363 update[abs] = True |
2369 update[abs] = True |
2364 |
2370 |
2365 repo.dirstate.forget(forget[0]) |
2371 repo.dirstate.forget(forget[0]) |
2366 r = repo.update(node, False, True, update.has_key, False, wlock=wlock, |
2372 r = repo.update(node, False, True, update.has_key, False, wlock=wlock, |
2367 show_stats=False) |
2373 show_stats=False) |