Should nothing-to-rebase still move active bookmarks?

Siddharth Agarwal sid0 at fb.com
Wed Mar 13 12:40:52 CDT 2013


Consider the following repo, where A and B are bookmarks:

   o--o--o(B)
    \
     -o (A)

At this point, doing

$ hg update A
$ hg rebase -d B

will move A's commit onto B, or in other words A ahead of B.

   o--o--o--o (A)
        (B)

However, when A is an ancestor of B:

   --o--o--o (B)
    (A)

the above commands will do nothing.

Compare to git, where even if A is an ancestor of B, if A is active 
rebasing it onto B will move A and B to the same commit.

One of our engineers hit this while trying to do "make A depend on B". 
Depending on whether A is an ancestor of B or not, the engineer has to 
either rebase or do something like `hg bookmark -f -r B A`.

I think git's behaviour makes a lot of sense here. Is it possible to 
reconcile that with hg's principles?


More information about the Mercurial-devel mailing list