#!/bin/sh
# In the merge below, the file "foo" has the same contents in both
# parents, but if we look at the file-level history, we'll notice that
# the version in p1 is an ancestor of the version in p2. This test
# makes sure that we'll use the version from p2 in the manifest of the
# merge revision.
hg init repo
cd repo
echo foo > foo
hg ci -qAm 'add foo'
echo bar >> foo
hg ci -m 'change foo'
hg backout -r tip -m 'backout changed foo'
hg up -C 0
touch bar
hg ci -qAm 'add bar'
hg merge --debug
hg debugstate | grep foo
hg st -A foo
hg ci -m 'merge'
hg manifest --debug | grep foo
hg debugindex .hg/store/data/foo.i