annotate tests/test-merge-internal-tools-pattern @ 9293:e48a48b754d3

minirst: parse field lists
author Martin Geisler <mg@lazybytes.net>
date Sun, 02 Aug 2009 23:38:07 +0200
parents a3668330f14a
children 4c94b6d0fb1c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6521
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
1 #!/bin/sh
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
2
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
3 # make sure that the internal merge tools (internal:fail, internal:local, and
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
4 # internal:other) are used when matched by a merge-pattern in hgrc
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
5
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
6 unset HGMERGE # make sure HGMERGE doesn't interfere with the test
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
7
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
8 hg init
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
9
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
10 echo "# initial file contents"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
11 echo "line 1" > f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
12 echo "line 2" >> f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
13 echo "line 3" >> f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
14 hg commit -Am "revision 0" -d "1000000 0"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
15 cat f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
16 echo "# branch 1: editing line 1"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
17 sed 's/line 1/first line/' f > f.new
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
18 mv f.new f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
19 hg commit -Am "edited first line" -d "1000000 0"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
20
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
21 echo "# branch 2: editing line 3"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
22 hg update 0
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
23 sed 's/line 3/third line/' f > f.new
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
24 mv f.new f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
25 hg commit -Am "edited third line" -d "1000000 0"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
26
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
27 echo "# merge using internal:fail tool"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
28 echo "[merge-patterns]" > .hg/hgrc
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
29 echo "* = internal:fail" >> .hg/hgrc
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
30 hg merge
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
31 cat f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
32 hg stat
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
33
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
34 echo "# merge using internal:local tool"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
35 hg update -C 2
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
36 sed 's/internal:fail/internal:local/' .hg/hgrc > .hg/hgrc.new
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
37 mv .hg/hgrc.new .hg/hgrc
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
38 hg merge
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
39 cat f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
40 hg stat
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
41
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
42 echo "# merge using internal:other tool"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
43 hg update -C 2
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
44 sed 's/internal:local/internal:other/' .hg/hgrc > .hg/hgrc.new
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
45 mv .hg/hgrc.new .hg/hgrc
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
46 hg merge
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
47 cat f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
48 hg stat
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
49
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
50 echo "# merge using default tool"
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
51 hg update -C 2
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
52 rm .hg/hgrc
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
53 hg merge
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
54 cat f
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
55 hg stat
a3668330f14a test that internal merge tools are used when set for a merge-pattern in hgrc
Dov Feldstern <dfeldstern@fastimap.com>
parents:
diff changeset
56