##// END OF EJS Templates
rebase: fix rebase with no common ancestors (issue4446)...
Durham Goode -
r23246:643c5830 3.2.1 stable
parent child Browse files
Show More
@@ -274,8 +274,12 b' def rebase(ui, repo, **opts):'
274 "can't compute rebase set\n"))
274 "can't compute rebase set\n"))
275 return 1
275 return 1
276 commonanc = repo.revs('ancestor(%ld, %d)', base, dest).first()
276 commonanc = repo.revs('ancestor(%ld, %d)', base, dest).first()
277 rebaseset = repo.revs('(%d::(%ld) - %d)::',
277 if commonanc is not None:
278 commonanc, base, commonanc)
278 rebaseset = repo.revs('(%d::(%ld) - %d)::',
279 commonanc, base, commonanc)
280 else:
281 rebaseset = []
282
279 if not rebaseset:
283 if not rebaseset:
280 # transform to list because smartsets are not comparable to
284 # transform to list because smartsets are not comparable to
281 # lists. This should be improved to honor lazyness of
285 # lists. This should be improved to honor lazyness of
@@ -468,3 +468,17 b' Test --tool parameter:'
468 [255]
468 [255]
469
469
470 $ cd ..
470 $ cd ..
471
472 No common ancestor
473
474 $ hg init separaterepo
475 $ cd separaterepo
476 $ touch a
477 $ hg commit -Aqm a
478 $ hg up -q null
479 $ touch b
480 $ hg commit -Aqm b
481 $ hg rebase -d 0
482 nothing to rebase from d7486e00c6f1 to 3903775176ed
483 [1]
484 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now