tests/test-merge-closedheads
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sun, 28 Jun 2009 22:24:33 +0900
changeset 8972 5edd998e8d55
parent 8694 ca8d05e1f1d1
child 11516 ee876e42dd74
permissions -rwxr-xr-x
i18n-jp: translation update for 288ba6d6c5c7 this revision consists of contribution by: Muraoka Yusuke<yusuke.muraoka@gmail.com> Tadashi Jokagi <elf@elf.no-ip.org> UENISHI Kota <kuenishi@gmail.com> Yuki KODAMA <endflow.net@gmail.com> FUJIWARA Katsunori <foozy@lares.dti.ne.jp>

#!/bin/sh

hgcommit() {
    hg commit -u user -d '0 0' "$@"
}

hg init clhead
cd clhead


touch foo && hg add && hgcommit -m 'foo'
touch bar && hg add && hgcommit -m 'bar'
touch baz && hg add && hgcommit -m 'baz'

echo "flub" > foo
hgcommit -m "flub"
echo "nub" > foo
hgcommit -m "nub"

hg up -C 2

echo "c1" > c1
hg add c1
hgcommit -m "c1"
echo "c2" > c1
hgcommit -m "c2"

hg up -C 2

echo "d1" > d1
hg add d1
hgcommit -m "d1"
echo "d2" > d1
hgcommit -m "d2"
hg tag -l good

echo '% fail with three heads'
hg up -C good
hg merge

echo '% close one of the heads'
hg up -C 6
hgcommit -m 'close this head' --close-branch

echo '% succeed with two open heads'
hg up -C good
hg up -C good
hg merge
hgcommit -m 'merged heads'