Show More
@@ -91,6 +91,9 b' def strip(ui, repo, nodelist, backup=Tru' | |||||
91 | striplist = [cl.rev(node) for node in nodelist] |
|
91 | striplist = [cl.rev(node) for node in nodelist] | |
92 | striprev = min(striplist) |
|
92 | striprev = min(striplist) | |
93 |
|
93 | |||
|
94 | files = _collectfiles(repo, striprev) | |||
|
95 | saverevs = _collectbrokencsets(repo, files, striprev) | |||
|
96 | ||||
94 | # Some revisions with rev > striprev may not be descendants of striprev. |
|
97 | # Some revisions with rev > striprev may not be descendants of striprev. | |
95 | # We have to find these revisions and put them in a bundle, so that |
|
98 | # We have to find these revisions and put them in a bundle, so that | |
96 | # we can restore them after the truncations. |
|
99 | # we can restore them after the truncations. | |
@@ -99,16 +102,11 b' def strip(ui, repo, nodelist, backup=Tru' | |||||
99 | # (head = revision in the set that has no descendant in the set; |
|
102 | # (head = revision in the set that has no descendant in the set; | |
100 | # base = revision in the set that has no ancestor in the set) |
|
103 | # base = revision in the set that has no ancestor in the set) | |
101 | tostrip = set(striplist) |
|
104 | tostrip = set(striplist) | |
|
105 | saveheads = set(saverevs) | |||
102 | for r in cl.revs(start=striprev + 1): |
|
106 | for r in cl.revs(start=striprev + 1): | |
103 | if any(p in tostrip for p in cl.parentrevs(r)): |
|
107 | if any(p in tostrip for p in cl.parentrevs(r)): | |
104 | tostrip.add(r) |
|
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 | if r not in tostrip: |
|
110 | if r not in tostrip: | |
113 | saverevs.add(r) |
|
111 | saverevs.add(r) | |
114 | saveheads.difference_update(cl.parentrevs(r)) |
|
112 | saveheads.difference_update(cl.parentrevs(r)) |
General Comments 0
You need to be logged in to leave comments.
Login now