D7642: rebase: inline single-use `dryrun` and `confirm` variables

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Dec 13 02:56:23 EST 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D7642

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1019,8 +1019,6 @@
     """
     opts = pycompat.byteskwargs(opts)
     inmemory = ui.configbool(b'rebase', b'experimental.inmemory')
-    dryrun = opts.get(b'dry_run')
-    confirm = opts.get(b'confirm')
     action = cmdutil.check_unique_argument(opts, b'abort', b'stop', b'continue')
     if action:
         cmdutil.check_unique_argument(opts, b'confirm', b'dry-run', action)
@@ -1042,7 +1040,7 @@
         opts[b'rev'] = [revsetlang.formatspec(b'%ld and orphan()', userrevs)]
         opts[b'dest'] = b'_destautoorphanrebase(SRC)'
 
-    if dryrun or confirm:
+    if opts.get(b'dry_run') or opts.get(b'confirm'):
         return _dryrunrebase(ui, repo, action, opts)
     elif action == b'stop':
         rbsrt = rebaseruntime(repo, ui)



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list