Show More
@@ -1,135 +1,215 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 | Testing merging mode change |
|
30 | Testing merging mode change | |
31 | =========================== |
|
31 | =========================== | |
32 |
|
32 | |||
33 | setup |
|
33 | setup | |
34 |
|
34 | |||
35 | Change on one side, executable bit on the other |
|
35 | Change on one side, executable bit on the other | |
36 |
|
36 | |||
37 | $ hg clone base-repo simple-merge-repo |
|
37 | $ hg clone base-repo simple-merge-repo | |
38 | updating to branch default |
|
38 | updating to branch default | |
39 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
39 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
40 | $ cd simple-merge-repo |
|
40 | $ cd simple-merge-repo | |
41 | $ chmod +x a |
|
41 | $ chmod +x a | |
42 | $ hg ci -m "make a executable, no change" |
|
42 | $ hg ci -m "make a executable, no change" | |
43 | $ [ -x a ] || echo "executable bit not recorded" |
|
43 | $ [ -x a ] || echo "executable bit not recorded" | |
44 | $ hg up ".^" |
|
44 | $ hg up ".^" | |
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 | $ cat << EOF > a |
|
46 | $ cat << EOF > a | |
47 | > 1 |
|
47 | > 1 | |
48 | > 2 |
|
48 | > 2 | |
49 | > 3 |
|
49 | > 3 | |
50 | > 4 |
|
50 | > 4 | |
51 | > 5 |
|
51 | > 5 | |
52 | > 6 |
|
52 | > 6 | |
53 | > 7 |
|
53 | > 7 | |
54 | > x |
|
54 | > x | |
55 | > 9 |
|
55 | > 9 | |
56 | > EOF |
|
56 | > EOF | |
57 | $ hg commit -m "edit end of file" |
|
57 | $ hg commit -m "edit end of file" | |
58 | created new head |
|
58 | created new head | |
59 |
|
59 | |||
60 | merge them (from the update side) |
|
60 | merge them (from the update side) | |
61 |
|
61 | |||
62 | $ hg merge 'desc("make a executable, no change")' |
|
62 | $ hg merge 'desc("make a executable, no change")' | |
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 | (branch merge, don't forget to commit) |
|
64 | (branch merge, don't forget to commit) | |
65 | $ hg st |
|
65 | $ hg st | |
66 | M a |
|
66 | M a | |
67 | $ [ -x a ] || echo "executable bit lost" |
|
67 | $ [ -x a ] || echo "executable bit lost" | |
68 |
|
68 | |||
69 | merge them (from the chmod side) |
|
69 | merge them (from the chmod side) | |
70 |
|
70 | |||
71 | $ hg up -C 'desc("make a executable, no change")' |
|
71 | $ hg up -C 'desc("make a executable, no change")' | |
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | $ hg merge 'desc("edit end of file")' |
|
73 | $ hg merge 'desc("edit end of file")' | |
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
75 | (branch merge, don't forget to commit) |
|
75 | (branch merge, don't forget to commit) | |
76 | $ hg st |
|
76 | $ hg st | |
77 | M a |
|
77 | M a | |
78 | $ [ -x a ] || echo "executable bit lost" |
|
78 | $ [ -x a ] || echo "executable bit lost" | |
79 |
|
79 | |||
80 |
|
80 | |||
81 | $ cd .. |
|
81 | $ cd .. | |
82 |
|
82 | |||
83 | Testing merging mode change with rename |
|
83 | Testing merging mode change with rename | |
84 | ======================================= |
|
84 | ======================================= | |
85 |
|
85 | |||
86 | $ hg clone base-repo rename-merge-repo |
|
86 | $ hg clone base-repo rename-merge-repo | |
87 | updating to branch default |
|
87 | updating to branch default | |
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 | $ cd rename-merge-repo |
|
89 | $ cd rename-merge-repo | |
90 |
|
90 | |||
91 | make "a" executable on one side |
|
91 | make "a" executable on one side | |
92 |
|
92 | |||
93 | $ chmod +x a |
|
93 | $ chmod +x a | |
94 | $ hg status |
|
94 | $ hg status | |
95 | M a |
|
95 | M a | |
96 | $ hg ci -m "make a executable" |
|
96 | $ hg ci -m "make a executable" | |
97 | $ [ -x a ] || echo "executable bit not recorded" |
|
97 | $ [ -x a ] || echo "executable bit not recorded" | |
98 | $ hg up ".^" |
|
98 | $ hg up ".^" | |
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 |
|
100 | |||
101 | make "a" renamed on the other side |
|
101 | make "a" renamed on the other side | |
102 |
|
102 | |||
103 | $ hg mv a z |
|
103 | $ hg mv a z | |
104 | $ hg st --copies |
|
104 | $ hg st --copies | |
105 | A z |
|
105 | A z | |
106 | a |
|
106 | a | |
107 | R a |
|
107 | R a | |
108 | $ hg ci -m "rename a to z" |
|
108 | $ hg ci -m "rename a to z" | |
109 | created new head |
|
109 | created new head | |
110 |
|
110 | |||
111 | merge them (from the rename side) |
|
111 | merge them (from the rename side) | |
112 |
|
112 | |||
113 | $ hg merge 'desc("make a executable")' |
|
113 | $ hg merge 'desc("make a executable")' | |
114 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
114 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
115 | (branch merge, don't forget to commit) |
|
115 | (branch merge, don't forget to commit) | |
116 | $ hg st --copies |
|
116 | $ hg st --copies | |
117 | M z |
|
117 | M z | |
118 | a |
|
118 | a | |
119 | $ [ -x z ] || echo "executable bit lost" |
|
119 | $ [ -x z ] || echo "executable bit lost" | |
120 |
|
120 | |||
121 | merge them (from the chmod side) |
|
121 | merge them (from the chmod side) | |
122 |
|
122 | |||
123 | $ hg up -C 'desc("make a executable")' |
|
123 | $ hg up -C 'desc("make a executable")' | |
124 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
124 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
125 | $ hg merge 'desc("rename a to z")' |
|
125 | $ hg merge 'desc("rename a to z")' | |
126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
127 | (branch merge, don't forget to commit) |
|
127 | (branch merge, don't forget to commit) | |
128 | $ hg st --copies |
|
128 | $ hg st --copies | |
129 | M z |
|
129 | M z | |
130 | a |
|
130 | a | |
131 | R a |
|
131 | R a | |
132 | $ [ -x z ] || echo "executable bit lost" |
|
132 | $ [ -x z ] || echo "executable bit lost" | |
133 |
|
133 | |||
134 |
|
134 | |||
135 | $ cd .. |
|
135 | $ cd .. | |
|
136 | ||||
|
137 | Testing merging mode change with rename + modification on both side | |||
|
138 | =================================================================== | |||
|
139 | ||||
|
140 | ||||
|
141 | $ hg clone base-repo rename+mod-merge-repo | |||
|
142 | updating to branch default | |||
|
143 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
144 | $ cd rename+mod-merge-repo | |||
|
145 | ||||
|
146 | make "a" executable on one side | |||
|
147 | ||||
|
148 | $ chmod +x a | |||
|
149 | $ cat << EOF > a | |||
|
150 | > 1 | |||
|
151 | > x | |||
|
152 | > 3 | |||
|
153 | > 4 | |||
|
154 | > 5 | |||
|
155 | > 6 | |||
|
156 | > 7 | |||
|
157 | > 8 | |||
|
158 | > 9 | |||
|
159 | > EOF | |||
|
160 | $ hg status | |||
|
161 | M a | |||
|
162 | $ hg ci -m "make a executable, and change start" | |||
|
163 | $ [ -x a ] || echo "executable bit not recorded" | |||
|
164 | $ hg up ".^" | |||
|
165 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
166 | ||||
|
167 | make "a" renamed on the other side | |||
|
168 | ||||
|
169 | $ hg mv a z | |||
|
170 | $ hg st --copies | |||
|
171 | A z | |||
|
172 | a | |||
|
173 | R a | |||
|
174 | $ cat << EOF > z | |||
|
175 | > 1 | |||
|
176 | > 2 | |||
|
177 | > 3 | |||
|
178 | > 4 | |||
|
179 | > 5 | |||
|
180 | > 6 | |||
|
181 | > 7 | |||
|
182 | > x | |||
|
183 | > 9 | |||
|
184 | > EOF | |||
|
185 | $ hg ci -m "rename a to z, and change end" | |||
|
186 | created new head | |||
|
187 | ||||
|
188 | merge them (from the rename side) | |||
|
189 | ||||
|
190 | $ hg merge 'desc("make a executable")' | |||
|
191 | merging z and a to z | |||
|
192 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |||
|
193 | (branch merge, don't forget to commit) | |||
|
194 | $ hg st --copies | |||
|
195 | M z | |||
|
196 | a | |||
|
197 | $ [ -x z ] || echo "executable bit lost" | |||
|
198 | executable bit lost | |||
|
199 | ||||
|
200 | merge them (from the chmod side) | |||
|
201 | ||||
|
202 | $ hg up -C 'desc("make a executable")' | |||
|
203 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
204 | $ hg merge 'desc("rename a to z")' | |||
|
205 | merging a and z to z | |||
|
206 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |||
|
207 | (branch merge, don't forget to commit) | |||
|
208 | $ hg st --copies | |||
|
209 | M z | |||
|
210 | a | |||
|
211 | R a | |||
|
212 | $ [ -x z ] || echo "executable bit lost" | |||
|
213 | executable bit lost | |||
|
214 | ||||
|
215 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now