equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 # |
|
3 # Test for b5605d88dc27 |
|
4 # Make ui.prompt repeat on "unrecognized response" again (issue897) |
|
5 # and for 840e2b315c1f |
|
6 # Fix misleading error and prompts during update/merge (issue556) |
|
7 |
|
8 status() { |
|
9 [ $? -ne 0 ] && echo "failed." |
|
10 echo "status:" |
|
11 hg st -A file1 file2 |
|
12 for file in file1 file2; do |
|
13 if [ -f $file ]; then |
|
14 echo "$file:" |
|
15 cat $file |
|
16 else |
|
17 echo "$file does not exist" |
|
18 fi |
|
19 done |
|
20 } |
|
21 |
|
22 hg init repo |
|
23 cd repo |
|
24 echo 1 > file1 |
|
25 echo 2 > file2 |
|
26 hg ci -Am 'added file1 and file2' # rev 0 |
|
27 |
|
28 hg rm file1 |
|
29 echo changed >> file2 |
|
30 hg ci -m 'removed file1, changed file2' # rev 1 |
|
31 |
|
32 hg co 0 |
|
33 echo changed >> file1 |
|
34 hg rm file2 |
|
35 hg ci -m 'changed file1, removed file2' # rev 2 |
|
36 |
|
37 echo |
|
38 echo "# non-interactive merge" |
|
39 hg merge -y || echo "failed" |
|
40 status |
|
41 |
|
42 echo |
|
43 echo "# interactive merge" |
|
44 hg co -C |
|
45 hg merge --config ui.interactive=true <<EOF || echo "failed" |
|
46 c |
|
47 d |
|
48 EOF |
|
49 status |
|
50 |
|
51 echo |
|
52 echo "# interactive merge with bad input" |
|
53 hg co -C |
|
54 hg merge --config ui.interactive=true <<EOF || echo "failed" |
|
55 foo |
|
56 bar |
|
57 d |
|
58 baz |
|
59 c |
|
60 EOF |
|
61 status |
|
62 |
|
63 echo |
|
64 echo "# interactive merge with not enough input" |
|
65 hg co -C |
|
66 hg merge --config ui.interactive=true <<EOF || echo "failed" |
|
67 d |
|
68 EOF |
|
69 status |