Show More
@@ -1,213 +1,292 b'' | |||||
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 | |||
|
31 | $ cd base-exec | |||
|
32 | $ cat << EOF > a | |||
|
33 | > 1 | |||
|
34 | > 2 | |||
|
35 | > 3 | |||
|
36 | > 4 | |||
|
37 | > 5 | |||
|
38 | > 6 | |||
|
39 | > 7 | |||
|
40 | > 8 | |||
|
41 | > 9 | |||
|
42 | > EOF | |||
|
43 | $ chmod +x a | |||
|
44 | $ touch b | |||
|
45 | $ hg add a b | |||
|
46 | $ hg commit -m "initial commit" | |||
|
47 | $ cd .. | |||
|
48 | ||||
30 | Testing merging mode change |
|
49 | Testing merging mode change | |
31 | =========================== |
|
50 | =========================== | |
32 |
|
51 | |||
|
52 | Adding the flag | |||
|
53 | --------------- | |||
|
54 | ||||
33 | setup |
|
55 | setup | |
34 |
|
56 | |||
35 | Change on one side, executable bit on the other |
|
57 | Change on one side, executable bit on the other | |
36 |
|
58 | |||
37 | $ hg clone base-repo simple-merge-repo |
|
59 | $ hg clone base-repo simple-merge-repo | |
38 | updating to branch default |
|
60 | updating to branch default | |
39 | 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 | |
40 | $ cd simple-merge-repo |
|
62 | $ cd simple-merge-repo | |
41 | $ chmod +x a |
|
63 | $ chmod +x a | |
42 | $ hg ci -m "make a executable, no change" |
|
64 | $ hg ci -m "make a executable, no change" | |
43 | $ [ -x a ] || echo "executable bit not recorded" |
|
65 | $ [ -x a ] || echo "executable bit not recorded" | |
44 | $ hg up ".^" |
|
66 | $ hg up ".^" | |
45 | 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 | |
46 | $ cat << EOF > a |
|
68 | $ cat << EOF > a | |
47 | > 1 |
|
69 | > 1 | |
48 | > 2 |
|
70 | > 2 | |
49 | > 3 |
|
71 | > 3 | |
50 | > 4 |
|
72 | > 4 | |
51 | > 5 |
|
73 | > 5 | |
52 | > 6 |
|
74 | > 6 | |
53 | > 7 |
|
75 | > 7 | |
54 | > x |
|
76 | > x | |
55 | > 9 |
|
77 | > 9 | |
56 | > EOF |
|
78 | > EOF | |
57 | $ hg commit -m "edit end of file" |
|
79 | $ hg commit -m "edit end of file" | |
58 | created new head |
|
80 | created new head | |
59 |
|
81 | |||
60 | merge them (from the update side) |
|
82 | merge them (from the update side) | |
61 |
|
83 | |||
62 | $ hg merge 'desc("make a executable, no change")' |
|
84 | $ hg merge 'desc("make a executable, no change")' | |
63 | 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 | |
64 | (branch merge, don't forget to commit) |
|
86 | (branch merge, don't forget to commit) | |
65 | $ hg st |
|
87 | $ hg st | |
66 | M a |
|
88 | M a | |
67 | $ [ -x a ] || echo "executable bit lost" |
|
89 | $ [ -x a ] || echo "executable bit lost" | |
68 |
|
90 | |||
69 | merge them (from the chmod side) |
|
91 | merge them (from the chmod side) | |
70 |
|
92 | |||
71 | $ hg up -C 'desc("make a executable, no change")' |
|
93 | $ hg up -C 'desc("make a executable, no change")' | |
72 | 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 | |
73 | $ hg merge 'desc("edit end of file")' |
|
95 | $ hg merge 'desc("edit end of file")' | |
74 | 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 | |
75 | (branch merge, don't forget to commit) |
|
97 | (branch merge, don't forget to commit) | |
76 | $ hg st |
|
98 | $ hg st | |
77 | M a |
|
99 | M a | |
78 | $ [ -x a ] || echo "executable bit lost" |
|
100 | $ [ -x a ] || echo "executable bit lost" | |
79 |
|
101 | |||
80 |
|
102 | |||
81 | $ cd .. |
|
103 | $ cd .. | |
82 |
|
104 | |||
|
105 | ||||
|
106 | Removing the flag | |||
|
107 | ----------------- | |||
|
108 | ||||
|
109 | setup | |||
|
110 | ||||
|
111 | Change on one side, executable bit on the other | |||
|
112 | ||||
|
113 | $ hg clone base-exec simple-merge-repo-removal | |||
|
114 | updating to branch default | |||
|
115 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
116 | $ cd simple-merge-repo-removal | |||
|
117 | $ chmod -x a | |||
|
118 | $ hg ci -m "make a non-executable, no change" | |||
|
119 | $ [ -x a ] && echo "executable bit not removed" | |||
|
120 | [1] | |||
|
121 | $ hg up ".^" | |||
|
122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
123 | $ cat << EOF > a | |||
|
124 | > 1 | |||
|
125 | > 2 | |||
|
126 | > 3 | |||
|
127 | > 4 | |||
|
128 | > 5 | |||
|
129 | > 6 | |||
|
130 | > 7 | |||
|
131 | > x | |||
|
132 | > 9 | |||
|
133 | > EOF | |||
|
134 | $ hg commit -m "edit end of file" | |||
|
135 | created new head | |||
|
136 | ||||
|
137 | merge them (from the update side) | |||
|
138 | ||||
|
139 | $ hg merge 'desc("make a non-executable, no change")' | |||
|
140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
141 | (branch merge, don't forget to commit) | |||
|
142 | $ hg st | |||
|
143 | M a | |||
|
144 | $ [ -x a ] && echo "executable bit not removed" | |||
|
145 | [1] | |||
|
146 | ||||
|
147 | merge them (from the chmod side) | |||
|
148 | ||||
|
149 | $ hg up -C 'desc("make a non-executable, no change")' | |||
|
150 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
151 | $ hg merge 'desc("edit end of file")' | |||
|
152 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
153 | (branch merge, don't forget to commit) | |||
|
154 | $ hg st | |||
|
155 | M a | |||
|
156 | $ [ -x a ] && echo "executable bit not removed" | |||
|
157 | [1] | |||
|
158 | ||||
|
159 | ||||
|
160 | $ cd .. | |||
|
161 | ||||
83 | Testing merging mode change with rename |
|
162 | Testing merging mode change with rename | |
84 | ======================================= |
|
163 | ======================================= | |
85 |
|
164 | |||
86 | $ hg clone base-repo rename-merge-repo |
|
165 | $ hg clone base-repo rename-merge-repo | |
87 | updating to branch default |
|
166 | updating to branch default | |
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
167 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 | $ cd rename-merge-repo |
|
168 | $ cd rename-merge-repo | |
90 |
|
169 | |||
91 | make "a" executable on one side |
|
170 | make "a" executable on one side | |
92 |
|
171 | |||
93 | $ chmod +x a |
|
172 | $ chmod +x a | |
94 | $ hg status |
|
173 | $ hg status | |
95 | M a |
|
174 | M a | |
96 | $ hg ci -m "make a executable" |
|
175 | $ hg ci -m "make a executable" | |
97 | $ [ -x a ] || echo "executable bit not recorded" |
|
176 | $ [ -x a ] || echo "executable bit not recorded" | |
98 | $ hg up ".^" |
|
177 | $ hg up ".^" | |
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
178 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 |
|
179 | |||
101 | make "a" renamed on the other side |
|
180 | make "a" renamed on the other side | |
102 |
|
181 | |||
103 | $ hg mv a z |
|
182 | $ hg mv a z | |
104 | $ hg st --copies |
|
183 | $ hg st --copies | |
105 | A z |
|
184 | A z | |
106 | a |
|
185 | a | |
107 | R a |
|
186 | R a | |
108 | $ hg ci -m "rename a to z" |
|
187 | $ hg ci -m "rename a to z" | |
109 | created new head |
|
188 | created new head | |
110 |
|
189 | |||
111 | merge them (from the rename side) |
|
190 | merge them (from the rename side) | |
112 |
|
191 | |||
113 | $ hg merge 'desc("make a executable")' |
|
192 | $ hg merge 'desc("make a executable")' | |
114 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
193 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
115 | (branch merge, don't forget to commit) |
|
194 | (branch merge, don't forget to commit) | |
116 | $ hg st --copies |
|
195 | $ hg st --copies | |
117 | M z |
|
196 | M z | |
118 | a |
|
197 | a | |
119 | $ [ -x z ] || echo "executable bit lost" |
|
198 | $ [ -x z ] || echo "executable bit lost" | |
120 |
|
199 | |||
121 | merge them (from the chmod side) |
|
200 | merge them (from the chmod side) | |
122 |
|
201 | |||
123 | $ hg up -C 'desc("make a executable")' |
|
202 | $ hg up -C 'desc("make a executable")' | |
124 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
203 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
125 | $ hg merge 'desc("rename a to z")' |
|
204 | $ hg merge 'desc("rename a to z")' | |
126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
205 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
127 | (branch merge, don't forget to commit) |
|
206 | (branch merge, don't forget to commit) | |
128 | $ hg st --copies |
|
207 | $ hg st --copies | |
129 | M z |
|
208 | M z | |
130 | a |
|
209 | a | |
131 | R a |
|
210 | R a | |
132 | $ [ -x z ] || echo "executable bit lost" |
|
211 | $ [ -x z ] || echo "executable bit lost" | |
133 |
|
212 | |||
134 |
|
213 | |||
135 | $ cd .. |
|
214 | $ cd .. | |
136 |
|
215 | |||
137 | Testing merging mode change with rename + modification on both side |
|
216 | Testing merging mode change with rename + modification on both side | |
138 | =================================================================== |
|
217 | =================================================================== | |
139 |
|
218 | |||
140 |
|
219 | |||
141 | $ hg clone base-repo rename+mod-merge-repo |
|
220 | $ hg clone base-repo rename+mod-merge-repo | |
142 | updating to branch default |
|
221 | updating to branch default | |
143 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
222 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
144 | $ cd rename+mod-merge-repo |
|
223 | $ cd rename+mod-merge-repo | |
145 |
|
224 | |||
146 | make "a" executable on one side |
|
225 | make "a" executable on one side | |
147 |
|
226 | |||
148 | $ chmod +x a |
|
227 | $ chmod +x a | |
149 | $ cat << EOF > a |
|
228 | $ cat << EOF > a | |
150 | > 1 |
|
229 | > 1 | |
151 | > x |
|
230 | > x | |
152 | > 3 |
|
231 | > 3 | |
153 | > 4 |
|
232 | > 4 | |
154 | > 5 |
|
233 | > 5 | |
155 | > 6 |
|
234 | > 6 | |
156 | > 7 |
|
235 | > 7 | |
157 | > 8 |
|
236 | > 8 | |
158 | > 9 |
|
237 | > 9 | |
159 | > EOF |
|
238 | > EOF | |
160 | $ hg status |
|
239 | $ hg status | |
161 | M a |
|
240 | M a | |
162 | $ hg ci -m "make a executable, and change start" |
|
241 | $ hg ci -m "make a executable, and change start" | |
163 | $ [ -x a ] || echo "executable bit not recorded" |
|
242 | $ [ -x a ] || echo "executable bit not recorded" | |
164 | $ hg up ".^" |
|
243 | $ hg up ".^" | |
165 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
244 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
166 |
|
245 | |||
167 | make "a" renamed on the other side |
|
246 | make "a" renamed on the other side | |
168 |
|
247 | |||
169 | $ hg mv a z |
|
248 | $ hg mv a z | |
170 | $ hg st --copies |
|
249 | $ hg st --copies | |
171 | A z |
|
250 | A z | |
172 | a |
|
251 | a | |
173 | R a |
|
252 | R a | |
174 | $ cat << EOF > z |
|
253 | $ cat << EOF > z | |
175 | > 1 |
|
254 | > 1 | |
176 | > 2 |
|
255 | > 2 | |
177 | > 3 |
|
256 | > 3 | |
178 | > 4 |
|
257 | > 4 | |
179 | > 5 |
|
258 | > 5 | |
180 | > 6 |
|
259 | > 6 | |
181 | > 7 |
|
260 | > 7 | |
182 | > x |
|
261 | > x | |
183 | > 9 |
|
262 | > 9 | |
184 | > EOF |
|
263 | > EOF | |
185 | $ hg ci -m "rename a to z, and change end" |
|
264 | $ hg ci -m "rename a to z, and change end" | |
186 | created new head |
|
265 | created new head | |
187 |
|
266 | |||
188 | merge them (from the rename side) |
|
267 | merge them (from the rename side) | |
189 |
|
268 | |||
190 | $ hg merge 'desc("make a executable")' |
|
269 | $ hg merge 'desc("make a executable")' | |
191 | merging z and a to z |
|
270 | merging z and a to z | |
192 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
271 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
193 | (branch merge, don't forget to commit) |
|
272 | (branch merge, don't forget to commit) | |
194 | $ hg st --copies |
|
273 | $ hg st --copies | |
195 | M z |
|
274 | M z | |
196 | a |
|
275 | a | |
197 | $ [ -x z ] || echo "executable bit lost" |
|
276 | $ [ -x z ] || echo "executable bit lost" | |
198 |
|
277 | |||
199 | merge them (from the chmod side) |
|
278 | merge them (from the chmod side) | |
200 |
|
279 | |||
201 | $ hg up -C 'desc("make a executable")' |
|
280 | $ hg up -C 'desc("make a executable")' | |
202 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
281 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
203 | $ hg merge 'desc("rename a to z")' |
|
282 | $ hg merge 'desc("rename a to z")' | |
204 | merging a and z to z |
|
283 | merging a and z to z | |
205 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
284 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
206 | (branch merge, don't forget to commit) |
|
285 | (branch merge, don't forget to commit) | |
207 | $ hg st --copies |
|
286 | $ hg st --copies | |
208 | M z |
|
287 | M z | |
209 | a |
|
288 | a | |
210 | R a |
|
289 | R a | |
211 | $ [ -x z ] || echo "executable bit lost" |
|
290 | $ [ -x z ] || echo "executable bit lost" | |
212 |
|
291 | |||
213 | $ cd .. |
|
292 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now