view tests/test-imerge @ 5044:58006f8b8275

imerge extension and test
author Brendan Cully <brendan@kublai.com>
date Wed, 01 Aug 2007 11:37:11 -0700
parents
children 86327d13d916
line wrap: on
line source

#!/bin/sh

echo "[extensions]" >> $HGRCPATH
echo "imerge=" >> $HGRCPATH
HGMERGE=true
export HGMERGE

hg init base
cd base

echo foo > foo
echo bar > bar
hg ci -Am0 -d '0 0'

echo foo >> foo
hg ci -m1 -d '1 0'

hg up -C 0
echo bar >> foo
echo bar >> bar
hg ci -m2 -d '2 0'

echo % start imerge
hg imerge

cat foo
cat bar

echo % status
hg imerge st

echo % merge next
hg imerge

echo % unresolve
hg imerge unres foo

echo % merge foo
hg imerge merge foo

echo % save
echo foo > foo
hg imerge save ../savedmerge

echo % load
hg up -C 0
hg imerge --traceback load ../savedmerge
cat foo

hg ci -m'merged' -d '3 0'
hg tip -v

echo % nothing to merge
hg imerge

exit 0