Patchwork D2908: rebase: get "inmemory" state directly from rebase runtime

login
register
mail settings
Submitter phabricator
Date March 21, 2018, 6:10 p.m.
Message ID <differential-rev-PHID-DREV-5nkxgcelnbk55yxc77so-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29696/
State Superseded
Headers show

Comments

phabricator - March 21, 2018, 6:10 p.m.
martinvonz created this revision.
martinvonz added a reviewer: phillco.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  As far as I can tell, rbsrt.inmemory is equivalent to
  rbsrt.wctx.isinmemory(), so let's use the shorter form.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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())