##// END OF EJS Templates
strip: move tree strip logic to it's own function...
Durham Goode -
r32196:a2be2abe default
parent child Browse files
Show More
@@ -165,13 +165,8 b' def strip(ui, repo, nodelist, backup=Tru'
165 tr.startgroup()
165 tr.startgroup()
166 cl.strip(striprev, tr)
166 cl.strip(striprev, tr)
167 mfst.strip(striprev, tr)
167 mfst.strip(striprev, tr)
168 if 'treemanifest' in repo.requirements: # safe but unnecessary
168 striptrees(repo, tr, striprev, files)
169 # otherwise
169
170 for unencoded, encoded, size in repo.store.datafiles():
171 if (unencoded.startswith('meta/') and
172 unencoded.endswith('00manifest.i')):
173 dir = unencoded[5:-12]
174 repo.manifestlog._revlog.dirlog(dir).strip(striprev, tr)
175 for fn in files:
170 for fn in files:
176 repo.file(fn).strip(striprev, tr)
171 repo.file(fn).strip(striprev, tr)
177 tr.endgroup()
172 tr.endgroup()
@@ -240,6 +235,15 b' def strip(ui, repo, nodelist, backup=Tru'
240 # extensions can use it
235 # extensions can use it
241 return backupfile
236 return backupfile
242
237
238 def striptrees(repo, tr, striprev, files):
239 if 'treemanifest' in repo.requirements: # safe but unnecessary
240 # otherwise
241 for unencoded, encoded, size in repo.store.datafiles():
242 if (unencoded.startswith('meta/') and
243 unencoded.endswith('00manifest.i')):
244 dir = unencoded[5:-12]
245 repo.manifestlog._revlog.dirlog(dir).strip(striprev, tr)
246
243 def rebuildfncache(ui, repo):
247 def rebuildfncache(ui, repo):
244 """Rebuilds the fncache file from repo history.
248 """Rebuilds the fncache file from repo history.
245
249
General Comments 0
You need to be logged in to leave comments. Login now