view tests/test-merge2 @ 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 9dcf9d45cab8
children
line wrap: on
line source

#!/bin/sh

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg update 0
echo This is file b2 > b
hg add b
hg commit -m "commit #2" -d "1000000 0"
cd ..; rm -r t

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg update 0
echo This is file b2 > b
hg commit -A -m "commit #2" -d "1000000 0"
cd ..; rm -r t

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg remove b
hg update 0
echo This is file b2 > b
hg commit -A -m "commit #2" -d "1000000 0"