equal
deleted
inserted
replaced
128 |
128 |
129 def _revstostrip(changelog, node): |
129 def _revstostrip(changelog, node): |
130 srev = changelog.rev(node) |
130 srev = changelog.rev(node) |
131 tostrip = [srev] |
131 tostrip = [srev] |
132 saveheads = [] |
132 saveheads = [] |
133 for r in xrange(srev, changelog.rev(changelog.tip()) + 1): |
133 for r in xrange(srev, len(changelog)): |
134 parents = changelog.parentrevs(r) |
134 parents = changelog.parentrevs(r) |
135 if parents[0] in tostrip or parents[1] in tostrip: |
135 if parents[0] in tostrip or parents[1] in tostrip: |
136 tostrip.append(r) |
136 tostrip.append(r) |
137 if parents[1] != nullrev: |
137 if parents[1] != nullrev: |
138 for p in parents: |
138 for p in parents: |
139 if p not in tostrip and p > striprev: |
139 if p not in tostrip and p > srev: |
140 saveheads.append(p) |
140 saveheads.append(p) |
141 return [r for r in tostrip if r not in saveheads] |
141 return [r for r in tostrip if r not in saveheads] |
142 |
142 |
143 def strip(ui, repo, node, backup="all"): |
143 def strip(ui, repo, node, backup="all"): |
144 """Strip bookmarks if revisions are stripped using |
144 """Strip bookmarks if revisions are stripped using |