[issue2043] merge --preview hides changes on different branch

Greg Ward bugs at mercurial.selenic.com
Mon Feb 15 17:59:47 UTC 2010


New submission from Greg Ward <greg-hg at gerg.ca>:

Imagine this situation:
  * create branch 1.0 off default
  * fix a bug on 1.0
  * do some more work on default
  * create branch 1.1 off default
  * fix a bug on 1.1
  * merge 1.0 to 1.1

If you now want to merge 1.1 to default, 'merge --preview' only shows
changesets that happened on branch 1.1, even though you're also merging
changesets from branch 1.0.

Example:

hg init test
cd test
echo hello > hello
hg commit -A -ualice -m'new project'
hg branch 1.0
touch fix.100
hg commit -A  -ualice -m'fix bug 100'

hg update default
echo "big change" >> hello 
hg commit -ubob -m'big change on trunk'
hg branch 1.1
touch fix.101
hg commit -A -u alice -m'fix bug 101'

# this behaves as expected
hg merge --preview 1.0
hg merge 1.0
hg commit -ualice -m"merge fixes on 1.0 to 1.1"

hg update default

# this hides changes on 1.0, only showing changesets on 1.1
hg merge --preview 1.1

In this case, I need to know that I am merging fixes for bug 100 and 101 to
default.  But 'merge --preview' hides the fix that happened on branch 1.0,
explicitly showing only the fix for bug 101 from branch 1.1.

----------
messages: 11729
nosy: gward
priority: bug
status: unread
title: merge --preview hides changes on different branch

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


More information about the Mercurial-devel mailing list