[Bug 3716] New: Rebase with --collapse and --keep gives wrong bookmark locations

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Sat Dec 1 01:33:02 UTC 2012


http://bz.selenic.com/show_bug.cgi?id=3716

          Priority: normal
            Bug ID: 3716
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Rebase with --collapse and --keep gives wrong bookmark
                    locations
          Severity: bug
    Classification: Unclassified
                OS: Mac OS
          Reporter: durham at fb.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.4
         Component: Mercurial
           Product: Mercurial

Given a feature bookmark forked off of a master bookmark, running 'hg rebase
--collapse --keep -d master -b mybook -m msg', results in both bookmarks
pointing to an incorrect commit.  Run the script below to repo.

Expected: 'mybook' points at the same commit as before, 'master' points at the
new collapsed commit. 
Actual: both 'mybook' and 'master' point to the old master bookmark commit.


#/bin/sh

rm -rf rebasetest
hg init rebasetest
cd rebasetest
touch a && hg commit -Ama
hg bookmark master
hg bookmark mybook
touch x && hg commit -Amx
touch y && hg commit -Amy

echo Before:
hg log --graph
# Before:
# @  changeset:   2:8cba851a1ce1
# |  bookmark:    mybook
# |  tag:         tip
# |  user:        Durham Goode <durham# @fb.com>
# |  date:        Fri Nov 30 17:09:16 2012 -0800
# |  summary:     y
# |
# o  changeset:   1:84704564f41c
# |  user:        Durham Goode <durham at fb.com>
# |  date:        Fri Nov 30 17:09:16 2012 -0800
# |  summary:     x
# |
# o  changeset:   0:1d53d7177f7b
#    bookmark:    master
#    user:        Durham Goode <durham at fb.com>
#    date:        Fri Nov 30 17:09:15 2012 -0800
#    summary:     a

hg rebase --collapse --keep -d master -b mybook -mrebase

echo After:
hg log --graph
# expected:  master = 4, mybook = 3
# actual: master = 1, mybook = 1
#
# @  changeset:   3:a6bda628c3ef
# |  tag:         tip
# |  parent:      0:1d53d7177f7b
# |  user:        Durham Goode <durham at fb.com>
# |  date:        Fri Nov 30 17:09:16 2012 -0800
# |  summary:     rebase
# |
# | o  changeset:   2:8cba851a1ce1
# | |  user:        Durham Goode <durham at fb.com>
# | |  date:        Fri Nov 30 17:09:16 2012 -0800
# | |  summary:     y
# | |
# | o  changeset:   1:84704564f41c
# |/   user:        Durham Goode <durham at fb.com>
# |    date:        Fri Nov 30 17:09:16 2012 -0800
# |    summary:     x
# |
# o  changeset:   0:1d53d7177f7b
#    bookmark:    master
#    bookmark:    mybook
#    user:        Durham Goode <durham at fb.com>
#    date:        Fri Nov 30 17:09:15 2012 -0800
#    summary:     a

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list