Show More
@@ -185,21 +185,19 b' def rebase(ui, repo, **opts):' | |||
|
185 | 185 | dest = repo[destf] |
|
186 | 186 | |
|
187 | 187 | if revf: |
|
188 |
re |
|
|
188 | rebaseset = repo.revs('%lr', revf) | |
|
189 | 189 | elif srcf: |
|
190 |
re |
|
|
190 | rebaseset = repo.revs('(%r)::', srcf) | |
|
191 | 191 | else: |
|
192 | 192 | base = basef or '.' |
|
193 |
re |
|
|
194 |
|
|
|
195 | ||
|
196 | rebaseset = [c.rev() for c in revgen] | |
|
193 | rebaseset = repo.revs('(children(ancestor(%r, %d)) & ::%r)::', | |
|
194 | base, dest, base) | |
|
197 | 195 | |
|
198 | 196 | if not rebaseset: |
|
199 | 197 | repo.ui.debug('base is ancestor of destination') |
|
200 | 198 | result = None |
|
201 |
elif not keepf and list(repo.s |
|
|
202 | rebaseset, rebaseset)): | |
|
199 | elif not keepf and list(repo.revs('first(children(%ld) - %ld)', | |
|
200 | rebaseset, rebaseset)): | |
|
203 | 201 | raise util.Abort( |
|
204 | 202 | _("can't remove original changesets with" |
|
205 | 203 | " unrebased descendants"), |
@@ -582,8 +580,7 b' def buildstate(repo, dest, rebaseset, de' | |||
|
582 | 580 | # rebase on ancestor, force detach |
|
583 | 581 | detach = True |
|
584 | 582 | if detach: |
|
585 |
detachset = |
|
|
586 | root, commonbase, root)] | |
|
583 | detachset = repo.revs('::%d - ::%d - %d', root, commonbase, root) | |
|
587 | 584 | |
|
588 | 585 | repo.ui.debug('rebase onto %d starting from %d\n' % (dest, root)) |
|
589 | 586 | state = dict.fromkeys(rebaseset, nullrev) |
@@ -2534,16 +2534,16 b' def graft(ui, repo, *revs, **opts):' | |||
|
2534 | 2534 | revs = scmutil.revrange(repo, revs) |
|
2535 | 2535 | |
|
2536 | 2536 | # check for merges |
|
2537 |
for |
|
|
2538 |
ui.warn(_('skipping ungraftable merge revision %s\n') % |
|
|
2539 |
revs.remove( |
|
|
2537 | for rev in repo.revs('%ld and merge()', revs): | |
|
2538 | ui.warn(_('skipping ungraftable merge revision %s\n') % rev) | |
|
2539 | revs.remove(rev) | |
|
2540 | 2540 | if not revs: |
|
2541 | 2541 | return -1 |
|
2542 | 2542 | |
|
2543 | 2543 | # check for ancestors of dest branch |
|
2544 |
for |
|
|
2545 |
ui.warn(_('skipping ancestor revision %s\n') % |
|
|
2546 |
revs.remove( |
|
|
2544 | for rev in repo.revs('::. and %ld', revs): | |
|
2545 | ui.warn(_('skipping ancestor revision %s\n') % rev) | |
|
2546 | revs.remove(rev) | |
|
2547 | 2547 | if not revs: |
|
2548 | 2548 | return -1 |
|
2549 | 2549 |
@@ -179,7 +179,7 b' def get(repo, status):' | |||
|
179 | 179 | # that's because the bisection can go either way |
|
180 | 180 | range = '( bisect(bad)::bisect(good) | bisect(good)::bisect(bad) )' |
|
181 | 181 | |
|
182 |
_t = |
|
|
182 | _t = repo.revs('bisect(good)::bisect(bad)') | |
|
183 | 183 | # The sets of topologically good or bad csets |
|
184 | 184 | if len(_t) == 0: |
|
185 | 185 | # Goods are topologically after bads |
@@ -206,18 +206,17 b' def get(repo, status):' | |||
|
206 | 206 | ignored = '( ( (%s) | (%s) ) - (%s) )' % (iba, iga, range) |
|
207 | 207 | |
|
208 | 208 | if status == 'range': |
|
209 |
return |
|
|
209 | return repo.revs(range) | |
|
210 | 210 | elif status == 'pruned': |
|
211 |
return |
|
|
211 | return repo.revs(pruned) | |
|
212 | 212 | elif status == 'untested': |
|
213 |
return |
|
|
213 | return repo.revs(untested) | |
|
214 | 214 | elif status == 'ignored': |
|
215 |
return |
|
|
215 | return repo.revs(ignored) | |
|
216 | 216 | elif status == "goods": |
|
217 |
return |
|
|
217 | return repo.revs(goods) | |
|
218 | 218 | elif status == "bads": |
|
219 |
return |
|
|
220 | ||
|
219 | return repo.revs(bads) | |
|
221 | 220 | else: |
|
222 | 221 | raise error.ParseError(_('invalid bisect state')) |
|
223 | 222 |
General Comments 0
You need to be logged in to leave comments.
Login now