##// END OF EJS Templates
change tests to use simplemerge by default
Alexis S. L. Carvalho -
r4365:46280c00 default
parent child Browse files
Show More
@@ -19,7 +19,7 b' import sys'
19 import tempfile
19 import tempfile
20 import time
20 import time
21
21
22 required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed", "merge"]
22 required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"]
23
23
24 parser = optparse.OptionParser("%prog [options] [tests]")
24 parser = optparse.OptionParser("%prog [options] [tests]")
25 parser.add_option("-v", "--verbose", action="store_true",
25 parser.add_option("-v", "--verbose", action="store_true",
@@ -340,17 +340,18 b' check_required_tools()'
340 os.environ['LANG'] = os.environ['LC_ALL'] = 'C'
340 os.environ['LANG'] = os.environ['LC_ALL'] = 'C'
341 os.environ['TZ'] = 'GMT'
341 os.environ['TZ'] = 'GMT'
342
342
343 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"'
344 os.environ["HGMERGE"] = sys.executable + ' -c "import sys; sys.exit(0)"'
345 os.environ["HGUSER"] = "test"
346 os.environ["HGENCODING"] = "ascii"
347 os.environ["HGENCODINGMODE"] = "strict"
348
349 TESTDIR = os.environ["TESTDIR"] = os.getcwd()
343 TESTDIR = os.environ["TESTDIR"] = os.getcwd()
350 HGTMP = os.environ["HGTMP"] = tempfile.mkdtemp("", "hgtests.")
344 HGTMP = os.environ["HGTMP"] = tempfile.mkdtemp("", "hgtests.")
351 DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids')
345 DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids')
352 HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc')
346 HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc')
353
347
348 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"'
349 os.environ["HGMERGE"] = 'python "%s"' % os.path.join(TESTDIR, os.path.pardir,
350 'contrib', 'simplemerge')
351 os.environ["HGUSER"] = "test"
352 os.environ["HGENCODING"] = "ascii"
353 os.environ["HGENCODINGMODE"] = "strict"
354
354 vlog("# Using TESTDIR", TESTDIR)
355 vlog("# Using TESTDIR", TESTDIR)
355 vlog("# Using HGTMP", HGTMP)
356 vlog("# Using HGTMP", HGTMP)
356
357
@@ -1,5 +1,7 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 HGMERGE=true; export HGMERGE
4
3 echo % init
5 echo % init
4 hg init
6 hg init
5
7
@@ -1,5 +1,7 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 HGMERGE=true; export HGMERGE
4
3 echo '# basic operation'
5 echo '# basic operation'
4 hg init basic
6 hg init basic
5 cd basic
7 cd basic
@@ -9,7 +9,6 b' hg commit -m branch1 -d "1000000 0"'
9 hg co 0
9 hg co 0
10 echo "something else" > a
10 echo "something else" > a
11 hg commit -m branch2 -d "1000000 0"
11 hg commit -m branch2 -d "1000000 0"
12 HGMERGE=merge; export HGMERGE
13 hg merge 1
12 hg merge 1
14 hg id
13 hg id
15 egrep -v ">>>|<<<" a
14 egrep -v ">>>|<<<" a
@@ -1,5 +1,5 b''
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 merge: warning: conflicts during merge
2 warning: conflicts during merge.
3 merging a
3 merging a
4 merging a failed!
4 merging a failed!
5 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
5 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
@@ -17,7 +17,7 b' cd ..'
17 hg clone a c
17 hg clone a c
18 cd c
18 cd c
19 hg pull -f ../b
19 hg pull -f ../b
20 HGMERGE=merge hg merge
20 hg merge
21
21
22 cd ..
22 cd ..
23
23
@@ -1,3 +1,3 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 HGMERGE=merge hg debuginstall
3 hg debuginstall
@@ -1,9 +1,6 b''
1 #!/bin/sh
1 #!/bin/sh
2 # check that renames are correctly saved by a commit after a merge
2 # check that renames are correctly saved by a commit after a merge
3
3
4 HGMERGE=merge
5 export HGMERGE
6
7 # test with the merge on 3 having the rename on the local parent
4 # test with the merge on 3 having the rename on the local parent
8 hg init a
5 hg init a
9 cd a
6 cd a
@@ -38,13 +38,13 b' hg diff --nodates | grep "^[+-][^<>]"'
38 hg st
38 hg st
39
39
40 echo "# local merge with conflicts"
40 echo "# local merge with conflicts"
41 HGMERGE=merge hg co
41 hg co
42 hg co 0
42 hg co 0
43 hg diff --nodates | grep "^[+-][^<>]"
43 hg diff --nodates | grep "^[+-][^<>]"
44 hg st
44 hg st
45
45
46 echo "# local merge without conflicts"
46 echo "# local merge without conflicts"
47 hg revert zzz2_merge_bad
47 hg revert zzz2_merge_bad
48 HGMERGE=merge hg co
48 hg co
49 hg diff --nodates | grep "^[+-][^<>]"
49 hg diff --nodates | grep "^[+-][^<>]"
50 hg st
50 hg st
@@ -36,7 +36,7 b' 2 files updated, 0 files merged, 3 files'
36 M zzz1_merge_ok
36 M zzz1_merge_ok
37 M zzz2_merge_bad
37 M zzz2_merge_bad
38 # local merge with conflicts
38 # local merge with conflicts
39 merge: warning: conflicts during merge
39 warning: conflicts during merge.
40 merging zzz1_merge_ok
40 merging zzz1_merge_ok
41 merging zzz2_merge_bad
41 merging zzz2_merge_bad
42 merging zzz2_merge_bad failed!
42 merging zzz2_merge_bad failed!
@@ -25,7 +25,7 b' hg status'
25 hg id
25 hg id
26 hg update -C 0
26 hg update -C 0
27 echo "changed file1" >> file1
27 echo "changed file1" >> file1
28 HGMERGE=merge hg update
28 hg update
29 hg diff
29 hg diff
30 hg status
30 hg status
31 hg id
31 hg id
@@ -26,7 +26,7 b' hg status'
26 hg id
26 hg id
27 hg update -C 0
27 hg update -C 0
28 echo "changed file1 different" >> file1
28 echo "changed file1 different" >> file1
29 HGMERGE=merge hg update
29 hg update
30 hg diff --nodates | sed -e "s/\(<<<<<<<\) .*/\1/" -e "s/\(>>>>>>>\) .*/\1/"
30 hg diff --nodates | sed -e "s/\(<<<<<<<\) .*/\1/" -e "s/\(>>>>>>>\) .*/\1/"
31 hg status
31 hg status
32 hg id
32 hg id
@@ -9,7 +9,7 b' 9eca13a34789'
9 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
10 f248da0d4c3e tip
10 f248da0d4c3e tip
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 merge: warning: conflicts during merge
12 warning: conflicts during merge.
13 merging file1
13 merging file1
14 merging file1 failed!
14 merging file1 failed!
15 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
15 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
@@ -35,7 +35,7 b' hg commit -m "2 -> 2.5" -d "1000000 0"'
35
35
36 # now pull and merge from test-a
36 # now pull and merge from test-a
37 hg pull ../test-a
37 hg pull ../test-a
38 HGMERGE=merge hg merge
38 hg merge
39 # resolve conflict
39 # resolve conflict
40 cat >test.txt <<"EOF"
40 cat >test.txt <<"EOF"
41 one
41 one
@@ -57,7 +57,7 b' hg commit -m "two -> two-point-one" -d "'
57 # pull and merge from test-a again
57 # pull and merge from test-a again
58 cd ../test-b
58 cd ../test-b
59 hg pull ../test-a
59 hg pull ../test-a
60 HGMERGE=merge hg merge --debug
60 hg merge --debug
61
61
62 cat test.txt | sed "s% .*%%"
62 cat test.txt | sed "s% .*%%"
63
63
@@ -6,7 +6,7 b' adding manifests'
6 adding file changes
6 adding file changes
7 added 1 changesets with 1 changes to 1 files (+1 heads)
7 added 1 changesets with 1 changes to 1 files (+1 heads)
8 (run 'hg heads' to see heads, 'hg merge' to merge)
8 (run 'hg heads' to see heads, 'hg merge' to merge)
9 merge: warning: conflicts during merge
9 warning: conflicts during merge.
10 merging test.txt
10 merging test.txt
11 merging test.txt failed!
11 merging test.txt failed!
12 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
12 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
@@ -20,7 +20,7 b' adding manifests'
20 adding file changes
20 adding file changes
21 added 1 changesets with 1 changes to 1 files (+1 heads)
21 added 1 changesets with 1 changes to 1 files (+1 heads)
22 (run 'hg heads' to see heads, 'hg merge' to merge)
22 (run 'hg heads' to see heads, 'hg merge' to merge)
23 merge: warning: conflicts during merge
23 warning: conflicts during merge.
24 resolving manifests
24 resolving manifests
25 overwrite None partial False
25 overwrite None partial False
26 ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360
26 ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360
@@ -1,5 +1,7 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 HGMERGE=true; export HGMERGE
4
3 set -e
5 set -e
4 mkdir r1
6 mkdir r1
5 cd r1
7 cd r1
General Comments 0
You need to be logged in to leave comments. Login now