view tests/test-diff-unified @ 6521:a3668330f14a

test that internal merge tools are used when set for a merge-pattern in hgrc It is possible to specify that one of the internal merge tools (internal:fail, internal:local or internal:other) should be used for performing merges on files matching a given pattern. This test makes sure that such a setting actually works.
author Dov Feldstern <dfeldstern@fastimap.com>
date Fri, 04 Apr 2008 02:20:58 +0300
parents 65029a3aafc2
children 07faba78cf5a
line wrap: on
line source

#!/bin/sh

hg init repo
cd repo
cat > a <<EOF
c
c
a
a
b
a
a
c
c
EOF
hg ci -Am adda
cat > a <<EOF
c
c
a
a
dd
a
a
c
c
EOF

echo '% default context'
hg diff --nodates

echo '% invalid --unified'
hg diff --nodates -U foo

echo '% --unified=2'
hg diff --nodates -U 2

echo '% diff.unified=2'
hg --config diff.unified=2 diff --nodates

echo '% diff.unified=2 --unified=1'
hg diff --nodates -U 1

echo '% invalid diff.unified'
hg --config diff.unified=foo diff --nodates

exit 0