diff -r 348132c112cf mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2304,16 +2304,25 @@ def revert(ui, repo, *pats, **opts): handle(remove, False) if not opts.get('dry_run'): + def checkout(f): + fc = ctx[f] + data = fc.data() + repo.wwrite(f, data, mf.flags(f)) for f in forget[0]: repo.dirstate.forget(f) - r = hg.revert(repo, node, update.has_key) + for f in revert[0]: + checkout(f) for f in add[0]: + checkout(f) repo.dirstate.add(f) for f in undelete[0]: + checkout(f) repo.dirstate.normal(f) + audit_path = util.path_auditor(repo.root) for f in remove[0]: + audit_path(f) + util.unlink(repo.wjoin(f)) repo.dirstate.remove(f) - return r finally: del wlock diff -r 348132c112cf tests/test-revert.out --- a/tests/test-revert.out +++ b/tests/test-revert.out @@ -26,8 +26,6 @@ e %% should verbosely save backup to e.orig saving current version of e as e.orig reverting e -resolving manifests -getting e %% should say no changes needed no changes needed to a %% should say file not managed