##// END OF EJS Templates
flags: also test merge with executable bit removed...
marmoute -
r45401:6d968cd4 stable
parent child Browse files
Show More
@@ -1,292 +1,434
1 ===============================================
1 ===============================================
2 Testing merge involving change to the exec flag
2 Testing merge involving change to the exec flag
3 ===============================================
3 ===============================================
4
4
5 #require execbit
5 #require execbit
6
6
7
7
8 Initial setup
8 Initial setup
9 ==============
9 ==============
10
10
11
11
12 $ hg init base-repo
12 $ hg init base-repo
13 $ cd base-repo
13 $ cd base-repo
14 $ cat << EOF > a
14 $ cat << EOF > a
15 > 1
15 > 1
16 > 2
16 > 2
17 > 3
17 > 3
18 > 4
18 > 4
19 > 5
19 > 5
20 > 6
20 > 6
21 > 7
21 > 7
22 > 8
22 > 8
23 > 9
23 > 9
24 > EOF
24 > EOF
25 $ touch b
25 $ touch b
26 $ hg add a b
26 $ hg add a b
27 $ hg commit -m "initial commit"
27 $ hg commit -m "initial commit"
28 $ cd ..
28 $ cd ..
29
29
30 $ hg init base-exec
30 $ hg init base-exec
31 $ cd base-exec
31 $ cd base-exec
32 $ cat << EOF > a
32 $ cat << EOF > a
33 > 1
33 > 1
34 > 2
34 > 2
35 > 3
35 > 3
36 > 4
36 > 4
37 > 5
37 > 5
38 > 6
38 > 6
39 > 7
39 > 7
40 > 8
40 > 8
41 > 9
41 > 9
42 > EOF
42 > EOF
43 $ chmod +x a
43 $ chmod +x a
44 $ touch b
44 $ touch b
45 $ hg add a b
45 $ hg add a b
46 $ hg commit -m "initial commit"
46 $ hg commit -m "initial commit"
47 $ cd ..
47 $ cd ..
48
48
49 Testing merging mode change
49 Testing merging mode change
50 ===========================
50 ===========================
51
51
52 Adding the flag
52 Adding the flag
53 ---------------
53 ---------------
54
54
55 setup
55 setup
56
56
57 Change on one side, executable bit on the other
57 Change on one side, executable bit on the other
58
58
59 $ hg clone base-repo simple-merge-repo
59 $ hg clone base-repo simple-merge-repo
60 updating to branch default
60 updating to branch default
61 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 $ cd simple-merge-repo
62 $ cd simple-merge-repo
63 $ chmod +x a
63 $ chmod +x a
64 $ hg ci -m "make a executable, no change"
64 $ hg ci -m "make a executable, no change"
65 $ [ -x a ] || echo "executable bit not recorded"
65 $ [ -x a ] || echo "executable bit not recorded"
66 $ hg up ".^"
66 $ hg up ".^"
67 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 $ cat << EOF > a
68 $ cat << EOF > a
69 > 1
69 > 1
70 > 2
70 > 2
71 > 3
71 > 3
72 > 4
72 > 4
73 > 5
73 > 5
74 > 6
74 > 6
75 > 7
75 > 7
76 > x
76 > x
77 > 9
77 > 9
78 > EOF
78 > EOF
79 $ hg commit -m "edit end of file"
79 $ hg commit -m "edit end of file"
80 created new head
80 created new head
81
81
82 merge them (from the update side)
82 merge them (from the update side)
83
83
84 $ hg merge 'desc("make a executable, no change")'
84 $ hg merge 'desc("make a executable, no change")'
85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 (branch merge, don't forget to commit)
86 (branch merge, don't forget to commit)
87 $ hg st
87 $ hg st
88 M a
88 M a
89 $ [ -x a ] || echo "executable bit lost"
89 $ [ -x a ] || echo "executable bit lost"
90
90
91 merge them (from the chmod side)
91 merge them (from the chmod side)
92
92
93 $ hg up -C 'desc("make a executable, no change")'
93 $ hg up -C 'desc("make a executable, no change")'
94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
95 $ hg merge 'desc("edit end of file")'
95 $ hg merge 'desc("edit end of file")'
96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
96 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
97 (branch merge, don't forget to commit)
97 (branch merge, don't forget to commit)
98 $ hg st
98 $ hg st
99 M a
99 M a
100 $ [ -x a ] || echo "executable bit lost"
100 $ [ -x a ] || echo "executable bit lost"
101
101
102
102
103 $ cd ..
103 $ cd ..
104
104
105
105
106 Removing the flag
106 Removing the flag
107 -----------------
107 -----------------
108
108
109 setup
110
111 Change on one side, executable bit on the other
109 Change on one side, executable bit on the other
112
110
113 $ hg clone base-exec simple-merge-repo-removal
111 $ hg clone base-exec simple-merge-repo-removal
114 updating to branch default
112 updating to branch default
115 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
116 $ cd simple-merge-repo-removal
114 $ cd simple-merge-repo-removal
117 $ chmod -x a
115 $ chmod -x a
118 $ hg ci -m "make a non-executable, no change"
116 $ hg ci -m "make a non-executable, no change"
119 $ [ -x a ] && echo "executable bit not removed"
117 $ [ -x a ] && echo "executable bit not removed"
120 [1]
118 [1]
121 $ hg up ".^"
119 $ hg up ".^"
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 $ cat << EOF > a
121 $ cat << EOF > a
124 > 1
122 > 1
125 > 2
123 > 2
126 > 3
124 > 3
127 > 4
125 > 4
128 > 5
126 > 5
129 > 6
127 > 6
130 > 7
128 > 7
131 > x
129 > x
132 > 9
130 > 9
133 > EOF
131 > EOF
134 $ hg commit -m "edit end of file"
132 $ hg commit -m "edit end of file"
135 created new head
133 created new head
136
134
137 merge them (from the update side)
135 merge them (from the update side)
138
136
139 $ hg merge 'desc("make a non-executable, no change")'
137 $ hg merge 'desc("make a non-executable, no change")'
140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
138 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 (branch merge, don't forget to commit)
139 (branch merge, don't forget to commit)
142 $ hg st
140 $ hg st
143 M a
141 M a
144 $ [ -x a ] && echo "executable bit not removed"
142 $ [ -x a ] && echo "executable bit not removed"
145 [1]
143 [1]
146
144
147 merge them (from the chmod side)
145 merge them (from the chmod side)
148
146
149 $ hg up -C 'desc("make a non-executable, no change")'
147 $ hg up -C 'desc("make a non-executable, no change")'
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
148 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 $ hg merge 'desc("edit end of file")'
149 $ hg merge 'desc("edit end of file")'
152 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
153 (branch merge, don't forget to commit)
151 (branch merge, don't forget to commit)
154 $ hg st
152 $ hg st
155 M a
153 M a
156 $ [ -x a ] && echo "executable bit not removed"
154 $ [ -x a ] && echo "executable bit not removed"
157 [1]
155 [1]
158
156
159
157
160 $ cd ..
158 $ cd ..
161
159
162 Testing merging mode change with rename
160 Testing merging mode change with rename
163 =======================================
161 =======================================
164
162
163 Adding the flag
164 ---------------
165
165 $ hg clone base-repo rename-merge-repo
166 $ hg clone base-repo rename-merge-repo
166 updating to branch default
167 updating to branch default
167 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 $ cd rename-merge-repo
169 $ cd rename-merge-repo
169
170
170 make "a" executable on one side
171 make "a" executable on one side
171
172
172 $ chmod +x a
173 $ chmod +x a
173 $ hg status
174 $ hg status
174 M a
175 M a
175 $ hg ci -m "make a executable"
176 $ hg ci -m "make a executable"
176 $ [ -x a ] || echo "executable bit not recorded"
177 $ [ -x a ] || echo "executable bit not recorded"
177 $ hg up ".^"
178 $ hg up ".^"
178 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
179 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
179
180
180 make "a" renamed on the other side
181 make "a" renamed on the other side
181
182
182 $ hg mv a z
183 $ hg mv a z
183 $ hg st --copies
184 $ hg st --copies
184 A z
185 A z
185 a
186 a
186 R a
187 R a
187 $ hg ci -m "rename a to z"
188 $ hg ci -m "rename a to z"
188 created new head
189 created new head
189
190
190 merge them (from the rename side)
191 merge them (from the rename side)
191
192
192 $ hg merge 'desc("make a executable")'
193 $ hg merge 'desc("make a executable")'
193 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
194 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
194 (branch merge, don't forget to commit)
195 (branch merge, don't forget to commit)
195 $ hg st --copies
196 $ hg st --copies
196 M z
197 M z
197 a
198 a
198 $ [ -x z ] || echo "executable bit lost"
199 $ [ -x z ] || echo "executable bit lost"
199
200
200 merge them (from the chmod side)
201 merge them (from the chmod side)
201
202
202 $ hg up -C 'desc("make a executable")'
203 $ hg up -C 'desc("make a executable")'
203 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
204 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
204 $ hg merge 'desc("rename a to z")'
205 $ hg merge 'desc("rename a to z")'
205 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
206 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
206 (branch merge, don't forget to commit)
207 (branch merge, don't forget to commit)
207 $ hg st --copies
208 $ hg st --copies
208 M z
209 M z
209 a
210 a
210 R a
211 R a
211 $ [ -x z ] || echo "executable bit lost"
212 $ [ -x z ] || echo "executable bit lost"
212
213
213
214
214 $ cd ..
215 $ cd ..
215
216
217 Removing the flag
218 -----------------
219
220 $ hg clone base-exec rename-merge-repo-removal
221 updating to branch default
222 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
223 $ cd rename-merge-repo-removal
224
225 make "a" non-executable on one side
226
227 $ chmod -x a
228 $ hg status
229 M a
230 $ hg ci -m "make a non-executable"
231 $ [ -x a ] && echo "executable bit not removed"
232 [1]
233 $ hg up ".^"
234 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
235
236 make "a" renamed on the other side
237
238 $ hg mv a z
239 $ hg st --copies
240 A z
241 a
242 R a
243 $ hg ci -m "rename a to z"
244 created new head
245
246 merge them (from the rename side)
247
248 $ hg merge 'desc("make a non-executable")'
249 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
250 (branch merge, don't forget to commit)
251 $ hg st --copies
252 M z
253 a
254 $ [ -x z ] && echo "executable bit not removed"
255 [1]
256
257 merge them (from the chmod side)
258
259 $ hg up -C 'desc("make a non-executable")'
260 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
261 $ hg merge 'desc("rename a to z")'
262 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
263 (branch merge, don't forget to commit)
264 $ hg st --copies
265 M z
266 a
267 R a
268 $ [ -x z ] && echo "executable bit not removed"
269 [1]
270
271
272 $ cd ..
273
274
216 Testing merging mode change with rename + modification on both side
275 Testing merging mode change with rename + modification on both side
217 ===================================================================
276 ===================================================================
218
277
219
278
279 Adding the flag
280 ---------------
281
220 $ hg clone base-repo rename+mod-merge-repo
282 $ hg clone base-repo rename+mod-merge-repo
221 updating to branch default
283 updating to branch default
222 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
284 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
223 $ cd rename+mod-merge-repo
285 $ cd rename+mod-merge-repo
224
286
225 make "a" executable on one side
287 make "a" executable on one side
226
288
227 $ chmod +x a
289 $ chmod +x a
228 $ cat << EOF > a
290 $ cat << EOF > a
229 > 1
291 > 1
230 > x
292 > x
231 > 3
293 > 3
232 > 4
294 > 4
233 > 5
295 > 5
234 > 6
296 > 6
235 > 7
297 > 7
236 > 8
298 > 8
237 > 9
299 > 9
238 > EOF
300 > EOF
239 $ hg status
301 $ hg status
240 M a
302 M a
241 $ hg ci -m "make a executable, and change start"
303 $ hg ci -m "make a executable, and change start"
242 $ [ -x a ] || echo "executable bit not recorded"
304 $ [ -x a ] || echo "executable bit not recorded"
243 $ hg up ".^"
305 $ hg up ".^"
244 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
306 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
245
307
246 make "a" renamed on the other side
308 make "a" renamed on the other side
247
309
248 $ hg mv a z
310 $ hg mv a z
249 $ hg st --copies
311 $ hg st --copies
250 A z
312 A z
251 a
313 a
252 R a
314 R a
253 $ cat << EOF > z
315 $ cat << EOF > z
254 > 1
316 > 1
255 > 2
317 > 2
256 > 3
318 > 3
257 > 4
319 > 4
258 > 5
320 > 5
259 > 6
321 > 6
260 > 7
322 > 7
261 > x
323 > x
262 > 9
324 > 9
263 > EOF
325 > EOF
264 $ hg ci -m "rename a to z, and change end"
326 $ hg ci -m "rename a to z, and change end"
265 created new head
327 created new head
266
328
267 merge them (from the rename side)
329 merge them (from the rename side)
268
330
269 $ hg merge 'desc("make a executable")'
331 $ hg merge 'desc("make a executable")'
270 merging z and a to z
332 merging z and a to z
271 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
333 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
272 (branch merge, don't forget to commit)
334 (branch merge, don't forget to commit)
273 $ hg st --copies
335 $ hg st --copies
274 M z
336 M z
275 a
337 a
276 $ [ -x z ] || echo "executable bit lost"
338 $ [ -x z ] || echo "executable bit lost"
277
339
278 merge them (from the chmod side)
340 merge them (from the chmod side)
279
341
280 $ hg up -C 'desc("make a executable")'
342 $ hg up -C 'desc("make a executable")'
281 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
343 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
282 $ hg merge 'desc("rename a to z")'
344 $ hg merge 'desc("rename a to z")'
283 merging a and z to z
345 merging a and z to z
284 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
346 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
285 (branch merge, don't forget to commit)
347 (branch merge, don't forget to commit)
286 $ hg st --copies
348 $ hg st --copies
287 M z
349 M z
288 a
350 a
289 R a
351 R a
290 $ [ -x z ] || echo "executable bit lost"
352 $ [ -x z ] || echo "executable bit lost"
291
353
292 $ cd ..
354 $ cd ..
355
356 Removing the flag
357 -----------------
358
359 $ hg clone base-exec rename+mod-merge-repo-removal
360 updating to branch default
361 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
362 $ cd rename+mod-merge-repo-removal
363
364 make "a" non-executable on one side
365
366 $ chmod -x a
367 $ cat << EOF > a
368 > 1
369 > x
370 > 3
371 > 4
372 > 5
373 > 6
374 > 7
375 > 8
376 > 9
377 > EOF
378 $ hg status
379 M a
380 $ hg ci -m "make a non-executable, and change start"
381 $ [ -x z ] && echo "executable bit not removed"
382 [1]
383 $ hg up ".^"
384 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
385
386 make "a" renamed on the other side
387
388 $ hg mv a z
389 $ hg st --copies
390 A z
391 a
392 R a
393 $ cat << EOF > z
394 > 1
395 > 2
396 > 3
397 > 4
398 > 5
399 > 6
400 > 7
401 > x
402 > 9
403 > EOF
404 $ hg ci -m "rename a to z, and change end"
405 created new head
406
407 merge them (from the rename side)
408
409 $ hg merge 'desc("make a non-executable")'
410 merging z and a to z
411 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
412 (branch merge, don't forget to commit)
413 $ hg st --copies
414 M z
415 a
416 $ [ -x z ] && echo "executable bit not removed"
417 [1]
418
419 merge them (from the chmod side)
420
421 $ hg up -C 'desc("make a non-executable")'
422 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
423 $ hg merge 'desc("rename a to z")'
424 merging a and z to z
425 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
426 (branch merge, don't forget to commit)
427 $ hg st --copies
428 M z
429 a
430 R a
431 $ [ -x z ] && echo "executable bit not removed"
432 [1]
433
434 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now