##// END OF EJS Templates
revert: remove code killed by the double status...
Pierre-Yves David -
r22211:76fa261b default
parent child Browse files
Show More
@@ -2482,8 +2482,6 b' def revert(ui, repo, ctx, parents, *pats'
2482 )
2482 )
2483
2483
2484 for abs, (rel, exact) in sorted(names.items()):
2484 for abs, (rel, exact) in sorted(names.items()):
2485 # hash on file in target manifest (or None if missing from target)
2486 mfentry = mf.get(abs)
2487 # target file to be touch on disk (relative to cwd)
2485 # target file to be touch on disk (relative to cwd)
2488 target = repo.wjoin(abs)
2486 target = repo.wjoin(abs)
2489 def handle(xlist, dobackup):
2487 def handle(xlist, dobackup):
@@ -2528,19 +2526,6 b' def revert(ui, repo, ctx, parents, *pats'
2528 if exact:
2526 if exact:
2529 ui.warn(_('no changes needed to %s\n') % rel)
2527 ui.warn(_('no changes needed to %s\n') % rel)
2530 continue
2528 continue
2531 # no change in dirstate but parent and target may differ
2532 if pmf is None:
2533 # only need parent manifest in this unlikely case,
2534 # so do not read by default
2535 pmf = repo[parent].manifest()
2536 if abs in pmf and mfentry:
2537 # if version of file is same in parent and target
2538 # manifests, do nothing
2539 if (pmf[abs] != mfentry or
2540 pmf.flags(abs) != mf.flags(abs)):
2541 handle(actions['revert'], False)
2542 else:
2543 handle(actions['remove'], False)
2544
2529
2545 if not opts.get('dry_run'):
2530 if not opts.get('dry_run'):
2546 _performrevert(repo, parents, ctx, actions)
2531 _performrevert(repo, parents, ctx, actions)
General Comments 0
You need to be logged in to leave comments. Login now