Mercurial > hg-stable
changeset 37030:81b35d275a60
rebase: get "inmemory" state directly from rebase runtime
As far as I can tell, rbsrt.inmemory is equivalent to
rbsrt.wctx.isinmemory(), so let's use the shorter form.
Differential Revision: https://phab.mercurial-scm.org/D2908
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 20 Mar 2018 17:30:08 -0700 |
parents | e2a0aaec7d86 |
children | 36c4e25c3ce1 |
files | hgext/rebase.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Mon Dec 25 15:56:07 2017 +0530 +++ b/hgext/rebase.py Tue Mar 20 17:30:08 2018 -0700 @@ -390,7 +390,7 @@ else: self.wctx = self.repo[None] self.repo.ui.debug("rebasing on disk\n") - self.repo.ui.log("rebase", "", rebase_imm_used=self.wctx.isinmemory()) + self.repo.ui.log("rebase", "", rebase_imm_used=self.inmemory) def _performrebase(self, tr): self._assignworkingcopy() @@ -489,7 +489,7 @@ stats = rebasenode(repo, rev, p1, base, self.collapsef, dest, wctx=self.wctx) if stats[3] > 0: - if self.wctx.isinmemory(): + if self.inmemory: raise error.InMemoryMergeConflictsError() else: raise error.InterventionRequired( @@ -500,7 +500,7 @@ editform = cmdutil.mergeeditform(merging, 'rebase') editor = cmdutil.getcommiteditor(editform=editform, **pycompat.strkwargs(opts)) - if self.wctx.isinmemory(): + if self.inmemory: newnode = concludememorynode(repo, rev, p1, p2, wctx=self.wctx, extrafn=_makeextrafn(self.extrafns), @@ -522,7 +522,7 @@ mergemod.mergestate.clean(repo) else: # Skip commit if we are collapsing - if self.wctx.isinmemory(): + if self.inmemory: self.wctx.setbase(repo[p1]) else: repo.setparents(repo[p1].node())