Windows 7 x64, hg 1.8.4: > mkdir repo > cd repo > hg init > echo text > text.txt > hg add text.txt > hg commit -m init > echo 1 >> text.txt > hg commit -m cs1 > echo 2 >> text.txt > hg commit -m cs2 > hg bookmark -r 1 bm1 > hg bookmark -r 2 bm2 > hg update -r 0 1 files updated, 0 files merged, 0 files removed, 0 files unresolved > echo a > text.txt > echo text >> text.txt > hg commit -m csa created new head > echo b > text.txt > echo a >> text.txt > echo text >> text.txt > hg commit -m csb > hg glog @ changeset: 4:cb577b24b11e | tag: tip | user: Me | date: Wed Jun 29 22:52:28 2011 +0100 | summary: csb | o changeset: 3:b61bf3ff8f9b | parent: 0:7435046a8813 | user: Me | date: Wed Jun 29 22:52:09 2011 +0100 | summary: csa | | o changeset: 2:58a69beda595 | | bookmark: bm2 | | user: Me | | date: Wed Jun 29 22:51:35 2011 +0100 | | summary: cs2 | | | o changeset: 1:1c394de767be |/ bookmark: bm1 | user: Me | date: Wed Jun 29 22:51:26 2011 +0100 | summary: cs1 | o changeset: 0:7435046a8813 user: Me date: Wed Jun 29 22:51:17 2011 +0100 summary: init > hg rebase -s 1 merging text.txt merging text.txt saved backup bundle to C:\temp\repo\.hg\strip-backup\1c394de767be-backup.hg > hg glog @ changeset: 4:a97d1f1d83c3 | bookmark: bm1 | bookmark: bm2 | tag: tip | user: Me | date: Wed Jun 29 22:51:35 2011 +0100 | summary: cs2 | o changeset: 3:c92ef6c06a93 | user: Me | date: Wed Jun 29 22:51:26 2011 +0100 | summary: cs1 | o changeset: 2:cb577b24b11e | user: Me | date: Wed Jun 29 22:52:28 2011 +0100 | summary: csb | o changeset: 1:b61bf3ff8f9b | user: Me | date: Wed Jun 29 22:52:09 2011 +0100 | summary: csa | o changeset: 0:7435046a8813 user: Me date: Wed Jun 29 22:51:17 2011 +0100 summary: init I was expecting bm1 to point to changeset 3.
Adding some folks to the nosy list.
I'm pretty sure that this is the same problem as in issue2265
Yes, I can confirm that it's the same problem. Btw, I've just sent a patch in ML.
Fixed by http://selenic.com/repo/hg/rev/c0ccd70df52c Stefano Tortarolo <stefano.tortarolo@gmail.com> rebase: reset bookmarks (issue2265 and issue2873) (please test the fix)
I tested the current rebase.py. The bookmarks were moved to the proper place. I tested with the example I posted as well as with a real repository with two bookmarks pointing to rebased changesets.
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:21 EDT --- This bug was previously known as _bug_ 2873 at http://mercurial.selenic.com/bts/issue2873