mercurial/commands.py
changeset 18685 fafdff7e9c43
parent 18658 5e63a85299ba
child 18686 0bca4d31f647
--- a/mercurial/commands.py	Wed Feb 13 15:09:43 2013 -0600
+++ b/mercurial/commands.py	Tue Feb 12 15:07:17 2013 +0000
@@ -458,12 +458,8 @@
         branch = repo.dirstate.branch()
         hg.clean(repo, node, show_stats=False)
         repo.dirstate.setbranch(branch)
-        revert_opts = opts.copy()
-        revert_opts['date'] = None
-        revert_opts['all'] = True
-        revert_opts['rev'] = hex(parent)
-        revert_opts['no_backup'] = None
-        revert(ui, repo, **revert_opts)
+        rctx = scmutil.revsingle(repo, hex(parent))
+        cmdutil.revert(ui, repo, rctx, repo.dirstate.parents())
         if not opts.get('merge') and op1 != node:
             try:
                 ui.setconfig('ui', 'forcemerge', opts.get('tool', ''))