Show More
@@ -1,220 +1,230 b'' | |||||
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 | Make sure HGMERGE doesn't interfere with the test |
|
8 | Make sure HGMERGE doesn't interfere with the test | |
9 | $ unset HGMERGE |
|
9 | $ unset HGMERGE | |
10 |
|
10 | |||
11 | $ status() { |
|
11 | $ status() { | |
12 | > echo "--- status ---" |
|
12 | > echo "--- status ---" | |
13 | > hg st -A file1 file2 file3 |
|
13 | > hg st -A file1 file2 file3 | |
|
14 | > echo "--- resolve --list ---" | |||
|
15 | > hg resolve --list file1 file2 file3 | |||
14 | > for file in file1 file2 file3; do |
|
16 | > for file in file1 file2 file3; do | |
15 | > if [ -f $file ]; then |
|
17 | > if [ -f $file ]; then | |
16 | > echo "--- $file ---" |
|
18 | > echo "--- $file ---" | |
17 | > cat $file |
|
19 | > cat $file | |
18 | > else |
|
20 | > else | |
19 | > echo "*** $file does not exist" |
|
21 | > echo "*** $file does not exist" | |
20 | > fi |
|
22 | > fi | |
21 | > done |
|
23 | > done | |
22 | > } |
|
24 | > } | |
23 |
|
25 | |||
24 | $ hg init |
|
26 | $ hg init | |
25 |
|
27 | |||
26 | $ echo 1 > file1 |
|
28 | $ echo 1 > file1 | |
27 | $ echo 2 > file2 |
|
29 | $ echo 2 > file2 | |
28 | $ echo 3 > file3 |
|
30 | $ echo 3 > file3 | |
29 | $ hg ci -Am 'added files' |
|
31 | $ hg ci -Am 'added files' | |
30 | adding file1 |
|
32 | adding file1 | |
31 | adding file2 |
|
33 | adding file2 | |
32 | adding file3 |
|
34 | adding file3 | |
33 |
|
35 | |||
34 | $ hg rm file1 |
|
36 | $ hg rm file1 | |
35 | $ echo changed >> file2 |
|
37 | $ echo changed >> file2 | |
36 | $ echo changed1 >> file3 |
|
38 | $ echo changed1 >> file3 | |
37 | $ hg ci -m 'removed file1, changed file2, changed file3' |
|
39 | $ hg ci -m 'removed file1, changed file2, changed file3' | |
38 |
|
40 | |||
39 | $ hg co 0 |
|
41 | $ hg co 0 | |
40 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
41 |
|
43 | |||
42 | $ echo changed >> file1 |
|
44 | $ echo changed >> file1 | |
43 | $ hg rm file2 |
|
45 | $ hg rm file2 | |
44 | $ echo changed2 >> file3 |
|
46 | $ echo changed2 >> file3 | |
45 | $ hg ci -m 'changed file1, removed file2, changed file3' |
|
47 | $ hg ci -m 'changed file1, removed file2, changed file3' | |
46 | created new head |
|
48 | created new head | |
47 |
|
49 | |||
48 |
|
50 | |||
49 | Non-interactive merge: |
|
51 | Non-interactive merge: | |
50 |
|
52 | |||
51 | $ hg merge -y |
|
53 | $ hg merge -y | |
52 | local changed file1 which remote deleted |
|
54 | local changed file1 which remote deleted | |
53 | use (c)hanged version or (d)elete? c |
|
55 | use (c)hanged version or (d)elete? c | |
54 | remote changed file2 which local deleted |
|
56 | remote changed file2 which local deleted | |
55 | use (c)hanged version or leave (d)eleted? c |
|
57 | use (c)hanged version or leave (d)eleted? c | |
56 | merging file3 |
|
58 | merging file3 | |
57 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
|
59 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | |
58 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
60 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
59 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
61 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
60 | [1] |
|
62 | [1] | |
61 |
|
63 | |||
62 | $ status |
|
64 | $ status | |
63 | --- status --- |
|
65 | --- status --- | |
64 | M file2 |
|
66 | M file2 | |
65 | M file3 |
|
67 | M file3 | |
66 | C file1 |
|
68 | C file1 | |
|
69 | --- resolve --list --- | |||
|
70 | U file3 | |||
67 | --- file1 --- |
|
71 | --- file1 --- | |
68 | 1 |
|
72 | 1 | |
69 | changed |
|
73 | changed | |
70 | --- file2 --- |
|
74 | --- file2 --- | |
71 | 2 |
|
75 | 2 | |
72 | changed |
|
76 | changed | |
73 | --- file3 --- |
|
77 | --- file3 --- | |
74 | 3 |
|
78 | 3 | |
75 | <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3 |
|
79 | <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3 | |
76 | changed2 |
|
80 | changed2 | |
77 | ======= |
|
81 | ======= | |
78 | changed1 |
|
82 | changed1 | |
79 | >>>>>>> other: 10f9a0a634e8 - test: removed file1, changed file2, changed file3 |
|
83 | >>>>>>> other: 10f9a0a634e8 - test: removed file1, changed file2, changed file3 | |
80 |
|
84 | |||
81 |
|
85 | |||
82 | Interactive merge: |
|
86 | Interactive merge: | |
83 |
|
87 | |||
84 | $ hg co -C |
|
88 | $ hg co -C | |
85 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
89 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
86 |
|
90 | |||
87 | $ hg merge --config ui.interactive=true <<EOF |
|
91 | $ hg merge --config ui.interactive=true <<EOF | |
88 | > c |
|
92 | > c | |
89 | > d |
|
93 | > d | |
90 | > EOF |
|
94 | > EOF | |
91 | local changed file1 which remote deleted |
|
95 | local changed file1 which remote deleted | |
92 | use (c)hanged version or (d)elete? c |
|
96 | use (c)hanged version or (d)elete? c | |
93 | remote changed file2 which local deleted |
|
97 | remote changed file2 which local deleted | |
94 | use (c)hanged version or leave (d)eleted? d |
|
98 | use (c)hanged version or leave (d)eleted? d | |
95 | merging file3 |
|
99 | merging file3 | |
96 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
|
100 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | |
97 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
101 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
98 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
102 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
99 | [1] |
|
103 | [1] | |
100 |
|
104 | |||
101 | $ status |
|
105 | $ status | |
102 | --- status --- |
|
106 | --- status --- | |
103 | file2: * (glob) |
|
107 | file2: * (glob) | |
104 | M file3 |
|
108 | M file3 | |
105 | C file1 |
|
109 | C file1 | |
|
110 | --- resolve --list --- | |||
|
111 | U file3 | |||
106 | --- file1 --- |
|
112 | --- file1 --- | |
107 | 1 |
|
113 | 1 | |
108 | changed |
|
114 | changed | |
109 | *** file2 does not exist |
|
115 | *** file2 does not exist | |
110 | --- file3 --- |
|
116 | --- file3 --- | |
111 | 3 |
|
117 | 3 | |
112 | <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3 |
|
118 | <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3 | |
113 | changed2 |
|
119 | changed2 | |
114 | ======= |
|
120 | ======= | |
115 | changed1 |
|
121 | changed1 | |
116 | >>>>>>> other: 10f9a0a634e8 - test: removed file1, changed file2, changed file3 |
|
122 | >>>>>>> other: 10f9a0a634e8 - test: removed file1, changed file2, changed file3 | |
117 |
|
123 | |||
118 |
|
124 | |||
119 | Interactive merge with bad input: |
|
125 | Interactive merge with bad input: | |
120 |
|
126 | |||
121 | $ hg co -C |
|
127 | $ hg co -C | |
122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
128 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
123 |
|
129 | |||
124 | $ hg merge --config ui.interactive=true <<EOF |
|
130 | $ hg merge --config ui.interactive=true <<EOF | |
125 | > foo |
|
131 | > foo | |
126 | > bar |
|
132 | > bar | |
127 | > d |
|
133 | > d | |
128 | > baz |
|
134 | > baz | |
129 | > c |
|
135 | > c | |
130 | > EOF |
|
136 | > EOF | |
131 | local changed file1 which remote deleted |
|
137 | local changed file1 which remote deleted | |
132 | use (c)hanged version or (d)elete? foo |
|
138 | use (c)hanged version or (d)elete? foo | |
133 | unrecognized response |
|
139 | unrecognized response | |
134 | local changed file1 which remote deleted |
|
140 | local changed file1 which remote deleted | |
135 | use (c)hanged version or (d)elete? bar |
|
141 | use (c)hanged version or (d)elete? bar | |
136 | unrecognized response |
|
142 | unrecognized response | |
137 | local changed file1 which remote deleted |
|
143 | local changed file1 which remote deleted | |
138 | use (c)hanged version or (d)elete? d |
|
144 | use (c)hanged version or (d)elete? d | |
139 | remote changed file2 which local deleted |
|
145 | remote changed file2 which local deleted | |
140 | use (c)hanged version or leave (d)eleted? baz |
|
146 | use (c)hanged version or leave (d)eleted? baz | |
141 | unrecognized response |
|
147 | unrecognized response | |
142 | remote changed file2 which local deleted |
|
148 | remote changed file2 which local deleted | |
143 | use (c)hanged version or leave (d)eleted? c |
|
149 | use (c)hanged version or leave (d)eleted? c | |
144 | merging file3 |
|
150 | merging file3 | |
145 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
|
151 | warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | |
146 | 1 files updated, 0 files merged, 1 files removed, 1 files unresolved |
|
152 | 1 files updated, 0 files merged, 1 files removed, 1 files unresolved | |
147 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
153 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
148 | [1] |
|
154 | [1] | |
149 |
|
155 | |||
150 | $ status |
|
156 | $ status | |
151 | --- status --- |
|
157 | --- status --- | |
152 | M file2 |
|
158 | M file2 | |
153 | M file3 |
|
159 | M file3 | |
154 | R file1 |
|
160 | R file1 | |
|
161 | --- resolve --list --- | |||
|
162 | U file3 | |||
155 | *** file1 does not exist |
|
163 | *** file1 does not exist | |
156 | --- file2 --- |
|
164 | --- file2 --- | |
157 | 2 |
|
165 | 2 | |
158 | changed |
|
166 | changed | |
159 | --- file3 --- |
|
167 | --- file3 --- | |
160 | 3 |
|
168 | 3 | |
161 | <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3 |
|
169 | <<<<<<< local: 13910f48cf7b - test: changed file1, removed file2, changed file3 | |
162 | changed2 |
|
170 | changed2 | |
163 | ======= |
|
171 | ======= | |
164 | changed1 |
|
172 | changed1 | |
165 | >>>>>>> other: 10f9a0a634e8 - test: removed file1, changed file2, changed file3 |
|
173 | >>>>>>> other: 10f9a0a634e8 - test: removed file1, changed file2, changed file3 | |
166 |
|
174 | |||
167 |
|
175 | |||
168 | Interactive merge with not enough input: |
|
176 | Interactive merge with not enough input: | |
169 |
|
177 | |||
170 | $ hg co -C |
|
178 | $ hg co -C | |
171 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
179 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
172 |
|
180 | |||
173 | $ hg merge --config ui.interactive=true <<EOF |
|
181 | $ hg merge --config ui.interactive=true <<EOF | |
174 | > d |
|
182 | > d | |
175 | > EOF |
|
183 | > EOF | |
176 | local changed file1 which remote deleted |
|
184 | local changed file1 which remote deleted | |
177 | use (c)hanged version or (d)elete? d |
|
185 | use (c)hanged version or (d)elete? d | |
178 | remote changed file2 which local deleted |
|
186 | remote changed file2 which local deleted | |
179 | use (c)hanged version or leave (d)eleted? abort: response expected |
|
187 | use (c)hanged version or leave (d)eleted? abort: response expected | |
180 | [255] |
|
188 | [255] | |
181 |
|
189 | |||
182 | $ status |
|
190 | $ status | |
183 | --- status --- |
|
191 | --- status --- | |
184 | file2: * (glob) |
|
192 | file2: * (glob) | |
185 | C file1 |
|
193 | C file1 | |
186 | C file3 |
|
194 | C file3 | |
|
195 | --- resolve --list --- | |||
187 | --- file1 --- |
|
196 | --- file1 --- | |
188 | 1 |
|
197 | 1 | |
189 | changed |
|
198 | changed | |
190 | *** file2 does not exist |
|
199 | *** file2 does not exist | |
191 | --- file3 --- |
|
200 | --- file3 --- | |
192 | 3 |
|
201 | 3 | |
193 | changed2 |
|
202 | changed2 | |
194 |
|
203 | |||
195 | Non-interactive linear update |
|
204 | Non-interactive linear update | |
196 |
|
205 | |||
197 | $ hg co -C 0 |
|
206 | $ hg co -C 0 | |
198 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
207 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
199 | $ echo changed >> file1 |
|
208 | $ echo changed >> file1 | |
200 | $ hg rm file2 |
|
209 | $ hg rm file2 | |
201 | $ hg update 1 -y |
|
210 | $ hg update 1 -y | |
202 | local changed file1 which remote deleted |
|
211 | local changed file1 which remote deleted | |
203 | use (c)hanged version or (d)elete? c |
|
212 | use (c)hanged version or (d)elete? c | |
204 | remote changed file2 which local deleted |
|
213 | remote changed file2 which local deleted | |
205 | use (c)hanged version or leave (d)eleted? c |
|
214 | use (c)hanged version or leave (d)eleted? c | |
206 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
215 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
207 | $ status |
|
216 | $ status | |
208 | --- status --- |
|
217 | --- status --- | |
209 | A file1 |
|
218 | A file1 | |
210 | C file2 |
|
219 | C file2 | |
211 | C file3 |
|
220 | C file3 | |
|
221 | --- resolve --list --- | |||
212 | --- file1 --- |
|
222 | --- file1 --- | |
213 | 1 |
|
223 | 1 | |
214 | changed |
|
224 | changed | |
215 | --- file2 --- |
|
225 | --- file2 --- | |
216 | 2 |
|
226 | 2 | |
217 | changed |
|
227 | changed | |
218 | --- file3 --- |
|
228 | --- file3 --- | |
219 | 3 |
|
229 | 3 | |
220 | changed1 |
|
230 | changed1 |
General Comments 0
You need to be logged in to leave comments.
Login now