Show More
@@ -1,150 +1,172 | |||||
1 | Test for |
|
1 | Test for | |
2 | b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again |
|
2 | b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again | |
3 | (issue897) |
|
3 | (issue897) | |
4 |
|
4 | |||
5 | 840e2b315c1f: Fix misleading error and prompts during update/merge |
|
5 | 840e2b315c1f: Fix misleading error and prompts during update/merge | |
6 | (issue556) |
|
6 | (issue556) | |
7 |
|
7 | |||
8 | $ status() { |
|
8 | $ status() { | |
9 | > echo "--- status ---" |
|
9 | > echo "--- status ---" | |
10 | > hg st -A file1 file2 |
|
10 | > hg st -A file1 file2 | |
11 | > for file in file1 file2; do |
|
11 | > for file in file1 file2; do | |
12 | > if [ -f $file ]; then |
|
12 | > if [ -f $file ]; then | |
13 | > echo "--- $file ---" |
|
13 | > echo "--- $file ---" | |
14 | > cat $file |
|
14 | > cat $file | |
15 | > else |
|
15 | > else | |
16 | > echo "*** $file does not exist" |
|
16 | > echo "*** $file does not exist" | |
17 | > fi |
|
17 | > fi | |
18 | > done |
|
18 | > done | |
19 | > } |
|
19 | > } | |
20 |
|
20 | |||
21 | $ hg init |
|
21 | $ hg init | |
22 |
|
22 | |||
23 | $ echo 1 > file1 |
|
23 | $ echo 1 > file1 | |
24 | $ echo 2 > file2 |
|
24 | $ echo 2 > file2 | |
25 | $ hg ci -Am 'added file1 and file2' |
|
25 | $ hg ci -Am 'added file1 and file2' | |
26 | adding file1 |
|
26 | adding file1 | |
27 | adding file2 |
|
27 | adding file2 | |
28 |
|
28 | |||
29 | $ hg rm file1 |
|
29 | $ hg rm file1 | |
30 | $ echo changed >> file2 |
|
30 | $ echo changed >> file2 | |
31 | $ hg ci -m 'removed file1, changed file2' |
|
31 | $ hg ci -m 'removed file1, changed file2' | |
32 |
|
32 | |||
33 | $ hg co 0 |
|
33 | $ hg co 0 | |
34 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
34 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
35 |
|
35 | |||
36 | $ echo changed >> file1 |
|
36 | $ echo changed >> file1 | |
37 | $ hg rm file2 |
|
37 | $ hg rm file2 | |
38 | $ hg ci -m 'changed file1, removed file2' |
|
38 | $ hg ci -m 'changed file1, removed file2' | |
39 | created new head |
|
39 | created new head | |
40 |
|
40 | |||
41 |
|
41 | |||
42 | Non-interactive merge: |
|
42 | Non-interactive merge: | |
43 |
|
43 | |||
44 | $ hg merge -y |
|
44 | $ hg merge -y | |
45 | local changed file1 which remote deleted |
|
45 | local changed file1 which remote deleted | |
46 | use (c)hanged version or (d)elete? c |
|
46 | use (c)hanged version or (d)elete? c | |
47 | remote changed file2 which local deleted |
|
47 | remote changed file2 which local deleted | |
48 | use (c)hanged version or leave (d)eleted? c |
|
48 | use (c)hanged version or leave (d)eleted? c | |
49 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
50 | (branch merge, don't forget to commit) |
|
50 | (branch merge, don't forget to commit) | |
51 |
|
51 | |||
52 | $ status |
|
52 | $ status | |
53 | --- status --- |
|
53 | --- status --- | |
54 | M file2 |
|
54 | M file2 | |
55 | C file1 |
|
55 | C file1 | |
56 | --- file1 --- |
|
56 | --- file1 --- | |
57 | 1 |
|
57 | 1 | |
58 | changed |
|
58 | changed | |
59 | --- file2 --- |
|
59 | --- file2 --- | |
60 | 2 |
|
60 | 2 | |
61 | changed |
|
61 | changed | |
62 |
|
62 | |||
63 |
|
63 | |||
64 | Interactive merge: |
|
64 | Interactive merge: | |
65 |
|
65 | |||
66 | $ hg co -C |
|
66 | $ hg co -C | |
67 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
67 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
68 |
|
68 | |||
69 | $ hg merge --config ui.interactive=true <<EOF |
|
69 | $ hg merge --config ui.interactive=true <<EOF | |
70 | > c |
|
70 | > c | |
71 | > d |
|
71 | > d | |
72 | > EOF |
|
72 | > EOF | |
73 | local changed file1 which remote deleted |
|
73 | local changed file1 which remote deleted | |
74 | use (c)hanged version or (d)elete? c |
|
74 | use (c)hanged version or (d)elete? c | |
75 | remote changed file2 which local deleted |
|
75 | remote changed file2 which local deleted | |
76 | use (c)hanged version or leave (d)eleted? d |
|
76 | use (c)hanged version or leave (d)eleted? d | |
77 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
78 | (branch merge, don't forget to commit) |
|
78 | (branch merge, don't forget to commit) | |
79 |
|
79 | |||
80 | $ status |
|
80 | $ status | |
81 | --- status --- |
|
81 | --- status --- | |
82 | file2: * (glob) |
|
82 | file2: * (glob) | |
83 | C file1 |
|
83 | C file1 | |
84 | --- file1 --- |
|
84 | --- file1 --- | |
85 | 1 |
|
85 | 1 | |
86 | changed |
|
86 | changed | |
87 | *** file2 does not exist |
|
87 | *** file2 does not exist | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | Interactive merge with bad input: |
|
90 | Interactive merge with bad input: | |
91 |
|
91 | |||
92 | $ hg co -C |
|
92 | $ hg co -C | |
93 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
93 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
94 |
|
94 | |||
95 | $ hg merge --config ui.interactive=true <<EOF |
|
95 | $ hg merge --config ui.interactive=true <<EOF | |
96 | > foo |
|
96 | > foo | |
97 | > bar |
|
97 | > bar | |
98 | > d |
|
98 | > d | |
99 | > baz |
|
99 | > baz | |
100 | > c |
|
100 | > c | |
101 | > EOF |
|
101 | > EOF | |
102 | local changed file1 which remote deleted |
|
102 | local changed file1 which remote deleted | |
103 | use (c)hanged version or (d)elete? foo |
|
103 | use (c)hanged version or (d)elete? foo | |
104 | unrecognized response |
|
104 | unrecognized response | |
105 | local changed file1 which remote deleted |
|
105 | local changed file1 which remote deleted | |
106 | use (c)hanged version or (d)elete? bar |
|
106 | use (c)hanged version or (d)elete? bar | |
107 | unrecognized response |
|
107 | unrecognized response | |
108 | local changed file1 which remote deleted |
|
108 | local changed file1 which remote deleted | |
109 | use (c)hanged version or (d)elete? d |
|
109 | use (c)hanged version or (d)elete? d | |
110 | remote changed file2 which local deleted |
|
110 | remote changed file2 which local deleted | |
111 | use (c)hanged version or leave (d)eleted? baz |
|
111 | use (c)hanged version or leave (d)eleted? baz | |
112 | unrecognized response |
|
112 | unrecognized response | |
113 | remote changed file2 which local deleted |
|
113 | remote changed file2 which local deleted | |
114 | use (c)hanged version or leave (d)eleted? c |
|
114 | use (c)hanged version or leave (d)eleted? c | |
115 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
115 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
116 | (branch merge, don't forget to commit) |
|
116 | (branch merge, don't forget to commit) | |
117 |
|
117 | |||
118 | $ status |
|
118 | $ status | |
119 | --- status --- |
|
119 | --- status --- | |
120 | M file2 |
|
120 | M file2 | |
121 | R file1 |
|
121 | R file1 | |
122 | *** file1 does not exist |
|
122 | *** file1 does not exist | |
123 | --- file2 --- |
|
123 | --- file2 --- | |
124 | 2 |
|
124 | 2 | |
125 | changed |
|
125 | changed | |
126 |
|
126 | |||
127 |
|
127 | |||
128 | Interactive merge with not enough input: |
|
128 | Interactive merge with not enough input: | |
129 |
|
129 | |||
130 | $ hg co -C |
|
130 | $ hg co -C | |
131 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
131 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
132 |
|
132 | |||
133 | $ hg merge --config ui.interactive=true <<EOF |
|
133 | $ hg merge --config ui.interactive=true <<EOF | |
134 | > d |
|
134 | > d | |
135 | > EOF |
|
135 | > EOF | |
136 | local changed file1 which remote deleted |
|
136 | local changed file1 which remote deleted | |
137 | use (c)hanged version or (d)elete? d |
|
137 | use (c)hanged version or (d)elete? d | |
138 | remote changed file2 which local deleted |
|
138 | remote changed file2 which local deleted | |
139 | use (c)hanged version or leave (d)eleted? abort: response expected |
|
139 | use (c)hanged version or leave (d)eleted? abort: response expected | |
140 | [255] |
|
140 | [255] | |
141 |
|
141 | |||
142 | $ status |
|
142 | $ status | |
143 | --- status --- |
|
143 | --- status --- | |
144 | file2: * (glob) |
|
144 | file2: * (glob) | |
145 | C file1 |
|
145 | C file1 | |
146 | --- file1 --- |
|
146 | --- file1 --- | |
147 | 1 |
|
147 | 1 | |
148 | changed |
|
148 | changed | |
149 | *** file2 does not exist |
|
149 | *** file2 does not exist | |
150 |
|
150 | |||
|
151 | Non-interactive linear update | |||
|
152 | ||||
|
153 | $ hg co -C 0 | |||
|
154 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
155 | $ echo changed >> file1 | |||
|
156 | $ hg rm file2 | |||
|
157 | $ hg update 1 -y | |||
|
158 | local changed file1 which remote deleted | |||
|
159 | use (c)hanged version or (d)elete? c | |||
|
160 | remote changed file2 which local deleted | |||
|
161 | use (c)hanged version or leave (d)eleted? c | |||
|
162 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
163 | $ status | |||
|
164 | --- status --- | |||
|
165 | A file1 | |||
|
166 | C file2 | |||
|
167 | --- file1 --- | |||
|
168 | 1 | |||
|
169 | changed | |||
|
170 | --- file2 --- | |||
|
171 | 2 | |||
|
172 | changed |
General Comments 0
You need to be logged in to leave comments.
Login now