##// END OF EJS Templates
repair: combine two loops over changelog revisions...
Martin von Zweigbergk -
r30707:987dbe87 default
parent child Browse files
Show More
@@ -91,6 +91,9 b' def strip(ui, repo, nodelist, backup=Tru'
91 91 striplist = [cl.rev(node) for node in nodelist]
92 92 striprev = min(striplist)
93 93
94 files = _collectfiles(repo, striprev)
95 saverevs = _collectbrokencsets(repo, files, striprev)
96
94 97 # Some revisions with rev > striprev may not be descendants of striprev.
95 98 # We have to find these revisions and put them in a bundle, so that
96 99 # we can restore them after the truncations.
@@ -99,16 +102,11 b' def strip(ui, repo, nodelist, backup=Tru'
99 102 # (head = revision in the set that has no descendant in the set;
100 103 # base = revision in the set that has no ancestor in the set)
101 104 tostrip = set(striplist)
105 saveheads = set(saverevs)
102 106 for r in cl.revs(start=striprev + 1):
103 107 if any(p in tostrip for p in cl.parentrevs(r)):
104 108 tostrip.add(r)
105 109
106 files = _collectfiles(repo, striprev)
107 saverevs = _collectbrokencsets(repo, files, striprev)
108
109 # compute heads
110 saveheads = set(saverevs)
111 for r in xrange(striprev + 1, len(cl)):
112 110 if r not in tostrip:
113 111 saverevs.add(r)
114 112 saveheads.difference_update(cl.parentrevs(r))
General Comments 0
You need to be logged in to leave comments. Login now