tests/test-rebase-abort
author Martin Geisler <mg@daimi.au.dk>
Thu, 15 Jan 2009 00:14:36 +0100
changeset 7651 5b5036ef847a
parent 6910 93609576244e
child 8168 8766fee6f225
permissions -rwxr-xr-x
i18n: encode output in user's local encoding This makes the translated output obey the HGENCODING environment variable or the preferred encoding as set by the LANG or LC_ALL environment variables. Python 2.4 has a lgettext method which is similar, except that it doesn't know about HGENCODING or the settings in .hgrc.

#!/bin/sh

echo "[extensions]" >> $HGRCPATH
echo "graphlog=" >> $HGRCPATH
echo "rebase=" >> $HGRCPATH

cleanoutput () {
    sed -e 's/\(Rebase status stored to\).*/\1/'  \
        -e 's/\(Rebase status restored from\).*/\1/' \
        -e 's/\(saving bundle to \).*/\1/'
}

hg init a
cd a
echo 'c1' >common
hg add common
hg commit -d '0 0' -u test -m "C1"

echo 'c2' >>common
hg commit -d '1 0' -u test -m "C2"

echo 'c3' >>common
hg commit -d '2 0' -u test -m "C3"

hg update -C 1
echo 'l1' >>extra
hg add extra
hg commit -d '3 0' -u test -m "L1"

sed -e 's/c2/l2/' common > common.new
mv common.new common
hg commit -d '4 0' -u test -m "L2"

hg glog  --template '{rev}: {desc}\n'

echo
echo '% Conflicting rebase'
hg rebase -s 3 -d 2 2>&1 | cleanoutput

echo
echo '% Abort'
hg rebase --abort 2>&1 | cleanoutput

hg glog  --template '{rev}: {desc}\n'