I have two repositories of the same project that are unrelated: One repo's history stops at a certain date, and the other repo starts with the project source at the state it was in when the first repo stopped. (Why I didn't use clone is a topic of discussion with my past self) Both repos only have the default branch. Running `hg pull -f --rebase` encounters an exception when doing the rebase. The output from the command is below. pulling from ..\sukiyaki-sf searching for changes warning: repository is unrelated requesting all changes adding changesets adding manifests adding file changes added 4 changesets with 13 changes to 22 files (+1 heads) ** unknown exception encountered, please report by visiting ** http://mercurial.selenic.com/wiki/BugTracker ** Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] ** Mercurial Distributed SCM (version 3.2) ** Extensions loaded: convert, rebase Traceback (most recent call last): File "hg", line 43, in <module> File "mercurial\dispatch.pyc", line 28, in run File "mercurial\dispatch.pyc", line 71, in dispatch File "mercurial\dispatch.pyc", line 140, in _runcatch File "mercurial\dispatch.pyc", line 850, in _dispatch File "mercurial\dispatch.pyc", line 611, in runcommand File "mercurial\dispatch.pyc", line 941, in _runcommand File "mercurial\dispatch.pyc", line 912, in checkargs File "mercurial\dispatch.pyc", line 847, in <lambda> File "mercurial\util.pyc", line 677, in check File "mercurial\extensions.pyc", line 151, in wrap File "mercurial\util.pyc", line 677, in check File "hgext\rebase.pyc", line 984, in pullrebase File "hgext\rebase.pyc", line 278, in rebase File "mercurial\localrepo.pyc", line 469, in revs File "mercurial\revset.pyc", line 2156, in formatspec File "mercurial\revset.pyc", line 2116, in argtype TypeError: int() argument must be a string or a number, not 'NoneType'
After further reading, it seems plausible this could be failing because the phase of the changes being pulled is 'public'.
This is failing because the destination and the "base" from which the rebased-set is computed do not have a common ancestors. The new code is not handling this case properly. This is likely a regression from a 3.1, upgrading to urgent. cc-ing durham (who wrote the new code) and Jordi (who claim to repro)
Fix it out for review.
Anthony, the bug has been addressed, but even with that fix, I don't think you'll get the result that you want. Instead, you'll have to do `hg pull -f` and then do `hg rebase --source $some_root --dest $some_head`. Depending which repo you're force pulling into which one, $some_root should probably 0 and $some_head should be tip. Look at `hg log -r "roots(all())"` and `hg heads` to help you decide what to rebase onto what.
Thanks, Jordi! I'll try that instead. Glad I could help by filing the bug. Do you need me to repro/test the fix at all?
Fixed by http://selenic.com/repo/hg/rev/643c58303fb0 Durham Goode <durham@fb.com> rebase: fix rebase with no common ancestors (issue4446) The new rebase revset didn't check for the case when there are no common ancestors. Now it does. The new behavior should be the same as the pre-3.2 behavior. Added a test. (please test the fix)
Bulk testing -> fixed