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