Mercurial > hg
changeset 37025:0782ac132a41
rebase: pass "inmemory" directly to _definedestmap()
We no longer reassign rbsrt.inmemory in _definedestmap(), so we don't
need to pass the whole rebase runtime instance anymore, thus
making it clear that it won't be updated.
Differential Revision: https://phab.mercurial-scm.org/D2905
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 20 Mar 2018 13:53:02 -0700 |
parents | 7c18798fc24d |
children | e2a0aaec7d86 |
files | hgext/rebase.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Tue Mar 20 14:19:28 2018 +0800 +++ b/hgext/rebase.py Tue Mar 20 13:53:02 2018 -0700 @@ -840,8 +840,8 @@ if retcode is not None: return retcode else: - destmap = _definedestmap(ui, repo, rbsrt, destf, srcf, basef, revf, - destspace=destspace) + destmap = _definedestmap(ui, repo, inmemory, destf, srcf, basef, + revf, destspace=destspace) retcode = rbsrt._preparenewrebase(destmap) if retcode is not None: return retcode @@ -866,7 +866,7 @@ rbsrt._performrebase(tr) rbsrt._finishrebase() -def _definedestmap(ui, repo, rbsrt, destf=None, srcf=None, basef=None, +def _definedestmap(ui, repo, inmemory, destf=None, srcf=None, basef=None, revf=None, destspace=None): """use revisions argument to define destmap {srcrev: destrev}""" if revf is None: @@ -881,7 +881,7 @@ if revf and srcf: raise error.Abort(_('cannot specify both a revision and a source')) - if not rbsrt.inmemory: + if not inmemory: cmdutil.checkunfinished(repo) cmdutil.bailifchanged(repo) @@ -959,7 +959,7 @@ rebasingwcp = repo['.'].rev() in rebaseset ui.log("rebase", "", rebase_rebasing_wcp=rebasingwcp) - if rbsrt.inmemory and rebasingwcp: + if inmemory and rebasingwcp: # Check these since we did not before. cmdutil.checkunfinished(repo) cmdutil.bailifchanged(repo)