##// END OF EJS Templates
strip: fix bug with treemanifests and unordered linkrevs...
Martin von Zweigbergk -
r43183:a8b249b2 default
parent child Browse files
Show More
@@ -81,14 +81,12 b' def _collectrevlog(revlog, striprev):'
81 _, brokenset = revlog.getstrippoint(striprev)
81 _, brokenset = revlog.getstrippoint(striprev)
82 return [revlog.linkrev(r) for r in brokenset]
82 return [revlog.linkrev(r) for r in brokenset]
83
83
84 def _collectmanifest(repo, striprev):
85 return _collectrevlog(repo.manifestlog.getstorage(b''), striprev)
86
87 def _collectbrokencsets(repo, files, striprev):
84 def _collectbrokencsets(repo, files, striprev):
88 """return the changesets which will be broken by the truncation"""
85 """return the changesets which will be broken by the truncation"""
89 s = set()
86 s = set()
90
87
91 s.update(_collectmanifest(repo, striprev))
88 for revlog in manifestrevlogs(repo):
89 s.update(_collectrevlog(revlog, striprev))
92 for fname in files:
90 for fname in files:
93 s.update(_collectrevlog(repo.file(fname), striprev))
91 s.update(_collectrevlog(repo.file(fname), striprev))
94
92
@@ -203,14 +203,9 b' Now a similar test for a non-root manife'
203 checking changesets
203 checking changesets
204 checking manifests
204 checking manifests
205 checking directory manifests
205 checking directory manifests
206 dir/@0: parent-directory manifest refers to unknown revision 1c556153fe54
207 dir/@1: parent-directory manifest refers to unknown revision 1f76dba919fd
208 crosschecking files in changesets and manifests
206 crosschecking files in changesets and manifests
209 checking files
207 checking files
210 dir/other@1: 5d9299349fc0 not in manifests
211 checked 3 changesets with 4 changes to 3 files
208 checked 3 changesets with 4 changes to 3 files
212 3 integrity errors encountered!
213 (first damaged changeset appears to be 0)
214
209
215 % Trying to strip revision 3
210 % Trying to strip revision 3
216 saved backup bundle to $TESTTMP/treemanifests/3/.hg/strip-backup/e4e3de5c3cb2-f4c70376-backup.hg
211 saved backup bundle to $TESTTMP/treemanifests/3/.hg/strip-backup/e4e3de5c3cb2-f4c70376-backup.hg
General Comments 0
You need to be logged in to leave comments. Login now