Bug 2873 - Bookmarks moved to tip instead of corresponding changesets when rebased
Summary: Bookmarks moved to tip instead of corresponding changesets when rebased
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Stefano Tortarolo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-29 15:59 UTC by Paulo Madeira
Modified: 2011-07-19 06:32 UTC (History)
6 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Madeira 2011-06-29 15:59 UTC
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.
Comment 1 Matt Mackall 2011-07-06 18:43 UTC
Adding some folks to the nosy list.
Comment 2 Bernhard Leiner 2011-07-09 09:01 UTC
I'm pretty sure that this is the same problem as in issue2265
Comment 3 Stefano Tortarolo 2011-07-14 16:16 UTC
Yes, I can confirm that it's the same problem.
Btw, I've just sent a patch in ML.
Comment 4 HG Bot 2011-07-15 14:00 UTC
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)
Comment 5 Paulo Madeira 2011-07-19 06:32 UTC
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.
Comment 6 Bugzilla 2012-05-12 09:21 UTC

--- 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