changeset 45546:3d47b5c7fe8d

rebase: remove redundant isinmemory argument from _origrebase() The argument is redundant with `rbst.inmemory`, which makes it unclear what to do if they were somehow different. Differential Revision: https://phab.mercurial-scm.org/D9070
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 18 Sep 2020 15:37:03 -0700
parents e5e1285b6f6f
children 2dcf595f6985
files hgext/rebase.py
diffstat 1 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Tue Sep 22 23:18:37 2020 -0700
+++ b/hgext/rebase.py	Fri Sep 18 15:37:03 2020 -0700
@@ -1110,13 +1110,7 @@
             overrides = {(b'rebase', b'singletransaction'): True}
             with ui.configoverride(overrides, b'rebase'):
                 _origrebase(
-                    ui,
-                    repo,
-                    action,
-                    opts,
-                    rbsrt,
-                    inmemory=True,
-                    leaveunfinished=True,
+                    ui, repo, action, opts, rbsrt, leaveunfinished=True,
                 )
         except error.InMemoryMergeConflictsError:
             ui.status(_(b'hit a merge conflict\n'))
@@ -1159,12 +1153,10 @@
 
 def _dorebase(ui, repo, action, opts, inmemory=False):
     rbsrt = rebaseruntime(repo, ui, inmemory, opts)
-    return _origrebase(ui, repo, action, opts, rbsrt, inmemory=inmemory)
+    return _origrebase(ui, repo, action, opts, rbsrt)
 
 
-def _origrebase(
-    ui, repo, action, opts, rbsrt, inmemory=False, leaveunfinished=False
-):
+def _origrebase(ui, repo, action, opts, rbsrt, leaveunfinished=False):
     assert action != b'stop'
     with repo.wlock(), repo.lock():
         if opts.get(b'interactive'):
@@ -1209,7 +1201,7 @@
             destmap = _definedestmap(
                 ui,
                 repo,
-                inmemory,
+                rbsrt.inmemory,
                 opts.get(b'dest', None),
                 opts.get(b'source', []),
                 opts.get(b'base', []),
@@ -1234,7 +1226,7 @@
             # Same logic for the dirstate guard, except we don't create one when
             # rebasing in-memory (it's not needed).
             dsguard = None
-            if singletr and not inmemory:
+            if singletr and not rbsrt.inmemory:
                 dsguard = dirstateguard.dirstateguard(repo, b'rebase')
             with util.acceptintervention(dsguard):
                 rbsrt._performrebase(tr)