##// END OF EJS Templates
tests: unify test-dispatch
tests: unify test-dispatch

File last commit:

r12156:4c94b6d0 default
r12157:88250a46 default
Show More
test-merge-internal-tools-pattern
56 lines | 1.1 KiB | text/plain | TextLexer
/ tests / test-merge-internal-tools-pattern
Dov Feldstern
test that internal merge tools are used when set for a merge-pattern in hgrc...
r6521 #!/bin/sh
# make sure that the internal merge tools (internal:fail, internal:local, and
# internal:other) are used when matched by a merge-pattern in hgrc
unset HGMERGE # make sure HGMERGE doesn't interfere with the test
hg init
echo "# initial file contents"
echo "line 1" > f
echo "line 2" >> f
echo "line 3" >> f
Martin Geisler
tests: remove unneeded -d flags...
r12156 hg commit -Am "revision 0"
Dov Feldstern
test that internal merge tools are used when set for a merge-pattern in hgrc...
r6521 cat f
echo "# branch 1: editing line 1"
sed 's/line 1/first line/' f > f.new
mv f.new f
Martin Geisler
tests: remove unneeded -d flags...
r12156 hg commit -Am "edited first line"
Dov Feldstern
test that internal merge tools are used when set for a merge-pattern in hgrc...
r6521
echo "# branch 2: editing line 3"
hg update 0
sed 's/line 3/third line/' f > f.new
mv f.new f
Martin Geisler
tests: remove unneeded -d flags...
r12156 hg commit -Am "edited third line"
Dov Feldstern
test that internal merge tools are used when set for a merge-pattern in hgrc...
r6521
echo "# merge using internal:fail tool"
echo "[merge-patterns]" > .hg/hgrc
echo "* = internal:fail" >> .hg/hgrc
hg merge
cat f
hg stat
echo "# merge using internal:local tool"
hg update -C 2
sed 's/internal:fail/internal:local/' .hg/hgrc > .hg/hgrc.new
mv .hg/hgrc.new .hg/hgrc
hg merge
cat f
hg stat
echo "# merge using internal:other tool"
hg update -C 2
sed 's/internal:local/internal:other/' .hg/hgrc > .hg/hgrc.new
mv .hg/hgrc.new .hg/hgrc
hg merge
cat f
hg stat
echo "# merge using default tool"
hg update -C 2
rm .hg/hgrc
hg merge
cat f
hg stat