view tests/test-rebase-abort @ 10128:ea7c392f2b08

patch: drop eol normalization fast-path for 'lf' and 'crlf' With eolmode set to 'lf' or 'crlf' we avoided the hunk duplication and normalization by reading the input patch in text mode. Dropping this optimization simplifies code expectations for a small overhead. The change in test-mq-eol comes from a tolerance to CRLF instead of LF for last lines without newlines being broken by this revision. This tolerance was only partially supported and will be added again in a better way.
author Patrick Mezard <pmezard@gmail.com>
date Wed, 23 Dec 2009 19:31:48 +0100
parents 8766fee6f225
children b345b1cc124f
line wrap: on
line source

#!/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' -m "C1"

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

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

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

sed -e 's/c2/l2/' common > common.new
mv common.new common
hg commit -d '4 0' -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'