[issue902] Nasty behavior with rollback, merge and named branches

Alexandre Vassalotti mercurial-bugs at selenic.com
Sat Dec 29 21:14:39 CST 2007


New submission from Alexandre Vassalotti <alexandre at peadrop.com>:

I don't know if this will be considered as bug, but I found this behavior quite
nasty. Although, I have to admit that the problem is due to a mistake from my
part. Here's a reproduction of what I did: 

mkdir -p test/upstream
cd test/upstream
hg init
echo foo > file-A
hg add file-A
hg commit -m "initial commit"

cd ..
hg clone upstream dev
hg branch testing
echo bar >> file-A
hg commit -m "feature test"

hg up default
echo foo > file-B
hg add file-B
hg commit -m "dev work"

hg branch experimental
echo bar >> file-B
hg commit -m "experimental work"

cd ../upstream
echo baz >> file-A
hg commit -m "upstream work"

hg up default
hg pull
hg merge tip
hg commit -m "merge upstream"

hg up -C experimental
hg merge testing
hg rollback            # oops

This rollback the last commit, but leave the upstream changes intact. It is now
impossible to merge the "upstream changes" back into 'default':

hg update -C default   # ouch

Updating to 'default' using -C will delete the "upstream" merge information, but
not undo the actual changes to the files.

----------
messages: 4740
nosy: alexandre.vassalotti
priority: bug
status: unread
title: Nasty behavior with rollback, merge and named branches

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue902>
____________________________________________________



More information about the Mercurial-devel mailing list