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

login
register
mail settings
Submitter phabricator
Date Dec. 18, 2019, 6:47 a.m.
Message ID <d51eede586008c77b3b0caa7ab2076f9@localhost.localdomain>
Download mbox | patch
Permalink /patch/43963/
State Not Applicable
Headers show

Comments

phabricator - Dec. 18, 2019, 6:47 a.m.
Closed by commit rHG0b769e1cbe89: rebase: inline single-use `dryrun` and `confirm` variables (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7642?vs=18821&id=18854

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7642/new/

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




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

Patch

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_at_most_one_arg(opts, b'abort', b'stop', b'continue')
     if action:
         cmdutil.check_incompatible_arguments(
@@ -1044,7 +1042,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)