##// END OF EJS Templates
repair: move manifest strip to a separate function...
Durham Goode -
r33691:86ea201e default
parent child Browse files
Show More
@@ -178,16 +178,13 b' def strip(ui, repo, nodelist, backup=Tru'
178 tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp',
178 tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp',
179 compress=False, obsolescence=False)
179 compress=False, obsolescence=False)
180
180
181 mfst = repo.manifestlog._revlog
182
183 try:
181 try:
184 with repo.transaction("strip") as tr:
182 with repo.transaction("strip") as tr:
185 offset = len(tr.entries)
183 offset = len(tr.entries)
186
184
187 tr.startgroup()
185 tr.startgroup()
188 cl.strip(striprev, tr)
186 cl.strip(striprev, tr)
189 mfst.strip(striprev, tr)
187 stripmanifest(repo, striprev, tr, files)
190 striptrees(repo, tr, striprev, files)
191
188
192 for fn in files:
189 for fn in files:
193 repo.file(fn).strip(striprev, tr)
190 repo.file(fn).strip(striprev, tr)
@@ -314,6 +311,11 b' def delayedstrip(ui, repo, nodelist, top'
314 callback.topic = topic
311 callback.topic = topic
315 callback.addnodes(nodelist)
312 callback.addnodes(nodelist)
316
313
314 def stripmanifest(repo, striprev, tr, files):
315 revlog = repo.manifestlog._revlog
316 revlog.strip(striprev, tr)
317 striptrees(repo, tr, striprev, files)
318
317 def striptrees(repo, tr, striprev, files):
319 def striptrees(repo, tr, striprev, files):
318 if 'treemanifest' in repo.requirements: # safe but unnecessary
320 if 'treemanifest' in repo.requirements: # safe but unnecessary
319 # otherwise
321 # otherwise
General Comments 0
You need to be logged in to leave comments. Login now