Patchwork D292: repair: move manifest strip to a separate function

login
register
mail settings
Submitter phabricator
Date Aug. 9, 2017, 3:36 p.m.
Message ID <378425b5d4da6d74f4227b185aee25f7@localhost.localdomain>
Download mbox | patch
Permalink /patch/22809/
State Not Applicable
Headers show

Comments

phabricator - Aug. 9, 2017, 3:36 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG86ea201eaeb9: repair: move manifest strip to a separate function (authored by durham).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D292?vs=662&id=693

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

AFFECTED FILES
  mercurial/repair.py

CHANGE DETAILS




To: durham, #hg-reviewers
Cc: lothiraldan, mercurial-devel

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -178,16 +178,13 @@ 
         tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp',
                                 compress=False, obsolescence=False)
 
-    mfst = repo.manifestlog._revlog
-
     try:
         with repo.transaction("strip") as tr:
             offset = len(tr.entries)
 
             tr.startgroup()
             cl.strip(striprev, tr)
-            mfst.strip(striprev, tr)
-            striptrees(repo, tr, striprev, files)
+            stripmanifest(repo, striprev, tr, files)
 
             for fn in files:
                 repo.file(fn).strip(striprev, tr)
@@ -314,6 +311,11 @@ 
         callback.topic = topic
     callback.addnodes(nodelist)
 
+def stripmanifest(repo, striprev, tr, files):
+    revlog = repo.manifestlog._revlog
+    revlog.strip(striprev, tr)
+    striptrees(repo, tr, striprev, files)
+
 def striptrees(repo, tr, striprev, files):
     if 'treemanifest' in repo.requirements: # safe but unnecessary
                                             # otherwise