Show More
@@ -1,869 +1,869 b'' | |||
|
1 | 1 | ===================================================== |
|
2 | 2 | Test Copy tracing for chain of copies involving merge |
|
3 | 3 | ===================================================== |
|
4 | 4 | |
|
5 | 5 | This test files covers copies/rename case for a chains of commit where merges |
|
6 | 6 | are involved. It cheks we do not have unwanted update of behavior and that the |
|
7 | 7 | different options to retrieve copies behave correctly. |
|
8 | 8 | |
|
9 | 9 | Setup |
|
10 | 10 | ===== |
|
11 | 11 | |
|
12 | 12 | use git diff to see rename |
|
13 | 13 | |
|
14 | 14 | $ cat << EOF >> $HGRCPATH |
|
15 | 15 | > [diff] |
|
16 | 16 | > git=yes |
|
17 | 17 | > [ui] |
|
18 |
> logtemplate={rev} {desc} |
|
|
18 | > logtemplate={rev} {desc}\n | |
|
19 | 19 | > EOF |
|
20 | 20 | |
|
21 | 21 |
$ |
|
22 | 22 | $ cd repo-chain |
|
23 | 23 | |
|
24 | 24 | Add some linear rename initialy |
|
25 | 25 | |
|
26 | 26 | $ touch a b h |
|
27 | 27 | $ hg ci -Am 'i-0 initial commit: a b h' |
|
28 | 28 | adding a |
|
29 | 29 | adding b |
|
30 | 30 | adding h |
|
31 | 31 | $ hg mv a c |
|
32 | 32 | $ hg ci -Am 'i-1: a -move-> c' |
|
33 | 33 | $ hg mv c d |
|
34 | 34 | $ hg ci -Am 'i-2: c -move-> d' |
|
35 | 35 | $ hg log -G |
|
36 |
@ 2 i-2: c -move-> d |
|
|
36 | @ 2 i-2: c -move-> d | |
|
37 | 37 | | |
|
38 |
o 1 i-1: a -move-> c |
|
|
38 | o 1 i-1: a -move-> c | |
|
39 | 39 | | |
|
40 |
o 0 i-0 initial commit: a b h |
|
|
40 | o 0 i-0 initial commit: a b h | |
|
41 | 41 | |
|
42 | 42 | |
|
43 | 43 | And having another branch with renames on the other side |
|
44 | 44 | |
|
45 | 45 | $ hg mv d e |
|
46 | 46 | $ hg ci -Am 'a-1: d -move-> e' |
|
47 | 47 | $ hg mv e f |
|
48 | 48 | $ hg ci -Am 'a-2: e -move-> f' |
|
49 | 49 | $ hg log -G --rev '::.' |
|
50 |
@ 4 a-2: e -move-> f |
|
|
50 | @ 4 a-2: e -move-> f | |
|
51 | 51 | | |
|
52 |
o 3 a-1: d -move-> e |
|
|
52 | o 3 a-1: d -move-> e | |
|
53 | 53 | | |
|
54 |
o 2 i-2: c -move-> d |
|
|
54 | o 2 i-2: c -move-> d | |
|
55 | 55 | | |
|
56 |
o 1 i-1: a -move-> c |
|
|
56 | o 1 i-1: a -move-> c | |
|
57 | 57 | | |
|
58 |
o 0 i-0 initial commit: a b h |
|
|
58 | o 0 i-0 initial commit: a b h | |
|
59 | 59 | |
|
60 | 60 | |
|
61 | 61 | Have a branching with nothing on one side |
|
62 | 62 | |
|
63 | 63 | $ hg up 'desc("i-2")' |
|
64 | 64 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
65 | 65 | $ echo foo > b |
|
66 | 66 | $ hg ci -m 'b-1: b update' |
|
67 | 67 | created new head |
|
68 | 68 | $ hg log -G --rev '::.' |
|
69 |
@ 5 b-1: b update |
|
|
69 | @ 5 b-1: b update | |
|
70 | 70 | | |
|
71 |
o 2 i-2: c -move-> d |
|
|
71 | o 2 i-2: c -move-> d | |
|
72 | 72 | | |
|
73 |
o 1 i-1: a -move-> c |
|
|
73 | o 1 i-1: a -move-> c | |
|
74 | 74 | | |
|
75 |
o 0 i-0 initial commit: a b h |
|
|
75 | o 0 i-0 initial commit: a b h | |
|
76 | 76 | |
|
77 | 77 | |
|
78 | 78 | |
|
79 | 79 | Merge the two branches we just defined (in both directions) |
|
80 | 80 | - one with change to an unrelated file |
|
81 | 81 | - one with renames in them |
|
82 | 82 | |
|
83 | 83 | $ hg up 'desc("b-1")' |
|
84 | 84 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
85 | 85 | $ hg merge 'desc("a-2")' |
|
86 | 86 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
87 | 87 | (branch merge, don't forget to commit) |
|
88 | 88 | $ hg ci -m 'mBAm-0 simple merge - one way' |
|
89 | 89 | $ hg up 'desc("a-2")' |
|
90 | 90 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 91 | $ hg merge 'desc("b-1")' |
|
92 | 92 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
93 | 93 | (branch merge, don't forget to commit) |
|
94 | 94 | $ hg ci -m 'mABm-0 simple merge - the other way' |
|
95 | 95 | created new head |
|
96 | 96 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
97 |
@ 7 mABm-0 simple merge - the other way |
|
|
97 | @ 7 mABm-0 simple merge - the other way | |
|
98 | 98 | |\ |
|
99 |
+---o 6 mBAm-0 simple merge - one way |
|
|
99 | +---o 6 mBAm-0 simple merge - one way | |
|
100 | 100 | | |/ |
|
101 |
| o 5 b-1: b update |
|
|
101 | | o 5 b-1: b update | |
|
102 | 102 | | | |
|
103 |
o | 4 a-2: e -move-> f |
|
|
103 | o | 4 a-2: e -move-> f | |
|
104 | 104 | | | |
|
105 |
o | 3 a-1: d -move-> e |
|
|
105 | o | 3 a-1: d -move-> e | |
|
106 | 106 | |/ |
|
107 |
o 2 i-2: c -move-> d |
|
|
107 | o 2 i-2: c -move-> d | |
|
108 | 108 | | |
|
109 |
o 1 i-1: a -move-> c |
|
|
109 | o 1 i-1: a -move-> c | |
|
110 | 110 | | |
|
111 |
o 0 i-0 initial commit: a b h |
|
|
111 | o 0 i-0 initial commit: a b h | |
|
112 | 112 | |
|
113 | 113 | |
|
114 | 114 | Create a branch that delete a file previous renamed |
|
115 | 115 | |
|
116 | 116 | $ hg up 'desc("i-2")' |
|
117 | 117 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
118 | 118 | $ hg rm d |
|
119 | 119 | $ hg ci -m 'c-1 delete d' |
|
120 | 120 | created new head |
|
121 | 121 | $ hg log -G --rev '::.' |
|
122 |
@ 8 c-1 delete d |
|
|
122 | @ 8 c-1 delete d | |
|
123 | 123 | | |
|
124 |
o 2 i-2: c -move-> d |
|
|
124 | o 2 i-2: c -move-> d | |
|
125 | 125 | | |
|
126 |
o 1 i-1: a -move-> c |
|
|
126 | o 1 i-1: a -move-> c | |
|
127 | 127 | | |
|
128 |
o 0 i-0 initial commit: a b h |
|
|
128 | o 0 i-0 initial commit: a b h | |
|
129 | 129 | |
|
130 | 130 | |
|
131 | 131 | Merge: |
|
132 | 132 | - one with change to an unrelated file |
|
133 | 133 | - one deleting the change |
|
134 | 134 | and recreate an unrelated file after the merge |
|
135 | 135 | |
|
136 | 136 | $ hg up 'desc("b-1")' |
|
137 | 137 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
138 | 138 | $ hg merge 'desc("c-1")' |
|
139 | 139 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
140 | 140 | (branch merge, don't forget to commit) |
|
141 | 141 | $ hg ci -m 'mBCm-0 simple merge - one way' |
|
142 | 142 | $ echo bar > d |
|
143 | 143 | $ hg add d |
|
144 | 144 | $ hg ci -m 'mBCm-1 re-add d' |
|
145 | 145 | $ hg up 'desc("c-1")' |
|
146 | 146 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
147 | 147 | $ hg merge 'desc("b-1")' |
|
148 | 148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 149 | (branch merge, don't forget to commit) |
|
150 | 150 | $ hg ci -m 'mCBm-0 simple merge - the other way' |
|
151 | 151 | created new head |
|
152 | 152 | $ echo bar > d |
|
153 | 153 | $ hg add d |
|
154 | 154 | $ hg ci -m 'mCBm-1 re-add d' |
|
155 | 155 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
156 |
@ 12 mCBm-1 re-add d |
|
|
156 | @ 12 mCBm-1 re-add d | |
|
157 | 157 | | |
|
158 |
o 11 mCBm-0 simple merge - the other way |
|
|
158 | o 11 mCBm-0 simple merge - the other way | |
|
159 | 159 | |\ |
|
160 |
| | o 10 mBCm-1 re-add d |
|
|
160 | | | o 10 mBCm-1 re-add d | |
|
161 | 161 | | | | |
|
162 |
+---o 9 mBCm-0 simple merge - one way |
|
|
162 | +---o 9 mBCm-0 simple merge - one way | |
|
163 | 163 | | |/ |
|
164 |
| o 8 c-1 delete d |
|
|
164 | | o 8 c-1 delete d | |
|
165 | 165 | | | |
|
166 |
o | 5 b-1: b update |
|
|
166 | o | 5 b-1: b update | |
|
167 | 167 | |/ |
|
168 |
o 2 i-2: c -move-> d |
|
|
168 | o 2 i-2: c -move-> d | |
|
169 | 169 | | |
|
170 |
o 1 i-1: a -move-> c |
|
|
170 | o 1 i-1: a -move-> c | |
|
171 | 171 | | |
|
172 |
o 0 i-0 initial commit: a b h |
|
|
172 | o 0 i-0 initial commit: a b h | |
|
173 | 173 | |
|
174 | 174 | |
|
175 | 175 | Create a branch that delete a file previous renamed and recreate it |
|
176 | 176 | |
|
177 | 177 | $ hg up 'desc("i-2")' |
|
178 | 178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
179 | 179 | $ hg rm d |
|
180 | 180 | $ hg ci -m 'd-1 delete d' |
|
181 | 181 | created new head |
|
182 | 182 | $ echo bar > d |
|
183 | 183 | $ hg add d |
|
184 | 184 | $ hg ci -m 'd-2 re-add d' |
|
185 | 185 | $ hg log -G --rev '::.' |
|
186 |
@ 14 d-2 re-add d |
|
|
186 | @ 14 d-2 re-add d | |
|
187 | 187 | | |
|
188 |
o 13 d-1 delete d |
|
|
188 | o 13 d-1 delete d | |
|
189 | 189 | | |
|
190 |
o 2 i-2: c -move-> d |
|
|
190 | o 2 i-2: c -move-> d | |
|
191 | 191 | | |
|
192 |
o 1 i-1: a -move-> c |
|
|
192 | o 1 i-1: a -move-> c | |
|
193 | 193 | | |
|
194 |
o 0 i-0 initial commit: a b h |
|
|
194 | o 0 i-0 initial commit: a b h | |
|
195 | 195 | |
|
196 | 196 | |
|
197 | 197 | Merge: |
|
198 | 198 | - one with change to an unrelated file |
|
199 | 199 | - one deleting and recreating the file |
|
200 | 200 | |
|
201 | 201 | Note: |
|
202 | 202 | | In this case, the merge get conflicting information since on one side we have |
|
203 | 203 | | a "brand new" d. and one the other one we have "d renamed from c (itself |
|
204 | 204 | | renamed from c)". |
|
205 | 205 | | |
|
206 | 206 | | The current code arbitrarily pick one side |
|
207 | 207 | |
|
208 | 208 | $ hg up 'desc("b-1")' |
|
209 | 209 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
210 | 210 | $ hg merge 'desc("d-2")' |
|
211 | 211 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
212 | 212 | (branch merge, don't forget to commit) |
|
213 | 213 | $ hg ci -m 'mBDm-0 simple merge - one way' |
|
214 | 214 | $ hg up 'desc("d-2")' |
|
215 | 215 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
216 | 216 | $ hg merge 'desc("b-1")' |
|
217 | 217 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
218 | 218 | (branch merge, don't forget to commit) |
|
219 | 219 | $ hg ci -m 'mDBm-0 simple merge - the other way' |
|
220 | 220 | created new head |
|
221 | 221 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
222 |
@ 16 mDBm-0 simple merge - the other way |
|
|
222 | @ 16 mDBm-0 simple merge - the other way | |
|
223 | 223 | |\ |
|
224 |
+---o 15 mBDm-0 simple merge - one way |
|
|
224 | +---o 15 mBDm-0 simple merge - one way | |
|
225 | 225 | | |/ |
|
226 |
| o 14 d-2 re-add d |
|
|
226 | | o 14 d-2 re-add d | |
|
227 | 227 | | | |
|
228 |
| o 13 d-1 delete d |
|
|
228 | | o 13 d-1 delete d | |
|
229 | 229 | | | |
|
230 |
o | 5 b-1: b update |
|
|
230 | o | 5 b-1: b update | |
|
231 | 231 | |/ |
|
232 |
o 2 i-2: c -move-> d |
|
|
232 | o 2 i-2: c -move-> d | |
|
233 | 233 | | |
|
234 |
o 1 i-1: a -move-> c |
|
|
234 | o 1 i-1: a -move-> c | |
|
235 | 235 | | |
|
236 |
o 0 i-0 initial commit: a b h |
|
|
236 | o 0 i-0 initial commit: a b h | |
|
237 | 237 | |
|
238 | 238 | |
|
239 | 239 | Having another branch renaming a different file to the same filename as another |
|
240 | 240 | |
|
241 | 241 | $ hg up 'desc("i-2")' |
|
242 | 242 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
243 | 243 | $ hg mv b g |
|
244 | 244 | $ hg ci -m 'e-1 b -move-> g' |
|
245 | 245 | created new head |
|
246 | 246 | $ hg mv g f |
|
247 | 247 | $ hg ci -m 'e-2 g -move-> f' |
|
248 | 248 | $ hg log -G --rev '::.' |
|
249 |
@ 18 e-2 g -move-> f |
|
|
249 | @ 18 e-2 g -move-> f | |
|
250 | 250 | | |
|
251 |
o 17 e-1 b -move-> g |
|
|
251 | o 17 e-1 b -move-> g | |
|
252 | 252 | | |
|
253 |
o 2 i-2: c -move-> d |
|
|
253 | o 2 i-2: c -move-> d | |
|
254 | 254 | | |
|
255 |
o 1 i-1: a -move-> c |
|
|
255 | o 1 i-1: a -move-> c | |
|
256 | 256 | | |
|
257 |
o 0 i-0 initial commit: a b h |
|
|
257 | o 0 i-0 initial commit: a b h | |
|
258 | 258 | |
|
259 | 259 | |
|
260 | 260 | Merge: |
|
261 | 261 | - the "e-" branch renaming b to f (through 'g') |
|
262 | 262 | - the "a-" branch renaming d to f (through e) |
|
263 | 263 | |
|
264 | 264 | $ hg up 'desc("a-2")' |
|
265 | 265 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
266 | 266 | $ hg merge 'desc("e-2")' |
|
267 | 267 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
268 | 268 | (branch merge, don't forget to commit) |
|
269 | 269 | $ hg ci -m 'mAEm-0 simple merge - one way' |
|
270 | 270 | $ hg up 'desc("e-2")' |
|
271 | 271 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
272 | 272 | $ hg merge 'desc("a-2")' |
|
273 | 273 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
274 | 274 | (branch merge, don't forget to commit) |
|
275 | 275 | $ hg ci -m 'mEAm-0 simple merge - the other way' |
|
276 | 276 | created new head |
|
277 | 277 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
278 |
@ 20 mEAm-0 simple merge - the other way |
|
|
278 | @ 20 mEAm-0 simple merge - the other way | |
|
279 | 279 | |\ |
|
280 |
+---o 19 mAEm-0 simple merge - one way |
|
|
280 | +---o 19 mAEm-0 simple merge - one way | |
|
281 | 281 | | |/ |
|
282 |
| o 18 e-2 g -move-> f |
|
|
282 | | o 18 e-2 g -move-> f | |
|
283 | 283 | | | |
|
284 |
| o 17 e-1 b -move-> g |
|
|
284 | | o 17 e-1 b -move-> g | |
|
285 | 285 | | | |
|
286 |
o | 4 a-2: e -move-> f |
|
|
286 | o | 4 a-2: e -move-> f | |
|
287 | 287 | | | |
|
288 |
o | 3 a-1: d -move-> e |
|
|
288 | o | 3 a-1: d -move-> e | |
|
289 | 289 | |/ |
|
290 |
o 2 i-2: c -move-> d |
|
|
290 | o 2 i-2: c -move-> d | |
|
291 | 291 | | |
|
292 |
o 1 i-1: a -move-> c |
|
|
292 | o 1 i-1: a -move-> c | |
|
293 | 293 | | |
|
294 |
o 0 i-0 initial commit: a b h |
|
|
294 | o 0 i-0 initial commit: a b h | |
|
295 | 295 | |
|
296 | 296 | |
|
297 | 297 | Note: |
|
298 | 298 | | In this case, one of the merge wrongly record a merge while there is none. |
|
299 | 299 | | This lead to bad copy tracing information to be dug up. |
|
300 | 300 | |
|
301 | 301 | |
|
302 | 302 | Merge: |
|
303 | 303 | - one with change to an unrelated file (b) |
|
304 | 304 | - one overwriting a file (d) with a rename (from h to i to d) |
|
305 | 305 | |
|
306 | 306 | $ hg up 'desc("i-2")' |
|
307 | 307 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
308 | 308 | $ hg mv h i |
|
309 | 309 | $ hg commit -m "f-1: rename h -> i" |
|
310 | 310 | created new head |
|
311 | 311 | $ hg mv --force i d |
|
312 | 312 | $ hg commit -m "f-2: rename i -> d" |
|
313 | 313 | $ hg debugindex d |
|
314 | 314 | rev linkrev nodeid p1 p2 |
|
315 | 315 | 0 2 01c2f5eabdc4 000000000000 000000000000 |
|
316 | 316 | 1 10 b004912a8510 000000000000 000000000000 |
|
317 | 317 | 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 |
|
318 | 318 | 3 22 c72365ee036f 000000000000 000000000000 |
|
319 | 319 | $ hg up 'desc("b-1")' |
|
320 | 320 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
321 | 321 | $ hg merge 'desc("f-2")' |
|
322 | 322 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
323 | 323 | (branch merge, don't forget to commit) |
|
324 | 324 | $ hg ci -m 'mBFm-0 simple merge - one way' |
|
325 | 325 | $ hg up 'desc("f-2")' |
|
326 | 326 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
327 | 327 | $ hg merge 'desc("b-1")' |
|
328 | 328 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
329 | 329 | (branch merge, don't forget to commit) |
|
330 | 330 | $ hg ci -m 'mFBm-0 simple merge - the other way' |
|
331 | 331 | created new head |
|
332 | 332 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
333 |
@ 24 mFBm-0 simple merge - the other way |
|
|
333 | @ 24 mFBm-0 simple merge - the other way | |
|
334 | 334 | |\ |
|
335 |
+---o 23 mBFm-0 simple merge - one way |
|
|
335 | +---o 23 mBFm-0 simple merge - one way | |
|
336 | 336 | | |/ |
|
337 |
| o 22 f-2: rename i -> d |
|
|
337 | | o 22 f-2: rename i -> d | |
|
338 | 338 | | | |
|
339 |
| o 21 f-1: rename h -> i |
|
|
339 | | o 21 f-1: rename h -> i | |
|
340 | 340 | | | |
|
341 |
o | 5 b-1: b update |
|
|
341 | o | 5 b-1: b update | |
|
342 | 342 | |/ |
|
343 |
o 2 i-2: c -move-> d |
|
|
343 | o 2 i-2: c -move-> d | |
|
344 | 344 | | |
|
345 |
o 1 i-1: a -move-> c |
|
|
345 | o 1 i-1: a -move-> c | |
|
346 | 346 | | |
|
347 |
o 0 i-0 initial commit: a b h |
|
|
347 | o 0 i-0 initial commit: a b h | |
|
348 | 348 | |
|
349 | 349 | |
|
350 | 350 | Merge: |
|
351 | 351 | - one with change to a file |
|
352 | 352 | - one deleting and recreating the file |
|
353 | 353 | |
|
354 | 354 | $ hg up 'desc("i-2")' |
|
355 | 355 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
356 | 356 | $ echo "some update" >> d |
|
357 | 357 | $ hg commit -m "g-1: update d" |
|
358 | 358 | created new head |
|
359 | 359 | $ hg up 'desc("d-2")' |
|
360 | 360 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
361 | 361 | $ hg merge 'desc("g-1")' --tool :union |
|
362 | 362 | merging d |
|
363 | 363 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
364 | 364 | (branch merge, don't forget to commit) |
|
365 | 365 | $ hg ci -m 'mDGm-0 simple merge - one way' |
|
366 | 366 | $ hg up 'desc("g-1")' |
|
367 | 367 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
368 | 368 | $ hg merge 'desc("d-2")' --tool :union |
|
369 | 369 | merging d |
|
370 | 370 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
371 | 371 | (branch merge, don't forget to commit) |
|
372 | 372 | $ hg ci -m 'mGDm-0 simple merge - the other way' |
|
373 | 373 | created new head |
|
374 | 374 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
375 |
@ 27 mGDm-0 simple merge - the other way |
|
|
375 | @ 27 mGDm-0 simple merge - the other way | |
|
376 | 376 | |\ |
|
377 |
+---o 26 mDGm-0 simple merge - one way |
|
|
377 | +---o 26 mDGm-0 simple merge - one way | |
|
378 | 378 | | |/ |
|
379 |
| o 25 g-1: update d |
|
|
379 | | o 25 g-1: update d | |
|
380 | 380 | | | |
|
381 |
o | 14 d-2 re-add d |
|
|
381 | o | 14 d-2 re-add d | |
|
382 | 382 | | | |
|
383 |
o | 13 d-1 delete d |
|
|
383 | o | 13 d-1 delete d | |
|
384 | 384 | |/ |
|
385 |
o 2 i-2: c -move-> d |
|
|
385 | o 2 i-2: c -move-> d | |
|
386 | 386 | | |
|
387 |
o 1 i-1: a -move-> c |
|
|
387 | o 1 i-1: a -move-> c | |
|
388 | 388 | | |
|
389 |
o 0 i-0 initial commit: a b h |
|
|
389 | o 0 i-0 initial commit: a b h | |
|
390 | 390 | |
|
391 | 391 | |
|
392 | 392 | |
|
393 | 393 | Merge: |
|
394 | 394 | - one with change to a file (d) |
|
395 | 395 | - one overwriting that file with a rename (from h to i, to d) |
|
396 | 396 | |
|
397 | 397 | $ hg up 'desc("f-2")' |
|
398 | 398 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
399 | 399 | $ hg merge 'desc("g-1")' --tool :union |
|
400 | 400 | merging d |
|
401 | 401 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
402 | 402 | (branch merge, don't forget to commit) |
|
403 | 403 | $ hg ci -m 'mFGm-0 simple merge - one way' |
|
404 | 404 | created new head |
|
405 | 405 | $ hg up 'desc("g-1")' |
|
406 | 406 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
407 | 407 | $ hg merge 'desc("f-2")' --tool :union |
|
408 | 408 | merging d |
|
409 | 409 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
410 | 410 | (branch merge, don't forget to commit) |
|
411 | 411 | $ hg ci -m 'mGFm-0 simple merge - the other way' |
|
412 | 412 | created new head |
|
413 | 413 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
414 |
@ 29 mGFm-0 simple merge - the other way |
|
|
414 | @ 29 mGFm-0 simple merge - the other way | |
|
415 | 415 | |\ |
|
416 |
+---o 28 mFGm-0 simple merge - one way |
|
|
416 | +---o 28 mFGm-0 simple merge - one way | |
|
417 | 417 | | |/ |
|
418 |
| o 25 g-1: update d |
|
|
418 | | o 25 g-1: update d | |
|
419 | 419 | | | |
|
420 |
o | 22 f-2: rename i -> d |
|
|
420 | o | 22 f-2: rename i -> d | |
|
421 | 421 | | | |
|
422 |
o | 21 f-1: rename h -> i |
|
|
422 | o | 21 f-1: rename h -> i | |
|
423 | 423 | |/ |
|
424 |
o 2 i-2: c -move-> d |
|
|
424 | o 2 i-2: c -move-> d | |
|
425 | 425 | | |
|
426 |
o 1 i-1: a -move-> c |
|
|
426 | o 1 i-1: a -move-> c | |
|
427 | 427 | | |
|
428 |
o 0 i-0 initial commit: a b h |
|
|
428 | o 0 i-0 initial commit: a b h | |
|
429 | 429 | |
|
430 | 430 | |
|
431 | 431 | |
|
432 | 432 | Check results |
|
433 | 433 |
============ |
|
434 | 434 | |
|
435 | 435 | merging with unrelated change does not interfer wit the renames |
|
436 | 436 | --------------------------------------------------------------- |
|
437 | 437 | |
|
438 | 438 | - rename on one side |
|
439 | 439 | - unrelated change on the other side |
|
440 | 440 | |
|
441 | 441 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' |
|
442 | 442 | A f |
|
443 | 443 | d |
|
444 | 444 | R d |
|
445 | 445 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' |
|
446 | 446 | A f |
|
447 | 447 | d |
|
448 | 448 | R d |
|
449 | 449 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' |
|
450 | 450 | M b |
|
451 | 451 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' |
|
452 | 452 | M b |
|
453 | 453 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' |
|
454 | 454 | M b |
|
455 | 455 | A f |
|
456 | 456 | d |
|
457 | 457 | R d |
|
458 | 458 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' |
|
459 | 459 | M b |
|
460 | 460 | A f |
|
461 | 461 | d |
|
462 | 462 | R d |
|
463 | 463 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' |
|
464 | 464 | M b |
|
465 | 465 | A f |
|
466 | 466 | a |
|
467 | 467 | R a |
|
468 | 468 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' |
|
469 | 469 | M b |
|
470 | 470 | A f |
|
471 | 471 | a |
|
472 | 472 | R a |
|
473 | 473 | |
|
474 | 474 | merging with the side having a delete |
|
475 | 475 | ------------------------------------- |
|
476 | 476 | |
|
477 | 477 | case summary: |
|
478 | 478 | - one with change to an unrelated file |
|
479 | 479 | - one deleting the change |
|
480 | 480 | and recreate an unrelated file after the merge |
|
481 | 481 | |
|
482 | 482 | checks: |
|
483 | 483 | - comparing from the merge |
|
484 | 484 | |
|
485 | 485 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' |
|
486 | 486 | R d |
|
487 | 487 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' |
|
488 | 488 | R d |
|
489 | 489 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' |
|
490 | 490 | M b |
|
491 | 491 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' |
|
492 | 492 | M b |
|
493 | 493 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' |
|
494 | 494 | M b |
|
495 | 495 | R d |
|
496 | 496 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' |
|
497 | 497 | M b |
|
498 | 498 | R d |
|
499 | 499 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' |
|
500 | 500 | M b |
|
501 | 501 | R a |
|
502 | 502 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' |
|
503 | 503 | M b |
|
504 | 504 | R a |
|
505 | 505 | |
|
506 | 506 | - comparing with the merge children re-adding the file |
|
507 | 507 | |
|
508 | 508 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' |
|
509 | 509 | M d |
|
510 | 510 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' |
|
511 | 511 | M d |
|
512 | 512 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' |
|
513 | 513 | M b |
|
514 | 514 | A d |
|
515 | 515 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' |
|
516 | 516 | M b |
|
517 | 517 | A d |
|
518 | 518 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' |
|
519 | 519 | M b |
|
520 | 520 | M d |
|
521 | 521 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' |
|
522 | 522 | M b |
|
523 | 523 | M d |
|
524 | 524 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' |
|
525 | 525 | M b |
|
526 | 526 | A d |
|
527 | 527 | R a |
|
528 | 528 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' |
|
529 | 529 | M b |
|
530 | 530 | A d |
|
531 | 531 | R a |
|
532 | 532 | |
|
533 | 533 | Comparing with a merge re-adding the file afterward |
|
534 | 534 | --------------------------------------------------- |
|
535 | 535 | |
|
536 | 536 | Merge: |
|
537 | 537 | - one with change to an unrelated file |
|
538 | 538 | - one deleting and recreating the change |
|
539 | 539 | |
|
540 | 540 | Note: |
|
541 | 541 | | In this case, one of the merge wrongly record a merge while there is none. |
|
542 | 542 | | This lead to bad copy tracing information to be dug up. |
|
543 | 543 | |
|
544 | 544 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' |
|
545 | 545 | M d |
|
546 | 546 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' |
|
547 | 547 | M d |
|
548 | 548 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' |
|
549 | 549 | M b |
|
550 | 550 | M d |
|
551 | 551 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' |
|
552 | 552 | M b |
|
553 | 553 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' |
|
554 | 554 | M b |
|
555 | 555 | M d |
|
556 | 556 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' |
|
557 | 557 | M b |
|
558 | 558 | M d |
|
559 | 559 | |
|
560 | 560 | The bugs makes recorded copy is different depending of where we started the merge from since |
|
561 | 561 | |
|
562 | 562 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' |
|
563 | 563 | 0bb5445dc4d02f4e0d86cf16f9f3a411d0f17744 644 d |
|
564 | 564 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' |
|
565 | 565 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
566 | 566 | |
|
567 | 567 | The 0bb5445dc4d02f4e0d86cf16f9f3a411d0f17744 entry is wrong, since the file was |
|
568 | 568 | deleted on one side (then recreate) and untouched on the other side, no "merge" |
|
569 | 569 | has happened. The resulting `d` file is the untouched version from branch `D`, |
|
570 | 570 | not a merge. |
|
571 | 571 | |
|
572 | 572 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' |
|
573 | 573 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
574 | 574 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' |
|
575 | 575 | 01c2f5eabdc4ce2bdee42b5f86311955e6c8f573 644 d |
|
576 | 576 | $ hg debugindex d |
|
577 | 577 | rev linkrev nodeid p1 p2 |
|
578 | 578 | 0 2 01c2f5eabdc4 000000000000 000000000000 |
|
579 | 579 | 1 10 b004912a8510 000000000000 000000000000 |
|
580 | 580 | 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 |
|
581 | 581 | 3 22 c72365ee036f 000000000000 000000000000 |
|
582 | 582 | 4 23 863d9bc49190 01c2f5eabdc4 c72365ee036f |
|
583 | 583 | 5 25 7bded9d9da1f 01c2f5eabdc4 000000000000 |
|
584 | 584 | 6 26 f04cac32d703 b004912a8510 7bded9d9da1f |
|
585 | 585 | 7 27 d7a5eafb9322 7bded9d9da1f b004912a8510 |
|
586 | 586 | 8 28 2ed7a51aed47 c72365ee036f 7bded9d9da1f |
|
587 | 587 | |
|
588 | 588 | (This `hg log` output if wrong, since no merge actually happened). |
|
589 | 589 | |
|
590 | 590 | $ hg log -Gfr 'desc("mBDm-0")' d |
|
591 |
o 15 mBDm-0 simple merge - one way |
|
|
591 | o 15 mBDm-0 simple merge - one way | |
|
592 | 592 | |\ |
|
593 |
o : 14 d-2 re-add d |
|
|
593 | o : 14 d-2 re-add d | |
|
594 | 594 | :/ |
|
595 |
o 2 i-2: c -move-> d |
|
|
595 | o 2 i-2: c -move-> d | |
|
596 | 596 | | |
|
597 |
o 1 i-1: a -move-> c |
|
|
597 | o 1 i-1: a -move-> c | |
|
598 | 598 | | |
|
599 |
o 0 i-0 initial commit: a b h |
|
|
599 | o 0 i-0 initial commit: a b h | |
|
600 | 600 | |
|
601 | 601 | |
|
602 | 602 | This `hg log` output is correct |
|
603 | 603 | |
|
604 | 604 | $ hg log -Gfr 'desc("mDBm-0")' d |
|
605 |
o 14 d-2 re-add d |
|
|
605 | o 14 d-2 re-add d | |
|
606 | 606 | | |
|
607 | 607 | ~ |
|
608 | 608 | |
|
609 | 609 |
$ |
|
610 | 610 | M b |
|
611 | 611 | A d |
|
612 | 612 | a |
|
613 | 613 | R a |
|
614 | 614 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' |
|
615 | 615 | M b |
|
616 | 616 | A d |
|
617 | 617 | R a |
|
618 | 618 | |
|
619 | 619 | Comparing with a merge with colliding rename |
|
620 | 620 | -------------------------------------------- |
|
621 | 621 | |
|
622 | 622 | - the "e-" branch renaming b to f (through 'g') |
|
623 | 623 | - the "a-" branch renaming d to f (through e) |
|
624 | 624 | |
|
625 | 625 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
626 | 626 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f |
|
627 | 627 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
628 | 628 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f |
|
629 | 629 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
630 | 630 | 0dd616bc7ab1a111921d95d76f69cda5c2ac539c 644 f |
|
631 | 631 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
632 | 632 | 6da5a2eecb9c833f830b67a4972366d49a9a142c 644 f |
|
633 | 633 | $ hg debugindex f |
|
634 | 634 | rev linkrev nodeid p1 p2 |
|
635 | 635 | 0 4 0dd616bc7ab1 000000000000 000000000000 |
|
636 | 636 | 1 18 6da5a2eecb9c 000000000000 000000000000 |
|
637 | 637 | 2 19 eb806e34ef6b 0dd616bc7ab1 6da5a2eecb9c |
|
638 | 638 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' |
|
639 | 639 | M f |
|
640 | 640 | R b |
|
641 | 641 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' |
|
642 | 642 | M f |
|
643 | 643 | R b |
|
644 | 644 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' |
|
645 | 645 | M f |
|
646 | 646 | R d |
|
647 | 647 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' |
|
648 | 648 | M f |
|
649 | 649 | R d |
|
650 | 650 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
|
651 | 651 | A f |
|
652 | 652 | d |
|
653 | 653 | R d |
|
654 | 654 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
|
655 | 655 | A f |
|
656 | 656 | b |
|
657 | 657 | R b |
|
658 | 658 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' |
|
659 | 659 | A f |
|
660 | 660 | d |
|
661 | 661 | R b |
|
662 | 662 | R d |
|
663 | 663 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' |
|
664 | 664 | A f |
|
665 | 665 | d |
|
666 | 666 | R b |
|
667 | 667 | R d |
|
668 | 668 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' |
|
669 | 669 | A f |
|
670 | 670 | a |
|
671 | 671 | R a |
|
672 | 672 | R b |
|
673 | 673 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' |
|
674 | 674 | A f |
|
675 | 675 | a |
|
676 | 676 | R a |
|
677 | 677 | R b |
|
678 | 678 | |
|
679 | 679 | Merge: |
|
680 | 680 | - one with change to an unrelated file (b) |
|
681 | 681 | - one overwriting a file (d) with a rename (from h to i to d) |
|
682 | 682 | |
|
683 | 683 | The overwriting should take over. However, the behavior is currently buggy |
|
684 | 684 | |
|
685 | 685 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' |
|
686 | 686 | M b |
|
687 | 687 | A d |
|
688 | 688 | a (true !) |
|
689 | 689 | h (false !) |
|
690 | 690 | R a |
|
691 | 691 | R h |
|
692 | 692 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' |
|
693 | 693 | M b |
|
694 | 694 | A d |
|
695 | 695 | h |
|
696 | 696 | R a |
|
697 | 697 | R h |
|
698 | 698 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' |
|
699 | 699 | M d |
|
700 | 700 | R h |
|
701 | 701 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' |
|
702 | 702 | M b |
|
703 | 703 | M d |
|
704 | 704 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' |
|
705 | 705 | M b |
|
706 | 706 | M d |
|
707 | 707 | R i |
|
708 | 708 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' |
|
709 | 709 | M d |
|
710 | 710 | R h |
|
711 | 711 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' |
|
712 | 712 | M b |
|
713 | 713 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' |
|
714 | 714 | M b |
|
715 | 715 | M d |
|
716 | 716 | R i |
|
717 | 717 | |
|
718 | 718 | The following graphlog is wrong, the "a -> c -> d" chain was overwritten and should not appear. |
|
719 | 719 | |
|
720 | 720 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
721 |
o 23 mBFm-0 simple merge - one way |
|
|
721 | o 23 mBFm-0 simple merge - one way | |
|
722 | 722 | |\ |
|
723 |
o : 22 f-2: rename i -> d |
|
|
723 | o : 22 f-2: rename i -> d | |
|
724 | 724 | | : |
|
725 |
o : 21 f-1: rename h -> i |
|
|
725 | o : 21 f-1: rename h -> i | |
|
726 | 726 | :/ |
|
727 |
o 2 i-2: c -move-> d |
|
|
727 | o 2 i-2: c -move-> d | |
|
728 | 728 | | |
|
729 |
o 1 i-1: a -move-> c |
|
|
729 | o 1 i-1: a -move-> c | |
|
730 | 730 | | |
|
731 |
o 0 i-0 initial commit: a b h |
|
|
731 | o 0 i-0 initial commit: a b h | |
|
732 | 732 | |
|
733 | 733 | |
|
734 | 734 | The following output is correct. |
|
735 | 735 | |
|
736 | 736 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
737 |
o 22 f-2: rename i -> d |
|
|
737 | o 22 f-2: rename i -> d | |
|
738 | 738 | | |
|
739 |
o 21 f-1: rename h -> i |
|
|
739 | o 21 f-1: rename h -> i | |
|
740 | 740 | : |
|
741 |
o 0 i-0 initial commit: a b h |
|
|
741 | o 0 i-0 initial commit: a b h | |
|
742 | 742 | |
|
743 | 743 | |
|
744 | 744 | Merge: |
|
745 | 745 | - one with change to a file |
|
746 | 746 | - one deleting and recreating the file |
|
747 | 747 | |
|
748 | 748 | Unlike in the 'BD/DB' cases, an actuall merge happened here. So we should |
|
749 | 749 | consider history and rename on both branch of the merge. |
|
750 | 750 | |
|
751 | 751 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' |
|
752 | 752 | A d |
|
753 | 753 | a |
|
754 | 754 | R a |
|
755 | 755 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' |
|
756 | 756 | A d |
|
757 | 757 | a |
|
758 | 758 | R a |
|
759 | 759 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' |
|
760 | 760 | M d |
|
761 | 761 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' |
|
762 | 762 | M d |
|
763 | 763 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' |
|
764 | 764 | M d |
|
765 | 765 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' |
|
766 | 766 | M d |
|
767 | 767 | |
|
768 | 768 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
769 |
o 26 mDGm-0 simple merge - one way |
|
|
769 | o 26 mDGm-0 simple merge - one way | |
|
770 | 770 | |\ |
|
771 |
| o 25 g-1: update d |
|
|
771 | | o 25 g-1: update d | |
|
772 | 772 | | | |
|
773 |
o | 14 d-2 re-add d |
|
|
773 | o | 14 d-2 re-add d | |
|
774 | 774 | |/ |
|
775 |
o 2 i-2: c -move-> d |
|
|
775 | o 2 i-2: c -move-> d | |
|
776 | 776 | | |
|
777 |
o 1 i-1: a -move-> c |
|
|
777 | o 1 i-1: a -move-> c | |
|
778 | 778 | | |
|
779 |
o 0 i-0 initial commit: a b h |
|
|
779 | o 0 i-0 initial commit: a b h | |
|
780 | 780 | |
|
781 | 781 | |
|
782 | 782 | |
|
783 | 783 |
$ |
|
784 |
o 26 mDGm-0 simple merge - one way |
|
|
784 | o 26 mDGm-0 simple merge - one way | |
|
785 | 785 | |\ |
|
786 |
| o 25 g-1: update d |
|
|
786 | | o 25 g-1: update d | |
|
787 | 787 | | | |
|
788 |
o | 14 d-2 re-add d |
|
|
788 | o | 14 d-2 re-add d | |
|
789 | 789 | |/ |
|
790 |
o 2 i-2: c -move-> d |
|
|
790 | o 2 i-2: c -move-> d | |
|
791 | 791 | | |
|
792 |
o 1 i-1: a -move-> c |
|
|
792 | o 1 i-1: a -move-> c | |
|
793 | 793 | | |
|
794 |
o 0 i-0 initial commit: a b h |
|
|
794 | o 0 i-0 initial commit: a b h | |
|
795 | 795 | |
|
796 | 796 | |
|
797 | 797 | |
|
798 | 798 | Merge: |
|
799 | 799 | - one with change to a file (d) |
|
800 | 800 | - one overwriting that file with a rename (from h to i, to d) |
|
801 | 801 | |
|
802 | 802 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
803 | 803 | history are relevant. |
|
804 | 804 | |
|
805 | 805 | Note: |
|
806 | 806 | | In this case, the merge get conflicting information since on one side we have |
|
807 | 807 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
808 | 808 | | |
|
809 | 809 | | The current code arbitrarily pick one side |
|
810 | 810 | |
|
811 | 811 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' |
|
812 | 812 | A d |
|
813 | 813 | a |
|
814 | 814 | R a |
|
815 | 815 | R h |
|
816 | 816 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' |
|
817 | 817 | A d |
|
818 | 818 | a |
|
819 | 819 | R a |
|
820 | 820 | R h |
|
821 | 821 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' |
|
822 | 822 | M d |
|
823 | 823 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' |
|
824 | 824 | M d |
|
825 | 825 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' |
|
826 | 826 | M d |
|
827 | 827 | R i |
|
828 | 828 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' |
|
829 | 829 | M d |
|
830 | 830 | R i |
|
831 | 831 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' |
|
832 | 832 | M d |
|
833 | 833 | R h |
|
834 | 834 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' |
|
835 | 835 | M d |
|
836 | 836 | R h |
|
837 | 837 | |
|
838 | 838 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
839 |
o 28 mFGm-0 simple merge - one way |
|
|
839 | o 28 mFGm-0 simple merge - one way | |
|
840 | 840 | |\ |
|
841 |
| o 25 g-1: update d |
|
|
841 | | o 25 g-1: update d | |
|
842 | 842 | | | |
|
843 |
o | 22 f-2: rename i -> d |
|
|
843 | o | 22 f-2: rename i -> d | |
|
844 | 844 | | | |
|
845 |
o | 21 f-1: rename h -> i |
|
|
845 | o | 21 f-1: rename h -> i | |
|
846 | 846 | |/ |
|
847 |
o 2 i-2: c -move-> d |
|
|
847 | o 2 i-2: c -move-> d | |
|
848 | 848 | | |
|
849 |
o 1 i-1: a -move-> c |
|
|
849 | o 1 i-1: a -move-> c | |
|
850 | 850 | | |
|
851 |
o 0 i-0 initial commit: a b h |
|
|
851 | o 0 i-0 initial commit: a b h | |
|
852 | 852 | |
|
853 | 853 | |
|
854 | 854 | |
|
855 | 855 |
$ |
|
856 |
@ 29 mGFm-0 simple merge - the other way |
|
|
856 | @ 29 mGFm-0 simple merge - the other way | |
|
857 | 857 | |\ |
|
858 |
| o 25 g-1: update d |
|
|
858 | | o 25 g-1: update d | |
|
859 | 859 | | | |
|
860 |
o | 22 f-2: rename i -> d |
|
|
860 | o | 22 f-2: rename i -> d | |
|
861 | 861 | | | |
|
862 |
o | 21 f-1: rename h -> i |
|
|
862 | o | 21 f-1: rename h -> i | |
|
863 | 863 | |/ |
|
864 |
o 2 i-2: c -move-> d |
|
|
864 | o 2 i-2: c -move-> d | |
|
865 | 865 | | |
|
866 |
o 1 i-1: a -move-> c |
|
|
866 | o 1 i-1: a -move-> c | |
|
867 | 867 | | |
|
868 |
o 0 i-0 initial commit: a b h |
|
|
868 | o 0 i-0 initial commit: a b h | |
|
869 | 869 |
General Comments 0
You need to be logged in to leave comments.
Login now