##// END OF EJS Templates
tests: run python script through quoted interpreter instead of directly...
Matt Harbison -
r47859:7383df4f stable
parent child Browse files
Show More
@@ -1,3821 +1,3820 b''
1 #testcases filelog compatibility changeset sidedata upgraded upgraded-parallel
1 #testcases filelog compatibility changeset sidedata upgraded upgraded-parallel
2
2
3 =====================================================
3 =====================================================
4 Test Copy tracing for chain of copies involving merge
4 Test Copy tracing for chain of copies involving merge
5 =====================================================
5 =====================================================
6
6
7 This test files covers copies/rename case for a chains of commit where merges
7 This test files covers copies/rename case for a chains of commit where merges
8 are involved. It cheks we do not have unwanted update of behavior and that the
8 are involved. It cheks we do not have unwanted update of behavior and that the
9 different options to retrieve copies behave correctly.
9 different options to retrieve copies behave correctly.
10
10
11
11
12 Setup
12 Setup
13 =====
13 =====
14
14
15 use git diff to see rename
15 use git diff to see rename
16
16
17 $ cat << EOF >> ./no-linkrev
17 $ cat << EOF >> ./no-linkrev
18 > #!$PYTHON
18 > #!$PYTHON
19 > # filter out linkrev part of the debugindex command
19 > # filter out linkrev part of the debugindex command
20 > import sys
20 > import sys
21 > for line in sys.stdin:
21 > for line in sys.stdin:
22 > if " linkrev " in line:
22 > if " linkrev " in line:
23 > print(line.rstrip())
23 > print(line.rstrip())
24 > else:
24 > else:
25 > l = "%s *%s" % (line[:6], line[14:].rstrip())
25 > l = "%s *%s" % (line[:6], line[14:].rstrip())
26 > print(l)
26 > print(l)
27 > EOF
27 > EOF
28 $ chmod +x no-linkrev
29
28
30 $ cat << EOF >> $HGRCPATH
29 $ cat << EOF >> $HGRCPATH
31 > [diff]
30 > [diff]
32 > git=yes
31 > git=yes
33 > [command-templates]
32 > [command-templates]
34 > log={desc}\n
33 > log={desc}\n
35 > EOF
34 > EOF
36
35
37 #if compatibility
36 #if compatibility
38 $ cat >> $HGRCPATH << EOF
37 $ cat >> $HGRCPATH << EOF
39 > [experimental]
38 > [experimental]
40 > copies.read-from = compatibility
39 > copies.read-from = compatibility
41 > EOF
40 > EOF
42 #endif
41 #endif
43
42
44 #if changeset
43 #if changeset
45 $ cat >> $HGRCPATH << EOF
44 $ cat >> $HGRCPATH << EOF
46 > [experimental]
45 > [experimental]
47 > copies.read-from = changeset-only
46 > copies.read-from = changeset-only
48 > copies.write-to = changeset-only
47 > copies.write-to = changeset-only
49 > EOF
48 > EOF
50 #endif
49 #endif
51
50
52 #if sidedata
51 #if sidedata
53 $ cat >> $HGRCPATH << EOF
52 $ cat >> $HGRCPATH << EOF
54 > [format]
53 > [format]
55 > exp-use-side-data = yes
54 > exp-use-side-data = yes
56 > exp-use-copies-side-data-changeset = yes
55 > exp-use-copies-side-data-changeset = yes
57 > EOF
56 > EOF
58 #endif
57 #endif
59
58
60
59
61 $ cat > same-content.txt << EOF
60 $ cat > same-content.txt << EOF
62 > Here is some content that will be the same accros multiple file.
61 > Here is some content that will be the same accros multiple file.
63 >
62 >
64 > This is done on purpose so that we end up in some merge situation, were the
63 > This is done on purpose so that we end up in some merge situation, were the
65 > resulting content is the same as in the parent(s), but a new filenodes still
64 > resulting content is the same as in the parent(s), but a new filenodes still
66 > need to be created to record some file history information (especially
65 > need to be created to record some file history information (especially
67 > about copies).
66 > about copies).
68 > EOF
67 > EOF
69
68
70 $ hg init repo-chain
69 $ hg init repo-chain
71 $ cd repo-chain
70 $ cd repo-chain
72
71
73 Add some linear rename initialy
72 Add some linear rename initialy
74
73
75 $ cp ../same-content.txt a
74 $ cp ../same-content.txt a
76 $ cp ../same-content.txt b
75 $ cp ../same-content.txt b
77 $ cp ../same-content.txt h
76 $ cp ../same-content.txt h
78 $ echo "original content for P" > p
77 $ echo "original content for P" > p
79 $ echo "original content for Q" > q
78 $ echo "original content for Q" > q
80 $ echo "original content for R" > r
79 $ echo "original content for R" > r
81 $ hg ci -Am 'i-0 initial commit: a b h p q r'
80 $ hg ci -Am 'i-0 initial commit: a b h p q r'
82 adding a
81 adding a
83 adding b
82 adding b
84 adding h
83 adding h
85 adding p
84 adding p
86 adding q
85 adding q
87 adding r
86 adding r
88 $ hg mv a c
87 $ hg mv a c
89 $ hg mv p s
88 $ hg mv p s
90 $ hg ci -Am 'i-1: a -move-> c, p -move-> s'
89 $ hg ci -Am 'i-1: a -move-> c, p -move-> s'
91 $ hg mv c d
90 $ hg mv c d
92 $ hg mv s t
91 $ hg mv s t
93 $ hg ci -Am 'i-2: c -move-> d, s -move-> t'
92 $ hg ci -Am 'i-2: c -move-> d, s -move-> t'
94 $ hg log -G
93 $ hg log -G
95 @ i-2: c -move-> d, s -move-> t
94 @ i-2: c -move-> d, s -move-> t
96 |
95 |
97 o i-1: a -move-> c, p -move-> s
96 o i-1: a -move-> c, p -move-> s
98 |
97 |
99 o i-0 initial commit: a b h p q r
98 o i-0 initial commit: a b h p q r
100
99
101
100
102 And having another branch with renames on the other side
101 And having another branch with renames on the other side
103
102
104 $ hg mv d e
103 $ hg mv d e
105 $ hg ci -Am 'a-1: d -move-> e'
104 $ hg ci -Am 'a-1: d -move-> e'
106 $ hg mv e f
105 $ hg mv e f
107 $ hg ci -Am 'a-2: e -move-> f'
106 $ hg ci -Am 'a-2: e -move-> f'
108 $ hg log -G --rev '::.'
107 $ hg log -G --rev '::.'
109 @ a-2: e -move-> f
108 @ a-2: e -move-> f
110 |
109 |
111 o a-1: d -move-> e
110 o a-1: d -move-> e
112 |
111 |
113 o i-2: c -move-> d, s -move-> t
112 o i-2: c -move-> d, s -move-> t
114 |
113 |
115 o i-1: a -move-> c, p -move-> s
114 o i-1: a -move-> c, p -move-> s
116 |
115 |
117 o i-0 initial commit: a b h p q r
116 o i-0 initial commit: a b h p q r
118
117
119
118
120 Have a branching with nothing on one side
119 Have a branching with nothing on one side
121
120
122 $ hg up 'desc("i-2")'
121 $ hg up 'desc("i-2")'
123 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
122 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
124 $ echo foo > b
123 $ echo foo > b
125 $ hg ci -m 'b-1: b update'
124 $ hg ci -m 'b-1: b update'
126 created new head
125 created new head
127 $ hg log -G --rev '::.'
126 $ hg log -G --rev '::.'
128 @ b-1: b update
127 @ b-1: b update
129 |
128 |
130 o i-2: c -move-> d, s -move-> t
129 o i-2: c -move-> d, s -move-> t
131 |
130 |
132 o i-1: a -move-> c, p -move-> s
131 o i-1: a -move-> c, p -move-> s
133 |
132 |
134 o i-0 initial commit: a b h p q r
133 o i-0 initial commit: a b h p q r
135
134
136
135
137 Create a branch that delete a file previous renamed
136 Create a branch that delete a file previous renamed
138
137
139 $ hg up 'desc("i-2")'
138 $ hg up 'desc("i-2")'
140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
139 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 $ hg rm d
140 $ hg rm d
142 $ hg ci -m 'c-1 delete d'
141 $ hg ci -m 'c-1 delete d'
143 created new head
142 created new head
144 $ hg log -G --rev '::.'
143 $ hg log -G --rev '::.'
145 @ c-1 delete d
144 @ c-1 delete d
146 |
145 |
147 o i-2: c -move-> d, s -move-> t
146 o i-2: c -move-> d, s -move-> t
148 |
147 |
149 o i-1: a -move-> c, p -move-> s
148 o i-1: a -move-> c, p -move-> s
150 |
149 |
151 o i-0 initial commit: a b h p q r
150 o i-0 initial commit: a b h p q r
152
151
153
152
154 Create a branch that delete a file previous renamed and recreate it
153 Create a branch that delete a file previous renamed and recreate it
155
154
156 $ hg up 'desc("i-2")'
155 $ hg up 'desc("i-2")'
157 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
158 $ hg rm d
157 $ hg rm d
159 $ hg ci -m 'd-1 delete d'
158 $ hg ci -m 'd-1 delete d'
160 created new head
159 created new head
161 $ echo bar > d
160 $ echo bar > d
162 $ hg add d
161 $ hg add d
163 $ hg ci -m 'd-2 re-add d'
162 $ hg ci -m 'd-2 re-add d'
164 $ hg log -G --rev '::.'
163 $ hg log -G --rev '::.'
165 @ d-2 re-add d
164 @ d-2 re-add d
166 |
165 |
167 o d-1 delete d
166 o d-1 delete d
168 |
167 |
169 o i-2: c -move-> d, s -move-> t
168 o i-2: c -move-> d, s -move-> t
170 |
169 |
171 o i-1: a -move-> c, p -move-> s
170 o i-1: a -move-> c, p -move-> s
172 |
171 |
173 o i-0 initial commit: a b h p q r
172 o i-0 initial commit: a b h p q r
174
173
175
174
176 Having another branch renaming a different file to the same filename as another
175 Having another branch renaming a different file to the same filename as another
177
176
178 $ hg up 'desc("i-2")'
177 $ hg up 'desc("i-2")'
179 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
180 $ hg mv b g
179 $ hg mv b g
181 $ hg ci -m 'e-1 b -move-> g'
180 $ hg ci -m 'e-1 b -move-> g'
182 created new head
181 created new head
183 $ hg mv g f
182 $ hg mv g f
184 $ hg ci -m 'e-2 g -move-> f'
183 $ hg ci -m 'e-2 g -move-> f'
185 $ hg log -G --rev '::.'
184 $ hg log -G --rev '::.'
186 @ e-2 g -move-> f
185 @ e-2 g -move-> f
187 |
186 |
188 o e-1 b -move-> g
187 o e-1 b -move-> g
189 |
188 |
190 o i-2: c -move-> d, s -move-> t
189 o i-2: c -move-> d, s -move-> t
191 |
190 |
192 o i-1: a -move-> c, p -move-> s
191 o i-1: a -move-> c, p -move-> s
193 |
192 |
194 o i-0 initial commit: a b h p q r
193 o i-0 initial commit: a b h p q r
195
194
196 $ hg up -q null
195 $ hg up -q null
197
196
198 Having a branch similar to the 'a' one, but moving the 'p' file around.
197 Having a branch similar to the 'a' one, but moving the 'p' file around.
199
198
200 $ hg up 'desc("i-2")'
199 $ hg up 'desc("i-2")'
201 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
200 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
202 $ hg mv t u
201 $ hg mv t u
203 $ hg ci -Am 'p-1: t -move-> u'
202 $ hg ci -Am 'p-1: t -move-> u'
204 created new head
203 created new head
205 $ hg mv u v
204 $ hg mv u v
206 $ hg ci -Am 'p-2: u -move-> v'
205 $ hg ci -Am 'p-2: u -move-> v'
207 $ hg log -G --rev '::.'
206 $ hg log -G --rev '::.'
208 @ p-2: u -move-> v
207 @ p-2: u -move-> v
209 |
208 |
210 o p-1: t -move-> u
209 o p-1: t -move-> u
211 |
210 |
212 o i-2: c -move-> d, s -move-> t
211 o i-2: c -move-> d, s -move-> t
213 |
212 |
214 o i-1: a -move-> c, p -move-> s
213 o i-1: a -move-> c, p -move-> s
215 |
214 |
216 o i-0 initial commit: a b h p q r
215 o i-0 initial commit: a b h p q r
217
216
218 $ hg up -q null
217 $ hg up -q null
219
218
220 Having another branch renaming a different file to the same filename as another
219 Having another branch renaming a different file to the same filename as another
221
220
222 $ hg up 'desc("i-2")'
221 $ hg up 'desc("i-2")'
223 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
222 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
224 $ hg mv r w
223 $ hg mv r w
225 $ hg ci -m 'q-1 r -move-> w'
224 $ hg ci -m 'q-1 r -move-> w'
226 created new head
225 created new head
227 $ hg mv w v
226 $ hg mv w v
228 $ hg ci -m 'q-2 w -move-> v'
227 $ hg ci -m 'q-2 w -move-> v'
229 $ hg log -G --rev '::.'
228 $ hg log -G --rev '::.'
230 @ q-2 w -move-> v
229 @ q-2 w -move-> v
231 |
230 |
232 o q-1 r -move-> w
231 o q-1 r -move-> w
233 |
232 |
234 o i-2: c -move-> d, s -move-> t
233 o i-2: c -move-> d, s -move-> t
235 |
234 |
236 o i-1: a -move-> c, p -move-> s
235 o i-1: a -move-> c, p -move-> s
237 |
236 |
238 o i-0 initial commit: a b h p q r
237 o i-0 initial commit: a b h p q r
239
238
240 $ hg up -q null
239 $ hg up -q null
241
240
242 Setup all merge
241 Setup all merge
243 ===============
242 ===============
244
243
245 This is done beforehand to validate that the upgrade process creates valid copy
244 This is done beforehand to validate that the upgrade process creates valid copy
246 information.
245 information.
247
246
248 merging with unrelated change does not interfere with the renames
247 merging with unrelated change does not interfere with the renames
249 ---------------------------------------------------------------
248 ---------------------------------------------------------------
250
249
251 - rename on one side
250 - rename on one side
252 - unrelated change on the other side
251 - unrelated change on the other side
253
252
254 $ case_desc="simple merge - A side: multiple renames, B side: unrelated update"
253 $ case_desc="simple merge - A side: multiple renames, B side: unrelated update"
255
254
256 $ hg up 'desc("b-1")'
255 $ hg up 'desc("b-1")'
257 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 $ hg merge 'desc("a-2")'
257 $ hg merge 'desc("a-2")'
259 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
258 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
260 (branch merge, don't forget to commit)
259 (branch merge, don't forget to commit)
261 $ hg ci -m "mBAm-0 $case_desc - one way"
260 $ hg ci -m "mBAm-0 $case_desc - one way"
262 $ hg up 'desc("a-2")'
261 $ hg up 'desc("a-2")'
263 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
262 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
264 $ hg merge 'desc("b-1")'
263 $ hg merge 'desc("b-1")'
265 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
264 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
266 (branch merge, don't forget to commit)
265 (branch merge, don't forget to commit)
267 $ hg ci -m "mABm-0 $case_desc - the other way"
266 $ hg ci -m "mABm-0 $case_desc - the other way"
268 created new head
267 created new head
269 $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))'
268 $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))'
270 @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
269 @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
271 |\
270 |\
272 +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
271 +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
273 | |/
272 | |/
274 | o b-1: b update
273 | o b-1: b update
275 | |
274 | |
276 o | a-2: e -move-> f
275 o | a-2: e -move-> f
277 | |
276 | |
278 o | a-1: d -move-> e
277 o | a-1: d -move-> e
279 |/
278 |/
280 o i-2: c -move-> d, s -move-> t
279 o i-2: c -move-> d, s -move-> t
281 |
280 |
282 o i-1: a -move-> c, p -move-> s
281 o i-1: a -move-> c, p -move-> s
283 |
282 |
284 o i-0 initial commit: a b h p q r
283 o i-0 initial commit: a b h p q r
285
284
286
285
287
286
288 merging with the side having a delete
287 merging with the side having a delete
289 -------------------------------------
288 -------------------------------------
290
289
291 case summary:
290 case summary:
292 - one with change to an unrelated file
291 - one with change to an unrelated file
293 - one deleting the change
292 - one deleting the change
294 and recreate an unrelated file after the merge
293 and recreate an unrelated file after the merge
295
294
296 $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update"
295 $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update"
297
296
298 $ hg up 'desc("b-1")'
297 $ hg up 'desc("b-1")'
299 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
298 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
300 $ hg merge 'desc("c-1")'
299 $ hg merge 'desc("c-1")'
301 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
300 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
302 (branch merge, don't forget to commit)
301 (branch merge, don't forget to commit)
303 $ hg ci -m "mBCm-0 $case_desc - one way"
302 $ hg ci -m "mBCm-0 $case_desc - one way"
304 $ echo bar > d
303 $ echo bar > d
305 $ hg add d
304 $ hg add d
306 $ hg ci -m 'mBCm-1 re-add d'
305 $ hg ci -m 'mBCm-1 re-add d'
307 $ hg up 'desc("c-1")'
306 $ hg up 'desc("c-1")'
308 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
307 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
309 $ hg merge 'desc("b-1")'
308 $ hg merge 'desc("b-1")'
310 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
309 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
311 (branch merge, don't forget to commit)
310 (branch merge, don't forget to commit)
312 $ hg ci -m "mCBm-0 $case_desc - the other way"
311 $ hg ci -m "mCBm-0 $case_desc - the other way"
313 created new head
312 created new head
314 $ echo bar > d
313 $ echo bar > d
315 $ hg add d
314 $ hg add d
316 $ hg ci -m 'mCBm-1 re-add d'
315 $ hg ci -m 'mCBm-1 re-add d'
317 $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))'
316 $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))'
318 @ mCBm-1 re-add d
317 @ mCBm-1 re-add d
319 |
318 |
320 o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
319 o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
321 |\
320 |\
322 | | o mBCm-1 re-add d
321 | | o mBCm-1 re-add d
323 | | |
322 | | |
324 +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
323 +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
325 | |/
324 | |/
326 | o c-1 delete d
325 | o c-1 delete d
327 | |
326 | |
328 o | b-1: b update
327 o | b-1: b update
329 |/
328 |/
330 o i-2: c -move-> d, s -move-> t
329 o i-2: c -move-> d, s -move-> t
331 |
330 |
332 o i-1: a -move-> c, p -move-> s
331 o i-1: a -move-> c, p -move-> s
333 |
332 |
334 o i-0 initial commit: a b h p q r
333 o i-0 initial commit: a b h p q r
335
334
336
335
337 Comparing with a merge re-adding the file afterward
336 Comparing with a merge re-adding the file afterward
338 ---------------------------------------------------
337 ---------------------------------------------------
339
338
340 Merge:
339 Merge:
341 - one with change to an unrelated file
340 - one with change to an unrelated file
342 - one deleting and recreating the change
341 - one deleting and recreating the change
343
342
344 $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)"
343 $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)"
345
344
346 $ hg up 'desc("b-1")'
345 $ hg up 'desc("b-1")'
347 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
346 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
348 $ hg merge 'desc("d-2")'
347 $ hg merge 'desc("d-2")'
349 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
348 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
350 (branch merge, don't forget to commit)
349 (branch merge, don't forget to commit)
351 $ hg ci -m "mBDm-0 $case_desc - one way"
350 $ hg ci -m "mBDm-0 $case_desc - one way"
352 $ hg up 'desc("d-2")'
351 $ hg up 'desc("d-2")'
353 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
352 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
354 $ hg merge 'desc("b-1")'
353 $ hg merge 'desc("b-1")'
355 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
354 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
356 (branch merge, don't forget to commit)
355 (branch merge, don't forget to commit)
357 $ hg ci -m "mDBm-0 $case_desc - the other way"
356 $ hg ci -m "mDBm-0 $case_desc - the other way"
358 created new head
357 created new head
359 $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))'
358 $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))'
360 @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
359 @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
361 |\
360 |\
362 +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
361 +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
363 | |/
362 | |/
364 | o d-2 re-add d
363 | o d-2 re-add d
365 | |
364 | |
366 | o d-1 delete d
365 | o d-1 delete d
367 | |
366 | |
368 o | b-1: b update
367 o | b-1: b update
369 |/
368 |/
370 o i-2: c -move-> d, s -move-> t
369 o i-2: c -move-> d, s -move-> t
371 |
370 |
372 o i-1: a -move-> c, p -move-> s
371 o i-1: a -move-> c, p -move-> s
373 |
372 |
374 o i-0 initial commit: a b h p q r
373 o i-0 initial commit: a b h p q r
375
374
376
375
377
376
378 Comparing with a merge with colliding rename
377 Comparing with a merge with colliding rename
379 --------------------------------------------
378 --------------------------------------------
380
379
381 Subcase: new copy information on both side
380 Subcase: new copy information on both side
382 ``````````````````````````````````````````
381 ``````````````````````````````````````````
383
382
384 - the "e-" branch renaming b to f (through 'g')
383 - the "e-" branch renaming b to f (through 'g')
385 - the "a-" branch renaming d to f (through e)
384 - the "a-" branch renaming d to f (through e)
386
385
387 $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)"
386 $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)"
388
387
389 $ hg up 'desc("a-2")'
388 $ hg up 'desc("a-2")'
390 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
389 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
391 $ hg merge 'desc("e-2")'
390 $ hg merge 'desc("e-2")'
392 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
391 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
393 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
392 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
394 (branch merge, don't forget to commit)
393 (branch merge, don't forget to commit)
395 $ hg ci -m "mAEm-0 $case_desc - one way"
394 $ hg ci -m "mAEm-0 $case_desc - one way"
396 $ hg up 'desc("e-2")'
395 $ hg up 'desc("e-2")'
397 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
396 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
398 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
397 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
399 $ hg merge 'desc("a-2")'
398 $ hg merge 'desc("a-2")'
400 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
399 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
401 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
400 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
402 (branch merge, don't forget to commit)
401 (branch merge, don't forget to commit)
403 $ hg ci -m "mEAm-0 $case_desc - the other way"
402 $ hg ci -m "mEAm-0 $case_desc - the other way"
404 created new head
403 created new head
405 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
404 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
406 @ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
405 @ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
407 |\
406 |\
408 +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
407 +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
409 | |/
408 | |/
410 | o e-2 g -move-> f
409 | o e-2 g -move-> f
411 | |
410 | |
412 | o e-1 b -move-> g
411 | o e-1 b -move-> g
413 | |
412 | |
414 o | a-2: e -move-> f
413 o | a-2: e -move-> f
415 | |
414 | |
416 o | a-1: d -move-> e
415 o | a-1: d -move-> e
417 |/
416 |/
418 o i-2: c -move-> d, s -move-> t
417 o i-2: c -move-> d, s -move-> t
419 |
418 |
420 o i-1: a -move-> c, p -move-> s
419 o i-1: a -move-> c, p -move-> s
421 |
420 |
422 o i-0 initial commit: a b h p q r
421 o i-0 initial commit: a b h p q r
423
422
424
423
425 Subcase: new copy information on both side with an actual merge happening
424 Subcase: new copy information on both side with an actual merge happening
426 `````````````````````````````````````````````````````````````````````````
425 `````````````````````````````````````````````````````````````````````````
427
426
428 - the "p-" branch renaming 't' to 'v' (through 'u')
427 - the "p-" branch renaming 't' to 'v' (through 'u')
429 - the "q-" branch renaming 'r' to 'v' (through 'w')
428 - the "q-" branch renaming 'r' to 'v' (through 'w')
430
429
431 $ case_desc="merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content)"
430 $ case_desc="merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content)"
432
431
433 $ hg up 'desc("p-2")'
432 $ hg up 'desc("p-2")'
434 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
433 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
435 $ hg merge 'desc("q-2")' --tool ':union'
434 $ hg merge 'desc("q-2")' --tool ':union'
436 merging v
435 merging v
437 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
436 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
438 (branch merge, don't forget to commit)
437 (branch merge, don't forget to commit)
439 $ hg ci -m "mPQm-0 $case_desc - one way"
438 $ hg ci -m "mPQm-0 $case_desc - one way"
440 $ hg up 'desc("q-2")'
439 $ hg up 'desc("q-2")'
441 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
440 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 $ hg merge 'desc("p-2")' --tool ':union'
441 $ hg merge 'desc("p-2")' --tool ':union'
443 merging v
442 merging v
444 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
443 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
445 (branch merge, don't forget to commit)
444 (branch merge, don't forget to commit)
446 $ hg ci -m "mQPm-0 $case_desc - the other way"
445 $ hg ci -m "mQPm-0 $case_desc - the other way"
447 created new head
446 created new head
448 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
447 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
449 o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
448 o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
450 |\
449 |\
451 +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
450 +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
452 | |/
451 | |/
453 | o e-2 g -move-> f
452 | o e-2 g -move-> f
454 | |
453 | |
455 | o e-1 b -move-> g
454 | o e-1 b -move-> g
456 | |
455 | |
457 o | a-2: e -move-> f
456 o | a-2: e -move-> f
458 | |
457 | |
459 o | a-1: d -move-> e
458 o | a-1: d -move-> e
460 |/
459 |/
461 o i-2: c -move-> d, s -move-> t
460 o i-2: c -move-> d, s -move-> t
462 |
461 |
463 o i-1: a -move-> c, p -move-> s
462 o i-1: a -move-> c, p -move-> s
464 |
463 |
465 o i-0 initial commit: a b h p q r
464 o i-0 initial commit: a b h p q r
466
465
467
466
468 Subcase: existing copy information overwritten on one branch
467 Subcase: existing copy information overwritten on one branch
469 ````````````````````````````````````````````````````````````
468 ````````````````````````````````````````````````````````````
470
469
471 Merge:
470 Merge:
472 - one with change to an unrelated file (b)
471 - one with change to an unrelated file (b)
473 - one overwriting a file (d) with a rename (from h to i to d)
472 - one overwriting a file (d) with a rename (from h to i to d)
474
473
475 $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)"
474 $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)"
476
475
477 $ hg up 'desc("i-2")'
476 $ hg up 'desc("i-2")'
478 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
477 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
479 $ hg mv h i
478 $ hg mv h i
480 $ hg commit -m "f-1: rename h -> i"
479 $ hg commit -m "f-1: rename h -> i"
481 created new head
480 created new head
482 $ hg mv --force i d
481 $ hg mv --force i d
483 $ hg commit -m "f-2: rename i -> d"
482 $ hg commit -m "f-2: rename i -> d"
484 $ hg debugindex d | ../no-linkrev
483 $ hg debugindex d | "$PYTHON" ../no-linkrev
485 rev linkrev nodeid p1 p2
484 rev linkrev nodeid p1 p2
486 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !)
485 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !)
487 0 * ae258f702dfe 000000000000 000000000000 (changeset !)
486 0 * ae258f702dfe 000000000000 000000000000 (changeset !)
488 1 * b004912a8510 000000000000 000000000000
487 1 * b004912a8510 000000000000 000000000000
489 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !)
488 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !)
490 $ hg up 'desc("b-1")'
489 $ hg up 'desc("b-1")'
491 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
490 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
492 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
491 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
493 $ hg merge 'desc("f-2")'
492 $ hg merge 'desc("f-2")'
494 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
493 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
495 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
494 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
496 (branch merge, don't forget to commit)
495 (branch merge, don't forget to commit)
497 $ hg ci -m "mBFm-0 $case_desc - one way"
496 $ hg ci -m "mBFm-0 $case_desc - one way"
498 $ hg up 'desc("f-2")'
497 $ hg up 'desc("f-2")'
499 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
498 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
500 $ hg merge 'desc("b-1")'
499 $ hg merge 'desc("b-1")'
501 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
500 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
502 (branch merge, don't forget to commit)
501 (branch merge, don't forget to commit)
503 $ hg ci -m "mFBm-0 $case_desc - the other way"
502 $ hg ci -m "mFBm-0 $case_desc - the other way"
504 created new head
503 created new head
505 $ hg up null --quiet
504 $ hg up null --quiet
506 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
505 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
507 o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
506 o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
508 |\
507 |\
509 +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
508 +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
510 | |/
509 | |/
511 | o f-2: rename i -> d
510 | o f-2: rename i -> d
512 | |
511 | |
513 | o f-1: rename h -> i
512 | o f-1: rename h -> i
514 | |
513 | |
515 o | b-1: b update
514 o | b-1: b update
516 |/
515 |/
517 o i-2: c -move-> d, s -move-> t
516 o i-2: c -move-> d, s -move-> t
518 |
517 |
519 o i-1: a -move-> c, p -move-> s
518 o i-1: a -move-> c, p -move-> s
520 |
519 |
521 o i-0 initial commit: a b h p q r
520 o i-0 initial commit: a b h p q r
522
521
523
522
524 Subcase: existing copy information overwritten on one branch, with different content)
523 Subcase: existing copy information overwritten on one branch, with different content)
525 `````````````````````````````````````````````````````````````````````````````````````
524 `````````````````````````````````````````````````````````````````````````````````````
526
525
527 Merge:
526 Merge:
528 - one with change to an unrelated file (b)
527 - one with change to an unrelated file (b)
529 - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch
528 - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch
530
529
531 $ case_desc="simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content"
530 $ case_desc="simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content"
532
531
533 $ hg up 'desc("i-2")'
532 $ hg up 'desc("i-2")'
534 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
533 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
535 $ hg mv r x
534 $ hg mv r x
536 $ hg commit -m "r-1: rename r -> x"
535 $ hg commit -m "r-1: rename r -> x"
537 created new head
536 created new head
538 $ hg mv --force x t
537 $ hg mv --force x t
539 $ hg commit -m "r-2: rename t -> x"
538 $ hg commit -m "r-2: rename t -> x"
540 $ hg debugindex t | ../no-linkrev
539 $ hg debugindex t | "$PYTHON" ../no-linkrev
541 rev linkrev nodeid p1 p2
540 rev linkrev nodeid p1 p2
542 0 * d74efbf65309 000000000000 000000000000 (no-changeset !)
541 0 * d74efbf65309 000000000000 000000000000 (no-changeset !)
543 1 * 02a930b9d7ad 000000000000 000000000000 (no-changeset !)
542 1 * 02a930b9d7ad 000000000000 000000000000 (no-changeset !)
544 0 * 5aed6a8dbff0 000000000000 000000000000 (changeset !)
543 0 * 5aed6a8dbff0 000000000000 000000000000 (changeset !)
545 1 * a38b2fa17021 000000000000 000000000000 (changeset !)
544 1 * a38b2fa17021 000000000000 000000000000 (changeset !)
546 $ hg up 'desc("b-1")'
545 $ hg up 'desc("b-1")'
547 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
546 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
548 $ hg merge 'desc("r-2")'
547 $ hg merge 'desc("r-2")'
549 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
548 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
550 (branch merge, don't forget to commit)
549 (branch merge, don't forget to commit)
551 $ hg ci -m "mBRm-0 $case_desc - one way"
550 $ hg ci -m "mBRm-0 $case_desc - one way"
552 $ hg up 'desc("r-2")'
551 $ hg up 'desc("r-2")'
553 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
552 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
554 $ hg merge 'desc("b-1")'
553 $ hg merge 'desc("b-1")'
555 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
554 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
556 (branch merge, don't forget to commit)
555 (branch merge, don't forget to commit)
557 $ hg ci -m "mRBm-0 $case_desc - the other way"
556 $ hg ci -m "mRBm-0 $case_desc - the other way"
558 created new head
557 created new head
559 $ hg up null --quiet
558 $ hg up null --quiet
560 $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))'
559 $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))'
561 o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way
560 o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way
562 |\
561 |\
563 +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
562 +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
564 | |/
563 | |/
565 | o r-2: rename t -> x
564 | o r-2: rename t -> x
566 | |
565 | |
567 | o r-1: rename r -> x
566 | o r-1: rename r -> x
568 | |
567 | |
569 o | b-1: b update
568 o | b-1: b update
570 |/
569 |/
571 o i-2: c -move-> d, s -move-> t
570 o i-2: c -move-> d, s -move-> t
572 |
571 |
573 o i-1: a -move-> c, p -move-> s
572 o i-1: a -move-> c, p -move-> s
574 |
573 |
575 o i-0 initial commit: a b h p q r
574 o i-0 initial commit: a b h p q r
576
575
577
576
578
577
579 Subcase: reset of the copy history on one side
578 Subcase: reset of the copy history on one side
580 ``````````````````````````````````````````````
579 ``````````````````````````````````````````````
581
580
582 Merge:
581 Merge:
583 - one with change to a file
582 - one with change to a file
584 - one deleting and recreating the file
583 - one deleting and recreating the file
585
584
586 Unlike in the 'BD/DB' cases, an actual merge happened here. So we should
585 Unlike in the 'BD/DB' cases, an actual merge happened here. So we should
587 consider history and rename on both branch of the merge.
586 consider history and rename on both branch of the merge.
588
587
589 $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content"
588 $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content"
590
589
591 $ hg up 'desc("i-2")'
590 $ hg up 'desc("i-2")'
592 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
591 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
593 $ echo "some update" >> d
592 $ echo "some update" >> d
594 $ hg commit -m "g-1: update d"
593 $ hg commit -m "g-1: update d"
595 created new head
594 created new head
596 $ hg up 'desc("d-2")'
595 $ hg up 'desc("d-2")'
597 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
596 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
598 $ hg merge 'desc("g-1")' --tool :union
597 $ hg merge 'desc("g-1")' --tool :union
599 merging d
598 merging d
600 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
599 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
601 (branch merge, don't forget to commit)
600 (branch merge, don't forget to commit)
602 $ hg ci -m "mDGm-0 $case_desc - one way"
601 $ hg ci -m "mDGm-0 $case_desc - one way"
603 $ hg up 'desc("g-1")'
602 $ hg up 'desc("g-1")'
604 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
603 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
605 $ hg merge 'desc("d-2")' --tool :union
604 $ hg merge 'desc("d-2")' --tool :union
606 merging d
605 merging d
607 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
606 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
608 (branch merge, don't forget to commit)
607 (branch merge, don't forget to commit)
609 $ hg ci -m "mGDm-0 $case_desc - the other way"
608 $ hg ci -m "mGDm-0 $case_desc - the other way"
610 created new head
609 created new head
611 $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))'
610 $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))'
612 @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
611 @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
613 |\
612 |\
614 +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
613 +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
615 | |/
614 | |/
616 | o g-1: update d
615 | o g-1: update d
617 | |
616 | |
618 o | d-2 re-add d
617 o | d-2 re-add d
619 | |
618 | |
620 o | d-1 delete d
619 o | d-1 delete d
621 |/
620 |/
622 o i-2: c -move-> d, s -move-> t
621 o i-2: c -move-> d, s -move-> t
623 |
622 |
624 o i-1: a -move-> c, p -move-> s
623 o i-1: a -move-> c, p -move-> s
625 |
624 |
626 o i-0 initial commit: a b h p q r
625 o i-0 initial commit: a b h p q r
627
626
628
627
629 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
628 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
630 ````````````````````````````````````````````````````````````````````````````````````````````
629 ````````````````````````````````````````````````````````````````````````````````````````````
631
630
632 Merge:
631 Merge:
633 - one with change to a file (d)
632 - one with change to a file (d)
634 - one overwriting that file with a rename (from h to i, to d)
633 - one overwriting that file with a rename (from h to i, to d)
635
634
636 This case is similar to BF/FB, but an actual merge happens, so both side of the
635 This case is similar to BF/FB, but an actual merge happens, so both side of the
637 history are relevant.
636 history are relevant.
638
637
639 Note:
638 Note:
640 | In this case, the merge get conflicting information since on one side we have
639 | In this case, the merge get conflicting information since on one side we have
641 | "a -> c -> d". and one the other one we have "h -> i -> d".
640 | "a -> c -> d". and one the other one we have "h -> i -> d".
642 |
641 |
643 | The current code arbitrarily pick one side
642 | The current code arbitrarily pick one side
644
643
645 $ case_desc="merge - G side: content change, F side: copy overwrite, no content change"
644 $ case_desc="merge - G side: content change, F side: copy overwrite, no content change"
646
645
647 $ hg up 'desc("f-2")'
646 $ hg up 'desc("f-2")'
648 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
647 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
649 $ hg merge 'desc("g-1")' --tool :union
648 $ hg merge 'desc("g-1")' --tool :union
650 merging d (no-changeset !)
649 merging d (no-changeset !)
651 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !)
650 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !)
652 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
651 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
653 (branch merge, don't forget to commit)
652 (branch merge, don't forget to commit)
654 $ hg ci -m "mFGm-0 $case_desc - one way"
653 $ hg ci -m "mFGm-0 $case_desc - one way"
655 created new head
654 created new head
656 $ hg up 'desc("g-1")'
655 $ hg up 'desc("g-1")'
657 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
656 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
658 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
657 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
659 $ hg merge 'desc("f-2")' --tool :union
658 $ hg merge 'desc("f-2")' --tool :union
660 merging d (no-changeset !)
659 merging d (no-changeset !)
661 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !)
660 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !)
662 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
661 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
663 (branch merge, don't forget to commit)
662 (branch merge, don't forget to commit)
664 $ hg ci -m "mGFm-0 $case_desc - the other way"
663 $ hg ci -m "mGFm-0 $case_desc - the other way"
665 created new head
664 created new head
666 $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))'
665 $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))'
667 @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
666 @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
668 |\
667 |\
669 +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
668 +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
670 | |/
669 | |/
671 | o g-1: update d
670 | o g-1: update d
672 | |
671 | |
673 o | f-2: rename i -> d
672 o | f-2: rename i -> d
674 | |
673 | |
675 o | f-1: rename h -> i
674 o | f-1: rename h -> i
676 |/
675 |/
677 o i-2: c -move-> d, s -move-> t
676 o i-2: c -move-> d, s -move-> t
678 |
677 |
679 o i-1: a -move-> c, p -move-> s
678 o i-1: a -move-> c, p -move-> s
680 |
679 |
681 o i-0 initial commit: a b h p q r
680 o i-0 initial commit: a b h p q r
682
681
683
682
684
683
685 Comparing with merging with a deletion (and keeping the file)
684 Comparing with merging with a deletion (and keeping the file)
686 -------------------------------------------------------------
685 -------------------------------------------------------------
687
686
688 Merge:
687 Merge:
689 - one removing a file (d)
688 - one removing a file (d)
690 - one updating that file
689 - one updating that file
691 - the merge keep the modified version of the file (canceling the delete)
690 - the merge keep the modified version of the file (canceling the delete)
692
691
693 In this case, the file keep on living after the merge. So we should not drop its
692 In this case, the file keep on living after the merge. So we should not drop its
694 copy tracing chain.
693 copy tracing chain.
695
694
696 $ case_desc="merge updated/deleted - revive the file (updated content)"
695 $ case_desc="merge updated/deleted - revive the file (updated content)"
697
696
698 $ hg up 'desc("c-1")'
697 $ hg up 'desc("c-1")'
699 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
698 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
700 $ hg merge 'desc("g-1")'
699 $ hg merge 'desc("g-1")'
701 file 'd' was deleted in local [working copy] but was modified in other [merge rev].
700 file 'd' was deleted in local [working copy] but was modified in other [merge rev].
702 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
701 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
703 What do you want to do? u
702 What do you want to do? u
704 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
703 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
705 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
704 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
706 [1]
705 [1]
707 $ hg resolve -t :other d
706 $ hg resolve -t :other d
708 (no more unresolved files)
707 (no more unresolved files)
709 $ hg ci -m "mCGm-0 $case_desc - one way"
708 $ hg ci -m "mCGm-0 $case_desc - one way"
710 created new head
709 created new head
711
710
712 $ hg up 'desc("g-1")'
711 $ hg up 'desc("g-1")'
713 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
712 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
714 $ hg merge 'desc("c-1")'
713 $ hg merge 'desc("c-1")'
715 file 'd' was deleted in other [merge rev] but was modified in local [working copy].
714 file 'd' was deleted in other [merge rev] but was modified in local [working copy].
716 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
715 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
717 What do you want to do? u
716 What do you want to do? u
718 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
717 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
719 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
718 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
720 [1]
719 [1]
721 $ hg resolve -t :local d
720 $ hg resolve -t :local d
722 (no more unresolved files)
721 (no more unresolved files)
723 $ hg ci -m "mGCm-0 $case_desc - the other way"
722 $ hg ci -m "mGCm-0 $case_desc - the other way"
724 created new head
723 created new head
725
724
726 $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))'
725 $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))'
727 @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
726 @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
728 |\
727 |\
729 +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way
728 +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way
730 | |/
729 | |/
731 | o g-1: update d
730 | o g-1: update d
732 | |
731 | |
733 o | c-1 delete d
732 o | c-1 delete d
734 |/
733 |/
735 o i-2: c -move-> d, s -move-> t
734 o i-2: c -move-> d, s -move-> t
736 |
735 |
737 o i-1: a -move-> c, p -move-> s
736 o i-1: a -move-> c, p -move-> s
738 |
737 |
739 o i-0 initial commit: a b h p q r
738 o i-0 initial commit: a b h p q r
740
739
741
740
742
741
743
742
744 Comparing with merge restoring an untouched deleted file
743 Comparing with merge restoring an untouched deleted file
745 --------------------------------------------------------
744 --------------------------------------------------------
746
745
747 Merge:
746 Merge:
748 - one removing a file (d)
747 - one removing a file (d)
749 - one leaving the file untouched
748 - one leaving the file untouched
750 - the merge actively restore the file to the same content.
749 - the merge actively restore the file to the same content.
751
750
752 In this case, the file keep on living after the merge. So we should not drop its
751 In this case, the file keep on living after the merge. So we should not drop its
753 copy tracing chain.
752 copy tracing chain.
754
753
755 $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)"
754 $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)"
756
755
757 $ hg up 'desc("c-1")'
756 $ hg up 'desc("c-1")'
758 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
757 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
759 $ hg merge 'desc("b-1")'
758 $ hg merge 'desc("b-1")'
760 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
759 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
761 (branch merge, don't forget to commit)
760 (branch merge, don't forget to commit)
762 $ hg revert --rev 'desc("b-1")' d
761 $ hg revert --rev 'desc("b-1")' d
763 $ hg ci -m "mCB-revert-m-0 $case_desc - one way"
762 $ hg ci -m "mCB-revert-m-0 $case_desc - one way"
764 created new head
763 created new head
765
764
766 $ hg up 'desc("b-1")'
765 $ hg up 'desc("b-1")'
767 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
766 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
768 $ hg merge 'desc("c-1")'
767 $ hg merge 'desc("c-1")'
769 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
768 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
770 (branch merge, don't forget to commit)
769 (branch merge, don't forget to commit)
771 $ hg revert --rev 'desc("b-1")' d
770 $ hg revert --rev 'desc("b-1")' d
772 $ hg ci -m "mBC-revert-m-0 $case_desc - the other way"
771 $ hg ci -m "mBC-revert-m-0 $case_desc - the other way"
773 created new head
772 created new head
774
773
775 $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))'
774 $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))'
776 @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
775 @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
777 |\
776 |\
778 +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
777 +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
779 | |/
778 | |/
780 | o c-1 delete d
779 | o c-1 delete d
781 | |
780 | |
782 o | b-1: b update
781 o | b-1: b update
783 |/
782 |/
784 o i-2: c -move-> d, s -move-> t
783 o i-2: c -move-> d, s -move-> t
785 |
784 |
786 o i-1: a -move-> c, p -move-> s
785 o i-1: a -move-> c, p -move-> s
787 |
786 |
788 o i-0 initial commit: a b h p q r
787 o i-0 initial commit: a b h p q r
789
788
790
789
791
790
792 $ hg up null --quiet
791 $ hg up null --quiet
793
792
794 Merging a branch where a rename was deleted with a branch where the same file was renamed
793 Merging a branch where a rename was deleted with a branch where the same file was renamed
795 ------------------------------------------------------------------------------------------
794 ------------------------------------------------------------------------------------------
796
795
797 Create a "conflicting" merge where `d` get removed on one branch before its
796 Create a "conflicting" merge where `d` get removed on one branch before its
798 rename information actually conflict with the other branch.
797 rename information actually conflict with the other branch.
799
798
800 (the copy information from the branch that was not deleted should win).
799 (the copy information from the branch that was not deleted should win).
801
800
802 $ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)"
801 $ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)"
803
802
804 $ hg up 'desc("i-0")'
803 $ hg up 'desc("i-0")'
805 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
804 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
806 $ hg mv b d
805 $ hg mv b d
807 $ hg ci -m "h-1: b -(move)-> d"
806 $ hg ci -m "h-1: b -(move)-> d"
808 created new head
807 created new head
809
808
810 $ hg up 'desc("c-1")'
809 $ hg up 'desc("c-1")'
811 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
810 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
812 $ hg merge 'desc("h-1")'
811 $ hg merge 'desc("h-1")'
813 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
812 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
814 (branch merge, don't forget to commit)
813 (branch merge, don't forget to commit)
815 $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way"
814 $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way"
816
815
817 $ hg up 'desc("h-1")'
816 $ hg up 'desc("h-1")'
818 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
817 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
819 $ hg merge 'desc("c-1")'
818 $ hg merge 'desc("c-1")'
820 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
819 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
821 (branch merge, don't forget to commit)
820 (branch merge, don't forget to commit)
822 $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way"
821 $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way"
823 created new head
822 created new head
824 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
823 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
825 @ mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way
824 @ mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way
826 |\
825 |\
827 +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way
826 +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way
828 | |/
827 | |/
829 | o h-1: b -(move)-> d
828 | o h-1: b -(move)-> d
830 | |
829 | |
831 o | c-1 delete d
830 o | c-1 delete d
832 | |
831 | |
833 o | i-2: c -move-> d, s -move-> t
832 o | i-2: c -move-> d, s -move-> t
834 | |
833 | |
835 o | i-1: a -move-> c, p -move-> s
834 o | i-1: a -move-> c, p -move-> s
836 |/
835 |/
837 o i-0 initial commit: a b h p q r
836 o i-0 initial commit: a b h p q r
838
837
839
838
840 Variant of previous with extra changes introduced by the merge
839 Variant of previous with extra changes introduced by the merge
841 --------------------------------------------------------------
840 --------------------------------------------------------------
842
841
843 Multiple cases above explicitely test cases where content are the same on both side during merge. In this section we will introduce variants for theses cases where new change are introduced to these file content during the merges.
842 Multiple cases above explicitely test cases where content are the same on both side during merge. In this section we will introduce variants for theses cases where new change are introduced to these file content during the merges.
844
843
845
844
846 Subcase: merge has same initial content on both side, but merge introduced a change
845 Subcase: merge has same initial content on both side, but merge introduced a change
847 ```````````````````````````````````````````````````````````````````````````````````
846 ```````````````````````````````````````````````````````````````````````````````````
848
847
849 Same as `mAEm` and `mEAm` but with extra change to the file before commiting
848 Same as `mAEm` and `mEAm` but with extra change to the file before commiting
850
849
851 - the "e-" branch renaming b to f (through 'g')
850 - the "e-" branch renaming b to f (through 'g')
852 - the "a-" branch renaming d to f (through e)
851 - the "a-" branch renaming d to f (through e)
853
852
854 $ case_desc="merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent)"
853 $ case_desc="merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent)"
855
854
856 $ hg up 'desc("a-2")'
855 $ hg up 'desc("a-2")'
857 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
856 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
858 $ hg merge 'desc("e-2")'
857 $ hg merge 'desc("e-2")'
859 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
858 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
860 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
859 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
861 (branch merge, don't forget to commit)
860 (branch merge, don't forget to commit)
862 $ echo "content change for mAE-change-m" > f
861 $ echo "content change for mAE-change-m" > f
863 $ hg ci -m "mAE-change-m-0 $case_desc - one way"
862 $ hg ci -m "mAE-change-m-0 $case_desc - one way"
864 created new head
863 created new head
865 $ hg up 'desc("e-2")'
864 $ hg up 'desc("e-2")'
866 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
865 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
867 $ hg merge 'desc("a-2")'
866 $ hg merge 'desc("a-2")'
868 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
867 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
869 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
868 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
870 (branch merge, don't forget to commit)
869 (branch merge, don't forget to commit)
871 $ echo "content change for mEA-change-m" > f
870 $ echo "content change for mEA-change-m" > f
872 $ hg ci -m "mEA-change-m-0 $case_desc - the other way"
871 $ hg ci -m "mEA-change-m-0 $case_desc - the other way"
873 created new head
872 created new head
874 $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))'
873 $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))'
875 @ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way
874 @ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way
876 |\
875 |\
877 +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way
876 +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way
878 | |/
877 | |/
879 | o e-2 g -move-> f
878 | o e-2 g -move-> f
880 | |
879 | |
881 | o e-1 b -move-> g
880 | o e-1 b -move-> g
882 | |
881 | |
883 o | a-2: e -move-> f
882 o | a-2: e -move-> f
884 | |
883 | |
885 o | a-1: d -move-> e
884 o | a-1: d -move-> e
886 |/
885 |/
887 o i-2: c -move-> d, s -move-> t
886 o i-2: c -move-> d, s -move-> t
888 |
887 |
889 o i-1: a -move-> c, p -move-> s
888 o i-1: a -move-> c, p -move-> s
890 |
889 |
891 o i-0 initial commit: a b h p q r
890 o i-0 initial commit: a b h p q r
892
891
893
892
894 Subcase: merge overwrite common copy information, but with extra change during the merge
893 Subcase: merge overwrite common copy information, but with extra change during the merge
895 ````````````````````````````````````````````````````````````````````````````````````````
894 ````````````````````````````````````````````````````````````````````````````````````````
896
895
897 Merge:
896 Merge:
898 - one with change to an unrelated file (b)
897 - one with change to an unrelated file (b)
899 - one overwriting a file (d) with a rename (from h to i to d)
898 - one overwriting a file (d) with a rename (from h to i to d)
900 - the merge update f content
899 - the merge update f content
901
900
902 $ case_desc="merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)"
901 $ case_desc="merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)"
903
902
904 $ hg up 'desc("f-2")'
903 $ hg up 'desc("f-2")'
905 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
904 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
906 #if no-changeset
905 #if no-changeset
907 $ hg debugindex d | ../no-linkrev
906 $ hg debugindex d | "$PYTHON" ../no-linkrev
908 rev linkrev nodeid p1 p2
907 rev linkrev nodeid p1 p2
909 0 * d8252ab2e760 000000000000 000000000000
908 0 * d8252ab2e760 000000000000 000000000000
910 1 * b004912a8510 000000000000 000000000000
909 1 * b004912a8510 000000000000 000000000000
911 2 * 7b79e2fe0c89 000000000000 000000000000
910 2 * 7b79e2fe0c89 000000000000 000000000000
912 3 * 17ec97e60577 d8252ab2e760 000000000000
911 3 * 17ec97e60577 d8252ab2e760 000000000000
913 4 * 06dabf50734c b004912a8510 17ec97e60577
912 4 * 06dabf50734c b004912a8510 17ec97e60577
914 5 * 19c0e3924691 17ec97e60577 b004912a8510
913 5 * 19c0e3924691 17ec97e60577 b004912a8510
915 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577
914 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577
916 7 * d55cb4e9ef57 000000000000 000000000000
915 7 * d55cb4e9ef57 000000000000 000000000000
917 #else
916 #else
918 $ hg debugindex d | ../no-linkrev
917 $ hg debugindex d | "$PYTHON" ../no-linkrev
919 rev linkrev nodeid p1 p2
918 rev linkrev nodeid p1 p2
920 0 * ae258f702dfe 000000000000 000000000000
919 0 * ae258f702dfe 000000000000 000000000000
921 1 * b004912a8510 000000000000 000000000000
920 1 * b004912a8510 000000000000 000000000000
922 2 * 5cce88bf349f ae258f702dfe 000000000000
921 2 * 5cce88bf349f ae258f702dfe 000000000000
923 3 * cc269dd788c8 b004912a8510 5cce88bf349f
922 3 * cc269dd788c8 b004912a8510 5cce88bf349f
924 4 * 51c91a115080 5cce88bf349f b004912a8510
923 4 * 51c91a115080 5cce88bf349f b004912a8510
925 #endif
924 #endif
926 $ hg up 'desc("b-1")'
925 $ hg up 'desc("b-1")'
927 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
926 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
928 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
927 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
929 $ hg merge 'desc("f-2")'
928 $ hg merge 'desc("f-2")'
930 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
929 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
931 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
930 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
932 (branch merge, don't forget to commit)
931 (branch merge, don't forget to commit)
933 $ echo "extra-change to (formelly h) during the merge" > d
932 $ echo "extra-change to (formelly h) during the merge" > d
934 $ hg ci -m "mBF-change-m-0 $case_desc - one way"
933 $ hg ci -m "mBF-change-m-0 $case_desc - one way"
935 created new head
934 created new head
936 $ hg manifest --rev . --debug | grep " d"
935 $ hg manifest --rev . --debug | grep " d"
937 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !)
936 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !)
938 cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !)
937 cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !)
939
938
940 $ hg up 'desc("f-2")'
939 $ hg up 'desc("f-2")'
941 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
940 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
942 $ hg merge 'desc("b-1")'
941 $ hg merge 'desc("b-1")'
943 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
942 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
944 (branch merge, don't forget to commit)
943 (branch merge, don't forget to commit)
945 $ echo "extra-change to (formelly h) during the merge" > d
944 $ echo "extra-change to (formelly h) during the merge" > d
946 $ hg ci -m "mFB-change-m-0 $case_desc - the other way"
945 $ hg ci -m "mFB-change-m-0 $case_desc - the other way"
947 created new head
946 created new head
948 $ hg manifest --rev . --debug | grep " d"
947 $ hg manifest --rev . --debug | grep " d"
949 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !)
948 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !)
950 cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !)
949 cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !)
951 #if no-changeset
950 #if no-changeset
952 $ hg debugindex d | ../no-linkrev
951 $ hg debugindex d | "$PYTHON" ../no-linkrev
953 rev linkrev nodeid p1 p2
952 rev linkrev nodeid p1 p2
954 0 * d8252ab2e760 000000000000 000000000000
953 0 * d8252ab2e760 000000000000 000000000000
955 1 * b004912a8510 000000000000 000000000000
954 1 * b004912a8510 000000000000 000000000000
956 2 * 7b79e2fe0c89 000000000000 000000000000
955 2 * 7b79e2fe0c89 000000000000 000000000000
957 3 * 17ec97e60577 d8252ab2e760 000000000000
956 3 * 17ec97e60577 d8252ab2e760 000000000000
958 4 * 06dabf50734c b004912a8510 17ec97e60577
957 4 * 06dabf50734c b004912a8510 17ec97e60577
959 5 * 19c0e3924691 17ec97e60577 b004912a8510
958 5 * 19c0e3924691 17ec97e60577 b004912a8510
960 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577
959 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577
961 7 * d55cb4e9ef57 000000000000 000000000000
960 7 * d55cb4e9ef57 000000000000 000000000000
962 8 * 1c334238bd42 7b79e2fe0c89 000000000000
961 8 * 1c334238bd42 7b79e2fe0c89 000000000000
963 #else
962 #else
964 $ hg debugindex d | ../no-linkrev
963 $ hg debugindex d | "$PYTHON" ../no-linkrev
965 rev linkrev nodeid p1 p2
964 rev linkrev nodeid p1 p2
966 0 * ae258f702dfe 000000000000 000000000000
965 0 * ae258f702dfe 000000000000 000000000000
967 1 * b004912a8510 000000000000 000000000000
966 1 * b004912a8510 000000000000 000000000000
968 2 * 5cce88bf349f ae258f702dfe 000000000000
967 2 * 5cce88bf349f ae258f702dfe 000000000000
969 3 * cc269dd788c8 b004912a8510 5cce88bf349f
968 3 * cc269dd788c8 b004912a8510 5cce88bf349f
970 4 * 51c91a115080 5cce88bf349f b004912a8510
969 4 * 51c91a115080 5cce88bf349f b004912a8510
971 5 * cea2d99c0fde ae258f702dfe 000000000000
970 5 * cea2d99c0fde ae258f702dfe 000000000000
972 #endif
971 #endif
973 $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))'
972 $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))'
974 @ mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
973 @ mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
975 |\
974 |\
976 +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
975 +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
977 | |/
976 | |/
978 | o f-2: rename i -> d
977 | o f-2: rename i -> d
979 | |
978 | |
980 | o f-1: rename h -> i
979 | o f-1: rename h -> i
981 | |
980 | |
982 o | b-1: b update
981 o | b-1: b update
983 |/
982 |/
984 o i-2: c -move-> d, s -move-> t
983 o i-2: c -move-> d, s -move-> t
985 |
984 |
986 o i-1: a -move-> c, p -move-> s
985 o i-1: a -move-> c, p -move-> s
987 |
986 |
988 o i-0 initial commit: a b h p q r
987 o i-0 initial commit: a b h p q r
989
988
990
989
991 Subcase: restoring and untouched deleted file, while touching it
990 Subcase: restoring and untouched deleted file, while touching it
992 ````````````````````````````````````````````````````````````````
991 ````````````````````````````````````````````````````````````````
993
992
994 Merge:
993 Merge:
995 - one removing a file (d)
994 - one removing a file (d)
996 - one leaving the file untouched
995 - one leaving the file untouched
997 - the merge actively restore the file to the same content.
996 - the merge actively restore the file to the same content.
998
997
999 In this case, the file keep on living after the merge. So we should not drop its
998 In this case, the file keep on living after the merge. So we should not drop its
1000 copy tracing chain.
999 copy tracing chain.
1001
1000
1002 $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)"
1001 $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)"
1003
1002
1004 $ hg up 'desc("c-1")'
1003 $ hg up 'desc("c-1")'
1005 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1004 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1006 $ hg merge 'desc("b-1")'
1005 $ hg merge 'desc("b-1")'
1007 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1006 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1008 (branch merge, don't forget to commit)
1007 (branch merge, don't forget to commit)
1009 $ hg revert --rev 'desc("b-1")' d
1008 $ hg revert --rev 'desc("b-1")' d
1010 $ echo "new content for d after the revert" > d
1009 $ echo "new content for d after the revert" > d
1011 $ hg ci -m "mCB-change-m-0 $case_desc - one way"
1010 $ hg ci -m "mCB-change-m-0 $case_desc - one way"
1012 created new head
1011 created new head
1013 $ hg manifest --rev . --debug | grep " d"
1012 $ hg manifest --rev . --debug | grep " d"
1014 e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !)
1013 e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !)
1015 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !)
1014 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !)
1016
1015
1017 $ hg up 'desc("b-1")'
1016 $ hg up 'desc("b-1")'
1018 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1017 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1019 $ hg merge 'desc("c-1")'
1018 $ hg merge 'desc("c-1")'
1020 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1019 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1021 (branch merge, don't forget to commit)
1020 (branch merge, don't forget to commit)
1022 $ hg revert --rev 'desc("b-1")' d
1021 $ hg revert --rev 'desc("b-1")' d
1023 $ echo "new content for d after the revert" > d
1022 $ echo "new content for d after the revert" > d
1024 $ hg ci -m "mBC-change-m-0 $case_desc - the other way"
1023 $ hg ci -m "mBC-change-m-0 $case_desc - the other way"
1025 created new head
1024 created new head
1026 $ hg manifest --rev . --debug | grep " d"
1025 $ hg manifest --rev . --debug | grep " d"
1027 e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !)
1026 e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !)
1028 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !)
1027 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !)
1029
1028
1030
1029
1031 $ hg up null --quiet
1030 $ hg up null --quiet
1032 $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))'
1031 $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))'
1033 o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1032 o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1034 |\
1033 |\
1035 +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1034 +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1036 | |/
1035 | |/
1037 | o c-1 delete d
1036 | o c-1 delete d
1038 | |
1037 | |
1039 o | b-1: b update
1038 o | b-1: b update
1040 |/
1039 |/
1041 o i-2: c -move-> d, s -move-> t
1040 o i-2: c -move-> d, s -move-> t
1042 |
1041 |
1043 o i-1: a -move-> c, p -move-> s
1042 o i-1: a -move-> c, p -move-> s
1044 |
1043 |
1045 o i-0 initial commit: a b h p q r
1044 o i-0 initial commit: a b h p q r
1046
1045
1047
1046
1048 Decision from previous merge are properly chained with later merge
1047 Decision from previous merge are properly chained with later merge
1049 ------------------------------------------------------------------
1048 ------------------------------------------------------------------
1050
1049
1051 Subcase: chaining conflicting rename resolution
1050 Subcase: chaining conflicting rename resolution
1052 ```````````````````````````````````````````````
1051 ```````````````````````````````````````````````
1053
1052
1054 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
1053 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
1055 add more change on the respective branch and merge again. These second merge
1054 add more change on the respective branch and merge again. These second merge
1056 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
1055 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
1057 about that file should stay unchanged.
1056 about that file should stay unchanged.
1058
1057
1059 We also touch J during some of the merge to check for unrelated change to new file during merge.
1058 We also touch J during some of the merge to check for unrelated change to new file during merge.
1060
1059
1061 $ case_desc="chained merges (conflict -> simple) - same content everywhere"
1060 $ case_desc="chained merges (conflict -> simple) - same content everywhere"
1062
1061
1063 (extra unrelated changes)
1062 (extra unrelated changes)
1064
1063
1065 $ hg up 'desc("a-2")'
1064 $ hg up 'desc("a-2")'
1066 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
1065 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
1067 $ echo j > unrelated-j
1066 $ echo j > unrelated-j
1068 $ hg add unrelated-j
1067 $ hg add unrelated-j
1069 $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)'
1068 $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)'
1070 created new head
1069 created new head
1071
1070
1072 $ hg up 'desc("e-2")'
1071 $ hg up 'desc("e-2")'
1073 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1072 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1074 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1073 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1075 $ echo k > unrelated-k
1074 $ echo k > unrelated-k
1076 $ hg add unrelated-k
1075 $ hg add unrelated-k
1077 $ hg ci -m 'k-1: unrelated changes (based on "e" changes)'
1076 $ hg ci -m 'k-1: unrelated changes (based on "e" changes)'
1078 created new head
1077 created new head
1079
1078
1080 (merge variant 1)
1079 (merge variant 1)
1081
1080
1082 $ hg up 'desc("mAEm")'
1081 $ hg up 'desc("mAEm")'
1083 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1082 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1084 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1083 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1085 $ hg merge 'desc("k-1")'
1084 $ hg merge 'desc("k-1")'
1086 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1085 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1087 (branch merge, don't forget to commit)
1086 (branch merge, don't forget to commit)
1088 $ hg ci -m "mAE,Km: $case_desc"
1087 $ hg ci -m "mAE,Km: $case_desc"
1089
1088
1090 (merge variant 2)
1089 (merge variant 2)
1091
1090
1092 $ hg up 'desc("k-1")'
1091 $ hg up 'desc("k-1")'
1093 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1092 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1094 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1093 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1095
1094
1096 $ hg merge 'desc("mAEm")'
1095 $ hg merge 'desc("mAEm")'
1097 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1096 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1098 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1097 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1099 (branch merge, don't forget to commit)
1098 (branch merge, don't forget to commit)
1100 $ hg ci -m "mK,AEm: $case_desc"
1099 $ hg ci -m "mK,AEm: $case_desc"
1101 created new head
1100 created new head
1102
1101
1103 (merge variant 3)
1102 (merge variant 3)
1104
1103
1105 $ hg up 'desc("mEAm")'
1104 $ hg up 'desc("mEAm")'
1106 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1105 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1107 $ hg merge 'desc("j-1")'
1106 $ hg merge 'desc("j-1")'
1108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1109 (branch merge, don't forget to commit)
1108 (branch merge, don't forget to commit)
1110 $ echo jj > unrelated-j
1109 $ echo jj > unrelated-j
1111 $ hg ci -m "mEA,Jm: $case_desc"
1110 $ hg ci -m "mEA,Jm: $case_desc"
1112
1111
1113 (merge variant 4)
1112 (merge variant 4)
1114
1113
1115 $ hg up 'desc("j-1")'
1114 $ hg up 'desc("j-1")'
1116 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1115 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1117 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1116 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1118 $ hg merge 'desc("mEAm")'
1117 $ hg merge 'desc("mEAm")'
1119 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1118 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1120 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1119 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1121 (branch merge, don't forget to commit)
1120 (branch merge, don't forget to commit)
1122 $ echo jj > unrelated-j
1121 $ echo jj > unrelated-j
1123 $ hg ci -m "mJ,EAm: $case_desc"
1122 $ hg ci -m "mJ,EAm: $case_desc"
1124 created new head
1123 created new head
1125
1124
1126
1125
1127 $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))'
1126 $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))'
1128 @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere
1127 @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere
1129 |\
1128 |\
1130 +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere
1129 +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere
1131 | |/
1130 | |/
1132 | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere
1131 | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere
1133 | | |\
1132 | | |\
1134 | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere
1133 | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere
1135 | | | |/
1134 | | | |/
1136 | | | o k-1: unrelated changes (based on "e" changes)
1135 | | | o k-1: unrelated changes (based on "e" changes)
1137 | | | |
1136 | | | |
1138 | o | | j-1: unrelated changes (based on the "a" series of changes)
1137 | o | | j-1: unrelated changes (based on the "a" series of changes)
1139 | | | |
1138 | | | |
1140 o-----+ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
1139 o-----+ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
1141 |/ / /
1140 |/ / /
1142 | o / mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
1141 | o / mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
1143 |/|/
1142 |/|/
1144 | o e-2 g -move-> f
1143 | o e-2 g -move-> f
1145 | |
1144 | |
1146 | o e-1 b -move-> g
1145 | o e-1 b -move-> g
1147 | |
1146 | |
1148 o | a-2: e -move-> f
1147 o | a-2: e -move-> f
1149 | |
1148 | |
1150 o | a-1: d -move-> e
1149 o | a-1: d -move-> e
1151 |/
1150 |/
1152 o i-2: c -move-> d, s -move-> t
1151 o i-2: c -move-> d, s -move-> t
1153 |
1152 |
1154 o i-1: a -move-> c, p -move-> s
1153 o i-1: a -move-> c, p -move-> s
1155 |
1154 |
1156 o i-0 initial commit: a b h p q r
1155 o i-0 initial commit: a b h p q r
1157
1156
1158
1157
1159 Subcase: chaining conflicting rename resolution, with actual merging happening
1158 Subcase: chaining conflicting rename resolution, with actual merging happening
1160 ``````````````````````````````````````````````````````````````````````````````
1159 ``````````````````````````````````````````````````````````````````````````````
1161
1160
1162 The "mPQm" and "mQPm" case create a rename tracking conflict on file 't'. We
1161 The "mPQm" and "mQPm" case create a rename tracking conflict on file 't'. We
1163 add more change on the respective branch and merge again. These second merge
1162 add more change on the respective branch and merge again. These second merge
1164 does not involve the file 't' and the arbitration done within "mPQm" and "mQP"
1163 does not involve the file 't' and the arbitration done within "mPQm" and "mQP"
1165 about that file should stay unchanged.
1164 about that file should stay unchanged.
1166
1165
1167 $ case_desc="chained merges (conflict -> simple) - different content"
1166 $ case_desc="chained merges (conflict -> simple) - different content"
1168
1167
1169 (extra unrelated changes)
1168 (extra unrelated changes)
1170
1169
1171 $ hg up 'desc("p-2")'
1170 $ hg up 'desc("p-2")'
1172 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
1171 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
1173 $ echo s > unrelated-s
1172 $ echo s > unrelated-s
1174 $ hg add unrelated-s
1173 $ hg add unrelated-s
1175 $ hg ci -m 's-1: unrelated changes (based on the "p" series of changes)'
1174 $ hg ci -m 's-1: unrelated changes (based on the "p" series of changes)'
1176 created new head
1175 created new head
1177
1176
1178 $ hg up 'desc("q-2")'
1177 $ hg up 'desc("q-2")'
1179 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
1178 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
1180 $ echo t > unrelated-t
1179 $ echo t > unrelated-t
1181 $ hg add unrelated-t
1180 $ hg add unrelated-t
1182 $ hg ci -m 't-1: unrelated changes (based on "q" changes)'
1181 $ hg ci -m 't-1: unrelated changes (based on "q" changes)'
1183 created new head
1182 created new head
1184
1183
1185 (merge variant 1)
1184 (merge variant 1)
1186
1185
1187 $ hg up 'desc("mPQm")'
1186 $ hg up 'desc("mPQm")'
1188 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
1187 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
1189 $ hg merge 'desc("t-1")'
1188 $ hg merge 'desc("t-1")'
1190 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1189 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1191 (branch merge, don't forget to commit)
1190 (branch merge, don't forget to commit)
1192 $ hg ci -m "mPQ,Tm: $case_desc"
1191 $ hg ci -m "mPQ,Tm: $case_desc"
1193
1192
1194 (merge variant 2)
1193 (merge variant 2)
1195
1194
1196 $ hg up 'desc("t-1")'
1195 $ hg up 'desc("t-1")'
1197 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1196 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1198
1197
1199 $ hg merge 'desc("mPQm")'
1198 $ hg merge 'desc("mPQm")'
1200 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1199 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1201 (branch merge, don't forget to commit)
1200 (branch merge, don't forget to commit)
1202 $ hg ci -m "mT,PQm: $case_desc"
1201 $ hg ci -m "mT,PQm: $case_desc"
1203 created new head
1202 created new head
1204
1203
1205 (merge variant 3)
1204 (merge variant 3)
1206
1205
1207 $ hg up 'desc("mQPm")'
1206 $ hg up 'desc("mQPm")'
1208 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1207 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1209 $ hg merge 'desc("s-1")'
1208 $ hg merge 'desc("s-1")'
1210 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1209 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1211 (branch merge, don't forget to commit)
1210 (branch merge, don't forget to commit)
1212 $ hg ci -m "mQP,Sm: $case_desc"
1211 $ hg ci -m "mQP,Sm: $case_desc"
1213
1212
1214 (merge variant 4)
1213 (merge variant 4)
1215
1214
1216 $ hg up 'desc("s-1")'
1215 $ hg up 'desc("s-1")'
1217 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1216 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1218 $ hg merge 'desc("mQPm")'
1217 $ hg merge 'desc("mQPm")'
1219 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1218 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1220 (branch merge, don't forget to commit)
1219 (branch merge, don't forget to commit)
1221 $ hg ci -m "mS,QPm: $case_desc"
1220 $ hg ci -m "mS,QPm: $case_desc"
1222 created new head
1221 created new head
1223 $ hg up null --quiet
1222 $ hg up null --quiet
1224
1223
1225
1224
1226 $ hg log -G --rev '::(desc("mPQ,Tm") + desc("mT,PQm") + desc("mQP,Sm") + desc("mS,QPm"))'
1225 $ hg log -G --rev '::(desc("mPQ,Tm") + desc("mT,PQm") + desc("mQP,Sm") + desc("mS,QPm"))'
1227 o mS,QPm: chained merges (conflict -> simple) - different content
1226 o mS,QPm: chained merges (conflict -> simple) - different content
1228 |\
1227 |\
1229 +---o mQP,Sm: chained merges (conflict -> simple) - different content
1228 +---o mQP,Sm: chained merges (conflict -> simple) - different content
1230 | |/
1229 | |/
1231 | | o mT,PQm: chained merges (conflict -> simple) - different content
1230 | | o mT,PQm: chained merges (conflict -> simple) - different content
1232 | | |\
1231 | | |\
1233 | | +---o mPQ,Tm: chained merges (conflict -> simple) - different content
1232 | | +---o mPQ,Tm: chained merges (conflict -> simple) - different content
1234 | | | |/
1233 | | | |/
1235 | | | o t-1: unrelated changes (based on "q" changes)
1234 | | | o t-1: unrelated changes (based on "q" changes)
1236 | | | |
1235 | | | |
1237 | o | | s-1: unrelated changes (based on the "p" series of changes)
1236 | o | | s-1: unrelated changes (based on the "p" series of changes)
1238 | | | |
1237 | | | |
1239 o-----+ mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way
1238 o-----+ mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way
1240 |/ / /
1239 |/ / /
1241 | o / mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way
1240 | o / mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way
1242 |/|/
1241 |/|/
1243 | o q-2 w -move-> v
1242 | o q-2 w -move-> v
1244 | |
1243 | |
1245 | o q-1 r -move-> w
1244 | o q-1 r -move-> w
1246 | |
1245 | |
1247 o | p-2: u -move-> v
1246 o | p-2: u -move-> v
1248 | |
1247 | |
1249 o | p-1: t -move-> u
1248 o | p-1: t -move-> u
1250 |/
1249 |/
1251 o i-2: c -move-> d, s -move-> t
1250 o i-2: c -move-> d, s -move-> t
1252 |
1251 |
1253 o i-1: a -move-> c, p -move-> s
1252 o i-1: a -move-> c, p -move-> s
1254 |
1253 |
1255 o i-0 initial commit: a b h p q r
1254 o i-0 initial commit: a b h p q r
1256
1255
1257
1256
1258 Subcase: chaining salvage information during a merge
1257 Subcase: chaining salvage information during a merge
1259 ````````````````````````````````````````````````````
1258 ````````````````````````````````````````````````````
1260
1259
1261 We add more change on the branch were the file was deleted. merging again
1260 We add more change on the branch were the file was deleted. merging again
1262 should preserve the fact eh file was salvaged.
1261 should preserve the fact eh file was salvaged.
1263
1262
1264 $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)"
1263 $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)"
1265
1264
1266 (creating the change)
1265 (creating the change)
1267
1266
1268 $ hg up 'desc("c-1")'
1267 $ hg up 'desc("c-1")'
1269 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1268 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1270 $ echo l > unrelated-l
1269 $ echo l > unrelated-l
1271 $ hg add unrelated-l
1270 $ hg add unrelated-l
1272 $ hg ci -m 'l-1: unrelated changes (based on "c" changes)'
1271 $ hg ci -m 'l-1: unrelated changes (based on "c" changes)'
1273 created new head
1272 created new head
1274
1273
1275 (Merge variant 1)
1274 (Merge variant 1)
1276
1275
1277 $ hg up 'desc("mBC-revert-m")'
1276 $ hg up 'desc("mBC-revert-m")'
1278 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1277 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1279 $ hg merge 'desc("l-1")'
1278 $ hg merge 'desc("l-1")'
1280 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1279 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1281 (branch merge, don't forget to commit)
1280 (branch merge, don't forget to commit)
1282 $ hg ci -m "mBC+revert,Lm: $case_desc"
1281 $ hg ci -m "mBC+revert,Lm: $case_desc"
1283
1282
1284 (Merge variant 2)
1283 (Merge variant 2)
1285
1284
1286 $ hg up 'desc("mCB-revert-m")'
1285 $ hg up 'desc("mCB-revert-m")'
1287 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1286 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1288 $ hg merge 'desc("l-1")'
1287 $ hg merge 'desc("l-1")'
1289 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1288 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1290 (branch merge, don't forget to commit)
1289 (branch merge, don't forget to commit)
1291 $ hg ci -m "mCB+revert,Lm: $case_desc"
1290 $ hg ci -m "mCB+revert,Lm: $case_desc"
1292
1291
1293 (Merge variant 3)
1292 (Merge variant 3)
1294
1293
1295 $ hg up 'desc("l-1")'
1294 $ hg up 'desc("l-1")'
1296 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1295 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1297
1296
1298 $ hg merge 'desc("mBC-revert-m")'
1297 $ hg merge 'desc("mBC-revert-m")'
1299 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1298 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1300 (branch merge, don't forget to commit)
1299 (branch merge, don't forget to commit)
1301 $ hg ci -m "mL,BC+revertm: $case_desc"
1300 $ hg ci -m "mL,BC+revertm: $case_desc"
1302 created new head
1301 created new head
1303
1302
1304 (Merge variant 4)
1303 (Merge variant 4)
1305
1304
1306 $ hg up 'desc("l-1")'
1305 $ hg up 'desc("l-1")'
1307 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1306 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1308
1307
1309 $ hg merge 'desc("mCB-revert-m")'
1308 $ hg merge 'desc("mCB-revert-m")'
1310 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1309 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1311 (branch merge, don't forget to commit)
1310 (branch merge, don't forget to commit)
1312 $ hg ci -m "mL,CB+revertm: $case_desc"
1311 $ hg ci -m "mL,CB+revertm: $case_desc"
1313 created new head
1312 created new head
1314
1313
1315 $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))'
1314 $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))'
1316 @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1315 @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1317 |\
1316 |\
1318 | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1317 | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1319 | |/|
1318 | |/|
1320 +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1319 +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1321 | | |
1320 | | |
1322 | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1321 | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1323 | | |/
1322 | | |/
1324 | o | l-1: unrelated changes (based on "c" changes)
1323 | o | l-1: unrelated changes (based on "c" changes)
1325 | | |
1324 | | |
1326 | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1325 | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1327 | |/|
1326 | |/|
1328 o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1327 o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1329 |/ /
1328 |/ /
1330 o | c-1 delete d
1329 o | c-1 delete d
1331 | |
1330 | |
1332 | o b-1: b update
1331 | o b-1: b update
1333 |/
1332 |/
1334 o i-2: c -move-> d, s -move-> t
1333 o i-2: c -move-> d, s -move-> t
1335 |
1334 |
1336 o i-1: a -move-> c, p -move-> s
1335 o i-1: a -move-> c, p -move-> s
1337 |
1336 |
1338 o i-0 initial commit: a b h p q r
1337 o i-0 initial commit: a b h p q r
1339
1338
1340
1339
1341
1340
1342 Subcase: chaining "merged" information during a merge
1341 Subcase: chaining "merged" information during a merge
1343 ``````````````````````````````````````````````````````
1342 ``````````````````````````````````````````````````````
1344
1343
1345 When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges.
1344 When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges.
1346
1345
1347 $ case_desc="chained merges (copy-overwrite -> simple) - same content"
1346 $ case_desc="chained merges (copy-overwrite -> simple) - same content"
1348
1347
1349 (extra unrelated changes)
1348 (extra unrelated changes)
1350
1349
1351 $ hg up 'desc("f-2")'
1350 $ hg up 'desc("f-2")'
1352 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1351 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1353 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1352 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1354 $ echo n > unrelated-n
1353 $ echo n > unrelated-n
1355 $ hg add unrelated-n
1354 $ hg add unrelated-n
1356 $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)'
1355 $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)'
1357 created new head
1356 created new head
1358
1357
1359 $ hg up 'desc("g-1")'
1358 $ hg up 'desc("g-1")'
1360 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1359 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1361 $ echo o > unrelated-o
1360 $ echo o > unrelated-o
1362 $ hg add unrelated-o
1361 $ hg add unrelated-o
1363 $ hg ci -m 'o-1: unrelated changes (based on "g" changes)'
1362 $ hg ci -m 'o-1: unrelated changes (based on "g" changes)'
1364 created new head
1363 created new head
1365
1364
1366 (merge variant 1)
1365 (merge variant 1)
1367
1366
1368 $ hg up 'desc("mFGm")'
1367 $ hg up 'desc("mFGm")'
1369 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1368 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1370 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1369 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1371 $ hg merge 'desc("o-1")'
1370 $ hg merge 'desc("o-1")'
1372 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1371 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1373 (branch merge, don't forget to commit)
1372 (branch merge, don't forget to commit)
1374 $ hg ci -m "mFG,Om: $case_desc"
1373 $ hg ci -m "mFG,Om: $case_desc"
1375
1374
1376 (merge variant 2)
1375 (merge variant 2)
1377
1376
1378 $ hg up 'desc("o-1")'
1377 $ hg up 'desc("o-1")'
1379 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1378 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1380 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1381 $ hg merge 'desc("FGm")'
1380 $ hg merge 'desc("FGm")'
1382 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1381 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1383 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1382 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1384 (branch merge, don't forget to commit)
1383 (branch merge, don't forget to commit)
1385 $ hg ci -m "mO,FGm: $case_desc"
1384 $ hg ci -m "mO,FGm: $case_desc"
1386 created new head
1385 created new head
1387
1386
1388 (merge variant 3)
1387 (merge variant 3)
1389
1388
1390 $ hg up 'desc("mGFm")'
1389 $ hg up 'desc("mGFm")'
1391 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1390 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1392 $ hg merge 'desc("n-1")'
1391 $ hg merge 'desc("n-1")'
1393 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1392 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1394 (branch merge, don't forget to commit)
1393 (branch merge, don't forget to commit)
1395 $ hg ci -m "mGF,Nm: $case_desc"
1394 $ hg ci -m "mGF,Nm: $case_desc"
1396
1395
1397 (merge variant 4)
1396 (merge variant 4)
1398
1397
1399 $ hg up 'desc("n-1")'
1398 $ hg up 'desc("n-1")'
1400 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1399 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1401 $ hg merge 'desc("mGFm")'
1400 $ hg merge 'desc("mGFm")'
1402 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1401 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1403 (branch merge, don't forget to commit)
1402 (branch merge, don't forget to commit)
1404 $ hg ci -m "mN,GFm: $case_desc"
1403 $ hg ci -m "mN,GFm: $case_desc"
1405 created new head
1404 created new head
1406
1405
1407 $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))'
1406 $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))'
1408 @ mN,GFm: chained merges (copy-overwrite -> simple) - same content
1407 @ mN,GFm: chained merges (copy-overwrite -> simple) - same content
1409 |\
1408 |\
1410 +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content
1409 +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content
1411 | |/
1410 | |/
1412 | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content
1411 | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content
1413 | | |\
1412 | | |\
1414 | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content
1413 | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content
1415 | | | |/
1414 | | | |/
1416 | | | o o-1: unrelated changes (based on "g" changes)
1415 | | | o o-1: unrelated changes (based on "g" changes)
1417 | | | |
1416 | | | |
1418 | o | | n-1: unrelated changes (based on the "f" series of changes)
1417 | o | | n-1: unrelated changes (based on the "f" series of changes)
1419 | | | |
1418 | | | |
1420 o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
1419 o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
1421 |/ / /
1420 |/ / /
1422 | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
1421 | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
1423 |/|/
1422 |/|/
1424 | o g-1: update d
1423 | o g-1: update d
1425 | |
1424 | |
1426 o | f-2: rename i -> d
1425 o | f-2: rename i -> d
1427 | |
1426 | |
1428 o | f-1: rename h -> i
1427 o | f-1: rename h -> i
1429 |/
1428 |/
1430 o i-2: c -move-> d, s -move-> t
1429 o i-2: c -move-> d, s -move-> t
1431 |
1430 |
1432 o i-1: a -move-> c, p -move-> s
1431 o i-1: a -move-> c, p -move-> s
1433 |
1432 |
1434 o i-0 initial commit: a b h p q r
1433 o i-0 initial commit: a b h p q r
1435
1434
1436
1435
1437 Subcase: chaining conflicting rename resolution, with extra change during the merge
1436 Subcase: chaining conflicting rename resolution, with extra change during the merge
1438 ```````````````````````````````````````````````````````````````````````````````````
1437 ```````````````````````````````````````````````````````````````````````````````````
1439
1438
1440 The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We
1439 The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We
1441 add more change on the respective branch and merge again. These second merge
1440 add more change on the respective branch and merge again. These second merge
1442 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
1441 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
1443 about that file should stay unchanged.
1442 about that file should stay unchanged.
1444
1443
1445 $ case_desc="chained merges (conflict+change -> simple) - same content on both branch in the initial merge"
1444 $ case_desc="chained merges (conflict+change -> simple) - same content on both branch in the initial merge"
1446
1445
1447
1446
1448 (merge variant 1)
1447 (merge variant 1)
1449
1448
1450 $ hg up 'desc("mAE-change-m")'
1449 $ hg up 'desc("mAE-change-m")'
1451 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
1450 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
1452 $ hg merge 'desc("k-1")'
1451 $ hg merge 'desc("k-1")'
1453 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1452 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1454 (branch merge, don't forget to commit)
1453 (branch merge, don't forget to commit)
1455 $ hg ci -m "mAE-change,Km: $case_desc"
1454 $ hg ci -m "mAE-change,Km: $case_desc"
1456
1455
1457 (merge variant 2)
1456 (merge variant 2)
1458
1457
1459 $ hg up 'desc("k-1")'
1458 $ hg up 'desc("k-1")'
1460 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1459 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1461
1460
1462 $ hg merge 'desc("mAE-change-m")'
1461 $ hg merge 'desc("mAE-change-m")'
1463 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1462 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1464 (branch merge, don't forget to commit)
1463 (branch merge, don't forget to commit)
1465 $ hg ci -m "mK,AE-change-m: $case_desc"
1464 $ hg ci -m "mK,AE-change-m: $case_desc"
1466 created new head
1465 created new head
1467
1466
1468 (merge variant 3)
1467 (merge variant 3)
1469
1468
1470 $ hg up 'desc("mEA-change-m")'
1469 $ hg up 'desc("mEA-change-m")'
1471 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1470 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1472 $ hg merge 'desc("j-1")'
1471 $ hg merge 'desc("j-1")'
1473 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1472 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1474 (branch merge, don't forget to commit)
1473 (branch merge, don't forget to commit)
1475 $ hg ci -m "mEA-change,Jm: $case_desc"
1474 $ hg ci -m "mEA-change,Jm: $case_desc"
1476
1475
1477 (merge variant 4)
1476 (merge variant 4)
1478
1477
1479 $ hg up 'desc("j-1")'
1478 $ hg up 'desc("j-1")'
1480 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1479 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1481 $ hg merge 'desc("mEA-change-m")'
1480 $ hg merge 'desc("mEA-change-m")'
1482 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1481 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1483 (branch merge, don't forget to commit)
1482 (branch merge, don't forget to commit)
1484 $ hg ci -m "mJ,EA-change-m: $case_desc"
1483 $ hg ci -m "mJ,EA-change-m: $case_desc"
1485 created new head
1484 created new head
1486
1485
1487
1486
1488 $ hg log -G --rev '::(desc("mAE-change,Km") + desc("mK,AE-change-m") + desc("mEA-change,Jm") + desc("mJ,EA-change-m"))'
1487 $ hg log -G --rev '::(desc("mAE-change,Km") + desc("mK,AE-change-m") + desc("mEA-change,Jm") + desc("mJ,EA-change-m"))'
1489 @ mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1488 @ mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1490 |\
1489 |\
1491 +---o mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1490 +---o mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1492 | |/
1491 | |/
1493 | | o mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1492 | | o mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1494 | | |\
1493 | | |\
1495 | | +---o mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1494 | | +---o mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1496 | | | |/
1495 | | | |/
1497 | | | o k-1: unrelated changes (based on "e" changes)
1496 | | | o k-1: unrelated changes (based on "e" changes)
1498 | | | |
1497 | | | |
1499 | o | | j-1: unrelated changes (based on the "a" series of changes)
1498 | o | | j-1: unrelated changes (based on the "a" series of changes)
1500 | | | |
1499 | | | |
1501 o-----+ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way
1500 o-----+ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way
1502 |/ / /
1501 |/ / /
1503 | o / mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way
1502 | o / mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way
1504 |/|/
1503 |/|/
1505 | o e-2 g -move-> f
1504 | o e-2 g -move-> f
1506 | |
1505 | |
1507 | o e-1 b -move-> g
1506 | o e-1 b -move-> g
1508 | |
1507 | |
1509 o | a-2: e -move-> f
1508 o | a-2: e -move-> f
1510 | |
1509 | |
1511 o | a-1: d -move-> e
1510 o | a-1: d -move-> e
1512 |/
1511 |/
1513 o i-2: c -move-> d, s -move-> t
1512 o i-2: c -move-> d, s -move-> t
1514 |
1513 |
1515 o i-1: a -move-> c, p -move-> s
1514 o i-1: a -move-> c, p -move-> s
1516 |
1515 |
1517 o i-0 initial commit: a b h p q r
1516 o i-0 initial commit: a b h p q r
1518
1517
1519
1518
1520 Summary of all created cases
1519 Summary of all created cases
1521 ----------------------------
1520 ----------------------------
1522
1521
1523 $ hg up --quiet null
1522 $ hg up --quiet null
1524
1523
1525 (This exists to help keeping a compact list of the various cases we have built)
1524 (This exists to help keeping a compact list of the various cases we have built)
1526
1525
1527 $ hg log -T '{desc|firstline}\n'| sort
1526 $ hg log -T '{desc|firstline}\n'| sort
1528 a-1: d -move-> e
1527 a-1: d -move-> e
1529 a-2: e -move-> f
1528 a-2: e -move-> f
1530 b-1: b update
1529 b-1: b update
1531 c-1 delete d
1530 c-1 delete d
1532 d-1 delete d
1531 d-1 delete d
1533 d-2 re-add d
1532 d-2 re-add d
1534 e-1 b -move-> g
1533 e-1 b -move-> g
1535 e-2 g -move-> f
1534 e-2 g -move-> f
1536 f-1: rename h -> i
1535 f-1: rename h -> i
1537 f-2: rename i -> d
1536 f-2: rename i -> d
1538 g-1: update d
1537 g-1: update d
1539 h-1: b -(move)-> d
1538 h-1: b -(move)-> d
1540 i-0 initial commit: a b h p q r
1539 i-0 initial commit: a b h p q r
1541 i-1: a -move-> c, p -move-> s
1540 i-1: a -move-> c, p -move-> s
1542 i-2: c -move-> d, s -move-> t
1541 i-2: c -move-> d, s -move-> t
1543 j-1: unrelated changes (based on the "a" series of changes)
1542 j-1: unrelated changes (based on the "a" series of changes)
1544 k-1: unrelated changes (based on "e" changes)
1543 k-1: unrelated changes (based on "e" changes)
1545 l-1: unrelated changes (based on "c" changes)
1544 l-1: unrelated changes (based on "c" changes)
1546 mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
1545 mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
1547 mAE,Km: chained merges (conflict -> simple) - same content everywhere
1546 mAE,Km: chained merges (conflict -> simple) - same content everywhere
1548 mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1547 mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1549 mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way
1548 mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way
1550 mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
1549 mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
1551 mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
1550 mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
1552 mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1551 mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1553 mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1552 mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1554 mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1553 mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1555 mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
1554 mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
1556 mBCm-1 re-add d
1555 mBCm-1 re-add d
1557 mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
1556 mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
1558 mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
1557 mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
1559 mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
1558 mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
1560 mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
1559 mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
1561 mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1560 mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1562 mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1561 mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1563 mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1562 mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1564 mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
1563 mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
1565 mCBm-1 re-add d
1564 mCBm-1 re-add d
1566 mCGm-0 merge updated/deleted - revive the file (updated content) - one way
1565 mCGm-0 merge updated/deleted - revive the file (updated content) - one way
1567 mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way
1566 mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way
1568 mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
1567 mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
1569 mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
1568 mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
1570 mEA,Jm: chained merges (conflict -> simple) - same content everywhere
1569 mEA,Jm: chained merges (conflict -> simple) - same content everywhere
1571 mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1570 mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1572 mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way
1571 mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way
1573 mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
1572 mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
1574 mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
1573 mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
1575 mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
1574 mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
1576 mFG,Om: chained merges (copy-overwrite -> simple) - same content
1575 mFG,Om: chained merges (copy-overwrite -> simple) - same content
1577 mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
1576 mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
1578 mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
1577 mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
1579 mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
1578 mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
1580 mGF,Nm: chained merges (copy-overwrite -> simple) - same content
1579 mGF,Nm: chained merges (copy-overwrite -> simple) - same content
1581 mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
1580 mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
1582 mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way
1581 mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way
1583 mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1582 mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1584 mJ,EAm: chained merges (conflict -> simple) - same content everywhere
1583 mJ,EAm: chained merges (conflict -> simple) - same content everywhere
1585 mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1584 mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1586 mK,AEm: chained merges (conflict -> simple) - same content everywhere
1585 mK,AEm: chained merges (conflict -> simple) - same content everywhere
1587 mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1586 mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1588 mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1587 mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1589 mN,GFm: chained merges (copy-overwrite -> simple) - same content
1588 mN,GFm: chained merges (copy-overwrite -> simple) - same content
1590 mO,FGm: chained merges (copy-overwrite -> simple) - same content
1589 mO,FGm: chained merges (copy-overwrite -> simple) - same content
1591 mPQ,Tm: chained merges (conflict -> simple) - different content
1590 mPQ,Tm: chained merges (conflict -> simple) - different content
1592 mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way
1591 mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way
1593 mQP,Sm: chained merges (conflict -> simple) - different content
1592 mQP,Sm: chained merges (conflict -> simple) - different content
1594 mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way
1593 mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way
1595 mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way
1594 mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way
1596 mS,QPm: chained merges (conflict -> simple) - different content
1595 mS,QPm: chained merges (conflict -> simple) - different content
1597 mT,PQm: chained merges (conflict -> simple) - different content
1596 mT,PQm: chained merges (conflict -> simple) - different content
1598 n-1: unrelated changes (based on the "f" series of changes)
1597 n-1: unrelated changes (based on the "f" series of changes)
1599 o-1: unrelated changes (based on "g" changes)
1598 o-1: unrelated changes (based on "g" changes)
1600 p-1: t -move-> u
1599 p-1: t -move-> u
1601 p-2: u -move-> v
1600 p-2: u -move-> v
1602 q-1 r -move-> w
1601 q-1 r -move-> w
1603 q-2 w -move-> v
1602 q-2 w -move-> v
1604 r-1: rename r -> x
1603 r-1: rename r -> x
1605 r-2: rename t -> x
1604 r-2: rename t -> x
1606 s-1: unrelated changes (based on the "p" series of changes)
1605 s-1: unrelated changes (based on the "p" series of changes)
1607 t-1: unrelated changes (based on "q" changes)
1606 t-1: unrelated changes (based on "q" changes)
1608
1607
1609
1608
1610 Test that sidedata computations during upgrades are correct
1609 Test that sidedata computations during upgrades are correct
1611 ===========================================================
1610 ===========================================================
1612
1611
1613 We upgrade a repository that is not using sidedata (the filelog case) and
1612 We upgrade a repository that is not using sidedata (the filelog case) and
1614 check that the same side data have been generated as if they were computed at
1613 check that the same side data have been generated as if they were computed at
1615 commit time.
1614 commit time.
1616
1615
1617
1616
1618 #if upgraded
1617 #if upgraded
1619 $ cat >> $HGRCPATH << EOF
1618 $ cat >> $HGRCPATH << EOF
1620 > [format]
1619 > [format]
1621 > exp-use-side-data = yes
1620 > exp-use-side-data = yes
1622 > exp-use-copies-side-data-changeset = yes
1621 > exp-use-copies-side-data-changeset = yes
1623 > EOF
1622 > EOF
1624 $ hg debugformat -v
1623 $ hg debugformat -v
1625 format-variant repo config default
1624 format-variant repo config default
1626 fncache: yes yes yes
1625 fncache: yes yes yes
1627 dotencode: yes yes yes
1626 dotencode: yes yes yes
1628 generaldelta: yes yes yes
1627 generaldelta: yes yes yes
1629 share-safe: no no no
1628 share-safe: no no no
1630 sparserevlog: yes yes yes
1629 sparserevlog: yes yes yes
1631 persistent-nodemap: no no no (no-rust !)
1630 persistent-nodemap: no no no (no-rust !)
1632 persistent-nodemap: yes yes no (rust !)
1631 persistent-nodemap: yes yes no (rust !)
1633 copies-sdc: no yes no
1632 copies-sdc: no yes no
1634 revlog-v2: no yes no
1633 revlog-v2: no yes no
1635 plain-cl-delta: yes yes yes
1634 plain-cl-delta: yes yes yes
1636 compression: * (glob)
1635 compression: * (glob)
1637 compression-level: default default default
1636 compression-level: default default default
1638 $ hg debugupgraderepo --run --quiet
1637 $ hg debugupgraderepo --run --quiet
1639 upgrade will perform the following actions:
1638 upgrade will perform the following actions:
1640
1639
1641 requirements
1640 requirements
1642 preserved: * (glob)
1641 preserved: * (glob)
1643 removed: revlogv1
1642 removed: revlogv1
1644 added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
1643 added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
1645
1644
1646 processed revlogs:
1645 processed revlogs:
1647 - all-filelogs
1646 - all-filelogs
1648 - changelog
1647 - changelog
1649 - manifest
1648 - manifest
1650
1649
1651 #endif
1650 #endif
1652
1651
1653 #if upgraded-parallel
1652 #if upgraded-parallel
1654 $ cat >> $HGRCPATH << EOF
1653 $ cat >> $HGRCPATH << EOF
1655 > [format]
1654 > [format]
1656 > exp-use-side-data = yes
1655 > exp-use-side-data = yes
1657 > exp-use-copies-side-data-changeset = yes
1656 > exp-use-copies-side-data-changeset = yes
1658 > [experimental]
1657 > [experimental]
1659 > worker.repository-upgrade=yes
1658 > worker.repository-upgrade=yes
1660 > [worker]
1659 > [worker]
1661 > enabled=yes
1660 > enabled=yes
1662 > numcpus=8
1661 > numcpus=8
1663 > EOF
1662 > EOF
1664 $ hg debugformat -v
1663 $ hg debugformat -v
1665 format-variant repo config default
1664 format-variant repo config default
1666 fncache: yes yes yes
1665 fncache: yes yes yes
1667 dotencode: yes yes yes
1666 dotencode: yes yes yes
1668 generaldelta: yes yes yes
1667 generaldelta: yes yes yes
1669 share-safe: no no no
1668 share-safe: no no no
1670 sparserevlog: yes yes yes
1669 sparserevlog: yes yes yes
1671 persistent-nodemap: no no no (no-rust !)
1670 persistent-nodemap: no no no (no-rust !)
1672 persistent-nodemap: yes yes no (rust !)
1671 persistent-nodemap: yes yes no (rust !)
1673 copies-sdc: no yes no
1672 copies-sdc: no yes no
1674 revlog-v2: no yes no
1673 revlog-v2: no yes no
1675 plain-cl-delta: yes yes yes
1674 plain-cl-delta: yes yes yes
1676 compression: * (glob)
1675 compression: * (glob)
1677 compression-level: default default default
1676 compression-level: default default default
1678 $ hg debugupgraderepo --run --quiet
1677 $ hg debugupgraderepo --run --quiet
1679 upgrade will perform the following actions:
1678 upgrade will perform the following actions:
1680
1679
1681 requirements
1680 requirements
1682 preserved: * (glob)
1681 preserved: * (glob)
1683 removed: revlogv1
1682 removed: revlogv1
1684 added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
1683 added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
1685
1684
1686 processed revlogs:
1685 processed revlogs:
1687 - all-filelogs
1686 - all-filelogs
1688 - changelog
1687 - changelog
1689 - manifest
1688 - manifest
1690
1689
1691 #endif
1690 #endif
1692
1691
1693
1692
1694 #if no-compatibility no-filelog no-changeset
1693 #if no-compatibility no-filelog no-changeset
1695
1694
1696 $ hg debugchangedfiles --compute 0
1695 $ hg debugchangedfiles --compute 0
1697 added : a, ;
1696 added : a, ;
1698 added : b, ;
1697 added : b, ;
1699 added : h, ;
1698 added : h, ;
1700 added : p, ;
1699 added : p, ;
1701 added : q, ;
1700 added : q, ;
1702 added : r, ;
1701 added : r, ;
1703
1702
1704 $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do
1703 $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do
1705 > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'`
1704 > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'`
1706 > echo "##### revision \"$case_id\" #####"
1705 > echo "##### revision \"$case_id\" #####"
1707 > hg debugsidedata -c -v -- $rev
1706 > hg debugsidedata -c -v -- $rev
1708 > hg debugchangedfiles $rev
1707 > hg debugchangedfiles $rev
1709 > done
1708 > done
1710 ##### revision "i-0 initial commit" #####
1709 ##### revision "i-0 initial commit" #####
1711 1 sidedata entries
1710 1 sidedata entries
1712 entry-0014 size 64
1711 entry-0014 size 64
1713 '\x00\x00\x00\x06\x04\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x00abhpqr'
1712 '\x00\x00\x00\x06\x04\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x00abhpqr'
1714 added : a, ;
1713 added : a, ;
1715 added : b, ;
1714 added : b, ;
1716 added : h, ;
1715 added : h, ;
1717 added : p, ;
1716 added : p, ;
1718 added : q, ;
1717 added : q, ;
1719 added : r, ;
1718 added : r, ;
1720 ##### revision "i-1" #####
1719 ##### revision "i-1" #####
1721 1 sidedata entries
1720 1 sidedata entries
1722 entry-0014 size 44
1721 entry-0014 size 44
1723 '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02acps'
1722 '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02acps'
1724 removed : a, ;
1723 removed : a, ;
1725 added p1: c, a;
1724 added p1: c, a;
1726 removed : p, ;
1725 removed : p, ;
1727 added p1: s, p;
1726 added p1: s, p;
1728 ##### revision "i-2" #####
1727 ##### revision "i-2" #####
1729 1 sidedata entries
1728 1 sidedata entries
1730 entry-0014 size 44
1729 entry-0014 size 44
1731 '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02cdst'
1730 '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02cdst'
1732 removed : c, ;
1731 removed : c, ;
1733 added p1: d, c;
1732 added p1: d, c;
1734 removed : s, ;
1733 removed : s, ;
1735 added p1: t, s;
1734 added p1: t, s;
1736 ##### revision "a-1" #####
1735 ##### revision "a-1" #####
1737 1 sidedata entries
1736 1 sidedata entries
1738 entry-0014 size 24
1737 entry-0014 size 24
1739 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de'
1738 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de'
1740 removed : d, ;
1739 removed : d, ;
1741 added p1: e, d;
1740 added p1: e, d;
1742 ##### revision "a-2" #####
1741 ##### revision "a-2" #####
1743 1 sidedata entries
1742 1 sidedata entries
1744 entry-0014 size 24
1743 entry-0014 size 24
1745 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef'
1744 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef'
1746 removed : e, ;
1745 removed : e, ;
1747 added p1: f, e;
1746 added p1: f, e;
1748 ##### revision "b-1" #####
1747 ##### revision "b-1" #####
1749 1 sidedata entries
1748 1 sidedata entries
1750 entry-0014 size 14
1749 entry-0014 size 14
1751 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b'
1750 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b'
1752 touched : b, ;
1751 touched : b, ;
1753 ##### revision "c-1 delete d" #####
1752 ##### revision "c-1 delete d" #####
1754 1 sidedata entries
1753 1 sidedata entries
1755 entry-0014 size 14
1754 entry-0014 size 14
1756 '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d'
1755 '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d'
1757 removed : d, ;
1756 removed : d, ;
1758 ##### revision "d-1 delete d" #####
1757 ##### revision "d-1 delete d" #####
1759 1 sidedata entries
1758 1 sidedata entries
1760 entry-0014 size 14
1759 entry-0014 size 14
1761 '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d'
1760 '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d'
1762 removed : d, ;
1761 removed : d, ;
1763 ##### revision "d-2 re-add d" #####
1762 ##### revision "d-2 re-add d" #####
1764 1 sidedata entries
1763 1 sidedata entries
1765 entry-0014 size 14
1764 entry-0014 size 14
1766 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1765 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1767 added : d, ;
1766 added : d, ;
1768 ##### revision "e-1 b -move-> g" #####
1767 ##### revision "e-1 b -move-> g" #####
1769 1 sidedata entries
1768 1 sidedata entries
1770 entry-0014 size 24
1769 entry-0014 size 24
1771 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg'
1770 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg'
1772 removed : b, ;
1771 removed : b, ;
1773 added p1: g, b;
1772 added p1: g, b;
1774 ##### revision "e-2 g -move-> f" #####
1773 ##### revision "e-2 g -move-> f" #####
1775 1 sidedata entries
1774 1 sidedata entries
1776 entry-0014 size 24
1775 entry-0014 size 24
1777 '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg'
1776 '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg'
1778 added p1: f, g;
1777 added p1: f, g;
1779 removed : g, ;
1778 removed : g, ;
1780 ##### revision "p-1" #####
1779 ##### revision "p-1" #####
1781 1 sidedata entries
1780 1 sidedata entries
1782 entry-0014 size 24
1781 entry-0014 size 24
1783 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00tu'
1782 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00tu'
1784 removed : t, ;
1783 removed : t, ;
1785 added p1: u, t;
1784 added p1: u, t;
1786 ##### revision "p-2" #####
1785 ##### revision "p-2" #####
1787 1 sidedata entries
1786 1 sidedata entries
1788 entry-0014 size 24
1787 entry-0014 size 24
1789 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00uv'
1788 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00uv'
1790 removed : u, ;
1789 removed : u, ;
1791 added p1: v, u;
1790 added p1: v, u;
1792 ##### revision "q-1 r -move-> w" #####
1791 ##### revision "q-1 r -move-> w" #####
1793 1 sidedata entries
1792 1 sidedata entries
1794 entry-0014 size 24
1793 entry-0014 size 24
1795 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rw'
1794 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rw'
1796 removed : r, ;
1795 removed : r, ;
1797 added p1: w, r;
1796 added p1: w, r;
1798 ##### revision "q-2 w -move-> v" #####
1797 ##### revision "q-2 w -move-> v" #####
1799 1 sidedata entries
1798 1 sidedata entries
1800 entry-0014 size 24
1799 entry-0014 size 24
1801 '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00vw'
1800 '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00vw'
1802 added p1: v, w;
1801 added p1: v, w;
1803 removed : w, ;
1802 removed : w, ;
1804 ##### revision "mBAm-0 simple merge - A side" #####
1803 ##### revision "mBAm-0 simple merge - A side" #####
1805 1 sidedata entries
1804 1 sidedata entries
1806 entry-0014 size 4
1805 entry-0014 size 4
1807 '\x00\x00\x00\x00'
1806 '\x00\x00\x00\x00'
1808 ##### revision "mABm-0 simple merge - A side" #####
1807 ##### revision "mABm-0 simple merge - A side" #####
1809 1 sidedata entries
1808 1 sidedata entries
1810 entry-0014 size 4
1809 entry-0014 size 4
1811 '\x00\x00\x00\x00'
1810 '\x00\x00\x00\x00'
1812 ##### revision "mBCm-0 simple merge - C side" #####
1811 ##### revision "mBCm-0 simple merge - C side" #####
1813 1 sidedata entries
1812 1 sidedata entries
1814 entry-0014 size 4
1813 entry-0014 size 4
1815 '\x00\x00\x00\x00'
1814 '\x00\x00\x00\x00'
1816 ##### revision "mBCm-1 re-add d" #####
1815 ##### revision "mBCm-1 re-add d" #####
1817 1 sidedata entries
1816 1 sidedata entries
1818 entry-0014 size 14
1817 entry-0014 size 14
1819 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1818 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1820 added : d, ;
1819 added : d, ;
1821 ##### revision "mCBm-0 simple merge - C side" #####
1820 ##### revision "mCBm-0 simple merge - C side" #####
1822 1 sidedata entries
1821 1 sidedata entries
1823 entry-0014 size 4
1822 entry-0014 size 4
1824 '\x00\x00\x00\x00'
1823 '\x00\x00\x00\x00'
1825 ##### revision "mCBm-1 re-add d" #####
1824 ##### revision "mCBm-1 re-add d" #####
1826 1 sidedata entries
1825 1 sidedata entries
1827 entry-0014 size 14
1826 entry-0014 size 14
1828 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1827 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1829 added : d, ;
1828 added : d, ;
1830 ##### revision "mBDm-0 simple merge - B side" #####
1829 ##### revision "mBDm-0 simple merge - B side" #####
1831 1 sidedata entries
1830 1 sidedata entries
1832 entry-0014 size 4
1831 entry-0014 size 4
1833 '\x00\x00\x00\x00'
1832 '\x00\x00\x00\x00'
1834 ##### revision "mDBm-0 simple merge - B side" #####
1833 ##### revision "mDBm-0 simple merge - B side" #####
1835 1 sidedata entries
1834 1 sidedata entries
1836 entry-0014 size 4
1835 entry-0014 size 4
1837 '\x00\x00\x00\x00'
1836 '\x00\x00\x00\x00'
1838 ##### revision "mAEm-0 merge with copies info on both side - A side" #####
1837 ##### revision "mAEm-0 merge with copies info on both side - A side" #####
1839 1 sidedata entries
1838 1 sidedata entries
1840 entry-0014 size 14
1839 entry-0014 size 14
1841 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1840 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1842 merged : f, ;
1841 merged : f, ;
1843 ##### revision "mEAm-0 merge with copies info on both side - A side" #####
1842 ##### revision "mEAm-0 merge with copies info on both side - A side" #####
1844 1 sidedata entries
1843 1 sidedata entries
1845 entry-0014 size 14
1844 entry-0014 size 14
1846 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1845 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1847 merged : f, ;
1846 merged : f, ;
1848 ##### revision "mPQm-0 merge with copies info on both side - P side" #####
1847 ##### revision "mPQm-0 merge with copies info on both side - P side" #####
1849 1 sidedata entries
1848 1 sidedata entries
1850 entry-0014 size 14
1849 entry-0014 size 14
1851 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v'
1850 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v'
1852 merged : v, ;
1851 merged : v, ;
1853 ##### revision "mQPm-0 merge with copies info on both side - P side" #####
1852 ##### revision "mQPm-0 merge with copies info on both side - P side" #####
1854 1 sidedata entries
1853 1 sidedata entries
1855 entry-0014 size 14
1854 entry-0014 size 14
1856 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v'
1855 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v'
1857 merged : v, ;
1856 merged : v, ;
1858 ##### revision "f-1" #####
1857 ##### revision "f-1" #####
1859 1 sidedata entries
1858 1 sidedata entries
1860 entry-0014 size 24
1859 entry-0014 size 24
1861 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi'
1860 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi'
1862 removed : h, ;
1861 removed : h, ;
1863 added p1: i, h;
1862 added p1: i, h;
1864 ##### revision "f-2" #####
1863 ##### revision "f-2" #####
1865 1 sidedata entries
1864 1 sidedata entries
1866 entry-0014 size 24
1865 entry-0014 size 24
1867 '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di'
1866 '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di'
1868 touched p1: d, i;
1867 touched p1: d, i;
1869 removed : i, ;
1868 removed : i, ;
1870 ##### revision "mBFm-0 simple merge - B side" #####
1869 ##### revision "mBFm-0 simple merge - B side" #####
1871 1 sidedata entries
1870 1 sidedata entries
1872 entry-0014 size 4
1871 entry-0014 size 4
1873 '\x00\x00\x00\x00'
1872 '\x00\x00\x00\x00'
1874 ##### revision "mFBm-0 simple merge - B side" #####
1873 ##### revision "mFBm-0 simple merge - B side" #####
1875 1 sidedata entries
1874 1 sidedata entries
1876 entry-0014 size 4
1875 entry-0014 size 4
1877 '\x00\x00\x00\x00'
1876 '\x00\x00\x00\x00'
1878 ##### revision "r-1" #####
1877 ##### revision "r-1" #####
1879 1 sidedata entries
1878 1 sidedata entries
1880 entry-0014 size 24
1879 entry-0014 size 24
1881 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rx'
1880 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rx'
1882 removed : r, ;
1881 removed : r, ;
1883 added p1: x, r;
1882 added p1: x, r;
1884 ##### revision "r-2" #####
1883 ##### revision "r-2" #####
1885 1 sidedata entries
1884 1 sidedata entries
1886 entry-0014 size 24
1885 entry-0014 size 24
1887 '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00tx'
1886 '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00tx'
1888 touched p1: t, x;
1887 touched p1: t, x;
1889 removed : x, ;
1888 removed : x, ;
1890 ##### revision "mBRm-0 simple merge - B side" #####
1889 ##### revision "mBRm-0 simple merge - B side" #####
1891 1 sidedata entries
1890 1 sidedata entries
1892 entry-0014 size 4
1891 entry-0014 size 4
1893 '\x00\x00\x00\x00'
1892 '\x00\x00\x00\x00'
1894 ##### revision "mRBm-0 simple merge - B side" #####
1893 ##### revision "mRBm-0 simple merge - B side" #####
1895 1 sidedata entries
1894 1 sidedata entries
1896 entry-0014 size 4
1895 entry-0014 size 4
1897 '\x00\x00\x00\x00'
1896 '\x00\x00\x00\x00'
1898 ##### revision "g-1" #####
1897 ##### revision "g-1" #####
1899 1 sidedata entries
1898 1 sidedata entries
1900 entry-0014 size 14
1899 entry-0014 size 14
1901 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
1900 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
1902 touched : d, ;
1901 touched : d, ;
1903 ##### revision "mDGm-0 actual content merge, copies on one side - D side" #####
1902 ##### revision "mDGm-0 actual content merge, copies on one side - D side" #####
1904 1 sidedata entries
1903 1 sidedata entries
1905 entry-0014 size 14
1904 entry-0014 size 14
1906 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
1905 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
1907 merged : d, ;
1906 merged : d, ;
1908 ##### revision "mGDm-0 actual content merge, copies on one side - D side" #####
1907 ##### revision "mGDm-0 actual content merge, copies on one side - D side" #####
1909 1 sidedata entries
1908 1 sidedata entries
1910 entry-0014 size 14
1909 entry-0014 size 14
1911 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
1910 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
1912 merged : d, ;
1911 merged : d, ;
1913 ##### revision "mFGm-0 merge - G side" #####
1912 ##### revision "mFGm-0 merge - G side" #####
1914 1 sidedata entries
1913 1 sidedata entries
1915 entry-0014 size 14
1914 entry-0014 size 14
1916 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
1915 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
1917 merged : d, ;
1916 merged : d, ;
1918 ##### revision "mGFm-0 merge - G side" #####
1917 ##### revision "mGFm-0 merge - G side" #####
1919 1 sidedata entries
1918 1 sidedata entries
1920 entry-0014 size 14
1919 entry-0014 size 14
1921 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
1920 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
1922 merged : d, ;
1921 merged : d, ;
1923 ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" #####
1922 ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" #####
1924 1 sidedata entries
1923 1 sidedata entries
1925 entry-0014 size 14
1924 entry-0014 size 14
1926 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1925 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1927 salvaged : d, ;
1926 salvaged : d, ;
1928 ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" #####
1927 ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" #####
1929 1 sidedata entries
1928 1 sidedata entries
1930 entry-0014 size 14
1929 entry-0014 size 14
1931 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1930 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1932 salvaged : d, ;
1931 salvaged : d, ;
1933 ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" #####
1932 ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" #####
1934 1 sidedata entries
1933 1 sidedata entries
1935 entry-0014 size 14
1934 entry-0014 size 14
1936 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1935 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1937 salvaged : d, ;
1936 salvaged : d, ;
1938 ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" #####
1937 ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" #####
1939 1 sidedata entries
1938 1 sidedata entries
1940 entry-0014 size 14
1939 entry-0014 size 14
1941 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1940 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1942 salvaged : d, ;
1941 salvaged : d, ;
1943 ##### revision "h-1" #####
1942 ##### revision "h-1" #####
1944 1 sidedata entries
1943 1 sidedata entries
1945 entry-0014 size 24
1944 entry-0014 size 24
1946 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd'
1945 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd'
1947 removed : b, ;
1946 removed : b, ;
1948 added p1: d, b;
1947 added p1: d, b;
1949 ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" #####
1948 ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" #####
1950 1 sidedata entries
1949 1 sidedata entries
1951 entry-0014 size 4
1950 entry-0014 size 4
1952 '\x00\x00\x00\x00'
1951 '\x00\x00\x00\x00'
1953 ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" #####
1952 ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" #####
1954 1 sidedata entries
1953 1 sidedata entries
1955 entry-0014 size 4
1954 entry-0014 size 4
1956 '\x00\x00\x00\x00'
1955 '\x00\x00\x00\x00'
1957 ##### revision "mAE-change-m-0 merge with file update and copies info on both side - A side" #####
1956 ##### revision "mAE-change-m-0 merge with file update and copies info on both side - A side" #####
1958 1 sidedata entries
1957 1 sidedata entries
1959 entry-0014 size 14
1958 entry-0014 size 14
1960 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1959 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1961 merged : f, ;
1960 merged : f, ;
1962 ##### revision "mEA-change-m-0 merge with file update and copies info on both side - A side" #####
1961 ##### revision "mEA-change-m-0 merge with file update and copies info on both side - A side" #####
1963 1 sidedata entries
1962 1 sidedata entries
1964 entry-0014 size 14
1963 entry-0014 size 14
1965 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1964 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1966 merged : f, ;
1965 merged : f, ;
1967 ##### revision "mBF-change-m-0 merge with extra change - B side" #####
1966 ##### revision "mBF-change-m-0 merge with extra change - B side" #####
1968 1 sidedata entries
1967 1 sidedata entries
1969 entry-0014 size 14
1968 entry-0014 size 14
1970 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
1969 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
1971 touched : d, ;
1970 touched : d, ;
1972 ##### revision "mFB-change-m-0 merge with extra change - B side" #####
1971 ##### revision "mFB-change-m-0 merge with extra change - B side" #####
1973 1 sidedata entries
1972 1 sidedata entries
1974 entry-0014 size 14
1973 entry-0014 size 14
1975 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
1974 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
1976 touched : d, ;
1975 touched : d, ;
1977 ##### revision "mCB-change-m-0 merge explicitely revive deleted file - B side" #####
1976 ##### revision "mCB-change-m-0 merge explicitely revive deleted file - B side" #####
1978 1 sidedata entries
1977 1 sidedata entries
1979 entry-0014 size 14
1978 entry-0014 size 14
1980 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1979 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1981 salvaged : d, ;
1980 salvaged : d, ;
1982 ##### revision "mBC-change-m-0 merge explicitely revive deleted file - B side" #####
1981 ##### revision "mBC-change-m-0 merge explicitely revive deleted file - B side" #####
1983 1 sidedata entries
1982 1 sidedata entries
1984 entry-0014 size 14
1983 entry-0014 size 14
1985 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1984 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
1986 salvaged : d, ;
1985 salvaged : d, ;
1987 ##### revision "j-1" #####
1986 ##### revision "j-1" #####
1988 1 sidedata entries
1987 1 sidedata entries
1989 entry-0014 size 24
1988 entry-0014 size 24
1990 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
1989 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
1991 added : unrelated-j, ;
1990 added : unrelated-j, ;
1992 ##### revision "k-1" #####
1991 ##### revision "k-1" #####
1993 1 sidedata entries
1992 1 sidedata entries
1994 entry-0014 size 24
1993 entry-0014 size 24
1995 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k'
1994 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k'
1996 added : unrelated-k, ;
1995 added : unrelated-k, ;
1997 ##### revision "mAE,Km" #####
1996 ##### revision "mAE,Km" #####
1998 1 sidedata entries
1997 1 sidedata entries
1999 entry-0014 size 4
1998 entry-0014 size 4
2000 '\x00\x00\x00\x00'
1999 '\x00\x00\x00\x00'
2001 ##### revision "mK,AEm" #####
2000 ##### revision "mK,AEm" #####
2002 1 sidedata entries
2001 1 sidedata entries
2003 entry-0014 size 4
2002 entry-0014 size 4
2004 '\x00\x00\x00\x00'
2003 '\x00\x00\x00\x00'
2005 ##### revision "mEA,Jm" #####
2004 ##### revision "mEA,Jm" #####
2006 1 sidedata entries
2005 1 sidedata entries
2007 entry-0014 size 24
2006 entry-0014 size 24
2008 '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2007 '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2009 touched : unrelated-j, ;
2008 touched : unrelated-j, ;
2010 ##### revision "mJ,EAm" #####
2009 ##### revision "mJ,EAm" #####
2011 1 sidedata entries
2010 1 sidedata entries
2012 entry-0014 size 24
2011 entry-0014 size 24
2013 '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2012 '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2014 touched : unrelated-j, ;
2013 touched : unrelated-j, ;
2015 ##### revision "s-1" #####
2014 ##### revision "s-1" #####
2016 1 sidedata entries
2015 1 sidedata entries
2017 entry-0014 size 24
2016 entry-0014 size 24
2018 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-s'
2017 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-s'
2019 added : unrelated-s, ;
2018 added : unrelated-s, ;
2020 ##### revision "t-1" #####
2019 ##### revision "t-1" #####
2021 1 sidedata entries
2020 1 sidedata entries
2022 entry-0014 size 24
2021 entry-0014 size 24
2023 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-t'
2022 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-t'
2024 added : unrelated-t, ;
2023 added : unrelated-t, ;
2025 ##### revision "mPQ,Tm" #####
2024 ##### revision "mPQ,Tm" #####
2026 1 sidedata entries
2025 1 sidedata entries
2027 entry-0014 size 4
2026 entry-0014 size 4
2028 '\x00\x00\x00\x00'
2027 '\x00\x00\x00\x00'
2029 ##### revision "mT,PQm" #####
2028 ##### revision "mT,PQm" #####
2030 1 sidedata entries
2029 1 sidedata entries
2031 entry-0014 size 4
2030 entry-0014 size 4
2032 '\x00\x00\x00\x00'
2031 '\x00\x00\x00\x00'
2033 ##### revision "mQP,Sm" #####
2032 ##### revision "mQP,Sm" #####
2034 1 sidedata entries
2033 1 sidedata entries
2035 entry-0014 size 4
2034 entry-0014 size 4
2036 '\x00\x00\x00\x00'
2035 '\x00\x00\x00\x00'
2037 ##### revision "mS,QPm" #####
2036 ##### revision "mS,QPm" #####
2038 1 sidedata entries
2037 1 sidedata entries
2039 entry-0014 size 4
2038 entry-0014 size 4
2040 '\x00\x00\x00\x00'
2039 '\x00\x00\x00\x00'
2041 ##### revision "l-1" #####
2040 ##### revision "l-1" #####
2042 1 sidedata entries
2041 1 sidedata entries
2043 entry-0014 size 24
2042 entry-0014 size 24
2044 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l'
2043 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l'
2045 added : unrelated-l, ;
2044 added : unrelated-l, ;
2046 ##### revision "mBC+revert,Lm" #####
2045 ##### revision "mBC+revert,Lm" #####
2047 1 sidedata entries
2046 1 sidedata entries
2048 entry-0014 size 4
2047 entry-0014 size 4
2049 '\x00\x00\x00\x00'
2048 '\x00\x00\x00\x00'
2050 ##### revision "mCB+revert,Lm" #####
2049 ##### revision "mCB+revert,Lm" #####
2051 1 sidedata entries
2050 1 sidedata entries
2052 entry-0014 size 4
2051 entry-0014 size 4
2053 '\x00\x00\x00\x00'
2052 '\x00\x00\x00\x00'
2054 ##### revision "mL,BC+revertm" #####
2053 ##### revision "mL,BC+revertm" #####
2055 1 sidedata entries
2054 1 sidedata entries
2056 entry-0014 size 4
2055 entry-0014 size 4
2057 '\x00\x00\x00\x00'
2056 '\x00\x00\x00\x00'
2058 ##### revision "mL,CB+revertm" #####
2057 ##### revision "mL,CB+revertm" #####
2059 1 sidedata entries
2058 1 sidedata entries
2060 entry-0014 size 4
2059 entry-0014 size 4
2061 '\x00\x00\x00\x00'
2060 '\x00\x00\x00\x00'
2062 ##### revision "n-1" #####
2061 ##### revision "n-1" #####
2063 1 sidedata entries
2062 1 sidedata entries
2064 entry-0014 size 24
2063 entry-0014 size 24
2065 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n'
2064 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n'
2066 added : unrelated-n, ;
2065 added : unrelated-n, ;
2067 ##### revision "o-1" #####
2066 ##### revision "o-1" #####
2068 1 sidedata entries
2067 1 sidedata entries
2069 entry-0014 size 24
2068 entry-0014 size 24
2070 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o'
2069 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o'
2071 added : unrelated-o, ;
2070 added : unrelated-o, ;
2072 ##### revision "mFG,Om" #####
2071 ##### revision "mFG,Om" #####
2073 1 sidedata entries
2072 1 sidedata entries
2074 entry-0014 size 4
2073 entry-0014 size 4
2075 '\x00\x00\x00\x00'
2074 '\x00\x00\x00\x00'
2076 ##### revision "mO,FGm" #####
2075 ##### revision "mO,FGm" #####
2077 1 sidedata entries
2076 1 sidedata entries
2078 entry-0014 size 4
2077 entry-0014 size 4
2079 '\x00\x00\x00\x00'
2078 '\x00\x00\x00\x00'
2080 ##### revision "mGF,Nm" #####
2079 ##### revision "mGF,Nm" #####
2081 1 sidedata entries
2080 1 sidedata entries
2082 entry-0014 size 4
2081 entry-0014 size 4
2083 '\x00\x00\x00\x00'
2082 '\x00\x00\x00\x00'
2084 ##### revision "mN,GFm" #####
2083 ##### revision "mN,GFm" #####
2085 1 sidedata entries
2084 1 sidedata entries
2086 entry-0014 size 4
2085 entry-0014 size 4
2087 '\x00\x00\x00\x00'
2086 '\x00\x00\x00\x00'
2088 ##### revision "mAE-change,Km" #####
2087 ##### revision "mAE-change,Km" #####
2089 1 sidedata entries
2088 1 sidedata entries
2090 entry-0014 size 4
2089 entry-0014 size 4
2091 '\x00\x00\x00\x00'
2090 '\x00\x00\x00\x00'
2092 ##### revision "mK,AE-change-m" #####
2091 ##### revision "mK,AE-change-m" #####
2093 1 sidedata entries
2092 1 sidedata entries
2094 entry-0014 size 4
2093 entry-0014 size 4
2095 '\x00\x00\x00\x00'
2094 '\x00\x00\x00\x00'
2096 ##### revision "mEA-change,Jm" #####
2095 ##### revision "mEA-change,Jm" #####
2097 1 sidedata entries
2096 1 sidedata entries
2098 entry-0014 size 4
2097 entry-0014 size 4
2099 '\x00\x00\x00\x00'
2098 '\x00\x00\x00\x00'
2100 ##### revision "mJ,EA-change-m" #####
2099 ##### revision "mJ,EA-change-m" #####
2101 1 sidedata entries
2100 1 sidedata entries
2102 entry-0014 size 4
2101 entry-0014 size 4
2103 '\x00\x00\x00\x00'
2102 '\x00\x00\x00\x00'
2104
2103
2105 #endif
2104 #endif
2106
2105
2107
2106
2108 Test copy information chaining
2107 Test copy information chaining
2109 ==============================
2108 ==============================
2110
2109
2111 Check that matching only affect the destination and not intermediate path
2110 Check that matching only affect the destination and not intermediate path
2112 -------------------------------------------------------------------------
2111 -------------------------------------------------------------------------
2113
2112
2114 The two status call should give the same value for f
2113 The two status call should give the same value for f
2115
2114
2116 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")'
2115 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")'
2117 A f
2116 A f
2118 a
2117 a
2119 A t
2118 A t
2120 p
2119 p
2121 R a
2120 R a
2122 R p
2121 R p
2123 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f
2122 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f
2124 A f
2123 A f
2125 a (no-changeset no-compatibility !)
2124 a (no-changeset no-compatibility !)
2126
2125
2127 merging with unrelated change does not interfere with the renames
2126 merging with unrelated change does not interfere with the renames
2128 ---------------------------------------------------------------
2127 ---------------------------------------------------------------
2129
2128
2130 - rename on one side
2129 - rename on one side
2131 - unrelated change on the other side
2130 - unrelated change on the other side
2132
2131
2133 $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))'
2132 $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))'
2134 o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
2133 o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
2135 |\
2134 |\
2136 +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
2135 +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
2137 | |/
2136 | |/
2138 | o b-1: b update
2137 | o b-1: b update
2139 | |
2138 | |
2140 o | a-2: e -move-> f
2139 o | a-2: e -move-> f
2141 | |
2140 | |
2142 o | a-1: d -move-> e
2141 o | a-1: d -move-> e
2143 |/
2142 |/
2144 o i-2: c -move-> d, s -move-> t
2143 o i-2: c -move-> d, s -move-> t
2145 |
2144 |
2146 o i-1: a -move-> c, p -move-> s
2145 o i-1: a -move-> c, p -move-> s
2147 |
2146 |
2148 o i-0 initial commit: a b h p q r
2147 o i-0 initial commit: a b h p q r
2149
2148
2150
2149
2151 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")'
2150 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")'
2152 A f
2151 A f
2153 d
2152 d
2154 R d
2153 R d
2155 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")'
2154 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")'
2156 A f
2155 A f
2157 d
2156 d
2158 R d
2157 R d
2159 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")'
2158 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")'
2160 M b
2159 M b
2161 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")'
2160 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")'
2162 M b
2161 M b
2163 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")'
2162 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")'
2164 M b
2163 M b
2165 A f
2164 A f
2166 d
2165 d
2167 R d
2166 R d
2168 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")'
2167 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")'
2169 M b
2168 M b
2170 A f
2169 A f
2171 d
2170 d
2172 R d
2171 R d
2173 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")'
2172 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")'
2174 M b
2173 M b
2175 A f
2174 A f
2176 a
2175 a
2177 A t
2176 A t
2178 p
2177 p
2179 R a
2178 R a
2180 R p
2179 R p
2181 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")'
2180 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")'
2182 M b
2181 M b
2183 A f
2182 A f
2184 a
2183 a
2185 A t
2184 A t
2186 p
2185 p
2187 R a
2186 R a
2188 R p
2187 R p
2189
2188
2190 merging with the side having a delete
2189 merging with the side having a delete
2191 -------------------------------------
2190 -------------------------------------
2192
2191
2193 case summary:
2192 case summary:
2194 - one with change to an unrelated file
2193 - one with change to an unrelated file
2195 - one deleting the change
2194 - one deleting the change
2196 and recreate an unrelated file after the merge
2195 and recreate an unrelated file after the merge
2197
2196
2198 $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))'
2197 $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))'
2199 o mCBm-1 re-add d
2198 o mCBm-1 re-add d
2200 |
2199 |
2201 o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
2200 o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
2202 |\
2201 |\
2203 | | o mBCm-1 re-add d
2202 | | o mBCm-1 re-add d
2204 | | |
2203 | | |
2205 +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
2204 +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
2206 | |/
2205 | |/
2207 | o c-1 delete d
2206 | o c-1 delete d
2208 | |
2207 | |
2209 o | b-1: b update
2208 o | b-1: b update
2210 |/
2209 |/
2211 o i-2: c -move-> d, s -move-> t
2210 o i-2: c -move-> d, s -move-> t
2212 |
2211 |
2213 o i-1: a -move-> c, p -move-> s
2212 o i-1: a -move-> c, p -move-> s
2214 |
2213 |
2215 o i-0 initial commit: a b h p q r
2214 o i-0 initial commit: a b h p q r
2216
2215
2217 - comparing from the merge
2216 - comparing from the merge
2218
2217
2219 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")'
2218 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")'
2220 R d
2219 R d
2221 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")'
2220 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")'
2222 R d
2221 R d
2223 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")'
2222 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")'
2224 M b
2223 M b
2225 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")'
2224 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")'
2226 M b
2225 M b
2227 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")'
2226 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")'
2228 M b
2227 M b
2229 R d
2228 R d
2230 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")'
2229 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")'
2231 M b
2230 M b
2232 R d
2231 R d
2233 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")'
2232 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")'
2234 M b
2233 M b
2235 A t
2234 A t
2236 p
2235 p
2237 R a
2236 R a
2238 R p
2237 R p
2239 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")'
2238 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")'
2240 M b
2239 M b
2241 A t
2240 A t
2242 p
2241 p
2243 R a
2242 R a
2244 R p
2243 R p
2245
2244
2246 - comparing with the merge children re-adding the file
2245 - comparing with the merge children re-adding the file
2247
2246
2248 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")'
2247 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")'
2249 M d
2248 M d
2250 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")'
2249 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")'
2251 M d
2250 M d
2252 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")'
2251 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")'
2253 M b
2252 M b
2254 A d
2253 A d
2255 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")'
2254 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")'
2256 M b
2255 M b
2257 A d
2256 A d
2258 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")'
2257 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")'
2259 M b
2258 M b
2260 M d
2259 M d
2261 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")'
2260 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")'
2262 M b
2261 M b
2263 M d
2262 M d
2264 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")'
2263 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")'
2265 M b
2264 M b
2266 A d
2265 A d
2267 A t
2266 A t
2268 p
2267 p
2269 R a
2268 R a
2270 R p
2269 R p
2271 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")'
2270 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")'
2272 M b
2271 M b
2273 A d
2272 A d
2274 A t
2273 A t
2275 p
2274 p
2276 R a
2275 R a
2277 R p
2276 R p
2278
2277
2279 Comparing with a merge re-adding the file afterward
2278 Comparing with a merge re-adding the file afterward
2280 ---------------------------------------------------
2279 ---------------------------------------------------
2281
2280
2282 Merge:
2281 Merge:
2283 - one with change to an unrelated file
2282 - one with change to an unrelated file
2284 - one deleting and recreating the change
2283 - one deleting and recreating the change
2285
2284
2286 $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))'
2285 $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))'
2287 o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
2286 o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
2288 |\
2287 |\
2289 +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
2288 +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
2290 | |/
2289 | |/
2291 | o d-2 re-add d
2290 | o d-2 re-add d
2292 | |
2291 | |
2293 | o d-1 delete d
2292 | o d-1 delete d
2294 | |
2293 | |
2295 o | b-1: b update
2294 o | b-1: b update
2296 |/
2295 |/
2297 o i-2: c -move-> d, s -move-> t
2296 o i-2: c -move-> d, s -move-> t
2298 |
2297 |
2299 o i-1: a -move-> c, p -move-> s
2298 o i-1: a -move-> c, p -move-> s
2300 |
2299 |
2301 o i-0 initial commit: a b h p q r
2300 o i-0 initial commit: a b h p q r
2302
2301
2303 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")'
2302 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")'
2304 M d
2303 M d
2305 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")'
2304 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")'
2306 M d
2305 M d
2307 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")'
2306 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")'
2308 M b
2307 M b
2309 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")'
2308 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")'
2310 M b
2309 M b
2311 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")'
2310 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")'
2312 M b
2311 M b
2313 M d
2312 M d
2314 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")'
2313 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")'
2315 M b
2314 M b
2316 M d
2315 M d
2317
2316
2318 The bugs makes recorded copy is different depending of where we started the merge from since
2317 The bugs makes recorded copy is different depending of where we started the merge from since
2319
2318
2320 $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d'
2319 $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d'
2321 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2320 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2322 $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d'
2321 $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d'
2323 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2322 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2324
2323
2325 $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d'
2324 $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d'
2326 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2325 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2327 $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d'
2326 $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d'
2328 d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !)
2327 d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !)
2329 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !)
2328 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !)
2330 $ hg debugindex d | head -n 4 | ../no-linkrev
2329 $ hg debugindex d | head -n 4 | "$PYTHON" ../no-linkrev
2331 rev linkrev nodeid p1 p2
2330 rev linkrev nodeid p1 p2
2332 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !)
2331 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !)
2333 0 * ae258f702dfe 000000000000 000000000000 (changeset !)
2332 0 * ae258f702dfe 000000000000 000000000000 (changeset !)
2334 1 * b004912a8510 000000000000 000000000000
2333 1 * b004912a8510 000000000000 000000000000
2335 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !)
2334 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !)
2336 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !)
2335 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !)
2337
2336
2338 Log output should not include a merge commit as it did not happen
2337 Log output should not include a merge commit as it did not happen
2339
2338
2340 $ hg log -Gfr 'desc("mBDm-0")' d
2339 $ hg log -Gfr 'desc("mBDm-0")' d
2341 o d-2 re-add d
2340 o d-2 re-add d
2342 |
2341 |
2343 ~
2342 ~
2344
2343
2345 $ hg log -Gfr 'desc("mDBm-0")' d
2344 $ hg log -Gfr 'desc("mDBm-0")' d
2346 o d-2 re-add d
2345 o d-2 re-add d
2347 |
2346 |
2348 ~
2347 ~
2349
2348
2350 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")'
2349 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")'
2351 M b
2350 M b
2352 A d
2351 A d
2353 A t
2352 A t
2354 p
2353 p
2355 R a
2354 R a
2356 R p
2355 R p
2357 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")'
2356 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")'
2358 M b
2357 M b
2359 A d
2358 A d
2360 A t
2359 A t
2361 p
2360 p
2362 R a
2361 R a
2363 R p
2362 R p
2364
2363
2365
2364
2366 Comparing with a merge with colliding rename
2365 Comparing with a merge with colliding rename
2367 --------------------------------------------
2366 --------------------------------------------
2368
2367
2369 Subcase: new copy information on both side
2368 Subcase: new copy information on both side
2370 ``````````````````````````````````````````
2369 ``````````````````````````````````````````
2371
2370
2372 - the "e-" branch renaming b to f (through 'g')
2371 - the "e-" branch renaming b to f (through 'g')
2373 - the "a-" branch renaming d to f (through e)
2372 - the "a-" branch renaming d to f (through e)
2374
2373
2375 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
2374 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
2376 o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
2375 o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way
2377 |\
2376 |\
2378 +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
2377 +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way
2379 | |/
2378 | |/
2380 | o e-2 g -move-> f
2379 | o e-2 g -move-> f
2381 | |
2380 | |
2382 | o e-1 b -move-> g
2381 | o e-1 b -move-> g
2383 | |
2382 | |
2384 o | a-2: e -move-> f
2383 o | a-2: e -move-> f
2385 | |
2384 | |
2386 o | a-1: d -move-> e
2385 o | a-1: d -move-> e
2387 |/
2386 |/
2388 o i-2: c -move-> d, s -move-> t
2387 o i-2: c -move-> d, s -move-> t
2389 |
2388 |
2390 o i-1: a -move-> c, p -move-> s
2389 o i-1: a -move-> c, p -move-> s
2391 |
2390 |
2392 o i-0 initial commit: a b h p q r
2391 o i-0 initial commit: a b h p q r
2393
2392
2394 #if no-changeset
2393 #if no-changeset
2395 $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f'
2394 $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f'
2396 2ff93c643948464ee1f871867910ae43a45b0bea 644 f
2395 2ff93c643948464ee1f871867910ae43a45b0bea 644 f
2397 $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f'
2396 $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f'
2398 2ff93c643948464ee1f871867910ae43a45b0bea 644 f
2397 2ff93c643948464ee1f871867910ae43a45b0bea 644 f
2399 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
2398 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
2400 b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f
2399 b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f
2401 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
2400 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
2402 e8825b386367b29fec957283a80bb47b47483fe1 644 f
2401 e8825b386367b29fec957283a80bb47b47483fe1 644 f
2403 $ hg debugindex f | ../no-linkrev
2402 $ hg debugindex f | "$PYTHON" ../no-linkrev
2404 rev linkrev nodeid p1 p2
2403 rev linkrev nodeid p1 p2
2405 0 * b76eb76580df 000000000000 000000000000
2404 0 * b76eb76580df 000000000000 000000000000
2406 1 * e8825b386367 000000000000 000000000000
2405 1 * e8825b386367 000000000000 000000000000
2407 2 * 2ff93c643948 b76eb76580df e8825b386367
2406 2 * 2ff93c643948 b76eb76580df e8825b386367
2408 3 * 2f649fba7eb2 b76eb76580df e8825b386367
2407 3 * 2f649fba7eb2 b76eb76580df e8825b386367
2409 4 * 774e7c1637d5 e8825b386367 b76eb76580df
2408 4 * 774e7c1637d5 e8825b386367 b76eb76580df
2410 #else
2409 #else
2411 $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f'
2410 $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f'
2412 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2411 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2413 $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f'
2412 $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f'
2414 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2413 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2415 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
2414 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
2416 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2415 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2417 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
2416 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
2418 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2417 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2419 $ hg debugindex f | ../no-linkrev
2418 $ hg debugindex f | "$PYTHON" ../no-linkrev
2420 rev linkrev nodeid p1 p2
2419 rev linkrev nodeid p1 p2
2421 0 * ae258f702dfe 000000000000 000000000000
2420 0 * ae258f702dfe 000000000000 000000000000
2422 1 * d3613c1ec831 ae258f702dfe 000000000000
2421 1 * d3613c1ec831 ae258f702dfe 000000000000
2423 2 * 05e03c868bbc ae258f702dfe 000000000000
2422 2 * 05e03c868bbc ae258f702dfe 000000000000
2424 #endif
2423 #endif
2425
2424
2426 # Here the filelog based implementation is not looking at the rename
2425 # Here the filelog based implementation is not looking at the rename
2427 # information (because the file exist on both side). However the changelog
2426 # information (because the file exist on both side). However the changelog
2428 # based on works fine. We have different output.
2427 # based on works fine. We have different output.
2429
2428
2430 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")'
2429 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")'
2431 M f (no-changeset !)
2430 M f (no-changeset !)
2432 b (no-filelog no-changeset !)
2431 b (no-filelog no-changeset !)
2433 R b
2432 R b
2434 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")'
2433 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")'
2435 M f (no-changeset !)
2434 M f (no-changeset !)
2436 b (no-filelog no-changeset !)
2435 b (no-filelog no-changeset !)
2437 R b
2436 R b
2438 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")'
2437 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")'
2439 M f (no-changeset !)
2438 M f (no-changeset !)
2440 d (no-filelog no-changeset !)
2439 d (no-filelog no-changeset !)
2441 R d
2440 R d
2442 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")'
2441 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")'
2443 M f (no-changeset !)
2442 M f (no-changeset !)
2444 d (no-filelog no-changeset !)
2443 d (no-filelog no-changeset !)
2445 R d
2444 R d
2446 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
2445 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
2447 A f
2446 A f
2448 d
2447 d
2449 R d
2448 R d
2450 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")'
2449 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")'
2451 A f
2450 A f
2452 b
2451 b
2453 R b
2452 R b
2454
2453
2455 # From here, we run status against revision where both source file exists.
2454 # From here, we run status against revision where both source file exists.
2456 #
2455 #
2457 # The filelog based implementation picks an arbitrary side based on revision
2456 # The filelog based implementation picks an arbitrary side based on revision
2458 # numbers. So the same side "wins" whatever the parents order is. This is
2457 # numbers. So the same side "wins" whatever the parents order is. This is
2459 # sub-optimal because depending on revision numbers means the result can be
2458 # sub-optimal because depending on revision numbers means the result can be
2460 # different from one repository to the next.
2459 # different from one repository to the next.
2461 #
2460 #
2462 # The changeset based algorithm use the parent order to break tie on conflicting
2461 # The changeset based algorithm use the parent order to break tie on conflicting
2463 # information and will have a different order depending on who is p1 and p2.
2462 # information and will have a different order depending on who is p1 and p2.
2464 # That order is stable accross repositories. (data from p1 prevails)
2463 # That order is stable accross repositories. (data from p1 prevails)
2465
2464
2466 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")'
2465 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")'
2467 A f
2466 A f
2468 d
2467 d
2469 R b
2468 R b
2470 R d
2469 R d
2471 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")'
2470 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")'
2472 A f
2471 A f
2473 d (filelog !)
2472 d (filelog !)
2474 b (no-filelog !)
2473 b (no-filelog !)
2475 R b
2474 R b
2476 R d
2475 R d
2477 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")'
2476 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")'
2478 A f
2477 A f
2479 a
2478 a
2480 A t
2479 A t
2481 p
2480 p
2482 R a
2481 R a
2483 R b
2482 R b
2484 R p
2483 R p
2485 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")'
2484 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")'
2486 A f
2485 A f
2487 a (filelog !)
2486 a (filelog !)
2488 b (no-filelog !)
2487 b (no-filelog !)
2489 A t
2488 A t
2490 p
2489 p
2491 R a
2490 R a
2492 R b
2491 R b
2493 R p
2492 R p
2494
2493
2495
2494
2496 Subcase: existing copy information overwritten on one branch
2495 Subcase: existing copy information overwritten on one branch
2497 ````````````````````````````````````````````````````````````
2496 ````````````````````````````````````````````````````````````
2498
2497
2499 Note:
2498 Note:
2500 | In this case, one of the merge wrongly record a merge while there is none.
2499 | In this case, one of the merge wrongly record a merge while there is none.
2501 | This lead to bad copy tracing information to be dug up.
2500 | This lead to bad copy tracing information to be dug up.
2502
2501
2503
2502
2504 Merge:
2503 Merge:
2505 - one with change to an unrelated file (b)
2504 - one with change to an unrelated file (b)
2506 - one overwriting a file (d) with a rename (from h to i to d)
2505 - one overwriting a file (d) with a rename (from h to i to d)
2507
2506
2508 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
2507 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
2509 o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
2508 o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
2510 |\
2509 |\
2511 +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
2510 +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
2512 | |/
2511 | |/
2513 | o f-2: rename i -> d
2512 | o f-2: rename i -> d
2514 | |
2513 | |
2515 | o f-1: rename h -> i
2514 | o f-1: rename h -> i
2516 | |
2515 | |
2517 o | b-1: b update
2516 o | b-1: b update
2518 |/
2517 |/
2519 o i-2: c -move-> d, s -move-> t
2518 o i-2: c -move-> d, s -move-> t
2520 |
2519 |
2521 o i-1: a -move-> c, p -move-> s
2520 o i-1: a -move-> c, p -move-> s
2522 |
2521 |
2523 o i-0 initial commit: a b h p q r
2522 o i-0 initial commit: a b h p q r
2524
2523
2525 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")'
2524 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")'
2526 M b
2525 M b
2527 A d
2526 A d
2528 h
2527 h
2529 A t
2528 A t
2530 p
2529 p
2531 R a
2530 R a
2532 R h
2531 R h
2533 R p
2532 R p
2534 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")'
2533 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")'
2535 M b
2534 M b
2536 A d
2535 A d
2537 h
2536 h
2538 A t
2537 A t
2539 p
2538 p
2540 R a
2539 R a
2541 R h
2540 R h
2542 R p
2541 R p
2543 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")'
2542 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")'
2544 M d (no-changeset !)
2543 M d (no-changeset !)
2545 h (no-filelog no-changeset !)
2544 h (no-filelog no-changeset !)
2546 R h
2545 R h
2547 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")'
2546 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")'
2548 M b
2547 M b
2549 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")'
2548 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")'
2550 M b
2549 M b
2551 M d (no-changeset !)
2550 M d (no-changeset !)
2552 i (no-filelog no-changeset !)
2551 i (no-filelog no-changeset !)
2553 R i
2552 R i
2554 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")'
2553 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")'
2555 M d (no-changeset !)
2554 M d (no-changeset !)
2556 h (no-filelog no-changeset !)
2555 h (no-filelog no-changeset !)
2557 R h
2556 R h
2558 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")'
2557 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")'
2559 M b
2558 M b
2560 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")'
2559 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")'
2561 M b
2560 M b
2562 M d (no-changeset !)
2561 M d (no-changeset !)
2563 i (no-filelog no-changeset !)
2562 i (no-filelog no-changeset !)
2564 R i
2563 R i
2565
2564
2566 #if no-changeset
2565 #if no-changeset
2567 $ hg log -Gfr 'desc("mBFm-0")' d
2566 $ hg log -Gfr 'desc("mBFm-0")' d
2568 o f-2: rename i -> d
2567 o f-2: rename i -> d
2569 |
2568 |
2570 o f-1: rename h -> i
2569 o f-1: rename h -> i
2571 :
2570 :
2572 o i-0 initial commit: a b h p q r
2571 o i-0 initial commit: a b h p q r
2573
2572
2574 #else
2573 #else
2575 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2574 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2576 $ hg log -Gfr 'desc("mBFm-0")' d
2575 $ hg log -Gfr 'desc("mBFm-0")' d
2577 o i-2: c -move-> d, s -move-> t
2576 o i-2: c -move-> d, s -move-> t
2578 |
2577 |
2579 ~
2578 ~
2580 #endif
2579 #endif
2581
2580
2582 #if no-changeset
2581 #if no-changeset
2583 $ hg log -Gfr 'desc("mFBm-0")' d
2582 $ hg log -Gfr 'desc("mFBm-0")' d
2584 o f-2: rename i -> d
2583 o f-2: rename i -> d
2585 |
2584 |
2586 o f-1: rename h -> i
2585 o f-1: rename h -> i
2587 :
2586 :
2588 o i-0 initial commit: a b h p q r
2587 o i-0 initial commit: a b h p q r
2589
2588
2590 #else
2589 #else
2591 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2590 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2592 $ hg log -Gfr 'desc("mFBm-0")' d
2591 $ hg log -Gfr 'desc("mFBm-0")' d
2593 o i-2: c -move-> d, s -move-> t
2592 o i-2: c -move-> d, s -move-> t
2594 |
2593 |
2595 ~
2594 ~
2596 #endif
2595 #endif
2597
2596
2598
2597
2599 Subcase: existing copy information overwritten on one branch, with different content)
2598 Subcase: existing copy information overwritten on one branch, with different content)
2600 `````````````````````````````````````````````````````````````````````````````````````
2599 `````````````````````````````````````````````````````````````````````````````````````
2601
2600
2602 Merge:
2601 Merge:
2603 - one with change to an unrelated file (b)
2602 - one with change to an unrelated file (b)
2604 - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch
2603 - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch
2605
2604
2606 $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))'
2605 $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))'
2607 o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way
2606 o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way
2608 |\
2607 |\
2609 +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
2608 +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
2610 | |/
2609 | |/
2611 | o r-2: rename t -> x
2610 | o r-2: rename t -> x
2612 | |
2611 | |
2613 | o r-1: rename r -> x
2612 | o r-1: rename r -> x
2614 | |
2613 | |
2615 o | b-1: b update
2614 o | b-1: b update
2616 |/
2615 |/
2617 o i-2: c -move-> d, s -move-> t
2616 o i-2: c -move-> d, s -move-> t
2618 |
2617 |
2619 o i-1: a -move-> c, p -move-> s
2618 o i-1: a -move-> c, p -move-> s
2620 |
2619 |
2621 o i-0 initial commit: a b h p q r
2620 o i-0 initial commit: a b h p q r
2622
2621
2623 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBRm-0")'
2622 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBRm-0")'
2624 M b
2623 M b
2625 A d
2624 A d
2626 a
2625 a
2627 A t
2626 A t
2628 r
2627 r
2629 R a
2628 R a
2630 R p
2629 R p
2631 R r
2630 R r
2632 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mRBm-0")'
2631 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mRBm-0")'
2633 M b
2632 M b
2634 A d
2633 A d
2635 a
2634 a
2636 A t
2635 A t
2637 r
2636 r
2638 R a
2637 R a
2639 R p
2638 R p
2640 R r
2639 R r
2641 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBRm-0")'
2640 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBRm-0")'
2642 M t
2641 M t
2643 r (no-filelog !)
2642 r (no-filelog !)
2644 R r
2643 R r
2645 $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mBRm-0")'
2644 $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mBRm-0")'
2646 M b
2645 M b
2647 $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mBRm-0")'
2646 $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mBRm-0")'
2648 M b
2647 M b
2649 M t
2648 M t
2650 x (no-filelog !)
2649 x (no-filelog !)
2651 R x
2650 R x
2652 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mRBm-0")'
2651 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mRBm-0")'
2653 M t
2652 M t
2654 r (no-filelog !)
2653 r (no-filelog !)
2655 R r
2654 R r
2656 $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mRBm-0")'
2655 $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mRBm-0")'
2657 M b
2656 M b
2658 $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mRBm-0")'
2657 $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mRBm-0")'
2659 M b
2658 M b
2660 M t
2659 M t
2661 x (no-filelog !)
2660 x (no-filelog !)
2662 R x
2661 R x
2663
2662
2664 #if no-changeset
2663 #if no-changeset
2665 $ hg log -Gfr 'desc("mBRm-0")' d
2664 $ hg log -Gfr 'desc("mBRm-0")' d
2666 o i-2: c -move-> d, s -move-> t
2665 o i-2: c -move-> d, s -move-> t
2667 |
2666 |
2668 o i-1: a -move-> c, p -move-> s
2667 o i-1: a -move-> c, p -move-> s
2669 |
2668 |
2670 o i-0 initial commit: a b h p q r
2669 o i-0 initial commit: a b h p q r
2671
2670
2672 #else
2671 #else
2673 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2672 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2674 $ hg log -Gfr 'desc("mBRm-0")' d
2673 $ hg log -Gfr 'desc("mBRm-0")' d
2675 o i-2: c -move-> d, s -move-> t
2674 o i-2: c -move-> d, s -move-> t
2676 |
2675 |
2677 ~
2676 ~
2678 #endif
2677 #endif
2679
2678
2680 #if no-changeset
2679 #if no-changeset
2681 $ hg log -Gfr 'desc("mRBm-0")' d
2680 $ hg log -Gfr 'desc("mRBm-0")' d
2682 o i-2: c -move-> d, s -move-> t
2681 o i-2: c -move-> d, s -move-> t
2683 |
2682 |
2684 o i-1: a -move-> c, p -move-> s
2683 o i-1: a -move-> c, p -move-> s
2685 |
2684 |
2686 o i-0 initial commit: a b h p q r
2685 o i-0 initial commit: a b h p q r
2687
2686
2688 #else
2687 #else
2689 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2688 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2690 $ hg log -Gfr 'desc("mRBm-0")' d
2689 $ hg log -Gfr 'desc("mRBm-0")' d
2691 o i-2: c -move-> d, s -move-> t
2690 o i-2: c -move-> d, s -move-> t
2692 |
2691 |
2693 ~
2692 ~
2694 #endif
2693 #endif
2695
2694
2696 Subcase: reset of the copy history on one side
2695 Subcase: reset of the copy history on one side
2697 ``````````````````````````````````````````````
2696 ``````````````````````````````````````````````
2698
2697
2699 Merge:
2698 Merge:
2700 - one with change to a file
2699 - one with change to a file
2701 - one deleting and recreating the file
2700 - one deleting and recreating the file
2702
2701
2703 Unlike in the 'BD/DB' cases, an actual merge happened here. So we should
2702 Unlike in the 'BD/DB' cases, an actual merge happened here. So we should
2704 consider history and rename on both branch of the merge.
2703 consider history and rename on both branch of the merge.
2705
2704
2706 $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))'
2705 $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))'
2707 o mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
2706 o mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
2708 |\
2707 |\
2709 +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2708 +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2710 | |/
2709 | |/
2711 | o g-1: update d
2710 | o g-1: update d
2712 | |
2711 | |
2713 o | d-2 re-add d
2712 o | d-2 re-add d
2714 | |
2713 | |
2715 o | d-1 delete d
2714 o | d-1 delete d
2716 |/
2715 |/
2717 o i-2: c -move-> d, s -move-> t
2716 o i-2: c -move-> d, s -move-> t
2718 |
2717 |
2719 o i-1: a -move-> c, p -move-> s
2718 o i-1: a -move-> c, p -move-> s
2720 |
2719 |
2721 o i-0 initial commit: a b h p q r
2720 o i-0 initial commit: a b h p q r
2722
2721
2723 One side of the merge have a long history with rename. The other side of the
2722 One side of the merge have a long history with rename. The other side of the
2724 merge point to a new file with a smaller history. Each side is "valid".
2723 merge point to a new file with a smaller history. Each side is "valid".
2725
2724
2726 (and again the filelog based algorithm only explore one, with a pick based on
2725 (and again the filelog based algorithm only explore one, with a pick based on
2727 revision numbers)
2726 revision numbers)
2728
2727
2729 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")'
2728 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")'
2730 A d
2729 A d
2731 a (filelog !)
2730 a (filelog !)
2732 A t
2731 A t
2733 p
2732 p
2734 R a
2733 R a
2735 R p
2734 R p
2736 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")'
2735 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")'
2737 A d
2736 A d
2738 a
2737 a
2739 A t
2738 A t
2740 p
2739 p
2741 R a
2740 R a
2742 R p
2741 R p
2743 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")'
2742 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")'
2744 M d
2743 M d
2745 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")'
2744 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")'
2746 M d
2745 M d
2747 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")'
2746 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")'
2748 M d
2747 M d
2749 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")'
2748 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")'
2750 M d
2749 M d
2751
2750
2752 #if no-changeset
2751 #if no-changeset
2753 $ hg log -Gfr 'desc("mDGm-0")' d
2752 $ hg log -Gfr 'desc("mDGm-0")' d
2754 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2753 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2755 |\
2754 |\
2756 | o g-1: update d
2755 | o g-1: update d
2757 | |
2756 | |
2758 o | d-2 re-add d
2757 o | d-2 re-add d
2759 |/
2758 |/
2760 o i-2: c -move-> d, s -move-> t
2759 o i-2: c -move-> d, s -move-> t
2761 |
2760 |
2762 o i-1: a -move-> c, p -move-> s
2761 o i-1: a -move-> c, p -move-> s
2763 |
2762 |
2764 o i-0 initial commit: a b h p q r
2763 o i-0 initial commit: a b h p q r
2765
2764
2766 #else
2765 #else
2767 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2766 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2768 $ hg log -Gfr 'desc("mDGm-0")' d
2767 $ hg log -Gfr 'desc("mDGm-0")' d
2769 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2768 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2770 |\
2769 |\
2771 | o g-1: update d
2770 | o g-1: update d
2772 | |
2771 | |
2773 o | d-2 re-add d
2772 o | d-2 re-add d
2774 |/
2773 |/
2775 o i-2: c -move-> d, s -move-> t
2774 o i-2: c -move-> d, s -move-> t
2776 |
2775 |
2777 ~
2776 ~
2778 #endif
2777 #endif
2779
2778
2780
2779
2781 #if no-changeset
2780 #if no-changeset
2782 $ hg log -Gfr 'desc("mDGm-0")' d
2781 $ hg log -Gfr 'desc("mDGm-0")' d
2783 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2782 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2784 |\
2783 |\
2785 | o g-1: update d
2784 | o g-1: update d
2786 | |
2785 | |
2787 o | d-2 re-add d
2786 o | d-2 re-add d
2788 |/
2787 |/
2789 o i-2: c -move-> d, s -move-> t
2788 o i-2: c -move-> d, s -move-> t
2790 |
2789 |
2791 o i-1: a -move-> c, p -move-> s
2790 o i-1: a -move-> c, p -move-> s
2792 |
2791 |
2793 o i-0 initial commit: a b h p q r
2792 o i-0 initial commit: a b h p q r
2794
2793
2795 #else
2794 #else
2796 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2795 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2797 $ hg log -Gfr 'desc("mDGm-0")' d
2796 $ hg log -Gfr 'desc("mDGm-0")' d
2798 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2797 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2799 |\
2798 |\
2800 | o g-1: update d
2799 | o g-1: update d
2801 | |
2800 | |
2802 o | d-2 re-add d
2801 o | d-2 re-add d
2803 |/
2802 |/
2804 o i-2: c -move-> d, s -move-> t
2803 o i-2: c -move-> d, s -move-> t
2805 |
2804 |
2806 ~
2805 ~
2807 #endif
2806 #endif
2808
2807
2809 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
2808 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
2810 ````````````````````````````````````````````````````````````````````````````````````````````
2809 ````````````````````````````````````````````````````````````````````````````````````````````
2811
2810
2812 Merge:
2811 Merge:
2813 - one with change to a file (d)
2812 - one with change to a file (d)
2814 - one overwriting that file with a rename (from h to i, to d)
2813 - one overwriting that file with a rename (from h to i, to d)
2815
2814
2816 This case is similar to BF/FB, but an actual merge happens, so both side of the
2815 This case is similar to BF/FB, but an actual merge happens, so both side of the
2817 history are relevant.
2816 history are relevant.
2818
2817
2819
2818
2820 $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))'
2819 $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))'
2821 o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
2820 o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
2822 |\
2821 |\
2823 +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
2822 +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
2824 | |/
2823 | |/
2825 | o g-1: update d
2824 | o g-1: update d
2826 | |
2825 | |
2827 o | f-2: rename i -> d
2826 o | f-2: rename i -> d
2828 | |
2827 | |
2829 o | f-1: rename h -> i
2828 o | f-1: rename h -> i
2830 |/
2829 |/
2831 o i-2: c -move-> d, s -move-> t
2830 o i-2: c -move-> d, s -move-> t
2832 |
2831 |
2833 o i-1: a -move-> c, p -move-> s
2832 o i-1: a -move-> c, p -move-> s
2834 |
2833 |
2835 o i-0 initial commit: a b h p q r
2834 o i-0 initial commit: a b h p q r
2836
2835
2837
2836
2838 Note:
2837 Note:
2839 | In this case, the merge get conflicting information since on one side we have
2838 | In this case, the merge get conflicting information since on one side we have
2840 | "a -> c -> d". and one the other one we have "h -> i -> d".
2839 | "a -> c -> d". and one the other one we have "h -> i -> d".
2841 |
2840 |
2842 | The current code arbitrarily pick one side depending the ordering of the merged hash:
2841 | The current code arbitrarily pick one side depending the ordering of the merged hash:
2843
2842
2844 In this case, the file hash from "f-2" is lower, so it will be `p1` of the resulting filenode its copy tracing information will win (and trace back to "h"):
2843 In this case, the file hash from "f-2" is lower, so it will be `p1` of the resulting filenode its copy tracing information will win (and trace back to "h"):
2845
2844
2846 Details on this hash ordering pick:
2845 Details on this hash ordering pick:
2847
2846
2848 $ hg manifest --debug 'desc("g-1")' | egrep 'd$'
2847 $ hg manifest --debug 'desc("g-1")' | egrep 'd$'
2849 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !)
2848 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !)
2850 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !)
2849 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !)
2851 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d
2850 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d
2852 A d
2851 A d
2853 a (no-changeset no-compatibility !)
2852 a (no-changeset no-compatibility !)
2854
2853
2855 $ hg manifest --debug 'desc("f-2")' | egrep 'd$'
2854 $ hg manifest --debug 'desc("f-2")' | egrep 'd$'
2856 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !)
2855 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !)
2857 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !)
2856 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !)
2858 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d
2857 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d
2859 A d
2858 A d
2860 h (no-changeset no-compatibility !)
2859 h (no-changeset no-compatibility !)
2861
2860
2862 Copy tracing data on the resulting merge:
2861 Copy tracing data on the resulting merge:
2863
2862
2864 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")'
2863 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")'
2865 A d
2864 A d
2866 h (no-filelog !)
2865 h (no-filelog !)
2867 a (filelog !)
2866 a (filelog !)
2868 A t
2867 A t
2869 p
2868 p
2870 R a
2869 R a
2871 R h
2870 R h
2872 R p
2871 R p
2873 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")'
2872 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")'
2874 A d
2873 A d
2875 a (no-changeset !)
2874 a (no-changeset !)
2876 h (changeset !)
2875 h (changeset !)
2877 A t
2876 A t
2878 p
2877 p
2879 R a
2878 R a
2880 R h
2879 R h
2881 R p
2880 R p
2882 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")'
2881 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")'
2883 M d
2882 M d
2884 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")'
2883 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")'
2885 M d
2884 M d
2886 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")'
2885 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")'
2887 M d
2886 M d
2888 i (no-filelog !)
2887 i (no-filelog !)
2889 R i
2888 R i
2890 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")'
2889 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")'
2891 M d
2890 M d
2892 i (no-filelog !)
2891 i (no-filelog !)
2893 R i
2892 R i
2894 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")'
2893 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")'
2895 M d (no-changeset !)
2894 M d (no-changeset !)
2896 h (no-filelog no-changeset !)
2895 h (no-filelog no-changeset !)
2897 R h
2896 R h
2898 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")'
2897 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")'
2899 M d (no-changeset !)
2898 M d (no-changeset !)
2900 h (no-filelog no-changeset !)
2899 h (no-filelog no-changeset !)
2901 R h
2900 R h
2902
2901
2903 #if no-changeset
2902 #if no-changeset
2904 $ hg log -Gfr 'desc("mFGm-0")' d
2903 $ hg log -Gfr 'desc("mFGm-0")' d
2905 o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
2904 o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
2906 |\
2905 |\
2907 | o g-1: update d
2906 | o g-1: update d
2908 | |
2907 | |
2909 o | f-2: rename i -> d
2908 o | f-2: rename i -> d
2910 | |
2909 | |
2911 o | f-1: rename h -> i
2910 o | f-1: rename h -> i
2912 |/
2911 |/
2913 o i-2: c -move-> d, s -move-> t
2912 o i-2: c -move-> d, s -move-> t
2914 |
2913 |
2915 o i-1: a -move-> c, p -move-> s
2914 o i-1: a -move-> c, p -move-> s
2916 |
2915 |
2917 o i-0 initial commit: a b h p q r
2916 o i-0 initial commit: a b h p q r
2918
2917
2919 #else
2918 #else
2920 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2919 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2921 $ hg log -Gfr 'desc("mFGm-0")' d
2920 $ hg log -Gfr 'desc("mFGm-0")' d
2922 o g-1: update d
2921 o g-1: update d
2923 |
2922 |
2924 o i-2: c -move-> d, s -move-> t
2923 o i-2: c -move-> d, s -move-> t
2925 |
2924 |
2926 ~
2925 ~
2927 #endif
2926 #endif
2928
2927
2929 #if no-changeset
2928 #if no-changeset
2930 $ hg log -Gfr 'desc("mGFm-0")' d
2929 $ hg log -Gfr 'desc("mGFm-0")' d
2931 o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
2930 o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
2932 |\
2931 |\
2933 | o g-1: update d
2932 | o g-1: update d
2934 | |
2933 | |
2935 o | f-2: rename i -> d
2934 o | f-2: rename i -> d
2936 | |
2935 | |
2937 o | f-1: rename h -> i
2936 o | f-1: rename h -> i
2938 |/
2937 |/
2939 o i-2: c -move-> d, s -move-> t
2938 o i-2: c -move-> d, s -move-> t
2940 |
2939 |
2941 o i-1: a -move-> c, p -move-> s
2940 o i-1: a -move-> c, p -move-> s
2942 |
2941 |
2943 o i-0 initial commit: a b h p q r
2942 o i-0 initial commit: a b h p q r
2944
2943
2945 #else
2944 #else
2946 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2945 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2947 $ hg log -Gfr 'desc("mGFm-0")' d
2946 $ hg log -Gfr 'desc("mGFm-0")' d
2948 o g-1: update d
2947 o g-1: update d
2949 |
2948 |
2950 o i-2: c -move-> d, s -move-> t
2949 o i-2: c -move-> d, s -move-> t
2951 |
2950 |
2952 ~
2951 ~
2953 #endif
2952 #endif
2954
2953
2955 Subcase: new copy information on both side with an actual merge happening
2954 Subcase: new copy information on both side with an actual merge happening
2956 `````````````````````````````````````````````````````````````````````````
2955 `````````````````````````````````````````````````````````````````````````
2957
2956
2958 - the "p-" branch renaming 't' to 'v' (through 'u')
2957 - the "p-" branch renaming 't' to 'v' (through 'u')
2959 - the "q-" branch renaming 'r' to 'v' (through 'w')
2958 - the "q-" branch renaming 'r' to 'v' (through 'w')
2960
2959
2961
2960
2962 $ hg log -G --rev '::(desc("mPQm")+desc("mQPm"))'
2961 $ hg log -G --rev '::(desc("mPQm")+desc("mQPm"))'
2963 o mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way
2962 o mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way
2964 |\
2963 |\
2965 +---o mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way
2964 +---o mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way
2966 | |/
2965 | |/
2967 | o q-2 w -move-> v
2966 | o q-2 w -move-> v
2968 | |
2967 | |
2969 | o q-1 r -move-> w
2968 | o q-1 r -move-> w
2970 | |
2969 | |
2971 o | p-2: u -move-> v
2970 o | p-2: u -move-> v
2972 | |
2971 | |
2973 o | p-1: t -move-> u
2972 o | p-1: t -move-> u
2974 |/
2973 |/
2975 o i-2: c -move-> d, s -move-> t
2974 o i-2: c -move-> d, s -move-> t
2976 |
2975 |
2977 o i-1: a -move-> c, p -move-> s
2976 o i-1: a -move-> c, p -move-> s
2978 |
2977 |
2979 o i-0 initial commit: a b h p q r
2978 o i-0 initial commit: a b h p q r
2980
2979
2981
2980
2982 #if no-changeset
2981 #if no-changeset
2983 $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v'
2982 $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v'
2984 0946c662ef16e4e67397fd717389eb6693d41749 644 v
2983 0946c662ef16e4e67397fd717389eb6693d41749 644 v
2985 $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v'
2984 $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v'
2986 0db3aad7fcc1ec27fab57060e327b9e864ea0cc9 644 v
2985 0db3aad7fcc1ec27fab57060e327b9e864ea0cc9 644 v
2987 $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v'
2986 $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v'
2988 3f91841cd75cadc9a1f1b4e7c1aa6d411f76032e 644 v
2987 3f91841cd75cadc9a1f1b4e7c1aa6d411f76032e 644 v
2989 $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v'
2988 $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v'
2990 c43c088b811fd27983c0a9aadf44f3343cd4cd7e 644 v
2989 c43c088b811fd27983c0a9aadf44f3343cd4cd7e 644 v
2991 $ hg debugindex v | ../no-linkrev
2990 $ hg debugindex v | "$PYTHON" ../no-linkrev
2992 rev linkrev nodeid p1 p2
2991 rev linkrev nodeid p1 p2
2993 0 * 3f91841cd75c 000000000000 000000000000
2992 0 * 3f91841cd75c 000000000000 000000000000
2994 1 * c43c088b811f 000000000000 000000000000
2993 1 * c43c088b811f 000000000000 000000000000
2995 2 * 0946c662ef16 3f91841cd75c c43c088b811f
2994 2 * 0946c662ef16 3f91841cd75c c43c088b811f
2996 3 * 0db3aad7fcc1 c43c088b811f 3f91841cd75c
2995 3 * 0db3aad7fcc1 c43c088b811f 3f91841cd75c
2997 #else
2996 #else
2998 $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v'
2997 $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v'
2999 65fde9f6e4d4da23b3f610e07b53673ea9541d75 644 v
2998 65fde9f6e4d4da23b3f610e07b53673ea9541d75 644 v
3000 $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v'
2999 $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v'
3001 a098dda6413aecf154eefc976afc38b295acb7e5 644 v
3000 a098dda6413aecf154eefc976afc38b295acb7e5 644 v
3002 $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v'
3001 $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v'
3003 5aed6a8dbff0301328c08360d24354d3d064cf0d 644 v
3002 5aed6a8dbff0301328c08360d24354d3d064cf0d 644 v
3004 $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v'
3003 $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v'
3005 a38b2fa170219750dac9bc7d19df831f213ba708 644 v
3004 a38b2fa170219750dac9bc7d19df831f213ba708 644 v
3006 $ hg debugindex v | ../no-linkrev
3005 $ hg debugindex v | "$PYTHON" ../no-linkrev
3007 rev linkrev nodeid p1 p2
3006 rev linkrev nodeid p1 p2
3008 0 * 5aed6a8dbff0 000000000000 000000000000
3007 0 * 5aed6a8dbff0 000000000000 000000000000
3009 1 * a38b2fa17021 000000000000 000000000000
3008 1 * a38b2fa17021 000000000000 000000000000
3010 2 * 65fde9f6e4d4 5aed6a8dbff0 a38b2fa17021
3009 2 * 65fde9f6e4d4 5aed6a8dbff0 a38b2fa17021
3011 3 * a098dda6413a a38b2fa17021 5aed6a8dbff0
3010 3 * a098dda6413a a38b2fa17021 5aed6a8dbff0
3012 #endif
3011 #endif
3013
3012
3014 # Here the filelog based implementation is not looking at the rename
3013 # Here the filelog based implementation is not looking at the rename
3015 # information (because the file exist on both side). However the changelog
3014 # information (because the file exist on both side). However the changelog
3016 # based on works fine. We have different output.
3015 # based on works fine. We have different output.
3017
3016
3018 $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mPQm-0")'
3017 $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mPQm-0")'
3019 M v
3018 M v
3020 r (no-filelog !)
3019 r (no-filelog !)
3021 R r
3020 R r
3022 $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mQPm-0")'
3021 $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mQPm-0")'
3023 M v
3022 M v
3024 r (no-filelog !)
3023 r (no-filelog !)
3025 R r
3024 R r
3026 $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mPQm-0")'
3025 $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mPQm-0")'
3027 M v
3026 M v
3028 t (no-filelog !)
3027 t (no-filelog !)
3029 R t
3028 R t
3030 $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mQPm-0")'
3029 $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mQPm-0")'
3031 M v
3030 M v
3032 t (no-filelog !)
3031 t (no-filelog !)
3033 R t
3032 R t
3034 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("p-2")'
3033 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("p-2")'
3035 A v
3034 A v
3036 t
3035 t
3037 R t
3036 R t
3038 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("q-2")'
3037 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("q-2")'
3039 A v
3038 A v
3040 r
3039 r
3041 R r
3040 R r
3042
3041
3043 # From here, we run status against revision where both source file exists.
3042 # From here, we run status against revision where both source file exists.
3044 #
3043 #
3045 # The filelog based implementation picks an arbitrary side based on revision
3044 # The filelog based implementation picks an arbitrary side based on revision
3046 # numbers. So the same side "wins" whatever the parents order is. This is
3045 # numbers. So the same side "wins" whatever the parents order is. This is
3047 # sub-optimal because depending on revision numbers means the result can be
3046 # sub-optimal because depending on revision numbers means the result can be
3048 # different from one repository to the next.
3047 # different from one repository to the next.
3049 #
3048 #
3050 # The changeset based algorithm use the parent order to break tie on conflicting
3049 # The changeset based algorithm use the parent order to break tie on conflicting
3051 # information and will have a different order depending on who is p1 and p2.
3050 # information and will have a different order depending on who is p1 and p2.
3052 # That order is stable accross repositories. (data from p1 prevails)
3051 # That order is stable accross repositories. (data from p1 prevails)
3053
3052
3054 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mPQm-0")'
3053 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mPQm-0")'
3055 A v
3054 A v
3056 t
3055 t
3057 R r
3056 R r
3058 R t
3057 R t
3059 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mQPm-0")'
3058 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mQPm-0")'
3060 A v
3059 A v
3061 t (filelog !)
3060 t (filelog !)
3062 r (no-filelog !)
3061 r (no-filelog !)
3063 R r
3062 R r
3064 R t
3063 R t
3065 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm-0")'
3064 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm-0")'
3066 A d
3065 A d
3067 a
3066 a
3068 A v
3067 A v
3069 r (filelog !)
3068 r (filelog !)
3070 p (no-filelog !)
3069 p (no-filelog !)
3071 R a
3070 R a
3072 R p
3071 R p
3073 R r
3072 R r
3074 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm-0")'
3073 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm-0")'
3075 A d
3074 A d
3076 a
3075 a
3077 A v
3076 A v
3078 r
3077 r
3079 R a
3078 R a
3080 R p
3079 R p
3081 R r
3080 R r
3082
3081
3083
3082
3084 Comparing with merging with a deletion (and keeping the file)
3083 Comparing with merging with a deletion (and keeping the file)
3085 -------------------------------------------------------------
3084 -------------------------------------------------------------
3086
3085
3087 Merge:
3086 Merge:
3088 - one removing a file (d)
3087 - one removing a file (d)
3089 - one updating that file
3088 - one updating that file
3090 - the merge keep the modified version of the file (canceling the delete)
3089 - the merge keep the modified version of the file (canceling the delete)
3091
3090
3092 In this case, the file keep on living after the merge. So we should not drop its
3091 In this case, the file keep on living after the merge. So we should not drop its
3093 copy tracing chain.
3092 copy tracing chain.
3094
3093
3095 $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))'
3094 $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))'
3096 o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
3095 o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
3097 |\
3096 |\
3098 +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way
3097 +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way
3099 | |/
3098 | |/
3100 | o g-1: update d
3099 | o g-1: update d
3101 | |
3100 | |
3102 o | c-1 delete d
3101 o | c-1 delete d
3103 |/
3102 |/
3104 o i-2: c -move-> d, s -move-> t
3103 o i-2: c -move-> d, s -move-> t
3105 |
3104 |
3106 o i-1: a -move-> c, p -move-> s
3105 o i-1: a -move-> c, p -move-> s
3107 |
3106 |
3108 o i-0 initial commit: a b h p q r
3107 o i-0 initial commit: a b h p q r
3109
3108
3110
3109
3111 'a' is the copy source of 'd'
3110 'a' is the copy source of 'd'
3112
3111
3113 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")'
3112 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")'
3114 A d
3113 A d
3115 a (no-compatibility no-changeset !)
3114 a (no-compatibility no-changeset !)
3116 A t
3115 A t
3117 p
3116 p
3118 R a
3117 R a
3119 R p
3118 R p
3120 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")'
3119 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")'
3121 A d
3120 A d
3122 a (no-compatibility no-changeset !)
3121 a (no-compatibility no-changeset !)
3123 A t
3122 A t
3124 p
3123 p
3125 R a
3124 R a
3126 R p
3125 R p
3127 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")'
3126 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")'
3128 A d
3127 A d
3129 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")'
3128 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")'
3130 A d
3129 A d
3131 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")'
3130 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")'
3132 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")'
3131 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")'
3133
3132
3134
3133
3135 Comparing with merge restoring an untouched deleted file
3134 Comparing with merge restoring an untouched deleted file
3136 --------------------------------------------------------
3135 --------------------------------------------------------
3137
3136
3138 Merge:
3137 Merge:
3139 - one removing a file (d)
3138 - one removing a file (d)
3140 - one leaving the file untouched
3139 - one leaving the file untouched
3141 - the merge actively restore the file to the same content.
3140 - the merge actively restore the file to the same content.
3142
3141
3143 In this case, the file keep on living after the merge. So we should not drop its
3142 In this case, the file keep on living after the merge. So we should not drop its
3144 copy tracing chain.
3143 copy tracing chain.
3145
3144
3146 $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))'
3145 $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))'
3147 o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
3146 o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
3148 |\
3147 |\
3149 +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
3148 +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
3150 | |/
3149 | |/
3151 | o c-1 delete d
3150 | o c-1 delete d
3152 | |
3151 | |
3153 o | b-1: b update
3152 o | b-1: b update
3154 |/
3153 |/
3155 o i-2: c -move-> d, s -move-> t
3154 o i-2: c -move-> d, s -move-> t
3156 |
3155 |
3157 o i-1: a -move-> c, p -move-> s
3156 o i-1: a -move-> c, p -move-> s
3158 |
3157 |
3159 o i-0 initial commit: a b h p q r
3158 o i-0 initial commit: a b h p q r
3160
3159
3161
3160
3162 'a' is the the copy source of 'd'
3161 'a' is the the copy source of 'd'
3163
3162
3164 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
3163 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
3165 M b
3164 M b
3166 A d
3165 A d
3167 a (no-compatibility no-changeset !)
3166 a (no-compatibility no-changeset !)
3168 A t
3167 A t
3169 p
3168 p
3170 R a
3169 R a
3171 R p
3170 R p
3172 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
3171 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
3173 M b
3172 M b
3174 A d
3173 A d
3175 a (no-compatibility no-changeset !)
3174 a (no-compatibility no-changeset !)
3176 A t
3175 A t
3177 p
3176 p
3178 R a
3177 R a
3179 R p
3178 R p
3180 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")'
3179 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")'
3181 M b
3180 M b
3182 A d
3181 A d
3183 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")'
3182 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")'
3184 M b
3183 M b
3185 A d
3184 A d
3186 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")'
3185 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")'
3187 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")'
3186 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")'
3188
3187
3189
3188
3190 Merging a branch where a rename was deleted with a branch where the same file was renamed
3189 Merging a branch where a rename was deleted with a branch where the same file was renamed
3191 ------------------------------------------------------------------------------------------
3190 ------------------------------------------------------------------------------------------
3192
3191
3193 Create a "conflicting" merge where `d` get removed on one branch before its
3192 Create a "conflicting" merge where `d` get removed on one branch before its
3194 rename information actually conflict with the other branch.
3193 rename information actually conflict with the other branch.
3195
3194
3196 (the copy information from the branch that was not deleted should win).
3195 (the copy information from the branch that was not deleted should win).
3197
3196
3198 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
3197 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
3199 o mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way
3198 o mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way
3200 |\
3199 |\
3201 +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way
3200 +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way
3202 | |/
3201 | |/
3203 | o h-1: b -(move)-> d
3202 | o h-1: b -(move)-> d
3204 | |
3203 | |
3205 o | c-1 delete d
3204 o | c-1 delete d
3206 | |
3205 | |
3207 o | i-2: c -move-> d, s -move-> t
3206 o | i-2: c -move-> d, s -move-> t
3208 | |
3207 | |
3209 o | i-1: a -move-> c, p -move-> s
3208 o | i-1: a -move-> c, p -move-> s
3210 |/
3209 |/
3211 o i-0 initial commit: a b h p q r
3210 o i-0 initial commit: a b h p q r
3212
3211
3213
3212
3214 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")'
3213 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")'
3215 A d
3214 A d
3216 b (no-compatibility no-changeset !)
3215 b (no-compatibility no-changeset !)
3217 A t
3216 A t
3218 p
3217 p
3219 R a
3218 R a
3220 R b
3219 R b
3221 R p
3220 R p
3222 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")'
3221 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")'
3223 A d
3222 A d
3224 b
3223 b
3225 A t
3224 A t
3226 p
3225 p
3227 R a
3226 R a
3228 R b
3227 R b
3229 R p
3228 R p
3230 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")'
3229 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")'
3231 A d
3230 A d
3232 b
3231 b
3233 R b
3232 R b
3234 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")'
3233 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")'
3235 A d
3234 A d
3236 b
3235 b
3237 R b
3236 R b
3238 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")'
3237 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")'
3239 A t
3238 A t
3240 p
3239 p
3241 R a
3240 R a
3242 R p
3241 R p
3243 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")'
3242 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")'
3244 A t
3243 A t
3245 p
3244 p
3246 R a
3245 R a
3247 R p
3246 R p
3248
3247
3249 Variant of previous with extra changes introduced by the merge
3248 Variant of previous with extra changes introduced by the merge
3250 --------------------------------------------------------------
3249 --------------------------------------------------------------
3251
3250
3252 (see case declaration for details)
3251 (see case declaration for details)
3253
3252
3254 Subcase: merge has same initial content on both side, but merge introduced a change
3253 Subcase: merge has same initial content on both side, but merge introduced a change
3255 ```````````````````````````````````````````````````````````````````````````````````
3254 ```````````````````````````````````````````````````````````````````````````````````
3256
3255
3257 - the "e-" branch renaming b to f (through 'g')
3256 - the "e-" branch renaming b to f (through 'g')
3258 - the "a-" branch renaming d to f (through e)
3257 - the "a-" branch renaming d to f (through e)
3259 - the merge add new change to b
3258 - the merge add new change to b
3260
3259
3261 $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))'
3260 $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))'
3262 o mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way
3261 o mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way
3263 |\
3262 |\
3264 +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way
3263 +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way
3265 | |/
3264 | |/
3266 | o e-2 g -move-> f
3265 | o e-2 g -move-> f
3267 | |
3266 | |
3268 | o e-1 b -move-> g
3267 | o e-1 b -move-> g
3269 | |
3268 | |
3270 o | a-2: e -move-> f
3269 o | a-2: e -move-> f
3271 | |
3270 | |
3272 o | a-1: d -move-> e
3271 o | a-1: d -move-> e
3273 |/
3272 |/
3274 o i-2: c -move-> d, s -move-> t
3273 o i-2: c -move-> d, s -move-> t
3275 |
3274 |
3276 o i-1: a -move-> c, p -move-> s
3275 o i-1: a -move-> c, p -move-> s
3277 |
3276 |
3278 o i-0 initial commit: a b h p q r
3277 o i-0 initial commit: a b h p q r
3279
3278
3280 #if no-changeset
3279 #if no-changeset
3281 $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f'
3280 $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f'
3282 2f649fba7eb284e720d02b61f0546fcef694c045 644 f
3281 2f649fba7eb284e720d02b61f0546fcef694c045 644 f
3283 $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f'
3282 $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f'
3284 774e7c1637d536b99e2d8ef16fd731f87a82bd09 644 f
3283 774e7c1637d536b99e2d8ef16fd731f87a82bd09 644 f
3285 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
3284 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
3286 b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f
3285 b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f
3287 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
3286 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
3288 e8825b386367b29fec957283a80bb47b47483fe1 644 f
3287 e8825b386367b29fec957283a80bb47b47483fe1 644 f
3289 $ hg debugindex f | ../no-linkrev
3288 $ hg debugindex f | "$PYTHON" ../no-linkrev
3290 rev linkrev nodeid p1 p2
3289 rev linkrev nodeid p1 p2
3291 0 * b76eb76580df 000000000000 000000000000
3290 0 * b76eb76580df 000000000000 000000000000
3292 1 * e8825b386367 000000000000 000000000000
3291 1 * e8825b386367 000000000000 000000000000
3293 2 * 2ff93c643948 b76eb76580df e8825b386367
3292 2 * 2ff93c643948 b76eb76580df e8825b386367
3294 3 * 2f649fba7eb2 b76eb76580df e8825b386367
3293 3 * 2f649fba7eb2 b76eb76580df e8825b386367
3295 4 * 774e7c1637d5 e8825b386367 b76eb76580df
3294 4 * 774e7c1637d5 e8825b386367 b76eb76580df
3296 #else
3295 #else
3297 $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f'
3296 $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f'
3298 d3613c1ec8310a812ac4268fd853ac576b6caea5 644 f
3297 d3613c1ec8310a812ac4268fd853ac576b6caea5 644 f
3299 $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f'
3298 $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f'
3300 05e03c868bbcab4a649cb33a238d7aa07398a469 644 f
3299 05e03c868bbcab4a649cb33a238d7aa07398a469 644 f
3301 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
3300 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
3302 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
3301 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
3303 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
3302 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
3304 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
3303 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
3305 $ hg debugindex f | ../no-linkrev
3304 $ hg debugindex f | "$PYTHON" ../no-linkrev
3306 rev linkrev nodeid p1 p2
3305 rev linkrev nodeid p1 p2
3307 0 * ae258f702dfe 000000000000 000000000000
3306 0 * ae258f702dfe 000000000000 000000000000
3308 1 * d3613c1ec831 ae258f702dfe 000000000000
3307 1 * d3613c1ec831 ae258f702dfe 000000000000
3309 2 * 05e03c868bbc ae258f702dfe 000000000000
3308 2 * 05e03c868bbc ae258f702dfe 000000000000
3310 #endif
3309 #endif
3311
3310
3312 # Here the filelog based implementation is not looking at the rename
3311 # Here the filelog based implementation is not looking at the rename
3313 # information (because the file exist on both side). However the changelog
3312 # information (because the file exist on both side). However the changelog
3314 # based on works fine. We have different output.
3313 # based on works fine. We have different output.
3315
3314
3316 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAE-change-m-0")'
3315 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAE-change-m-0")'
3317 M f
3316 M f
3318 b (no-filelog !)
3317 b (no-filelog !)
3319 R b
3318 R b
3320 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEA-change-m-0")'
3319 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEA-change-m-0")'
3321 M f
3320 M f
3322 b (no-filelog !)
3321 b (no-filelog !)
3323 R b
3322 R b
3324 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAE-change-m-0")'
3323 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAE-change-m-0")'
3325 M f
3324 M f
3326 d (no-filelog !)
3325 d (no-filelog !)
3327 R d
3326 R d
3328 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEA-change-m-0")'
3327 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEA-change-m-0")'
3329 M f
3328 M f
3330 d (no-filelog !)
3329 d (no-filelog !)
3331 R d
3330 R d
3332 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
3331 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
3333 A f
3332 A f
3334 d
3333 d
3335 R d
3334 R d
3336 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")'
3335 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")'
3337 A f
3336 A f
3338 b
3337 b
3339 R b
3338 R b
3340
3339
3341 # From here, we run status against revision where both source file exists.
3340 # From here, we run status against revision where both source file exists.
3342 #
3341 #
3343 # The filelog based implementation picks an arbitrary side based on revision
3342 # The filelog based implementation picks an arbitrary side based on revision
3344 # numbers. So the same side "wins" whatever the parents order is. This is
3343 # numbers. So the same side "wins" whatever the parents order is. This is
3345 # sub-optimal because depending on revision numbers means the result can be
3344 # sub-optimal because depending on revision numbers means the result can be
3346 # different from one repository to the next.
3345 # different from one repository to the next.
3347 #
3346 #
3348 # The changeset based algorithm use the parent order to break tie on conflicting
3347 # The changeset based algorithm use the parent order to break tie on conflicting
3349 # information and will have a different order depending on who is p1 and p2.
3348 # information and will have a different order depending on who is p1 and p2.
3350 # That order is stable accross repositories. (data from p1 prevails)
3349 # That order is stable accross repositories. (data from p1 prevails)
3351
3350
3352 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAE-change-m-0")'
3351 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAE-change-m-0")'
3353 A f
3352 A f
3354 d
3353 d
3355 R b
3354 R b
3356 R d
3355 R d
3357 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEA-change-m-0")'
3356 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEA-change-m-0")'
3358 A f
3357 A f
3359 d (filelog !)
3358 d (filelog !)
3360 b (no-filelog !)
3359 b (no-filelog !)
3361 R b
3360 R b
3362 R d
3361 R d
3363 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")'
3362 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")'
3364 A f
3363 A f
3365 a
3364 a
3366 A t
3365 A t
3367 p
3366 p
3368 R a
3367 R a
3369 R b
3368 R b
3370 R p
3369 R p
3371 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")'
3370 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")'
3372 A f
3371 A f
3373 a (filelog !)
3372 a (filelog !)
3374 b (no-filelog !)
3373 b (no-filelog !)
3375 A t
3374 A t
3376 p
3375 p
3377 R a
3376 R a
3378 R b
3377 R b
3379 R p
3378 R p
3380
3379
3381
3380
3382 Subcase: merge overwrite common copy information, but with extra change during the merge
3381 Subcase: merge overwrite common copy information, but with extra change during the merge
3383 ```````````````````````````````````````````````````````````````````````````````````
3382 ```````````````````````````````````````````````````````````````````````````````````
3384
3383
3385 Merge:
3384 Merge:
3386 - one with change to an unrelated file (b)
3385 - one with change to an unrelated file (b)
3387 - one overwriting a file (d) with a rename (from h to i to d)
3386 - one overwriting a file (d) with a rename (from h to i to d)
3388
3387
3389 $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))'
3388 $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))'
3390 o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
3389 o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
3391 |\
3390 |\
3392 +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
3391 +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
3393 | |/
3392 | |/
3394 | o f-2: rename i -> d
3393 | o f-2: rename i -> d
3395 | |
3394 | |
3396 | o f-1: rename h -> i
3395 | o f-1: rename h -> i
3397 | |
3396 | |
3398 o | b-1: b update
3397 o | b-1: b update
3399 |/
3398 |/
3400 o i-2: c -move-> d, s -move-> t
3399 o i-2: c -move-> d, s -move-> t
3401 |
3400 |
3402 o i-1: a -move-> c, p -move-> s
3401 o i-1: a -move-> c, p -move-> s
3403 |
3402 |
3404 o i-0 initial commit: a b h p q r
3403 o i-0 initial commit: a b h p q r
3405
3404
3406 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBF-change-m-0")'
3405 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBF-change-m-0")'
3407 M b
3406 M b
3408 A d
3407 A d
3409 h (filelog !)
3408 h (filelog !)
3410 h (sidedata !)
3409 h (sidedata !)
3411 h (upgraded !)
3410 h (upgraded !)
3412 h (upgraded-parallel !)
3411 h (upgraded-parallel !)
3413 h (changeset !)
3412 h (changeset !)
3414 h (compatibility !)
3413 h (compatibility !)
3415 A t
3414 A t
3416 p
3415 p
3417 R a
3416 R a
3418 R h
3417 R h
3419 R p
3418 R p
3420 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")'
3419 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")'
3421 M b
3420 M b
3422 A d
3421 A d
3423 h
3422 h
3424 A t
3423 A t
3425 p
3424 p
3426 R a
3425 R a
3427 R h
3426 R h
3428 R p
3427 R p
3429 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBF-change-m-0")'
3428 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBF-change-m-0")'
3430 M d
3429 M d
3431 h (no-filelog !)
3430 h (no-filelog !)
3432 R h
3431 R h
3433 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBF-change-m-0")'
3432 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBF-change-m-0")'
3434 M b
3433 M b
3435 M d
3434 M d
3436 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBF-change-m-0")'
3435 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBF-change-m-0")'
3437 M b
3436 M b
3438 M d
3437 M d
3439 i (no-filelog !)
3438 i (no-filelog !)
3440 R i
3439 R i
3441 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFB-change-m-0")'
3440 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFB-change-m-0")'
3442 M d
3441 M d
3443 h (no-filelog !)
3442 h (no-filelog !)
3444 R h
3443 R h
3445 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFB-change-m-0")'
3444 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFB-change-m-0")'
3446 M b
3445 M b
3447 M d
3446 M d
3448 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFB-change-m-0")'
3447 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFB-change-m-0")'
3449 M b
3448 M b
3450 M d
3449 M d
3451 i (no-filelog !)
3450 i (no-filelog !)
3452 R i
3451 R i
3453
3452
3454 #if no-changeset
3453 #if no-changeset
3455 $ hg log -Gfr 'desc("mBF-change-m-0")' d
3454 $ hg log -Gfr 'desc("mBF-change-m-0")' d
3456 o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
3455 o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
3457 |\
3456 |\
3458 o : f-2: rename i -> d
3457 o : f-2: rename i -> d
3459 | :
3458 | :
3460 o : f-1: rename h -> i
3459 o : f-1: rename h -> i
3461 :/
3460 :/
3462 o i-0 initial commit: a b h p q r
3461 o i-0 initial commit: a b h p q r
3463
3462
3464 #else
3463 #else
3465 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3464 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3466 $ hg log -Gfr 'desc("mBF-change-m-0")' d
3465 $ hg log -Gfr 'desc("mBF-change-m-0")' d
3467 o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
3466 o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
3468 :
3467 :
3469 o i-2: c -move-> d, s -move-> t
3468 o i-2: c -move-> d, s -move-> t
3470 |
3469 |
3471 ~
3470 ~
3472 #endif
3471 #endif
3473
3472
3474 #if no-changeset
3473 #if no-changeset
3475 $ hg log -Gfr 'desc("mFB-change-m-0")' d
3474 $ hg log -Gfr 'desc("mFB-change-m-0")' d
3476 o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
3475 o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
3477 |\
3476 |\
3478 o : f-2: rename i -> d
3477 o : f-2: rename i -> d
3479 | :
3478 | :
3480 o : f-1: rename h -> i
3479 o : f-1: rename h -> i
3481 :/
3480 :/
3482 o i-0 initial commit: a b h p q r
3481 o i-0 initial commit: a b h p q r
3483
3482
3484 #else
3483 #else
3485 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3484 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3486 $ hg log -Gfr 'desc("mFB-change-m-0")' d
3485 $ hg log -Gfr 'desc("mFB-change-m-0")' d
3487 o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
3486 o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
3488 :
3487 :
3489 o i-2: c -move-> d, s -move-> t
3488 o i-2: c -move-> d, s -move-> t
3490 |
3489 |
3491 ~
3490 ~
3492 #endif
3491 #endif
3493
3492
3494
3493
3495 Subcase: restoring and untouched deleted file, while touching it
3494 Subcase: restoring and untouched deleted file, while touching it
3496 ````````````````````````````````````````````````````````````````
3495 ````````````````````````````````````````````````````````````````
3497
3496
3498 Merge:
3497 Merge:
3499 - one removing a file (d)
3498 - one removing a file (d)
3500 - one leaving the file untouched
3499 - one leaving the file untouched
3501 - the merge actively restore the file to the same content.
3500 - the merge actively restore the file to the same content.
3502
3501
3503 In this case, the file keep on living after the merge. So we should not drop its
3502 In this case, the file keep on living after the merge. So we should not drop its
3504 copy tracing chain.
3503 copy tracing chain.
3505
3504
3506 $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))'
3505 $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))'
3507 o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
3506 o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
3508 |\
3507 |\
3509 +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
3508 +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
3510 | |/
3509 | |/
3511 | o c-1 delete d
3510 | o c-1 delete d
3512 | |
3511 | |
3513 o | b-1: b update
3512 o | b-1: b update
3514 |/
3513 |/
3515 o i-2: c -move-> d, s -move-> t
3514 o i-2: c -move-> d, s -move-> t
3516 |
3515 |
3517 o i-1: a -move-> c, p -move-> s
3516 o i-1: a -move-> c, p -move-> s
3518 |
3517 |
3519 o i-0 initial commit: a b h p q r
3518 o i-0 initial commit: a b h p q r
3520
3519
3521
3520
3522 'a' is the the copy source of 'd'
3521 'a' is the the copy source of 'd'
3523
3522
3524 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-change-m-0")'
3523 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-change-m-0")'
3525 M b
3524 M b
3526 A d
3525 A d
3527 a (no-compatibility no-changeset !)
3526 a (no-compatibility no-changeset !)
3528 A t
3527 A t
3529 p
3528 p
3530 R a
3529 R a
3531 R p
3530 R p
3532 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-change-m-0")'
3531 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-change-m-0")'
3533 M b
3532 M b
3534 A d
3533 A d
3535 a (no-compatibility no-changeset !)
3534 a (no-compatibility no-changeset !)
3536 A t
3535 A t
3537 p
3536 p
3538 R a
3537 R a
3539 R p
3538 R p
3540 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-change-m-0")'
3539 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-change-m-0")'
3541 M b
3540 M b
3542 A d
3541 A d
3543 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-change-m-0")'
3542 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-change-m-0")'
3544 M b
3543 M b
3545 A d
3544 A d
3546 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-change-m-0")'
3545 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-change-m-0")'
3547 M d
3546 M d
3548 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-change-m-0")'
3547 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-change-m-0")'
3549 M d
3548 M d
3550
3549
3551
3550
3552 Decision from previous merge are properly chained with later merge
3551 Decision from previous merge are properly chained with later merge
3553 ------------------------------------------------------------------
3552 ------------------------------------------------------------------
3554
3553
3555
3554
3556 Subcase: chaining conflicting rename resolution
3555 Subcase: chaining conflicting rename resolution
3557 ```````````````````````````````````````````````
3556 ```````````````````````````````````````````````
3558
3557
3559 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
3558 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
3560 add more change on the respective branch and merge again. These second merge
3559 add more change on the respective branch and merge again. These second merge
3561 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
3560 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
3562 about that file should stay unchanged.
3561 about that file should stay unchanged.
3563
3562
3564 The result from mAEm is the same for the subsequent merge:
3563 The result from mAEm is the same for the subsequent merge:
3565
3564
3566 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f
3565 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f
3567 A f
3566 A f
3568 a (filelog !)
3567 a (filelog !)
3569 a (sidedata !)
3568 a (sidedata !)
3570 a (upgraded !)
3569 a (upgraded !)
3571 a (upgraded-parallel !)
3570 a (upgraded-parallel !)
3572
3571
3573 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f
3572 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f
3574 A f
3573 A f
3575 a (filelog !)
3574 a (filelog !)
3576 a (sidedata !)
3575 a (sidedata !)
3577 a (upgraded !)
3576 a (upgraded !)
3578 a (upgraded-parallel !)
3577 a (upgraded-parallel !)
3579
3578
3580 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f
3579 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f
3581 A f
3580 A f
3582 a (filelog !)
3581 a (filelog !)
3583 a (sidedata !)
3582 a (sidedata !)
3584 a (upgraded !)
3583 a (upgraded !)
3585 a (upgraded-parallel !)
3584 a (upgraded-parallel !)
3586
3585
3587
3586
3588 The result from mEAm is the same for the subsequent merge:
3587 The result from mEAm is the same for the subsequent merge:
3589
3588
3590 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f
3589 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f
3591 A f
3590 A f
3592 a (filelog !)
3591 a (filelog !)
3593 b (sidedata !)
3592 b (sidedata !)
3594 b (upgraded !)
3593 b (upgraded !)
3595 b (upgraded-parallel !)
3594 b (upgraded-parallel !)
3596
3595
3597 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f
3596 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f
3598 A f
3597 A f
3599 a (filelog !)
3598 a (filelog !)
3600 b (sidedata !)
3599 b (sidedata !)
3601 b (upgraded !)
3600 b (upgraded !)
3602 b (upgraded-parallel !)
3601 b (upgraded-parallel !)
3603
3602
3604 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f
3603 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f
3605 A f
3604 A f
3606 a (filelog !)
3605 a (filelog !)
3607 b (sidedata !)
3606 b (sidedata !)
3608 b (upgraded !)
3607 b (upgraded !)
3609 b (upgraded-parallel !)
3608 b (upgraded-parallel !)
3610
3609
3611 Subcase: chaining conflicting rename resolution
3610 Subcase: chaining conflicting rename resolution
3612 ```````````````````````````````````````````````
3611 ```````````````````````````````````````````````
3613
3612
3614 The "mPQm" and "mQPm" case create a rename tracking conflict on file 'v'. We
3613 The "mPQm" and "mQPm" case create a rename tracking conflict on file 'v'. We
3615 add more change on the respective branch and merge again. These second merge
3614 add more change on the respective branch and merge again. These second merge
3616 does not involve the file 'v' and the arbitration done within "mPQm" and "mQP"
3615 does not involve the file 'v' and the arbitration done within "mPQm" and "mQP"
3617 about that file should stay unchanged.
3616 about that file should stay unchanged.
3618
3617
3619 The result from mPQm is the same for the subsequent merge:
3618 The result from mPQm is the same for the subsequent merge:
3620
3619
3621 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm")' v
3620 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm")' v
3622 A v
3621 A v
3623 r (filelog !)
3622 r (filelog !)
3624 p (sidedata !)
3623 p (sidedata !)
3625 p (upgraded !)
3624 p (upgraded !)
3626 p (upgraded-parallel !)
3625 p (upgraded-parallel !)
3627
3626
3628 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v
3627 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v
3629 A v
3628 A v
3630 r (filelog !)
3629 r (filelog !)
3631 p (sidedata !)
3630 p (sidedata !)
3632 p (upgraded !)
3631 p (upgraded !)
3633 p (upgraded-parallel !)
3632 p (upgraded-parallel !)
3634
3633
3635 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v
3634 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v
3636 A v
3635 A v
3637 r (filelog !)
3636 r (filelog !)
3638 p (sidedata !)
3637 p (sidedata !)
3639 p (upgraded !)
3638 p (upgraded !)
3640 p (upgraded-parallel !)
3639 p (upgraded-parallel !)
3641
3640
3642
3641
3643 The result from mQPm is the same for the subsequent merge:
3642 The result from mQPm is the same for the subsequent merge:
3644
3643
3645 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm")' v
3644 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm")' v
3646 A v
3645 A v
3647 r (no-changeset no-compatibility !)
3646 r (no-changeset no-compatibility !)
3648
3647
3649 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQP,Sm")' v
3648 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQP,Sm")' v
3650 A v
3649 A v
3651 r (no-changeset no-compatibility !)
3650 r (no-changeset no-compatibility !)
3652
3651
3653 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mS,QPm")' v
3652 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mS,QPm")' v
3654 A v
3653 A v
3655 r (filelog !)
3654 r (filelog !)
3656 r (sidedata !)
3655 r (sidedata !)
3657 r (upgraded !)
3656 r (upgraded !)
3658 r (upgraded-parallel !)
3657 r (upgraded-parallel !)
3659
3658
3660
3659
3661 Subcase: chaining salvage information during a merge
3660 Subcase: chaining salvage information during a merge
3662 ````````````````````````````````````````````````````
3661 ````````````````````````````````````````````````````
3663
3662
3664 We add more change on the branch were the file was deleted. merging again
3663 We add more change on the branch were the file was deleted. merging again
3665 should preserve the fact eh file was salvaged.
3664 should preserve the fact eh file was salvaged.
3666
3665
3667 reference output:
3666 reference output:
3668
3667
3669 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
3668 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
3670 M b
3669 M b
3671 A d
3670 A d
3672 a (no-changeset no-compatibility !)
3671 a (no-changeset no-compatibility !)
3673 A t
3672 A t
3674 p
3673 p
3675 R a
3674 R a
3676 R p
3675 R p
3677 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
3676 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
3678 M b
3677 M b
3679 A d
3678 A d
3680 a (no-changeset no-compatibility !)
3679 a (no-changeset no-compatibility !)
3681 A t
3680 A t
3682 p
3681 p
3683 R a
3682 R a
3684 R p
3683 R p
3685
3684
3686 chained output
3685 chained output
3687 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")'
3686 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")'
3688 M b
3687 M b
3689 A d
3688 A d
3690 a (no-changeset no-compatibility !)
3689 a (no-changeset no-compatibility !)
3691 A t
3690 A t
3692 p
3691 p
3693 A unrelated-l
3692 A unrelated-l
3694 R a
3693 R a
3695 R p
3694 R p
3696 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")'
3695 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")'
3697 M b
3696 M b
3698 A d
3697 A d
3699 a (no-changeset no-compatibility !)
3698 a (no-changeset no-compatibility !)
3700 A t
3699 A t
3701 p
3700 p
3702 A unrelated-l
3701 A unrelated-l
3703 R a
3702 R a
3704 R p
3703 R p
3705 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")'
3704 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")'
3706 M b
3705 M b
3707 A d
3706 A d
3708 a (no-changeset no-compatibility !)
3707 a (no-changeset no-compatibility !)
3709 A t
3708 A t
3710 p
3709 p
3711 A unrelated-l
3710 A unrelated-l
3712 R a
3711 R a
3713 R p
3712 R p
3714 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")'
3713 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")'
3715 M b
3714 M b
3716 A d
3715 A d
3717 a (no-changeset no-compatibility !)
3716 a (no-changeset no-compatibility !)
3718 A t
3717 A t
3719 p
3718 p
3720 A unrelated-l
3719 A unrelated-l
3721 R a
3720 R a
3722 R p
3721 R p
3723
3722
3724 Subcase: chaining "merged" information during a merge
3723 Subcase: chaining "merged" information during a merge
3725 ``````````````````````````````````````````````````````
3724 ``````````````````````````````````````````````````````
3726
3725
3727 When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges.
3726 When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges.
3728
3727
3729
3728
3730 reference output:
3729 reference output:
3731
3730
3732 (for details about the filelog pick, check the mFGm/mGFm case)
3731 (for details about the filelog pick, check the mFGm/mGFm case)
3733
3732
3734 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d
3733 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d
3735 A d
3734 A d
3736 a (filelog !)
3735 a (filelog !)
3737 h (sidedata !)
3736 h (sidedata !)
3738 h (upgraded !)
3737 h (upgraded !)
3739 h (upgraded-parallel !)
3738 h (upgraded-parallel !)
3740 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d
3739 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d
3741 A d
3740 A d
3742 a (filelog !)
3741 a (filelog !)
3743 a (sidedata !)
3742 a (sidedata !)
3744 a (upgraded !)
3743 a (upgraded !)
3745 a (upgraded-parallel !)
3744 a (upgraded-parallel !)
3746
3745
3747 Chained output
3746 Chained output
3748
3747
3749 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d
3748 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d
3750 A d
3749 A d
3751 a (filelog !)
3750 a (filelog !)
3752 h (sidedata !)
3751 h (sidedata !)
3753 h (upgraded !)
3752 h (upgraded !)
3754 h (upgraded-parallel !)
3753 h (upgraded-parallel !)
3755 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d
3754 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d
3756 A d
3755 A d
3757 a (filelog !)
3756 a (filelog !)
3758 h (sidedata !)
3757 h (sidedata !)
3759 h (upgraded !)
3758 h (upgraded !)
3760 h (upgraded-parallel !)
3759 h (upgraded-parallel !)
3761
3760
3762
3761
3763 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d
3762 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d
3764 A d
3763 A d
3765 a (no-changeset no-compatibility !)
3764 a (no-changeset no-compatibility !)
3766 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d
3765 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d
3767 A d
3766 A d
3768 a (no-changeset no-compatibility !)
3767 a (no-changeset no-compatibility !)
3769
3768
3770
3769
3771 Subcase: chaining conflicting rename resolution, with extra change during the merge
3770 Subcase: chaining conflicting rename resolution, with extra change during the merge
3772 ```````````````````````````````````````````````````````````````````````````````````
3771 ```````````````````````````````````````````````````````````````````````````````````
3773
3772
3774 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
3773 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
3775 add more change on the respective branch and merge again. These second merge
3774 add more change on the respective branch and merge again. These second merge
3776 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
3775 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
3777 about that file should stay unchanged.
3776 about that file should stay unchanged.
3778
3777
3779 The result from mAEm is the same for the subsequent merge:
3778 The result from mAEm is the same for the subsequent merge:
3780
3779
3781 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m")' f
3780 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m")' f
3782 A f
3781 A f
3783 a (filelog !)
3782 a (filelog !)
3784 a (sidedata !)
3783 a (sidedata !)
3785 a (upgraded !)
3784 a (upgraded !)
3786 a (upgraded-parallel !)
3785 a (upgraded-parallel !)
3787
3786
3788 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f
3787 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f
3789 A f
3788 A f
3790 a (filelog !)
3789 a (filelog !)
3791 a (sidedata !)
3790 a (sidedata !)
3792 a (upgraded !)
3791 a (upgraded !)
3793 a (upgraded-parallel !)
3792 a (upgraded-parallel !)
3794
3793
3795 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AE-change-m")' f
3794 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AE-change-m")' f
3796 A f
3795 A f
3797 a (no-changeset no-compatibility !)
3796 a (no-changeset no-compatibility !)
3798
3797
3799
3798
3800 The result from mEAm is the same for the subsequent merge:
3799 The result from mEAm is the same for the subsequent merge:
3801
3800
3802 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m")' f
3801 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m")' f
3803 A f
3802 A f
3804 a (filelog !)
3803 a (filelog !)
3805 b (sidedata !)
3804 b (sidedata !)
3806 b (upgraded !)
3805 b (upgraded !)
3807 b (upgraded-parallel !)
3806 b (upgraded-parallel !)
3808
3807
3809 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f
3808 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f
3810 A f
3809 A f
3811 a (filelog !)
3810 a (filelog !)
3812 b (sidedata !)
3811 b (sidedata !)
3813 b (upgraded !)
3812 b (upgraded !)
3814 b (upgraded-parallel !)
3813 b (upgraded-parallel !)
3815
3814
3816 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f
3815 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f
3817 A f
3816 A f
3818 a (filelog !)
3817 a (filelog !)
3819 b (sidedata !)
3818 b (sidedata !)
3820 b (upgraded !)
3819 b (upgraded !)
3821 b (upgraded-parallel !)
3820 b (upgraded-parallel !)
General Comments 0
You need to be logged in to leave comments. Login now