# HG changeset patch # User Kevin Bullock # Date 1360681637 0 # Node ID fafdff7e9c438bf9397476115a44faf6c7100865 # Parent c161e4cf77d4d4997c853d00e5b3117d6d5d8f72 backout: use cmdutil.revert directly instead of commands.revert Before this change, backout would explicitly set the options it passed to commands.revert in order to fall thru most of its logic and call cmdutil.revert. This change makes it clearer what backup is trying to accomplish and makes it robust against changes to the revert command. diff -r c161e4cf77d4 -r fafdff7e9c43 mercurial/commands.py --- 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', ''))