Patchwork D1617: rebase: extract _assignworkingcopy

login
register
mail settings
Submitter phabricator
Date Dec. 9, 2017, 4:34 a.m.
Message ID <b3bf1278808a40cbf10c2128d84b09ec@localhost.localdomain>
Download mbox | patch
Permalink /patch/26137/
State Not Applicable
Headers show

Comments

phabricator - Dec. 9, 2017, 4:34 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8dba17546016: rebase: extract _assignworkingcopy (authored by phillco, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1617?vs=4277&id=4286

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

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -382,14 +382,16 @@ 
 
         self.prepared = True
 
-    def _performrebase(self, tr):
-        repo, ui = self.repo, self.ui
-        # Assign a working copy object.
+    def _assignworkingcopy(self):
         if self.inmemory:
             from mercurial.context import overlayworkingctx
             self.wctx = overlayworkingctx(self.repo)
         else:
             self.wctx = self.repo[None]
+
+    def _performrebase(self, tr):
+        self._assignworkingcopy()
+        repo, ui = self.repo, self.ui
         if self.keepbranchesf:
             # insert _savebranch at the start of extrafns so if
             # there's a user-provided extrafn it can clobber branch if