##// END OF EJS Templates
test: no longer directly use the sidedata config and requirements...
marmoute -
r48001:0dedd3d0 default
parent child Browse files
Show More
@@ -1,3881 +1,3872 b''
1 #testcases filelog compatibility changeset sidedata upgraded upgraded-parallel pull push pull-upgrade push-upgrade
1 #testcases filelog compatibility changeset sidedata upgraded upgraded-parallel pull push pull-upgrade push-upgrade
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
28
29 $ cat << EOF >> $HGRCPATH
29 $ cat << EOF >> $HGRCPATH
30 > [diff]
30 > [diff]
31 > git=yes
31 > git=yes
32 > [command-templates]
32 > [command-templates]
33 > log={desc}\n
33 > log={desc}\n
34 > EOF
34 > EOF
35
35
36 #if compatibility
36 #if compatibility
37 $ cat >> $HGRCPATH << EOF
37 $ cat >> $HGRCPATH << EOF
38 > [experimental]
38 > [experimental]
39 > copies.read-from = compatibility
39 > copies.read-from = compatibility
40 > EOF
40 > EOF
41 #endif
41 #endif
42
42
43 #if changeset
43 #if changeset
44 $ cat >> $HGRCPATH << EOF
44 $ cat >> $HGRCPATH << EOF
45 > [experimental]
45 > [experimental]
46 > copies.read-from = changeset-only
46 > copies.read-from = changeset-only
47 > copies.write-to = changeset-only
47 > copies.write-to = changeset-only
48 > EOF
48 > EOF
49 #endif
49 #endif
50
50
51 #if sidedata
51 #if sidedata
52 $ cat >> $HGRCPATH << EOF
52 $ cat >> $HGRCPATH << EOF
53 > [format]
53 > [format]
54 > exp-use-side-data = yes
55 > exp-use-copies-side-data-changeset = yes
54 > exp-use-copies-side-data-changeset = yes
56 > EOF
55 > EOF
57 #endif
56 #endif
58
57
59 #if pull
58 #if pull
60 $ cat >> $HGRCPATH << EOF
59 $ cat >> $HGRCPATH << EOF
61 > [format]
60 > [format]
62 > exp-use-side-data = yes
63 > exp-use-copies-side-data-changeset = yes
61 > exp-use-copies-side-data-changeset = yes
64 > EOF
62 > EOF
65 #endif
63 #endif
66
64
67 #if push
65 #if push
68 $ cat >> $HGRCPATH << EOF
66 $ cat >> $HGRCPATH << EOF
69 > [format]
67 > [format]
70 > exp-use-side-data = yes
71 > exp-use-copies-side-data-changeset = yes
68 > exp-use-copies-side-data-changeset = yes
72 > EOF
69 > EOF
73 #endif
70 #endif
74
71
75 #if pull-upgrade
72 #if pull-upgrade
76 $ cat >> $HGRCPATH << EOF
73 $ cat >> $HGRCPATH << EOF
77 > [format]
74 > [format]
78 > exp-use-side-data = no
79 > exp-use-copies-side-data-changeset = no
75 > exp-use-copies-side-data-changeset = no
80 > [experimental]
76 > [experimental]
81 > changegroup4 = yes
77 > changegroup4 = yes
82 > EOF
78 > EOF
83 #endif
79 #endif
84
80
85 #if push-upgrade
81 #if push-upgrade
86 $ cat >> $HGRCPATH << EOF
82 $ cat >> $HGRCPATH << EOF
87 > [format]
83 > [format]
88 > exp-use-side-data = no
89 > exp-use-copies-side-data-changeset = no
84 > exp-use-copies-side-data-changeset = no
90 > [experimental]
85 > [experimental]
91 > changegroup4 = yes
86 > changegroup4 = yes
92 > EOF
87 > EOF
93 #endif
88 #endif
94
89
95 $ cat > same-content.txt << EOF
90 $ cat > same-content.txt << EOF
96 > Here is some content that will be the same accros multiple file.
91 > Here is some content that will be the same accros multiple file.
97 >
92 >
98 > This is done on purpose so that we end up in some merge situation, were the
93 > This is done on purpose so that we end up in some merge situation, were the
99 > resulting content is the same as in the parent(s), but a new filenodes still
94 > resulting content is the same as in the parent(s), but a new filenodes still
100 > need to be created to record some file history information (especially
95 > need to be created to record some file history information (especially
101 > about copies).
96 > about copies).
102 > EOF
97 > EOF
103
98
104 $ hg init repo-chain
99 $ hg init repo-chain
105 $ cd repo-chain
100 $ cd repo-chain
106
101
107 Add some linear rename initialy
102 Add some linear rename initialy
108
103
109 $ cp ../same-content.txt a
104 $ cp ../same-content.txt a
110 $ cp ../same-content.txt b
105 $ cp ../same-content.txt b
111 $ cp ../same-content.txt h
106 $ cp ../same-content.txt h
112 $ echo "original content for P" > p
107 $ echo "original content for P" > p
113 $ echo "original content for Q" > q
108 $ echo "original content for Q" > q
114 $ echo "original content for R" > r
109 $ echo "original content for R" > r
115 $ hg ci -Am 'i-0 initial commit: a b h p q r'
110 $ hg ci -Am 'i-0 initial commit: a b h p q r'
116 adding a
111 adding a
117 adding b
112 adding b
118 adding h
113 adding h
119 adding p
114 adding p
120 adding q
115 adding q
121 adding r
116 adding r
122 $ hg mv a c
117 $ hg mv a c
123 $ hg mv p s
118 $ hg mv p s
124 $ hg ci -Am 'i-1: a -move-> c, p -move-> s'
119 $ hg ci -Am 'i-1: a -move-> c, p -move-> s'
125 $ hg mv c d
120 $ hg mv c d
126 $ hg mv s t
121 $ hg mv s t
127 $ hg ci -Am 'i-2: c -move-> d, s -move-> t'
122 $ hg ci -Am 'i-2: c -move-> d, s -move-> t'
128 $ hg log -G
123 $ hg log -G
129 @ i-2: c -move-> d, s -move-> t
124 @ i-2: c -move-> d, s -move-> t
130 |
125 |
131 o i-1: a -move-> c, p -move-> s
126 o i-1: a -move-> c, p -move-> s
132 |
127 |
133 o i-0 initial commit: a b h p q r
128 o i-0 initial commit: a b h p q r
134
129
135
130
136 And having another branch with renames on the other side
131 And having another branch with renames on the other side
137
132
138 $ hg mv d e
133 $ hg mv d e
139 $ hg ci -Am 'a-1: d -move-> e'
134 $ hg ci -Am 'a-1: d -move-> e'
140 $ hg mv e f
135 $ hg mv e f
141 $ hg ci -Am 'a-2: e -move-> f'
136 $ hg ci -Am 'a-2: e -move-> f'
142 $ hg log -G --rev '::.'
137 $ hg log -G --rev '::.'
143 @ a-2: e -move-> f
138 @ a-2: e -move-> f
144 |
139 |
145 o a-1: d -move-> e
140 o a-1: d -move-> e
146 |
141 |
147 o i-2: c -move-> d, s -move-> t
142 o i-2: c -move-> d, s -move-> t
148 |
143 |
149 o i-1: a -move-> c, p -move-> s
144 o i-1: a -move-> c, p -move-> s
150 |
145 |
151 o i-0 initial commit: a b h p q r
146 o i-0 initial commit: a b h p q r
152
147
153
148
154 Have a branching with nothing on one side
149 Have a branching with nothing on one side
155
150
156 $ hg up 'desc("i-2")'
151 $ hg up 'desc("i-2")'
157 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
152 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
158 $ echo foo > b
153 $ echo foo > b
159 $ hg ci -m 'b-1: b update'
154 $ hg ci -m 'b-1: b update'
160 created new head
155 created new head
161 $ hg log -G --rev '::.'
156 $ hg log -G --rev '::.'
162 @ b-1: b update
157 @ b-1: b update
163 |
158 |
164 o i-2: c -move-> d, s -move-> t
159 o i-2: c -move-> d, s -move-> t
165 |
160 |
166 o i-1: a -move-> c, p -move-> s
161 o i-1: a -move-> c, p -move-> s
167 |
162 |
168 o i-0 initial commit: a b h p q r
163 o i-0 initial commit: a b h p q r
169
164
170
165
171 Create a branch that delete a file previous renamed
166 Create a branch that delete a file previous renamed
172
167
173 $ hg up 'desc("i-2")'
168 $ hg up 'desc("i-2")'
174 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 $ hg rm d
170 $ hg rm d
176 $ hg ci -m 'c-1 delete d'
171 $ hg ci -m 'c-1 delete d'
177 created new head
172 created new head
178 $ hg log -G --rev '::.'
173 $ hg log -G --rev '::.'
179 @ c-1 delete d
174 @ c-1 delete d
180 |
175 |
181 o i-2: c -move-> d, s -move-> t
176 o i-2: c -move-> d, s -move-> t
182 |
177 |
183 o i-1: a -move-> c, p -move-> s
178 o i-1: a -move-> c, p -move-> s
184 |
179 |
185 o i-0 initial commit: a b h p q r
180 o i-0 initial commit: a b h p q r
186
181
187
182
188 Create a branch that delete a file previous renamed and recreate it
183 Create a branch that delete a file previous renamed and recreate it
189
184
190 $ hg up 'desc("i-2")'
185 $ hg up 'desc("i-2")'
191 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
186 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 $ hg rm d
187 $ hg rm d
193 $ hg ci -m 'd-1 delete d'
188 $ hg ci -m 'd-1 delete d'
194 created new head
189 created new head
195 $ echo bar > d
190 $ echo bar > d
196 $ hg add d
191 $ hg add d
197 $ hg ci -m 'd-2 re-add d'
192 $ hg ci -m 'd-2 re-add d'
198 $ hg log -G --rev '::.'
193 $ hg log -G --rev '::.'
199 @ d-2 re-add d
194 @ d-2 re-add d
200 |
195 |
201 o d-1 delete d
196 o d-1 delete d
202 |
197 |
203 o i-2: c -move-> d, s -move-> t
198 o i-2: c -move-> d, s -move-> t
204 |
199 |
205 o i-1: a -move-> c, p -move-> s
200 o i-1: a -move-> c, p -move-> s
206 |
201 |
207 o i-0 initial commit: a b h p q r
202 o i-0 initial commit: a b h p q r
208
203
209
204
210 Having another branch renaming a different file to the same filename as another
205 Having another branch renaming a different file to the same filename as another
211
206
212 $ hg up 'desc("i-2")'
207 $ hg up 'desc("i-2")'
213 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
208 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
214 $ hg mv b g
209 $ hg mv b g
215 $ hg ci -m 'e-1 b -move-> g'
210 $ hg ci -m 'e-1 b -move-> g'
216 created new head
211 created new head
217 $ hg mv g f
212 $ hg mv g f
218 $ hg ci -m 'e-2 g -move-> f'
213 $ hg ci -m 'e-2 g -move-> f'
219 $ hg log -G --rev '::.'
214 $ hg log -G --rev '::.'
220 @ e-2 g -move-> f
215 @ e-2 g -move-> f
221 |
216 |
222 o e-1 b -move-> g
217 o e-1 b -move-> g
223 |
218 |
224 o i-2: c -move-> d, s -move-> t
219 o i-2: c -move-> d, s -move-> t
225 |
220 |
226 o i-1: a -move-> c, p -move-> s
221 o i-1: a -move-> c, p -move-> s
227 |
222 |
228 o i-0 initial commit: a b h p q r
223 o i-0 initial commit: a b h p q r
229
224
230 $ hg up -q null
225 $ hg up -q null
231
226
232 Having a branch similar to the 'a' one, but moving the 'p' file around.
227 Having a branch similar to the 'a' one, but moving the 'p' file around.
233
228
234 $ hg up 'desc("i-2")'
229 $ hg up 'desc("i-2")'
235 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
230 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 $ hg mv t u
231 $ hg mv t u
237 $ hg ci -Am 'p-1: t -move-> u'
232 $ hg ci -Am 'p-1: t -move-> u'
238 created new head
233 created new head
239 $ hg mv u v
234 $ hg mv u v
240 $ hg ci -Am 'p-2: u -move-> v'
235 $ hg ci -Am 'p-2: u -move-> v'
241 $ hg log -G --rev '::.'
236 $ hg log -G --rev '::.'
242 @ p-2: u -move-> v
237 @ p-2: u -move-> v
243 |
238 |
244 o p-1: t -move-> u
239 o p-1: t -move-> u
245 |
240 |
246 o i-2: c -move-> d, s -move-> t
241 o i-2: c -move-> d, s -move-> t
247 |
242 |
248 o i-1: a -move-> c, p -move-> s
243 o i-1: a -move-> c, p -move-> s
249 |
244 |
250 o i-0 initial commit: a b h p q r
245 o i-0 initial commit: a b h p q r
251
246
252 $ hg up -q null
247 $ hg up -q null
253
248
254 Having another branch renaming a different file to the same filename as another
249 Having another branch renaming a different file to the same filename as another
255
250
256 $ hg up 'desc("i-2")'
251 $ hg up 'desc("i-2")'
257 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
252 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 $ hg mv r w
253 $ hg mv r w
259 $ hg ci -m 'q-1 r -move-> w'
254 $ hg ci -m 'q-1 r -move-> w'
260 created new head
255 created new head
261 $ hg mv w v
256 $ hg mv w v
262 $ hg ci -m 'q-2 w -move-> v'
257 $ hg ci -m 'q-2 w -move-> v'
263 $ hg log -G --rev '::.'
258 $ hg log -G --rev '::.'
264 @ q-2 w -move-> v
259 @ q-2 w -move-> v
265 |
260 |
266 o q-1 r -move-> w
261 o q-1 r -move-> w
267 |
262 |
268 o i-2: c -move-> d, s -move-> t
263 o i-2: c -move-> d, s -move-> t
269 |
264 |
270 o i-1: a -move-> c, p -move-> s
265 o i-1: a -move-> c, p -move-> s
271 |
266 |
272 o i-0 initial commit: a b h p q r
267 o i-0 initial commit: a b h p q r
273
268
274 $ hg up -q null
269 $ hg up -q null
275
270
276 Setup all merge
271 Setup all merge
277 ===============
272 ===============
278
273
279 This is done beforehand to validate that the upgrade process creates valid copy
274 This is done beforehand to validate that the upgrade process creates valid copy
280 information.
275 information.
281
276
282 merging with unrelated change does not interfere with the renames
277 merging with unrelated change does not interfere with the renames
283 ---------------------------------------------------------------
278 ---------------------------------------------------------------
284
279
285 - rename on one side
280 - rename on one side
286 - unrelated change on the other side
281 - unrelated change on the other side
287
282
288 $ case_desc="simple merge - A side: multiple renames, B side: unrelated update"
283 $ case_desc="simple merge - A side: multiple renames, B side: unrelated update"
289
284
290 $ hg up 'desc("b-1")'
285 $ hg up 'desc("b-1")'
291 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
286 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
292 $ hg merge 'desc("a-2")'
287 $ hg merge 'desc("a-2")'
293 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
288 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
294 (branch merge, don't forget to commit)
289 (branch merge, don't forget to commit)
295 $ hg ci -m "mBAm-0 $case_desc - one way"
290 $ hg ci -m "mBAm-0 $case_desc - one way"
296 $ hg up 'desc("a-2")'
291 $ hg up 'desc("a-2")'
297 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
292 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
298 $ hg merge 'desc("b-1")'
293 $ hg merge 'desc("b-1")'
299 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
294 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
300 (branch merge, don't forget to commit)
295 (branch merge, don't forget to commit)
301 $ hg ci -m "mABm-0 $case_desc - the other way"
296 $ hg ci -m "mABm-0 $case_desc - the other way"
302 created new head
297 created new head
303 $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))'
298 $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))'
304 @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
299 @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
305 |\
300 |\
306 +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
301 +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
307 | |/
302 | |/
308 | o b-1: b update
303 | o b-1: b update
309 | |
304 | |
310 o | a-2: e -move-> f
305 o | a-2: e -move-> f
311 | |
306 | |
312 o | a-1: d -move-> e
307 o | a-1: d -move-> e
313 |/
308 |/
314 o i-2: c -move-> d, s -move-> t
309 o i-2: c -move-> d, s -move-> t
315 |
310 |
316 o i-1: a -move-> c, p -move-> s
311 o i-1: a -move-> c, p -move-> s
317 |
312 |
318 o i-0 initial commit: a b h p q r
313 o i-0 initial commit: a b h p q r
319
314
320
315
321
316
322 merging with the side having a delete
317 merging with the side having a delete
323 -------------------------------------
318 -------------------------------------
324
319
325 case summary:
320 case summary:
326 - one with change to an unrelated file
321 - one with change to an unrelated file
327 - one deleting the change
322 - one deleting the change
328 and recreate an unrelated file after the merge
323 and recreate an unrelated file after the merge
329
324
330 $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update"
325 $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update"
331
326
332 $ hg up 'desc("b-1")'
327 $ hg up 'desc("b-1")'
333 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
328 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
334 $ hg merge 'desc("c-1")'
329 $ hg merge 'desc("c-1")'
335 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
330 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
336 (branch merge, don't forget to commit)
331 (branch merge, don't forget to commit)
337 $ hg ci -m "mBCm-0 $case_desc - one way"
332 $ hg ci -m "mBCm-0 $case_desc - one way"
338 $ echo bar > d
333 $ echo bar > d
339 $ hg add d
334 $ hg add d
340 $ hg ci -m 'mBCm-1 re-add d'
335 $ hg ci -m 'mBCm-1 re-add d'
341 $ hg up 'desc("c-1")'
336 $ hg up 'desc("c-1")'
342 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
337 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
343 $ hg merge 'desc("b-1")'
338 $ hg merge 'desc("b-1")'
344 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
339 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
345 (branch merge, don't forget to commit)
340 (branch merge, don't forget to commit)
346 $ hg ci -m "mCBm-0 $case_desc - the other way"
341 $ hg ci -m "mCBm-0 $case_desc - the other way"
347 created new head
342 created new head
348 $ echo bar > d
343 $ echo bar > d
349 $ hg add d
344 $ hg add d
350 $ hg ci -m 'mCBm-1 re-add d'
345 $ hg ci -m 'mCBm-1 re-add d'
351 $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))'
346 $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))'
352 @ mCBm-1 re-add d
347 @ mCBm-1 re-add d
353 |
348 |
354 o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
349 o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
355 |\
350 |\
356 | | o mBCm-1 re-add d
351 | | o mBCm-1 re-add d
357 | | |
352 | | |
358 +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
353 +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
359 | |/
354 | |/
360 | o c-1 delete d
355 | o c-1 delete d
361 | |
356 | |
362 o | b-1: b update
357 o | b-1: b update
363 |/
358 |/
364 o i-2: c -move-> d, s -move-> t
359 o i-2: c -move-> d, s -move-> t
365 |
360 |
366 o i-1: a -move-> c, p -move-> s
361 o i-1: a -move-> c, p -move-> s
367 |
362 |
368 o i-0 initial commit: a b h p q r
363 o i-0 initial commit: a b h p q r
369
364
370
365
371 Comparing with a merge re-adding the file afterward
366 Comparing with a merge re-adding the file afterward
372 ---------------------------------------------------
367 ---------------------------------------------------
373
368
374 Merge:
369 Merge:
375 - one with change to an unrelated file
370 - one with change to an unrelated file
376 - one deleting and recreating the change
371 - one deleting and recreating the change
377
372
378 $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)"
373 $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)"
379
374
380 $ hg up 'desc("b-1")'
375 $ hg up 'desc("b-1")'
381 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
376 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
382 $ hg merge 'desc("d-2")'
377 $ hg merge 'desc("d-2")'
383 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
378 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
384 (branch merge, don't forget to commit)
379 (branch merge, don't forget to commit)
385 $ hg ci -m "mBDm-0 $case_desc - one way"
380 $ hg ci -m "mBDm-0 $case_desc - one way"
386 $ hg up 'desc("d-2")'
381 $ hg up 'desc("d-2")'
387 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
382 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
388 $ hg merge 'desc("b-1")'
383 $ hg merge 'desc("b-1")'
389 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
384 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
390 (branch merge, don't forget to commit)
385 (branch merge, don't forget to commit)
391 $ hg ci -m "mDBm-0 $case_desc - the other way"
386 $ hg ci -m "mDBm-0 $case_desc - the other way"
392 created new head
387 created new head
393 $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))'
388 $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))'
394 @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
389 @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
395 |\
390 |\
396 +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
391 +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
397 | |/
392 | |/
398 | o d-2 re-add d
393 | o d-2 re-add d
399 | |
394 | |
400 | o d-1 delete d
395 | o d-1 delete d
401 | |
396 | |
402 o | b-1: b update
397 o | b-1: b update
403 |/
398 |/
404 o i-2: c -move-> d, s -move-> t
399 o i-2: c -move-> d, s -move-> t
405 |
400 |
406 o i-1: a -move-> c, p -move-> s
401 o i-1: a -move-> c, p -move-> s
407 |
402 |
408 o i-0 initial commit: a b h p q r
403 o i-0 initial commit: a b h p q r
409
404
410
405
411
406
412 Comparing with a merge with colliding rename
407 Comparing with a merge with colliding rename
413 --------------------------------------------
408 --------------------------------------------
414
409
415 Subcase: new copy information on both side
410 Subcase: new copy information on both side
416 ``````````````````````````````````````````
411 ``````````````````````````````````````````
417
412
418 - the "e-" branch renaming b to f (through 'g')
413 - the "e-" branch renaming b to f (through 'g')
419 - the "a-" branch renaming d to f (through e)
414 - the "a-" branch renaming d to f (through e)
420
415
421 $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)"
416 $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)"
422
417
423 $ hg up 'desc("a-2")'
418 $ hg up 'desc("a-2")'
424 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
419 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
425 $ hg merge 'desc("e-2")'
420 $ hg merge 'desc("e-2")'
426 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
421 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
427 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
422 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
428 (branch merge, don't forget to commit)
423 (branch merge, don't forget to commit)
429 $ hg ci -m "mAEm-0 $case_desc - one way"
424 $ hg ci -m "mAEm-0 $case_desc - one way"
430 $ hg up 'desc("e-2")'
425 $ hg up 'desc("e-2")'
431 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
426 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
432 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
427 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
433 $ hg merge 'desc("a-2")'
428 $ hg merge 'desc("a-2")'
434 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
429 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
435 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
430 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
436 (branch merge, don't forget to commit)
431 (branch merge, don't forget to commit)
437 $ hg ci -m "mEAm-0 $case_desc - the other way"
432 $ hg ci -m "mEAm-0 $case_desc - the other way"
438 created new head
433 created new head
439 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
434 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
440 @ 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
435 @ 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
441 |\
436 |\
442 +---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
437 +---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
443 | |/
438 | |/
444 | o e-2 g -move-> f
439 | o e-2 g -move-> f
445 | |
440 | |
446 | o e-1 b -move-> g
441 | o e-1 b -move-> g
447 | |
442 | |
448 o | a-2: e -move-> f
443 o | a-2: e -move-> f
449 | |
444 | |
450 o | a-1: d -move-> e
445 o | a-1: d -move-> e
451 |/
446 |/
452 o i-2: c -move-> d, s -move-> t
447 o i-2: c -move-> d, s -move-> t
453 |
448 |
454 o i-1: a -move-> c, p -move-> s
449 o i-1: a -move-> c, p -move-> s
455 |
450 |
456 o i-0 initial commit: a b h p q r
451 o i-0 initial commit: a b h p q r
457
452
458
453
459 Subcase: new copy information on both side with an actual merge happening
454 Subcase: new copy information on both side with an actual merge happening
460 `````````````````````````````````````````````````````````````````````````
455 `````````````````````````````````````````````````````````````````````````
461
456
462 - the "p-" branch renaming 't' to 'v' (through 'u')
457 - the "p-" branch renaming 't' to 'v' (through 'u')
463 - the "q-" branch renaming 'r' to 'v' (through 'w')
458 - the "q-" branch renaming 'r' to 'v' (through 'w')
464
459
465 $ case_desc="merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content)"
460 $ case_desc="merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content)"
466
461
467 $ hg up 'desc("p-2")'
462 $ hg up 'desc("p-2")'
468 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
463 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
469 $ hg merge 'desc("q-2")' --tool ':union'
464 $ hg merge 'desc("q-2")' --tool ':union'
470 merging v
465 merging v
471 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
466 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
472 (branch merge, don't forget to commit)
467 (branch merge, don't forget to commit)
473 $ hg ci -m "mPQm-0 $case_desc - one way"
468 $ hg ci -m "mPQm-0 $case_desc - one way"
474 $ hg up 'desc("q-2")'
469 $ hg up 'desc("q-2")'
475 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
470 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
476 $ hg merge 'desc("p-2")' --tool ':union'
471 $ hg merge 'desc("p-2")' --tool ':union'
477 merging v
472 merging v
478 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
473 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
479 (branch merge, don't forget to commit)
474 (branch merge, don't forget to commit)
480 $ hg ci -m "mQPm-0 $case_desc - the other way"
475 $ hg ci -m "mQPm-0 $case_desc - the other way"
481 created new head
476 created new head
482 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
477 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
483 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
478 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
484 |\
479 |\
485 +---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
480 +---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
486 | |/
481 | |/
487 | o e-2 g -move-> f
482 | o e-2 g -move-> f
488 | |
483 | |
489 | o e-1 b -move-> g
484 | o e-1 b -move-> g
490 | |
485 | |
491 o | a-2: e -move-> f
486 o | a-2: e -move-> f
492 | |
487 | |
493 o | a-1: d -move-> e
488 o | a-1: d -move-> e
494 |/
489 |/
495 o i-2: c -move-> d, s -move-> t
490 o i-2: c -move-> d, s -move-> t
496 |
491 |
497 o i-1: a -move-> c, p -move-> s
492 o i-1: a -move-> c, p -move-> s
498 |
493 |
499 o i-0 initial commit: a b h p q r
494 o i-0 initial commit: a b h p q r
500
495
501
496
502 Subcase: existing copy information overwritten on one branch
497 Subcase: existing copy information overwritten on one branch
503 ````````````````````````````````````````````````````````````
498 ````````````````````````````````````````````````````````````
504
499
505 Merge:
500 Merge:
506 - one with change to an unrelated file (b)
501 - one with change to an unrelated file (b)
507 - one overwriting a file (d) with a rename (from h to i to d)
502 - one overwriting a file (d) with a rename (from h to i to d)
508
503
509 $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)"
504 $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)"
510
505
511 $ hg up 'desc("i-2")'
506 $ hg up 'desc("i-2")'
512 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
507 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
513 $ hg mv h i
508 $ hg mv h i
514 $ hg commit -m "f-1: rename h -> i"
509 $ hg commit -m "f-1: rename h -> i"
515 created new head
510 created new head
516 $ hg mv --force i d
511 $ hg mv --force i d
517 $ hg commit -m "f-2: rename i -> d"
512 $ hg commit -m "f-2: rename i -> d"
518 $ hg debugindex d | "$PYTHON" ../no-linkrev
513 $ hg debugindex d | "$PYTHON" ../no-linkrev
519 rev linkrev nodeid p1 p2
514 rev linkrev nodeid p1 p2
520 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !)
515 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !)
521 0 * ae258f702dfe 000000000000 000000000000 (changeset !)
516 0 * ae258f702dfe 000000000000 000000000000 (changeset !)
522 1 * b004912a8510 000000000000 000000000000
517 1 * b004912a8510 000000000000 000000000000
523 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !)
518 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !)
524 $ hg up 'desc("b-1")'
519 $ hg up 'desc("b-1")'
525 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
520 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
526 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
521 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
527 $ hg merge 'desc("f-2")'
522 $ hg merge 'desc("f-2")'
528 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
523 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
529 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
524 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
530 (branch merge, don't forget to commit)
525 (branch merge, don't forget to commit)
531 $ hg ci -m "mBFm-0 $case_desc - one way"
526 $ hg ci -m "mBFm-0 $case_desc - one way"
532 $ hg up 'desc("f-2")'
527 $ hg up 'desc("f-2")'
533 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
528 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
534 $ hg merge 'desc("b-1")'
529 $ hg merge 'desc("b-1")'
535 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
530 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
536 (branch merge, don't forget to commit)
531 (branch merge, don't forget to commit)
537 $ hg ci -m "mFBm-0 $case_desc - the other way"
532 $ hg ci -m "mFBm-0 $case_desc - the other way"
538 created new head
533 created new head
539 $ hg up null --quiet
534 $ hg up null --quiet
540 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
535 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
541 o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
536 o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
542 |\
537 |\
543 +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
538 +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
544 | |/
539 | |/
545 | o f-2: rename i -> d
540 | o f-2: rename i -> d
546 | |
541 | |
547 | o f-1: rename h -> i
542 | o f-1: rename h -> i
548 | |
543 | |
549 o | b-1: b update
544 o | b-1: b update
550 |/
545 |/
551 o i-2: c -move-> d, s -move-> t
546 o i-2: c -move-> d, s -move-> t
552 |
547 |
553 o i-1: a -move-> c, p -move-> s
548 o i-1: a -move-> c, p -move-> s
554 |
549 |
555 o i-0 initial commit: a b h p q r
550 o i-0 initial commit: a b h p q r
556
551
557
552
558 Subcase: existing copy information overwritten on one branch, with different content)
553 Subcase: existing copy information overwritten on one branch, with different content)
559 `````````````````````````````````````````````````````````````````````````````````````
554 `````````````````````````````````````````````````````````````````````````````````````
560
555
561 Merge:
556 Merge:
562 - one with change to an unrelated file (b)
557 - one with change to an unrelated file (b)
563 - 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
558 - 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
564
559
565 $ case_desc="simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content"
560 $ case_desc="simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content"
566
561
567 $ hg up 'desc("i-2")'
562 $ hg up 'desc("i-2")'
568 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
563 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
569 $ hg mv r x
564 $ hg mv r x
570 $ hg commit -m "r-1: rename r -> x"
565 $ hg commit -m "r-1: rename r -> x"
571 created new head
566 created new head
572 $ hg mv --force x t
567 $ hg mv --force x t
573 $ hg commit -m "r-2: rename t -> x"
568 $ hg commit -m "r-2: rename t -> x"
574 $ hg debugindex t | "$PYTHON" ../no-linkrev
569 $ hg debugindex t | "$PYTHON" ../no-linkrev
575 rev linkrev nodeid p1 p2
570 rev linkrev nodeid p1 p2
576 0 * d74efbf65309 000000000000 000000000000 (no-changeset !)
571 0 * d74efbf65309 000000000000 000000000000 (no-changeset !)
577 1 * 02a930b9d7ad 000000000000 000000000000 (no-changeset !)
572 1 * 02a930b9d7ad 000000000000 000000000000 (no-changeset !)
578 0 * 5aed6a8dbff0 000000000000 000000000000 (changeset !)
573 0 * 5aed6a8dbff0 000000000000 000000000000 (changeset !)
579 1 * a38b2fa17021 000000000000 000000000000 (changeset !)
574 1 * a38b2fa17021 000000000000 000000000000 (changeset !)
580 $ hg up 'desc("b-1")'
575 $ hg up 'desc("b-1")'
581 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
576 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
582 $ hg merge 'desc("r-2")'
577 $ hg merge 'desc("r-2")'
583 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
578 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
584 (branch merge, don't forget to commit)
579 (branch merge, don't forget to commit)
585 $ hg ci -m "mBRm-0 $case_desc - one way"
580 $ hg ci -m "mBRm-0 $case_desc - one way"
586 $ hg up 'desc("r-2")'
581 $ hg up 'desc("r-2")'
587 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
582 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
588 $ hg merge 'desc("b-1")'
583 $ hg merge 'desc("b-1")'
589 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
584 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
590 (branch merge, don't forget to commit)
585 (branch merge, don't forget to commit)
591 $ hg ci -m "mRBm-0 $case_desc - the other way"
586 $ hg ci -m "mRBm-0 $case_desc - the other way"
592 created new head
587 created new head
593 $ hg up null --quiet
588 $ hg up null --quiet
594 $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))'
589 $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))'
595 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
590 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
596 |\
591 |\
597 +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
592 +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
598 | |/
593 | |/
599 | o r-2: rename t -> x
594 | o r-2: rename t -> x
600 | |
595 | |
601 | o r-1: rename r -> x
596 | o r-1: rename r -> x
602 | |
597 | |
603 o | b-1: b update
598 o | b-1: b update
604 |/
599 |/
605 o i-2: c -move-> d, s -move-> t
600 o i-2: c -move-> d, s -move-> t
606 |
601 |
607 o i-1: a -move-> c, p -move-> s
602 o i-1: a -move-> c, p -move-> s
608 |
603 |
609 o i-0 initial commit: a b h p q r
604 o i-0 initial commit: a b h p q r
610
605
611
606
612
607
613 Subcase: reset of the copy history on one side
608 Subcase: reset of the copy history on one side
614 ``````````````````````````````````````````````
609 ``````````````````````````````````````````````
615
610
616 Merge:
611 Merge:
617 - one with change to a file
612 - one with change to a file
618 - one deleting and recreating the file
613 - one deleting and recreating the file
619
614
620 Unlike in the 'BD/DB' cases, an actual merge happened here. So we should
615 Unlike in the 'BD/DB' cases, an actual merge happened here. So we should
621 consider history and rename on both branch of the merge.
616 consider history and rename on both branch of the merge.
622
617
623 $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content"
618 $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content"
624
619
625 $ hg up 'desc("i-2")'
620 $ hg up 'desc("i-2")'
626 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
621 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
627 $ echo "some update" >> d
622 $ echo "some update" >> d
628 $ hg commit -m "g-1: update d"
623 $ hg commit -m "g-1: update d"
629 created new head
624 created new head
630 $ hg up 'desc("d-2")'
625 $ hg up 'desc("d-2")'
631 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
626 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
632 $ hg merge 'desc("g-1")' --tool :union
627 $ hg merge 'desc("g-1")' --tool :union
633 merging d
628 merging d
634 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
629 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
635 (branch merge, don't forget to commit)
630 (branch merge, don't forget to commit)
636 $ hg ci -m "mDGm-0 $case_desc - one way"
631 $ hg ci -m "mDGm-0 $case_desc - one way"
637 $ hg up 'desc("g-1")'
632 $ hg up 'desc("g-1")'
638 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
633 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
639 $ hg merge 'desc("d-2")' --tool :union
634 $ hg merge 'desc("d-2")' --tool :union
640 merging d
635 merging d
641 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
636 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
642 (branch merge, don't forget to commit)
637 (branch merge, don't forget to commit)
643 $ hg ci -m "mGDm-0 $case_desc - the other way"
638 $ hg ci -m "mGDm-0 $case_desc - the other way"
644 created new head
639 created new head
645 $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))'
640 $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))'
646 @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
641 @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
647 |\
642 |\
648 +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
643 +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
649 | |/
644 | |/
650 | o g-1: update d
645 | o g-1: update d
651 | |
646 | |
652 o | d-2 re-add d
647 o | d-2 re-add d
653 | |
648 | |
654 o | d-1 delete d
649 o | d-1 delete d
655 |/
650 |/
656 o i-2: c -move-> d, s -move-> t
651 o i-2: c -move-> d, s -move-> t
657 |
652 |
658 o i-1: a -move-> c, p -move-> s
653 o i-1: a -move-> c, p -move-> s
659 |
654 |
660 o i-0 initial commit: a b h p q r
655 o i-0 initial commit: a b h p q r
661
656
662
657
663 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
658 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
664 ````````````````````````````````````````````````````````````````````````````````````````````
659 ````````````````````````````````````````````````````````````````````````````````````````````
665
660
666 Merge:
661 Merge:
667 - one with change to a file (d)
662 - one with change to a file (d)
668 - one overwriting that file with a rename (from h to i, to d)
663 - one overwriting that file with a rename (from h to i, to d)
669
664
670 This case is similar to BF/FB, but an actual merge happens, so both side of the
665 This case is similar to BF/FB, but an actual merge happens, so both side of the
671 history are relevant.
666 history are relevant.
672
667
673 Note:
668 Note:
674 | In this case, the merge get conflicting information since on one side we have
669 | In this case, the merge get conflicting information since on one side we have
675 | "a -> c -> d". and one the other one we have "h -> i -> d".
670 | "a -> c -> d". and one the other one we have "h -> i -> d".
676 |
671 |
677 | The current code arbitrarily pick one side
672 | The current code arbitrarily pick one side
678
673
679 $ case_desc="merge - G side: content change, F side: copy overwrite, no content change"
674 $ case_desc="merge - G side: content change, F side: copy overwrite, no content change"
680
675
681 $ hg up 'desc("f-2")'
676 $ hg up 'desc("f-2")'
682 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
677 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
683 $ hg merge 'desc("g-1")' --tool :union
678 $ hg merge 'desc("g-1")' --tool :union
684 merging d (no-changeset !)
679 merging d (no-changeset !)
685 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !)
680 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !)
686 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
681 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
687 (branch merge, don't forget to commit)
682 (branch merge, don't forget to commit)
688 $ hg ci -m "mFGm-0 $case_desc - one way"
683 $ hg ci -m "mFGm-0 $case_desc - one way"
689 created new head
684 created new head
690 $ hg up 'desc("g-1")'
685 $ hg up 'desc("g-1")'
691 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
686 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
692 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
687 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
693 $ hg merge 'desc("f-2")' --tool :union
688 $ hg merge 'desc("f-2")' --tool :union
694 merging d (no-changeset !)
689 merging d (no-changeset !)
695 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !)
690 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !)
696 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
691 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
697 (branch merge, don't forget to commit)
692 (branch merge, don't forget to commit)
698 $ hg ci -m "mGFm-0 $case_desc - the other way"
693 $ hg ci -m "mGFm-0 $case_desc - the other way"
699 created new head
694 created new head
700 $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))'
695 $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))'
701 @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
696 @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
702 |\
697 |\
703 +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
698 +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
704 | |/
699 | |/
705 | o g-1: update d
700 | o g-1: update d
706 | |
701 | |
707 o | f-2: rename i -> d
702 o | f-2: rename i -> d
708 | |
703 | |
709 o | f-1: rename h -> i
704 o | f-1: rename h -> i
710 |/
705 |/
711 o i-2: c -move-> d, s -move-> t
706 o i-2: c -move-> d, s -move-> t
712 |
707 |
713 o i-1: a -move-> c, p -move-> s
708 o i-1: a -move-> c, p -move-> s
714 |
709 |
715 o i-0 initial commit: a b h p q r
710 o i-0 initial commit: a b h p q r
716
711
717
712
718
713
719 Comparing with merging with a deletion (and keeping the file)
714 Comparing with merging with a deletion (and keeping the file)
720 -------------------------------------------------------------
715 -------------------------------------------------------------
721
716
722 Merge:
717 Merge:
723 - one removing a file (d)
718 - one removing a file (d)
724 - one updating that file
719 - one updating that file
725 - the merge keep the modified version of the file (canceling the delete)
720 - the merge keep the modified version of the file (canceling the delete)
726
721
727 In this case, the file keep on living after the merge. So we should not drop its
722 In this case, the file keep on living after the merge. So we should not drop its
728 copy tracing chain.
723 copy tracing chain.
729
724
730 $ case_desc="merge updated/deleted - revive the file (updated content)"
725 $ case_desc="merge updated/deleted - revive the file (updated content)"
731
726
732 $ hg up 'desc("c-1")'
727 $ hg up 'desc("c-1")'
733 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
728 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
734 $ hg merge 'desc("g-1")'
729 $ hg merge 'desc("g-1")'
735 file 'd' was deleted in local [working copy] but was modified in other [merge rev].
730 file 'd' was deleted in local [working copy] but was modified in other [merge rev].
736 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
731 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
737 What do you want to do? u
732 What do you want to do? u
738 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
733 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
739 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
734 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
740 [1]
735 [1]
741 $ hg resolve -t :other d
736 $ hg resolve -t :other d
742 (no more unresolved files)
737 (no more unresolved files)
743 $ hg ci -m "mCGm-0 $case_desc - one way"
738 $ hg ci -m "mCGm-0 $case_desc - one way"
744 created new head
739 created new head
745
740
746 $ hg up 'desc("g-1")'
741 $ hg up 'desc("g-1")'
747 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
742 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
748 $ hg merge 'desc("c-1")'
743 $ hg merge 'desc("c-1")'
749 file 'd' was deleted in other [merge rev] but was modified in local [working copy].
744 file 'd' was deleted in other [merge rev] but was modified in local [working copy].
750 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
745 You can use (c)hanged version, (d)elete, or leave (u)nresolved.
751 What do you want to do? u
746 What do you want to do? u
752 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
747 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
753 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
748 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
754 [1]
749 [1]
755 $ hg resolve -t :local d
750 $ hg resolve -t :local d
756 (no more unresolved files)
751 (no more unresolved files)
757 $ hg ci -m "mGCm-0 $case_desc - the other way"
752 $ hg ci -m "mGCm-0 $case_desc - the other way"
758 created new head
753 created new head
759
754
760 $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))'
755 $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))'
761 @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
756 @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
762 |\
757 |\
763 +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way
758 +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way
764 | |/
759 | |/
765 | o g-1: update d
760 | o g-1: update d
766 | |
761 | |
767 o | c-1 delete d
762 o | c-1 delete d
768 |/
763 |/
769 o i-2: c -move-> d, s -move-> t
764 o i-2: c -move-> d, s -move-> t
770 |
765 |
771 o i-1: a -move-> c, p -move-> s
766 o i-1: a -move-> c, p -move-> s
772 |
767 |
773 o i-0 initial commit: a b h p q r
768 o i-0 initial commit: a b h p q r
774
769
775
770
776
771
777
772
778 Comparing with merge restoring an untouched deleted file
773 Comparing with merge restoring an untouched deleted file
779 --------------------------------------------------------
774 --------------------------------------------------------
780
775
781 Merge:
776 Merge:
782 - one removing a file (d)
777 - one removing a file (d)
783 - one leaving the file untouched
778 - one leaving the file untouched
784 - the merge actively restore the file to the same content.
779 - the merge actively restore the file to the same content.
785
780
786 In this case, the file keep on living after the merge. So we should not drop its
781 In this case, the file keep on living after the merge. So we should not drop its
787 copy tracing chain.
782 copy tracing chain.
788
783
789 $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)"
784 $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)"
790
785
791 $ hg up 'desc("c-1")'
786 $ hg up 'desc("c-1")'
792 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
787 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
793 $ hg merge 'desc("b-1")'
788 $ hg merge 'desc("b-1")'
794 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
789 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
795 (branch merge, don't forget to commit)
790 (branch merge, don't forget to commit)
796 $ hg revert --rev 'desc("b-1")' d
791 $ hg revert --rev 'desc("b-1")' d
797 $ hg ci -m "mCB-revert-m-0 $case_desc - one way"
792 $ hg ci -m "mCB-revert-m-0 $case_desc - one way"
798 created new head
793 created new head
799
794
800 $ hg up 'desc("b-1")'
795 $ hg up 'desc("b-1")'
801 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
796 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
802 $ hg merge 'desc("c-1")'
797 $ hg merge 'desc("c-1")'
803 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
798 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
804 (branch merge, don't forget to commit)
799 (branch merge, don't forget to commit)
805 $ hg revert --rev 'desc("b-1")' d
800 $ hg revert --rev 'desc("b-1")' d
806 $ hg ci -m "mBC-revert-m-0 $case_desc - the other way"
801 $ hg ci -m "mBC-revert-m-0 $case_desc - the other way"
807 created new head
802 created new head
808
803
809 $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))'
804 $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))'
810 @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
805 @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
811 |\
806 |\
812 +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
807 +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
813 | |/
808 | |/
814 | o c-1 delete d
809 | o c-1 delete d
815 | |
810 | |
816 o | b-1: b update
811 o | b-1: b update
817 |/
812 |/
818 o i-2: c -move-> d, s -move-> t
813 o i-2: c -move-> d, s -move-> t
819 |
814 |
820 o i-1: a -move-> c, p -move-> s
815 o i-1: a -move-> c, p -move-> s
821 |
816 |
822 o i-0 initial commit: a b h p q r
817 o i-0 initial commit: a b h p q r
823
818
824
819
825
820
826 $ hg up null --quiet
821 $ hg up null --quiet
827
822
828 Merging a branch where a rename was deleted with a branch where the same file was renamed
823 Merging a branch where a rename was deleted with a branch where the same file was renamed
829 ------------------------------------------------------------------------------------------
824 ------------------------------------------------------------------------------------------
830
825
831 Create a "conflicting" merge where `d` get removed on one branch before its
826 Create a "conflicting" merge where `d` get removed on one branch before its
832 rename information actually conflict with the other branch.
827 rename information actually conflict with the other branch.
833
828
834 (the copy information from the branch that was not deleted should win).
829 (the copy information from the branch that was not deleted should win).
835
830
836 $ 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)"
831 $ 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)"
837
832
838 $ hg up 'desc("i-0")'
833 $ hg up 'desc("i-0")'
839 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
834 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
840 $ hg mv b d
835 $ hg mv b d
841 $ hg ci -m "h-1: b -(move)-> d"
836 $ hg ci -m "h-1: b -(move)-> d"
842 created new head
837 created new head
843
838
844 $ hg up 'desc("c-1")'
839 $ hg up 'desc("c-1")'
845 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
840 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
846 $ hg merge 'desc("h-1")'
841 $ hg merge 'desc("h-1")'
847 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
842 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
848 (branch merge, don't forget to commit)
843 (branch merge, don't forget to commit)
849 $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way"
844 $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way"
850
845
851 $ hg up 'desc("h-1")'
846 $ hg up 'desc("h-1")'
852 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
847 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
853 $ hg merge 'desc("c-1")'
848 $ hg merge 'desc("c-1")'
854 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
849 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
855 (branch merge, don't forget to commit)
850 (branch merge, don't forget to commit)
856 $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way"
851 $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way"
857 created new head
852 created new head
858 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
853 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
859 @ 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
854 @ 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
860 |\
855 |\
861 +---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
856 +---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
862 | |/
857 | |/
863 | o h-1: b -(move)-> d
858 | o h-1: b -(move)-> d
864 | |
859 | |
865 o | c-1 delete d
860 o | c-1 delete d
866 | |
861 | |
867 o | i-2: c -move-> d, s -move-> t
862 o | i-2: c -move-> d, s -move-> t
868 | |
863 | |
869 o | i-1: a -move-> c, p -move-> s
864 o | i-1: a -move-> c, p -move-> s
870 |/
865 |/
871 o i-0 initial commit: a b h p q r
866 o i-0 initial commit: a b h p q r
872
867
873
868
874 Variant of previous with extra changes introduced by the merge
869 Variant of previous with extra changes introduced by the merge
875 --------------------------------------------------------------
870 --------------------------------------------------------------
876
871
877 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.
872 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.
878
873
879
874
880 Subcase: merge has same initial content on both side, but merge introduced a change
875 Subcase: merge has same initial content on both side, but merge introduced a change
881 ```````````````````````````````````````````````````````````````````````````````````
876 ```````````````````````````````````````````````````````````````````````````````````
882
877
883 Same as `mAEm` and `mEAm` but with extra change to the file before commiting
878 Same as `mAEm` and `mEAm` but with extra change to the file before commiting
884
879
885 - the "e-" branch renaming b to f (through 'g')
880 - the "e-" branch renaming b to f (through 'g')
886 - the "a-" branch renaming d to f (through e)
881 - the "a-" branch renaming d to f (through e)
887
882
888 $ 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)"
883 $ 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)"
889
884
890 $ hg up 'desc("a-2")'
885 $ hg up 'desc("a-2")'
891 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
886 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
892 $ hg merge 'desc("e-2")'
887 $ hg merge 'desc("e-2")'
893 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
888 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
894 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
889 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
895 (branch merge, don't forget to commit)
890 (branch merge, don't forget to commit)
896 $ echo "content change for mAE-change-m" > f
891 $ echo "content change for mAE-change-m" > f
897 $ hg ci -m "mAE-change-m-0 $case_desc - one way"
892 $ hg ci -m "mAE-change-m-0 $case_desc - one way"
898 created new head
893 created new head
899 $ hg up 'desc("e-2")'
894 $ hg up 'desc("e-2")'
900 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
895 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
901 $ hg merge 'desc("a-2")'
896 $ hg merge 'desc("a-2")'
902 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
897 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
903 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
898 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
904 (branch merge, don't forget to commit)
899 (branch merge, don't forget to commit)
905 $ echo "content change for mEA-change-m" > f
900 $ echo "content change for mEA-change-m" > f
906 $ hg ci -m "mEA-change-m-0 $case_desc - the other way"
901 $ hg ci -m "mEA-change-m-0 $case_desc - the other way"
907 created new head
902 created new head
908 $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))'
903 $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))'
909 @ 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
904 @ 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
910 |\
905 |\
911 +---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
906 +---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
912 | |/
907 | |/
913 | o e-2 g -move-> f
908 | o e-2 g -move-> f
914 | |
909 | |
915 | o e-1 b -move-> g
910 | o e-1 b -move-> g
916 | |
911 | |
917 o | a-2: e -move-> f
912 o | a-2: e -move-> f
918 | |
913 | |
919 o | a-1: d -move-> e
914 o | a-1: d -move-> e
920 |/
915 |/
921 o i-2: c -move-> d, s -move-> t
916 o i-2: c -move-> d, s -move-> t
922 |
917 |
923 o i-1: a -move-> c, p -move-> s
918 o i-1: a -move-> c, p -move-> s
924 |
919 |
925 o i-0 initial commit: a b h p q r
920 o i-0 initial commit: a b h p q r
926
921
927
922
928 Subcase: merge overwrite common copy information, but with extra change during the merge
923 Subcase: merge overwrite common copy information, but with extra change during the merge
929 ````````````````````````````````````````````````````````````````````````````````````````
924 ````````````````````````````````````````````````````````````````````````````````````````
930
925
931 Merge:
926 Merge:
932 - one with change to an unrelated file (b)
927 - one with change to an unrelated file (b)
933 - one overwriting a file (d) with a rename (from h to i to d)
928 - one overwriting a file (d) with a rename (from h to i to d)
934 - the merge update f content
929 - the merge update f content
935
930
936 $ case_desc="merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)"
931 $ case_desc="merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)"
937
932
938 $ hg up 'desc("f-2")'
933 $ hg up 'desc("f-2")'
939 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
934 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
940 #if no-changeset
935 #if no-changeset
941 $ hg debugindex d | "$PYTHON" ../no-linkrev
936 $ hg debugindex d | "$PYTHON" ../no-linkrev
942 rev linkrev nodeid p1 p2
937 rev linkrev nodeid p1 p2
943 0 * d8252ab2e760 000000000000 000000000000
938 0 * d8252ab2e760 000000000000 000000000000
944 1 * b004912a8510 000000000000 000000000000
939 1 * b004912a8510 000000000000 000000000000
945 2 * 7b79e2fe0c89 000000000000 000000000000
940 2 * 7b79e2fe0c89 000000000000 000000000000
946 3 * 17ec97e60577 d8252ab2e760 000000000000
941 3 * 17ec97e60577 d8252ab2e760 000000000000
947 4 * 06dabf50734c b004912a8510 17ec97e60577
942 4 * 06dabf50734c b004912a8510 17ec97e60577
948 5 * 19c0e3924691 17ec97e60577 b004912a8510
943 5 * 19c0e3924691 17ec97e60577 b004912a8510
949 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577
944 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577
950 7 * d55cb4e9ef57 000000000000 000000000000
945 7 * d55cb4e9ef57 000000000000 000000000000
951 #else
946 #else
952 $ hg debugindex d | "$PYTHON" ../no-linkrev
947 $ hg debugindex d | "$PYTHON" ../no-linkrev
953 rev linkrev nodeid p1 p2
948 rev linkrev nodeid p1 p2
954 0 * ae258f702dfe 000000000000 000000000000
949 0 * ae258f702dfe 000000000000 000000000000
955 1 * b004912a8510 000000000000 000000000000
950 1 * b004912a8510 000000000000 000000000000
956 2 * 5cce88bf349f ae258f702dfe 000000000000
951 2 * 5cce88bf349f ae258f702dfe 000000000000
957 3 * cc269dd788c8 b004912a8510 5cce88bf349f
952 3 * cc269dd788c8 b004912a8510 5cce88bf349f
958 4 * 51c91a115080 5cce88bf349f b004912a8510
953 4 * 51c91a115080 5cce88bf349f b004912a8510
959 #endif
954 #endif
960 $ hg up 'desc("b-1")'
955 $ hg up 'desc("b-1")'
961 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
956 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
962 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
957 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
963 $ hg merge 'desc("f-2")'
958 $ hg merge 'desc("f-2")'
964 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
959 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
965 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
960 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
966 (branch merge, don't forget to commit)
961 (branch merge, don't forget to commit)
967 $ echo "extra-change to (formelly h) during the merge" > d
962 $ echo "extra-change to (formelly h) during the merge" > d
968 $ hg ci -m "mBF-change-m-0 $case_desc - one way"
963 $ hg ci -m "mBF-change-m-0 $case_desc - one way"
969 created new head
964 created new head
970 $ hg manifest --rev . --debug | grep " d"
965 $ hg manifest --rev . --debug | grep " d"
971 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !)
966 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !)
972 cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !)
967 cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !)
973
968
974 $ hg up 'desc("f-2")'
969 $ hg up 'desc("f-2")'
975 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
970 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
976 $ hg merge 'desc("b-1")'
971 $ hg merge 'desc("b-1")'
977 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
972 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
978 (branch merge, don't forget to commit)
973 (branch merge, don't forget to commit)
979 $ echo "extra-change to (formelly h) during the merge" > d
974 $ echo "extra-change to (formelly h) during the merge" > d
980 $ hg ci -m "mFB-change-m-0 $case_desc - the other way"
975 $ hg ci -m "mFB-change-m-0 $case_desc - the other way"
981 created new head
976 created new head
982 $ hg manifest --rev . --debug | grep " d"
977 $ hg manifest --rev . --debug | grep " d"
983 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !)
978 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !)
984 cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !)
979 cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !)
985 #if no-changeset
980 #if no-changeset
986 $ hg debugindex d | "$PYTHON" ../no-linkrev
981 $ hg debugindex d | "$PYTHON" ../no-linkrev
987 rev linkrev nodeid p1 p2
982 rev linkrev nodeid p1 p2
988 0 * d8252ab2e760 000000000000 000000000000
983 0 * d8252ab2e760 000000000000 000000000000
989 1 * b004912a8510 000000000000 000000000000
984 1 * b004912a8510 000000000000 000000000000
990 2 * 7b79e2fe0c89 000000000000 000000000000
985 2 * 7b79e2fe0c89 000000000000 000000000000
991 3 * 17ec97e60577 d8252ab2e760 000000000000
986 3 * 17ec97e60577 d8252ab2e760 000000000000
992 4 * 06dabf50734c b004912a8510 17ec97e60577
987 4 * 06dabf50734c b004912a8510 17ec97e60577
993 5 * 19c0e3924691 17ec97e60577 b004912a8510
988 5 * 19c0e3924691 17ec97e60577 b004912a8510
994 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577
989 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577
995 7 * d55cb4e9ef57 000000000000 000000000000
990 7 * d55cb4e9ef57 000000000000 000000000000
996 8 * 1c334238bd42 7b79e2fe0c89 000000000000
991 8 * 1c334238bd42 7b79e2fe0c89 000000000000
997 #else
992 #else
998 $ hg debugindex d | "$PYTHON" ../no-linkrev
993 $ hg debugindex d | "$PYTHON" ../no-linkrev
999 rev linkrev nodeid p1 p2
994 rev linkrev nodeid p1 p2
1000 0 * ae258f702dfe 000000000000 000000000000
995 0 * ae258f702dfe 000000000000 000000000000
1001 1 * b004912a8510 000000000000 000000000000
996 1 * b004912a8510 000000000000 000000000000
1002 2 * 5cce88bf349f ae258f702dfe 000000000000
997 2 * 5cce88bf349f ae258f702dfe 000000000000
1003 3 * cc269dd788c8 b004912a8510 5cce88bf349f
998 3 * cc269dd788c8 b004912a8510 5cce88bf349f
1004 4 * 51c91a115080 5cce88bf349f b004912a8510
999 4 * 51c91a115080 5cce88bf349f b004912a8510
1005 5 * cea2d99c0fde ae258f702dfe 000000000000
1000 5 * cea2d99c0fde ae258f702dfe 000000000000
1006 #endif
1001 #endif
1007 $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))'
1002 $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))'
1008 @ 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
1003 @ 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
1009 |\
1004 |\
1010 +---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
1005 +---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
1011 | |/
1006 | |/
1012 | o f-2: rename i -> d
1007 | o f-2: rename i -> d
1013 | |
1008 | |
1014 | o f-1: rename h -> i
1009 | o f-1: rename h -> i
1015 | |
1010 | |
1016 o | b-1: b update
1011 o | b-1: b update
1017 |/
1012 |/
1018 o i-2: c -move-> d, s -move-> t
1013 o i-2: c -move-> d, s -move-> t
1019 |
1014 |
1020 o i-1: a -move-> c, p -move-> s
1015 o i-1: a -move-> c, p -move-> s
1021 |
1016 |
1022 o i-0 initial commit: a b h p q r
1017 o i-0 initial commit: a b h p q r
1023
1018
1024
1019
1025 Subcase: restoring and untouched deleted file, while touching it
1020 Subcase: restoring and untouched deleted file, while touching it
1026 ````````````````````````````````````````````````````````````````
1021 ````````````````````````````````````````````````````````````````
1027
1022
1028 Merge:
1023 Merge:
1029 - one removing a file (d)
1024 - one removing a file (d)
1030 - one leaving the file untouched
1025 - one leaving the file untouched
1031 - the merge actively restore the file to the same content.
1026 - the merge actively restore the file to the same content.
1032
1027
1033 In this case, the file keep on living after the merge. So we should not drop its
1028 In this case, the file keep on living after the merge. So we should not drop its
1034 copy tracing chain.
1029 copy tracing chain.
1035
1030
1036 $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)"
1031 $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)"
1037
1032
1038 $ hg up 'desc("c-1")'
1033 $ hg up 'desc("c-1")'
1039 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1034 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1040 $ hg merge 'desc("b-1")'
1035 $ hg merge 'desc("b-1")'
1041 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1036 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1042 (branch merge, don't forget to commit)
1037 (branch merge, don't forget to commit)
1043 $ hg revert --rev 'desc("b-1")' d
1038 $ hg revert --rev 'desc("b-1")' d
1044 $ echo "new content for d after the revert" > d
1039 $ echo "new content for d after the revert" > d
1045 $ hg ci -m "mCB-change-m-0 $case_desc - one way"
1040 $ hg ci -m "mCB-change-m-0 $case_desc - one way"
1046 created new head
1041 created new head
1047 $ hg manifest --rev . --debug | grep " d"
1042 $ hg manifest --rev . --debug | grep " d"
1048 e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !)
1043 e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !)
1049 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !)
1044 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !)
1050
1045
1051 $ hg up 'desc("b-1")'
1046 $ hg up 'desc("b-1")'
1052 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1047 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1053 $ hg merge 'desc("c-1")'
1048 $ hg merge 'desc("c-1")'
1054 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1049 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1055 (branch merge, don't forget to commit)
1050 (branch merge, don't forget to commit)
1056 $ hg revert --rev 'desc("b-1")' d
1051 $ hg revert --rev 'desc("b-1")' d
1057 $ echo "new content for d after the revert" > d
1052 $ echo "new content for d after the revert" > d
1058 $ hg ci -m "mBC-change-m-0 $case_desc - the other way"
1053 $ hg ci -m "mBC-change-m-0 $case_desc - the other way"
1059 created new head
1054 created new head
1060 $ hg manifest --rev . --debug | grep " d"
1055 $ hg manifest --rev . --debug | grep " d"
1061 e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !)
1056 e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !)
1062 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !)
1057 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !)
1063
1058
1064
1059
1065 $ hg up null --quiet
1060 $ hg up null --quiet
1066 $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))'
1061 $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))'
1067 o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1062 o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1068 |\
1063 |\
1069 +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1064 +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1070 | |/
1065 | |/
1071 | o c-1 delete d
1066 | o c-1 delete d
1072 | |
1067 | |
1073 o | b-1: b update
1068 o | b-1: b update
1074 |/
1069 |/
1075 o i-2: c -move-> d, s -move-> t
1070 o i-2: c -move-> d, s -move-> t
1076 |
1071 |
1077 o i-1: a -move-> c, p -move-> s
1072 o i-1: a -move-> c, p -move-> s
1078 |
1073 |
1079 o i-0 initial commit: a b h p q r
1074 o i-0 initial commit: a b h p q r
1080
1075
1081
1076
1082 Decision from previous merge are properly chained with later merge
1077 Decision from previous merge are properly chained with later merge
1083 ------------------------------------------------------------------
1078 ------------------------------------------------------------------
1084
1079
1085 Subcase: chaining conflicting rename resolution
1080 Subcase: chaining conflicting rename resolution
1086 ```````````````````````````````````````````````
1081 ```````````````````````````````````````````````
1087
1082
1088 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
1083 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
1089 add more change on the respective branch and merge again. These second merge
1084 add more change on the respective branch and merge again. These second merge
1090 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
1085 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
1091 about that file should stay unchanged.
1086 about that file should stay unchanged.
1092
1087
1093 We also touch J during some of the merge to check for unrelated change to new file during merge.
1088 We also touch J during some of the merge to check for unrelated change to new file during merge.
1094
1089
1095 $ case_desc="chained merges (conflict -> simple) - same content everywhere"
1090 $ case_desc="chained merges (conflict -> simple) - same content everywhere"
1096
1091
1097 (extra unrelated changes)
1092 (extra unrelated changes)
1098
1093
1099 $ hg up 'desc("a-2")'
1094 $ hg up 'desc("a-2")'
1100 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
1095 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
1101 $ echo j > unrelated-j
1096 $ echo j > unrelated-j
1102 $ hg add unrelated-j
1097 $ hg add unrelated-j
1103 $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)'
1098 $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)'
1104 created new head
1099 created new head
1105
1100
1106 $ hg up 'desc("e-2")'
1101 $ hg up 'desc("e-2")'
1107 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1102 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1108 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1103 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1109 $ echo k > unrelated-k
1104 $ echo k > unrelated-k
1110 $ hg add unrelated-k
1105 $ hg add unrelated-k
1111 $ hg ci -m 'k-1: unrelated changes (based on "e" changes)'
1106 $ hg ci -m 'k-1: unrelated changes (based on "e" changes)'
1112 created new head
1107 created new head
1113
1108
1114 (merge variant 1)
1109 (merge variant 1)
1115
1110
1116 $ hg up 'desc("mAEm")'
1111 $ hg up 'desc("mAEm")'
1117 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1112 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1118 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1113 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1119 $ hg merge 'desc("k-1")'
1114 $ hg merge 'desc("k-1")'
1120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1115 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1121 (branch merge, don't forget to commit)
1116 (branch merge, don't forget to commit)
1122 $ hg ci -m "mAE,Km: $case_desc"
1117 $ hg ci -m "mAE,Km: $case_desc"
1123
1118
1124 (merge variant 2)
1119 (merge variant 2)
1125
1120
1126 $ hg up 'desc("k-1")'
1121 $ hg up 'desc("k-1")'
1127 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1122 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1128 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1123 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1129
1124
1130 $ hg merge 'desc("mAEm")'
1125 $ hg merge 'desc("mAEm")'
1131 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1126 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1132 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1127 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1133 (branch merge, don't forget to commit)
1128 (branch merge, don't forget to commit)
1134 $ hg ci -m "mK,AEm: $case_desc"
1129 $ hg ci -m "mK,AEm: $case_desc"
1135 created new head
1130 created new head
1136
1131
1137 (merge variant 3)
1132 (merge variant 3)
1138
1133
1139 $ hg up 'desc("mEAm")'
1134 $ hg up 'desc("mEAm")'
1140 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1135 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1141 $ hg merge 'desc("j-1")'
1136 $ hg merge 'desc("j-1")'
1142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1137 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1143 (branch merge, don't forget to commit)
1138 (branch merge, don't forget to commit)
1144 $ echo jj > unrelated-j
1139 $ echo jj > unrelated-j
1145 $ hg ci -m "mEA,Jm: $case_desc"
1140 $ hg ci -m "mEA,Jm: $case_desc"
1146
1141
1147 (merge variant 4)
1142 (merge variant 4)
1148
1143
1149 $ hg up 'desc("j-1")'
1144 $ hg up 'desc("j-1")'
1150 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1145 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1151 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1146 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1152 $ hg merge 'desc("mEAm")'
1147 $ hg merge 'desc("mEAm")'
1153 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1148 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1154 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1149 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1155 (branch merge, don't forget to commit)
1150 (branch merge, don't forget to commit)
1156 $ echo jj > unrelated-j
1151 $ echo jj > unrelated-j
1157 $ hg ci -m "mJ,EAm: $case_desc"
1152 $ hg ci -m "mJ,EAm: $case_desc"
1158 created new head
1153 created new head
1159
1154
1160
1155
1161 $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))'
1156 $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))'
1162 @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere
1157 @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere
1163 |\
1158 |\
1164 +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere
1159 +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere
1165 | |/
1160 | |/
1166 | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere
1161 | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere
1167 | | |\
1162 | | |\
1168 | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere
1163 | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere
1169 | | | |/
1164 | | | |/
1170 | | | o k-1: unrelated changes (based on "e" changes)
1165 | | | o k-1: unrelated changes (based on "e" changes)
1171 | | | |
1166 | | | |
1172 | o | | j-1: unrelated changes (based on the "a" series of changes)
1167 | o | | j-1: unrelated changes (based on the "a" series of changes)
1173 | | | |
1168 | | | |
1174 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
1169 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
1175 |/ / /
1170 |/ / /
1176 | 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
1171 | 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
1177 |/|/
1172 |/|/
1178 | o e-2 g -move-> f
1173 | o e-2 g -move-> f
1179 | |
1174 | |
1180 | o e-1 b -move-> g
1175 | o e-1 b -move-> g
1181 | |
1176 | |
1182 o | a-2: e -move-> f
1177 o | a-2: e -move-> f
1183 | |
1178 | |
1184 o | a-1: d -move-> e
1179 o | a-1: d -move-> e
1185 |/
1180 |/
1186 o i-2: c -move-> d, s -move-> t
1181 o i-2: c -move-> d, s -move-> t
1187 |
1182 |
1188 o i-1: a -move-> c, p -move-> s
1183 o i-1: a -move-> c, p -move-> s
1189 |
1184 |
1190 o i-0 initial commit: a b h p q r
1185 o i-0 initial commit: a b h p q r
1191
1186
1192
1187
1193 Subcase: chaining conflicting rename resolution, with actual merging happening
1188 Subcase: chaining conflicting rename resolution, with actual merging happening
1194 ``````````````````````````````````````````````````````````````````````````````
1189 ``````````````````````````````````````````````````````````````````````````````
1195
1190
1196 The "mPQm" and "mQPm" case create a rename tracking conflict on file 't'. We
1191 The "mPQm" and "mQPm" case create a rename tracking conflict on file 't'. We
1197 add more change on the respective branch and merge again. These second merge
1192 add more change on the respective branch and merge again. These second merge
1198 does not involve the file 't' and the arbitration done within "mPQm" and "mQP"
1193 does not involve the file 't' and the arbitration done within "mPQm" and "mQP"
1199 about that file should stay unchanged.
1194 about that file should stay unchanged.
1200
1195
1201 $ case_desc="chained merges (conflict -> simple) - different content"
1196 $ case_desc="chained merges (conflict -> simple) - different content"
1202
1197
1203 (extra unrelated changes)
1198 (extra unrelated changes)
1204
1199
1205 $ hg up 'desc("p-2")'
1200 $ hg up 'desc("p-2")'
1206 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
1201 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
1207 $ echo s > unrelated-s
1202 $ echo s > unrelated-s
1208 $ hg add unrelated-s
1203 $ hg add unrelated-s
1209 $ hg ci -m 's-1: unrelated changes (based on the "p" series of changes)'
1204 $ hg ci -m 's-1: unrelated changes (based on the "p" series of changes)'
1210 created new head
1205 created new head
1211
1206
1212 $ hg up 'desc("q-2")'
1207 $ hg up 'desc("q-2")'
1213 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
1208 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
1214 $ echo t > unrelated-t
1209 $ echo t > unrelated-t
1215 $ hg add unrelated-t
1210 $ hg add unrelated-t
1216 $ hg ci -m 't-1: unrelated changes (based on "q" changes)'
1211 $ hg ci -m 't-1: unrelated changes (based on "q" changes)'
1217 created new head
1212 created new head
1218
1213
1219 (merge variant 1)
1214 (merge variant 1)
1220
1215
1221 $ hg up 'desc("mPQm")'
1216 $ hg up 'desc("mPQm")'
1222 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
1217 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
1223 $ hg merge 'desc("t-1")'
1218 $ hg merge 'desc("t-1")'
1224 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1219 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1225 (branch merge, don't forget to commit)
1220 (branch merge, don't forget to commit)
1226 $ hg ci -m "mPQ,Tm: $case_desc"
1221 $ hg ci -m "mPQ,Tm: $case_desc"
1227
1222
1228 (merge variant 2)
1223 (merge variant 2)
1229
1224
1230 $ hg up 'desc("t-1")'
1225 $ hg up 'desc("t-1")'
1231 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1226 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1232
1227
1233 $ hg merge 'desc("mPQm")'
1228 $ hg merge 'desc("mPQm")'
1234 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1229 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1235 (branch merge, don't forget to commit)
1230 (branch merge, don't forget to commit)
1236 $ hg ci -m "mT,PQm: $case_desc"
1231 $ hg ci -m "mT,PQm: $case_desc"
1237 created new head
1232 created new head
1238
1233
1239 (merge variant 3)
1234 (merge variant 3)
1240
1235
1241 $ hg up 'desc("mQPm")'
1236 $ hg up 'desc("mQPm")'
1242 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1237 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1243 $ hg merge 'desc("s-1")'
1238 $ hg merge 'desc("s-1")'
1244 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1239 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1245 (branch merge, don't forget to commit)
1240 (branch merge, don't forget to commit)
1246 $ hg ci -m "mQP,Sm: $case_desc"
1241 $ hg ci -m "mQP,Sm: $case_desc"
1247
1242
1248 (merge variant 4)
1243 (merge variant 4)
1249
1244
1250 $ hg up 'desc("s-1")'
1245 $ hg up 'desc("s-1")'
1251 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1246 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1252 $ hg merge 'desc("mQPm")'
1247 $ hg merge 'desc("mQPm")'
1253 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1248 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1254 (branch merge, don't forget to commit)
1249 (branch merge, don't forget to commit)
1255 $ hg ci -m "mS,QPm: $case_desc"
1250 $ hg ci -m "mS,QPm: $case_desc"
1256 created new head
1251 created new head
1257 $ hg up null --quiet
1252 $ hg up null --quiet
1258
1253
1259
1254
1260 $ hg log -G --rev '::(desc("mPQ,Tm") + desc("mT,PQm") + desc("mQP,Sm") + desc("mS,QPm"))'
1255 $ hg log -G --rev '::(desc("mPQ,Tm") + desc("mT,PQm") + desc("mQP,Sm") + desc("mS,QPm"))'
1261 o mS,QPm: chained merges (conflict -> simple) - different content
1256 o mS,QPm: chained merges (conflict -> simple) - different content
1262 |\
1257 |\
1263 +---o mQP,Sm: chained merges (conflict -> simple) - different content
1258 +---o mQP,Sm: chained merges (conflict -> simple) - different content
1264 | |/
1259 | |/
1265 | | o mT,PQm: chained merges (conflict -> simple) - different content
1260 | | o mT,PQm: chained merges (conflict -> simple) - different content
1266 | | |\
1261 | | |\
1267 | | +---o mPQ,Tm: chained merges (conflict -> simple) - different content
1262 | | +---o mPQ,Tm: chained merges (conflict -> simple) - different content
1268 | | | |/
1263 | | | |/
1269 | | | o t-1: unrelated changes (based on "q" changes)
1264 | | | o t-1: unrelated changes (based on "q" changes)
1270 | | | |
1265 | | | |
1271 | o | | s-1: unrelated changes (based on the "p" series of changes)
1266 | o | | s-1: unrelated changes (based on the "p" series of changes)
1272 | | | |
1267 | | | |
1273 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
1268 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
1274 |/ / /
1269 |/ / /
1275 | 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
1270 | 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
1276 |/|/
1271 |/|/
1277 | o q-2 w -move-> v
1272 | o q-2 w -move-> v
1278 | |
1273 | |
1279 | o q-1 r -move-> w
1274 | o q-1 r -move-> w
1280 | |
1275 | |
1281 o | p-2: u -move-> v
1276 o | p-2: u -move-> v
1282 | |
1277 | |
1283 o | p-1: t -move-> u
1278 o | p-1: t -move-> u
1284 |/
1279 |/
1285 o i-2: c -move-> d, s -move-> t
1280 o i-2: c -move-> d, s -move-> t
1286 |
1281 |
1287 o i-1: a -move-> c, p -move-> s
1282 o i-1: a -move-> c, p -move-> s
1288 |
1283 |
1289 o i-0 initial commit: a b h p q r
1284 o i-0 initial commit: a b h p q r
1290
1285
1291
1286
1292 Subcase: chaining salvage information during a merge
1287 Subcase: chaining salvage information during a merge
1293 ````````````````````````````````````````````````````
1288 ````````````````````````````````````````````````````
1294
1289
1295 We add more change on the branch were the file was deleted. merging again
1290 We add more change on the branch were the file was deleted. merging again
1296 should preserve the fact eh file was salvaged.
1291 should preserve the fact eh file was salvaged.
1297
1292
1298 $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)"
1293 $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)"
1299
1294
1300 (creating the change)
1295 (creating the change)
1301
1296
1302 $ hg up 'desc("c-1")'
1297 $ hg up 'desc("c-1")'
1303 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1298 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1304 $ echo l > unrelated-l
1299 $ echo l > unrelated-l
1305 $ hg add unrelated-l
1300 $ hg add unrelated-l
1306 $ hg ci -m 'l-1: unrelated changes (based on "c" changes)'
1301 $ hg ci -m 'l-1: unrelated changes (based on "c" changes)'
1307 created new head
1302 created new head
1308
1303
1309 (Merge variant 1)
1304 (Merge variant 1)
1310
1305
1311 $ hg up 'desc("mBC-revert-m")'
1306 $ hg up 'desc("mBC-revert-m")'
1312 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1307 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1313 $ hg merge 'desc("l-1")'
1308 $ hg merge 'desc("l-1")'
1314 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1309 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1315 (branch merge, don't forget to commit)
1310 (branch merge, don't forget to commit)
1316 $ hg ci -m "mBC+revert,Lm: $case_desc"
1311 $ hg ci -m "mBC+revert,Lm: $case_desc"
1317
1312
1318 (Merge variant 2)
1313 (Merge variant 2)
1319
1314
1320 $ hg up 'desc("mCB-revert-m")'
1315 $ hg up 'desc("mCB-revert-m")'
1321 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1316 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1322 $ hg merge 'desc("l-1")'
1317 $ hg merge 'desc("l-1")'
1323 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1318 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1324 (branch merge, don't forget to commit)
1319 (branch merge, don't forget to commit)
1325 $ hg ci -m "mCB+revert,Lm: $case_desc"
1320 $ hg ci -m "mCB+revert,Lm: $case_desc"
1326
1321
1327 (Merge variant 3)
1322 (Merge variant 3)
1328
1323
1329 $ hg up 'desc("l-1")'
1324 $ hg up 'desc("l-1")'
1330 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1325 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1331
1326
1332 $ hg merge 'desc("mBC-revert-m")'
1327 $ hg merge 'desc("mBC-revert-m")'
1333 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1328 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1334 (branch merge, don't forget to commit)
1329 (branch merge, don't forget to commit)
1335 $ hg ci -m "mL,BC+revertm: $case_desc"
1330 $ hg ci -m "mL,BC+revertm: $case_desc"
1336 created new head
1331 created new head
1337
1332
1338 (Merge variant 4)
1333 (Merge variant 4)
1339
1334
1340 $ hg up 'desc("l-1")'
1335 $ hg up 'desc("l-1")'
1341 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1336 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1342
1337
1343 $ hg merge 'desc("mCB-revert-m")'
1338 $ hg merge 'desc("mCB-revert-m")'
1344 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1339 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1345 (branch merge, don't forget to commit)
1340 (branch merge, don't forget to commit)
1346 $ hg ci -m "mL,CB+revertm: $case_desc"
1341 $ hg ci -m "mL,CB+revertm: $case_desc"
1347 created new head
1342 created new head
1348
1343
1349 $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))'
1344 $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))'
1350 @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1345 @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1351 |\
1346 |\
1352 | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1347 | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1353 | |/|
1348 | |/|
1354 +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1349 +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1355 | | |
1350 | | |
1356 | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1351 | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1357 | | |/
1352 | | |/
1358 | o | l-1: unrelated changes (based on "c" changes)
1353 | o | l-1: unrelated changes (based on "c" changes)
1359 | | |
1354 | | |
1360 | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1355 | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1361 | |/|
1356 | |/|
1362 o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1357 o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1363 |/ /
1358 |/ /
1364 o | c-1 delete d
1359 o | c-1 delete d
1365 | |
1360 | |
1366 | o b-1: b update
1361 | o b-1: b update
1367 |/
1362 |/
1368 o i-2: c -move-> d, s -move-> t
1363 o i-2: c -move-> d, s -move-> t
1369 |
1364 |
1370 o i-1: a -move-> c, p -move-> s
1365 o i-1: a -move-> c, p -move-> s
1371 |
1366 |
1372 o i-0 initial commit: a b h p q r
1367 o i-0 initial commit: a b h p q r
1373
1368
1374
1369
1375
1370
1376 Subcase: chaining "merged" information during a merge
1371 Subcase: chaining "merged" information during a merge
1377 ``````````````````````````````````````````````````````
1372 ``````````````````````````````````````````````````````
1378
1373
1379 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.
1374 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.
1380
1375
1381 $ case_desc="chained merges (copy-overwrite -> simple) - same content"
1376 $ case_desc="chained merges (copy-overwrite -> simple) - same content"
1382
1377
1383 (extra unrelated changes)
1378 (extra unrelated changes)
1384
1379
1385 $ hg up 'desc("f-2")'
1380 $ hg up 'desc("f-2")'
1386 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1381 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1387 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1382 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1388 $ echo n > unrelated-n
1383 $ echo n > unrelated-n
1389 $ hg add unrelated-n
1384 $ hg add unrelated-n
1390 $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)'
1385 $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)'
1391 created new head
1386 created new head
1392
1387
1393 $ hg up 'desc("g-1")'
1388 $ hg up 'desc("g-1")'
1394 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1389 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1395 $ echo o > unrelated-o
1390 $ echo o > unrelated-o
1396 $ hg add unrelated-o
1391 $ hg add unrelated-o
1397 $ hg ci -m 'o-1: unrelated changes (based on "g" changes)'
1392 $ hg ci -m 'o-1: unrelated changes (based on "g" changes)'
1398 created new head
1393 created new head
1399
1394
1400 (merge variant 1)
1395 (merge variant 1)
1401
1396
1402 $ hg up 'desc("mFGm")'
1397 $ hg up 'desc("mFGm")'
1403 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1398 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !)
1404 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1399 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !)
1405 $ hg merge 'desc("o-1")'
1400 $ hg merge 'desc("o-1")'
1406 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
1407 (branch merge, don't forget to commit)
1402 (branch merge, don't forget to commit)
1408 $ hg ci -m "mFG,Om: $case_desc"
1403 $ hg ci -m "mFG,Om: $case_desc"
1409
1404
1410 (merge variant 2)
1405 (merge variant 2)
1411
1406
1412 $ hg up 'desc("o-1")'
1407 $ hg up 'desc("o-1")'
1413 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1408 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !)
1414 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1409 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !)
1415 $ hg merge 'desc("FGm")'
1410 $ hg merge 'desc("FGm")'
1416 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1411 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !)
1417 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1412 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !)
1418 (branch merge, don't forget to commit)
1413 (branch merge, don't forget to commit)
1419 $ hg ci -m "mO,FGm: $case_desc"
1414 $ hg ci -m "mO,FGm: $case_desc"
1420 created new head
1415 created new head
1421
1416
1422 (merge variant 3)
1417 (merge variant 3)
1423
1418
1424 $ hg up 'desc("mGFm")'
1419 $ hg up 'desc("mGFm")'
1425 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1420 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1426 $ hg merge 'desc("n-1")'
1421 $ hg merge 'desc("n-1")'
1427 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1422 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1428 (branch merge, don't forget to commit)
1423 (branch merge, don't forget to commit)
1429 $ hg ci -m "mGF,Nm: $case_desc"
1424 $ hg ci -m "mGF,Nm: $case_desc"
1430
1425
1431 (merge variant 4)
1426 (merge variant 4)
1432
1427
1433 $ hg up 'desc("n-1")'
1428 $ hg up 'desc("n-1")'
1434 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1429 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1435 $ hg merge 'desc("mGFm")'
1430 $ hg merge 'desc("mGFm")'
1436 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1431 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1437 (branch merge, don't forget to commit)
1432 (branch merge, don't forget to commit)
1438 $ hg ci -m "mN,GFm: $case_desc"
1433 $ hg ci -m "mN,GFm: $case_desc"
1439 created new head
1434 created new head
1440
1435
1441 $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))'
1436 $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))'
1442 @ mN,GFm: chained merges (copy-overwrite -> simple) - same content
1437 @ mN,GFm: chained merges (copy-overwrite -> simple) - same content
1443 |\
1438 |\
1444 +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content
1439 +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content
1445 | |/
1440 | |/
1446 | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content
1441 | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content
1447 | | |\
1442 | | |\
1448 | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content
1443 | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content
1449 | | | |/
1444 | | | |/
1450 | | | o o-1: unrelated changes (based on "g" changes)
1445 | | | o o-1: unrelated changes (based on "g" changes)
1451 | | | |
1446 | | | |
1452 | o | | n-1: unrelated changes (based on the "f" series of changes)
1447 | o | | n-1: unrelated changes (based on the "f" series of changes)
1453 | | | |
1448 | | | |
1454 o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
1449 o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
1455 |/ / /
1450 |/ / /
1456 | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
1451 | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
1457 |/|/
1452 |/|/
1458 | o g-1: update d
1453 | o g-1: update d
1459 | |
1454 | |
1460 o | f-2: rename i -> d
1455 o | f-2: rename i -> d
1461 | |
1456 | |
1462 o | f-1: rename h -> i
1457 o | f-1: rename h -> i
1463 |/
1458 |/
1464 o i-2: c -move-> d, s -move-> t
1459 o i-2: c -move-> d, s -move-> t
1465 |
1460 |
1466 o i-1: a -move-> c, p -move-> s
1461 o i-1: a -move-> c, p -move-> s
1467 |
1462 |
1468 o i-0 initial commit: a b h p q r
1463 o i-0 initial commit: a b h p q r
1469
1464
1470
1465
1471 Subcase: chaining conflicting rename resolution, with extra change during the merge
1466 Subcase: chaining conflicting rename resolution, with extra change during the merge
1472 ```````````````````````````````````````````````````````````````````````````````````
1467 ```````````````````````````````````````````````````````````````````````````````````
1473
1468
1474 The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We
1469 The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We
1475 add more change on the respective branch and merge again. These second merge
1470 add more change on the respective branch and merge again. These second merge
1476 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
1471 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
1477 about that file should stay unchanged.
1472 about that file should stay unchanged.
1478
1473
1479 $ case_desc="chained merges (conflict+change -> simple) - same content on both branch in the initial merge"
1474 $ case_desc="chained merges (conflict+change -> simple) - same content on both branch in the initial merge"
1480
1475
1481
1476
1482 (merge variant 1)
1477 (merge variant 1)
1483
1478
1484 $ hg up 'desc("mAE-change-m")'
1479 $ hg up 'desc("mAE-change-m")'
1485 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
1480 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
1486 $ hg merge 'desc("k-1")'
1481 $ hg merge 'desc("k-1")'
1487 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1482 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1488 (branch merge, don't forget to commit)
1483 (branch merge, don't forget to commit)
1489 $ hg ci -m "mAE-change,Km: $case_desc"
1484 $ hg ci -m "mAE-change,Km: $case_desc"
1490
1485
1491 (merge variant 2)
1486 (merge variant 2)
1492
1487
1493 $ hg up 'desc("k-1")'
1488 $ hg up 'desc("k-1")'
1494 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1489 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1495
1490
1496 $ hg merge 'desc("mAE-change-m")'
1491 $ hg merge 'desc("mAE-change-m")'
1497 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1492 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1498 (branch merge, don't forget to commit)
1493 (branch merge, don't forget to commit)
1499 $ hg ci -m "mK,AE-change-m: $case_desc"
1494 $ hg ci -m "mK,AE-change-m: $case_desc"
1500 created new head
1495 created new head
1501
1496
1502 (merge variant 3)
1497 (merge variant 3)
1503
1498
1504 $ hg up 'desc("mEA-change-m")'
1499 $ hg up 'desc("mEA-change-m")'
1505 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1500 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1506 $ hg merge 'desc("j-1")'
1501 $ hg merge 'desc("j-1")'
1507 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1502 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1508 (branch merge, don't forget to commit)
1503 (branch merge, don't forget to commit)
1509 $ hg ci -m "mEA-change,Jm: $case_desc"
1504 $ hg ci -m "mEA-change,Jm: $case_desc"
1510
1505
1511 (merge variant 4)
1506 (merge variant 4)
1512
1507
1513 $ hg up 'desc("j-1")'
1508 $ hg up 'desc("j-1")'
1514 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1509 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1515 $ hg merge 'desc("mEA-change-m")'
1510 $ hg merge 'desc("mEA-change-m")'
1516 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1511 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1517 (branch merge, don't forget to commit)
1512 (branch merge, don't forget to commit)
1518 $ hg ci -m "mJ,EA-change-m: $case_desc"
1513 $ hg ci -m "mJ,EA-change-m: $case_desc"
1519 created new head
1514 created new head
1520
1515
1521
1516
1522 $ hg log -G --rev '::(desc("mAE-change,Km") + desc("mK,AE-change-m") + desc("mEA-change,Jm") + desc("mJ,EA-change-m"))'
1517 $ hg log -G --rev '::(desc("mAE-change,Km") + desc("mK,AE-change-m") + desc("mEA-change,Jm") + desc("mJ,EA-change-m"))'
1523 @ mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1518 @ mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1524 |\
1519 |\
1525 +---o mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1520 +---o mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1526 | |/
1521 | |/
1527 | | o mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1522 | | o mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1528 | | |\
1523 | | |\
1529 | | +---o mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1524 | | +---o mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1530 | | | |/
1525 | | | |/
1531 | | | o k-1: unrelated changes (based on "e" changes)
1526 | | | o k-1: unrelated changes (based on "e" changes)
1532 | | | |
1527 | | | |
1533 | o | | j-1: unrelated changes (based on the "a" series of changes)
1528 | o | | j-1: unrelated changes (based on the "a" series of changes)
1534 | | | |
1529 | | | |
1535 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
1530 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
1536 |/ / /
1531 |/ / /
1537 | 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
1532 | 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
1538 |/|/
1533 |/|/
1539 | o e-2 g -move-> f
1534 | o e-2 g -move-> f
1540 | |
1535 | |
1541 | o e-1 b -move-> g
1536 | o e-1 b -move-> g
1542 | |
1537 | |
1543 o | a-2: e -move-> f
1538 o | a-2: e -move-> f
1544 | |
1539 | |
1545 o | a-1: d -move-> e
1540 o | a-1: d -move-> e
1546 |/
1541 |/
1547 o i-2: c -move-> d, s -move-> t
1542 o i-2: c -move-> d, s -move-> t
1548 |
1543 |
1549 o i-1: a -move-> c, p -move-> s
1544 o i-1: a -move-> c, p -move-> s
1550 |
1545 |
1551 o i-0 initial commit: a b h p q r
1546 o i-0 initial commit: a b h p q r
1552
1547
1553
1548
1554 Summary of all created cases
1549 Summary of all created cases
1555 ----------------------------
1550 ----------------------------
1556
1551
1557 $ hg up --quiet null
1552 $ hg up --quiet null
1558
1553
1559 (This exists to help keeping a compact list of the various cases we have built)
1554 (This exists to help keeping a compact list of the various cases we have built)
1560
1555
1561 $ hg log -T '{desc|firstline}\n'| sort
1556 $ hg log -T '{desc|firstline}\n'| sort
1562 a-1: d -move-> e
1557 a-1: d -move-> e
1563 a-2: e -move-> f
1558 a-2: e -move-> f
1564 b-1: b update
1559 b-1: b update
1565 c-1 delete d
1560 c-1 delete d
1566 d-1 delete d
1561 d-1 delete d
1567 d-2 re-add d
1562 d-2 re-add d
1568 e-1 b -move-> g
1563 e-1 b -move-> g
1569 e-2 g -move-> f
1564 e-2 g -move-> f
1570 f-1: rename h -> i
1565 f-1: rename h -> i
1571 f-2: rename i -> d
1566 f-2: rename i -> d
1572 g-1: update d
1567 g-1: update d
1573 h-1: b -(move)-> d
1568 h-1: b -(move)-> d
1574 i-0 initial commit: a b h p q r
1569 i-0 initial commit: a b h p q r
1575 i-1: a -move-> c, p -move-> s
1570 i-1: a -move-> c, p -move-> s
1576 i-2: c -move-> d, s -move-> t
1571 i-2: c -move-> d, s -move-> t
1577 j-1: unrelated changes (based on the "a" series of changes)
1572 j-1: unrelated changes (based on the "a" series of changes)
1578 k-1: unrelated changes (based on "e" changes)
1573 k-1: unrelated changes (based on "e" changes)
1579 l-1: unrelated changes (based on "c" changes)
1574 l-1: unrelated changes (based on "c" changes)
1580 mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
1575 mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
1581 mAE,Km: chained merges (conflict -> simple) - same content everywhere
1576 mAE,Km: chained merges (conflict -> simple) - same content everywhere
1582 mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1577 mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1583 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
1578 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
1584 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
1579 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
1585 mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
1580 mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
1586 mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1581 mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1587 mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1582 mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1588 mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1583 mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
1589 mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
1584 mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
1590 mBCm-1 re-add d
1585 mBCm-1 re-add d
1591 mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
1586 mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
1592 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
1587 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
1593 mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
1588 mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
1594 mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
1589 mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
1595 mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1590 mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists)
1596 mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1591 mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1597 mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1592 mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
1598 mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
1593 mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
1599 mCBm-1 re-add d
1594 mCBm-1 re-add d
1600 mCGm-0 merge updated/deleted - revive the file (updated content) - one way
1595 mCGm-0 merge updated/deleted - revive the file (updated content) - one way
1601 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
1596 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
1602 mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
1597 mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
1603 mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
1598 mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
1604 mEA,Jm: chained merges (conflict -> simple) - same content everywhere
1599 mEA,Jm: chained merges (conflict -> simple) - same content everywhere
1605 mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1600 mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1606 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
1601 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
1607 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
1602 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
1608 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
1603 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
1609 mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
1604 mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
1610 mFG,Om: chained merges (copy-overwrite -> simple) - same content
1605 mFG,Om: chained merges (copy-overwrite -> simple) - same content
1611 mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
1606 mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
1612 mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
1607 mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
1613 mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
1608 mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way
1614 mGF,Nm: chained merges (copy-overwrite -> simple) - same content
1609 mGF,Nm: chained merges (copy-overwrite -> simple) - same content
1615 mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
1610 mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
1616 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
1611 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
1617 mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1612 mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1618 mJ,EAm: chained merges (conflict -> simple) - same content everywhere
1613 mJ,EAm: chained merges (conflict -> simple) - same content everywhere
1619 mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1614 mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge
1620 mK,AEm: chained merges (conflict -> simple) - same content everywhere
1615 mK,AEm: chained merges (conflict -> simple) - same content everywhere
1621 mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1616 mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1622 mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1617 mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists)
1623 mN,GFm: chained merges (copy-overwrite -> simple) - same content
1618 mN,GFm: chained merges (copy-overwrite -> simple) - same content
1624 mO,FGm: chained merges (copy-overwrite -> simple) - same content
1619 mO,FGm: chained merges (copy-overwrite -> simple) - same content
1625 mPQ,Tm: chained merges (conflict -> simple) - different content
1620 mPQ,Tm: chained merges (conflict -> simple) - different content
1626 mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way
1621 mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way
1627 mQP,Sm: chained merges (conflict -> simple) - different content
1622 mQP,Sm: chained merges (conflict -> simple) - different content
1628 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
1623 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
1629 mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way
1624 mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way
1630 mS,QPm: chained merges (conflict -> simple) - different content
1625 mS,QPm: chained merges (conflict -> simple) - different content
1631 mT,PQm: chained merges (conflict -> simple) - different content
1626 mT,PQm: chained merges (conflict -> simple) - different content
1632 n-1: unrelated changes (based on the "f" series of changes)
1627 n-1: unrelated changes (based on the "f" series of changes)
1633 o-1: unrelated changes (based on "g" changes)
1628 o-1: unrelated changes (based on "g" changes)
1634 p-1: t -move-> u
1629 p-1: t -move-> u
1635 p-2: u -move-> v
1630 p-2: u -move-> v
1636 q-1 r -move-> w
1631 q-1 r -move-> w
1637 q-2 w -move-> v
1632 q-2 w -move-> v
1638 r-1: rename r -> x
1633 r-1: rename r -> x
1639 r-2: rename t -> x
1634 r-2: rename t -> x
1640 s-1: unrelated changes (based on the "p" series of changes)
1635 s-1: unrelated changes (based on the "p" series of changes)
1641 t-1: unrelated changes (based on "q" changes)
1636 t-1: unrelated changes (based on "q" changes)
1642
1637
1643
1638
1644 Test that sidedata computations during upgrades are correct
1639 Test that sidedata computations during upgrades are correct
1645 ===========================================================
1640 ===========================================================
1646
1641
1647 We upgrade a repository that is not using sidedata (the filelog case) and
1642 We upgrade a repository that is not using sidedata (the filelog case) and
1648 check that the same side data have been generated as if they were computed at
1643 check that the same side data have been generated as if they were computed at
1649 commit time.
1644 commit time.
1650
1645
1651
1646
1652 #if upgraded
1647 #if upgraded
1653 $ cat >> $HGRCPATH << EOF
1648 $ cat >> $HGRCPATH << EOF
1654 > [format]
1649 > [format]
1655 > exp-use-side-data = yes
1656 > exp-use-copies-side-data-changeset = yes
1650 > exp-use-copies-side-data-changeset = yes
1657 > EOF
1651 > EOF
1658 $ hg debugformat -v
1652 $ hg debugformat -v
1659 format-variant repo config default
1653 format-variant repo config default
1660 fncache: yes yes yes
1654 fncache: yes yes yes
1661 dotencode: yes yes yes
1655 dotencode: yes yes yes
1662 generaldelta: yes yes yes
1656 generaldelta: yes yes yes
1663 share-safe: no no no
1657 share-safe: no no no
1664 sparserevlog: yes yes yes
1658 sparserevlog: yes yes yes
1665 persistent-nodemap: no no no (no-rust !)
1659 persistent-nodemap: no no no (no-rust !)
1666 persistent-nodemap: yes yes no (rust !)
1660 persistent-nodemap: yes yes no (rust !)
1667 copies-sdc: no yes no
1661 copies-sdc: no yes no
1668 revlog-v2: no yes no
1662 revlog-v2: no yes no
1669 plain-cl-delta: yes yes yes
1663 plain-cl-delta: yes yes yes
1670 compression: * (glob)
1664 compression: * (glob)
1671 compression-level: default default default
1665 compression-level: default default default
1672 $ hg debugupgraderepo --run --quiet
1666 $ hg debugupgraderepo --run --quiet
1673 upgrade will perform the following actions:
1667 upgrade will perform the following actions:
1674
1668
1675 requirements
1669 requirements
1676 preserved: * (glob)
1670 preserved: * (glob)
1677 removed: revlogv1
1671 removed: revlogv1
1678 added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
1672 added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
1679
1673
1680 processed revlogs:
1674 processed revlogs:
1681 - all-filelogs
1675 - all-filelogs
1682 - changelog
1676 - changelog
1683 - manifest
1677 - manifest
1684
1678
1685 #endif
1679 #endif
1686
1680
1687 #if upgraded-parallel
1681 #if upgraded-parallel
1688 $ cat >> $HGRCPATH << EOF
1682 $ cat >> $HGRCPATH << EOF
1689 > [format]
1683 > [format]
1690 > exp-use-side-data = yes
1691 > exp-use-copies-side-data-changeset = yes
1684 > exp-use-copies-side-data-changeset = yes
1692 > [experimental]
1685 > [experimental]
1693 > worker.repository-upgrade=yes
1686 > worker.repository-upgrade=yes
1694 > [worker]
1687 > [worker]
1695 > enabled=yes
1688 > enabled=yes
1696 > numcpus=8
1689 > numcpus=8
1697 > EOF
1690 > EOF
1698 $ hg debugformat -v
1691 $ hg debugformat -v
1699 format-variant repo config default
1692 format-variant repo config default
1700 fncache: yes yes yes
1693 fncache: yes yes yes
1701 dotencode: yes yes yes
1694 dotencode: yes yes yes
1702 generaldelta: yes yes yes
1695 generaldelta: yes yes yes
1703 share-safe: no no no
1696 share-safe: no no no
1704 sparserevlog: yes yes yes
1697 sparserevlog: yes yes yes
1705 persistent-nodemap: no no no (no-rust !)
1698 persistent-nodemap: no no no (no-rust !)
1706 persistent-nodemap: yes yes no (rust !)
1699 persistent-nodemap: yes yes no (rust !)
1707 copies-sdc: no yes no
1700 copies-sdc: no yes no
1708 revlog-v2: no yes no
1701 revlog-v2: no yes no
1709 plain-cl-delta: yes yes yes
1702 plain-cl-delta: yes yes yes
1710 compression: * (glob)
1703 compression: * (glob)
1711 compression-level: default default default
1704 compression-level: default default default
1712 $ hg debugupgraderepo --run --quiet
1705 $ hg debugupgraderepo --run --quiet
1713 upgrade will perform the following actions:
1706 upgrade will perform the following actions:
1714
1707
1715 requirements
1708 requirements
1716 preserved: * (glob)
1709 preserved: * (glob)
1717 removed: revlogv1
1710 removed: revlogv1
1718 added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
1711 added: exp-copies-sidedata-changeset, exp-revlogv2.2, exp-sidedata-flag
1719
1712
1720 processed revlogs:
1713 processed revlogs:
1721 - all-filelogs
1714 - all-filelogs
1722 - changelog
1715 - changelog
1723 - manifest
1716 - manifest
1724
1717
1725 #endif
1718 #endif
1726
1719
1727 #if pull
1720 #if pull
1728 $ cd ..
1721 $ cd ..
1729 $ mv repo-chain repo-source
1722 $ mv repo-chain repo-source
1730 $ hg init repo-chain
1723 $ hg init repo-chain
1731 $ cd repo-chain
1724 $ cd repo-chain
1732 $ hg pull ../repo-source
1725 $ hg pull ../repo-source
1733 pulling from ../repo-source
1726 pulling from ../repo-source
1734 requesting all changes
1727 requesting all changes
1735 adding changesets
1728 adding changesets
1736 adding manifests
1729 adding manifests
1737 adding file changes
1730 adding file changes
1738 added 80 changesets with 44 changes to 25 files (+39 heads)
1731 added 80 changesets with 44 changes to 25 files (+39 heads)
1739 new changesets a3a31bbefea6:908ce9259ffa
1732 new changesets a3a31bbefea6:908ce9259ffa
1740 (run 'hg heads' to see heads, 'hg merge' to merge)
1733 (run 'hg heads' to see heads, 'hg merge' to merge)
1741 #endif
1734 #endif
1742
1735
1743 #if pull-upgrade
1736 #if pull-upgrade
1744 $ cat >> $HGRCPATH << EOF
1737 $ cat >> $HGRCPATH << EOF
1745 > [format]
1738 > [format]
1746 > exp-use-side-data = yes
1747 > exp-use-copies-side-data-changeset = yes
1739 > exp-use-copies-side-data-changeset = yes
1748 > [experimental]
1740 > [experimental]
1749 > changegroup4 = yes
1741 > changegroup4 = yes
1750 > EOF
1742 > EOF
1751 $ cd ..
1743 $ cd ..
1752 $ mv repo-chain repo-source
1744 $ mv repo-chain repo-source
1753 $ hg init repo-chain
1745 $ hg init repo-chain
1754 $ cd repo-chain
1746 $ cd repo-chain
1755 $ hg pull ../repo-source
1747 $ hg pull ../repo-source
1756 pulling from ../repo-source
1748 pulling from ../repo-source
1757 requesting all changes
1749 requesting all changes
1758 adding changesets
1750 adding changesets
1759 adding manifests
1751 adding manifests
1760 adding file changes
1752 adding file changes
1761 added 80 changesets with 44 changes to 25 files (+39 heads)
1753 added 80 changesets with 44 changes to 25 files (+39 heads)
1762 new changesets a3a31bbefea6:908ce9259ffa
1754 new changesets a3a31bbefea6:908ce9259ffa
1763 (run 'hg heads' to see heads, 'hg merge' to merge)
1755 (run 'hg heads' to see heads, 'hg merge' to merge)
1764 #endif
1756 #endif
1765
1757
1766 #if push
1758 #if push
1767 $ cd ..
1759 $ cd ..
1768 $ mv repo-chain repo-source
1760 $ mv repo-chain repo-source
1769 $ hg init repo-chain
1761 $ hg init repo-chain
1770 $ cd repo-source
1762 $ cd repo-source
1771 $ hg push ../repo-chain
1763 $ hg push ../repo-chain
1772 pushing to ../repo-chain
1764 pushing to ../repo-chain
1773 searching for changes
1765 searching for changes
1774 adding changesets
1766 adding changesets
1775 adding manifests
1767 adding manifests
1776 adding file changes
1768 adding file changes
1777 added 80 changesets with 44 changes to 25 files (+39 heads)
1769 added 80 changesets with 44 changes to 25 files (+39 heads)
1778 $ cd ../repo-chain
1770 $ cd ../repo-chain
1779 #endif
1771 #endif
1780
1772
1781 #if push-upgrade
1773 #if push-upgrade
1782 $ cat >> $HGRCPATH << EOF
1774 $ cat >> $HGRCPATH << EOF
1783 > [format]
1775 > [format]
1784 > exp-use-side-data = yes
1785 > exp-use-copies-side-data-changeset = yes
1776 > exp-use-copies-side-data-changeset = yes
1786 > [experimental]
1777 > [experimental]
1787 > changegroup4 = yes
1778 > changegroup4 = yes
1788 > EOF
1779 > EOF
1789 $ cd ..
1780 $ cd ..
1790 $ mv repo-chain repo-source
1781 $ mv repo-chain repo-source
1791 $ hg init repo-chain
1782 $ hg init repo-chain
1792 $ cd repo-source
1783 $ cd repo-source
1793 $ hg push ../repo-chain
1784 $ hg push ../repo-chain
1794 pushing to ../repo-chain
1785 pushing to ../repo-chain
1795 searching for changes
1786 searching for changes
1796 adding changesets
1787 adding changesets
1797 adding manifests
1788 adding manifests
1798 adding file changes
1789 adding file changes
1799 added 80 changesets with 44 changes to 25 files (+39 heads)
1790 added 80 changesets with 44 changes to 25 files (+39 heads)
1800 $ cd ../repo-chain
1791 $ cd ../repo-chain
1801 #endif
1792 #endif
1802
1793
1803 #if no-compatibility no-filelog no-changeset
1794 #if no-compatibility no-filelog no-changeset
1804
1795
1805 $ hg debugchangedfiles --compute 0
1796 $ hg debugchangedfiles --compute 0
1806 added : a, ;
1797 added : a, ;
1807 added : b, ;
1798 added : b, ;
1808 added : h, ;
1799 added : h, ;
1809 added : p, ;
1800 added : p, ;
1810 added : q, ;
1801 added : q, ;
1811 added : r, ;
1802 added : r, ;
1812
1803
1813 $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do
1804 $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do
1814 > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'`
1805 > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'`
1815 > echo "##### revision \"$case_id\" #####"
1806 > echo "##### revision \"$case_id\" #####"
1816 > hg debugsidedata -c -v -- $rev
1807 > hg debugsidedata -c -v -- $rev
1817 > hg debugchangedfiles $rev
1808 > hg debugchangedfiles $rev
1818 > done
1809 > done
1819 ##### revision "i-0 initial commit" #####
1810 ##### revision "i-0 initial commit" #####
1820 1 sidedata entries
1811 1 sidedata entries
1821 entry-0014 size 64
1812 entry-0014 size 64
1822 '\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'
1813 '\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'
1823 added : a, ;
1814 added : a, ;
1824 added : b, ;
1815 added : b, ;
1825 added : h, ;
1816 added : h, ;
1826 added : p, ;
1817 added : p, ;
1827 added : q, ;
1818 added : q, ;
1828 added : r, ;
1819 added : r, ;
1829 ##### revision "i-1" #####
1820 ##### revision "i-1" #####
1830 1 sidedata entries
1821 1 sidedata entries
1831 entry-0014 size 44
1822 entry-0014 size 44
1832 '\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'
1823 '\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'
1833 removed : a, ;
1824 removed : a, ;
1834 added p1: c, a;
1825 added p1: c, a;
1835 removed : p, ;
1826 removed : p, ;
1836 added p1: s, p;
1827 added p1: s, p;
1837 ##### revision "i-2" #####
1828 ##### revision "i-2" #####
1838 1 sidedata entries
1829 1 sidedata entries
1839 entry-0014 size 44
1830 entry-0014 size 44
1840 '\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'
1831 '\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'
1841 removed : c, ;
1832 removed : c, ;
1842 added p1: d, c;
1833 added p1: d, c;
1843 removed : s, ;
1834 removed : s, ;
1844 added p1: t, s;
1835 added p1: t, s;
1845 ##### revision "a-1" #####
1836 ##### revision "a-1" #####
1846 1 sidedata entries
1837 1 sidedata entries
1847 entry-0014 size 24
1838 entry-0014 size 24
1848 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de'
1839 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de'
1849 removed : d, ;
1840 removed : d, ;
1850 added p1: e, d;
1841 added p1: e, d;
1851 ##### revision "a-2" #####
1842 ##### revision "a-2" #####
1852 1 sidedata entries
1843 1 sidedata entries
1853 entry-0014 size 24
1844 entry-0014 size 24
1854 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef'
1845 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef'
1855 removed : e, ;
1846 removed : e, ;
1856 added p1: f, e;
1847 added p1: f, e;
1857 ##### revision "b-1" #####
1848 ##### revision "b-1" #####
1858 1 sidedata entries
1849 1 sidedata entries
1859 entry-0014 size 14
1850 entry-0014 size 14
1860 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b'
1851 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b'
1861 touched : b, ;
1852 touched : b, ;
1862 ##### revision "c-1 delete d" #####
1853 ##### revision "c-1 delete d" #####
1863 1 sidedata entries
1854 1 sidedata entries
1864 entry-0014 size 14
1855 entry-0014 size 14
1865 '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d'
1856 '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d'
1866 removed : d, ;
1857 removed : d, ;
1867 ##### revision "d-1 delete d" #####
1858 ##### revision "d-1 delete d" #####
1868 1 sidedata entries
1859 1 sidedata entries
1869 entry-0014 size 14
1860 entry-0014 size 14
1870 '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d'
1861 '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d'
1871 removed : d, ;
1862 removed : d, ;
1872 ##### revision "d-2 re-add d" #####
1863 ##### revision "d-2 re-add d" #####
1873 1 sidedata entries
1864 1 sidedata entries
1874 entry-0014 size 14
1865 entry-0014 size 14
1875 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1866 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1876 added : d, ;
1867 added : d, ;
1877 ##### revision "e-1 b -move-> g" #####
1868 ##### revision "e-1 b -move-> g" #####
1878 1 sidedata entries
1869 1 sidedata entries
1879 entry-0014 size 24
1870 entry-0014 size 24
1880 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg'
1871 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg'
1881 removed : b, ;
1872 removed : b, ;
1882 added p1: g, b;
1873 added p1: g, b;
1883 ##### revision "e-2 g -move-> f" #####
1874 ##### revision "e-2 g -move-> f" #####
1884 1 sidedata entries
1875 1 sidedata entries
1885 entry-0014 size 24
1876 entry-0014 size 24
1886 '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg'
1877 '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg'
1887 added p1: f, g;
1878 added p1: f, g;
1888 removed : g, ;
1879 removed : g, ;
1889 ##### revision "p-1" #####
1880 ##### revision "p-1" #####
1890 1 sidedata entries
1881 1 sidedata entries
1891 entry-0014 size 24
1882 entry-0014 size 24
1892 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00tu'
1883 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00tu'
1893 removed : t, ;
1884 removed : t, ;
1894 added p1: u, t;
1885 added p1: u, t;
1895 ##### revision "p-2" #####
1886 ##### revision "p-2" #####
1896 1 sidedata entries
1887 1 sidedata entries
1897 entry-0014 size 24
1888 entry-0014 size 24
1898 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00uv'
1889 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00uv'
1899 removed : u, ;
1890 removed : u, ;
1900 added p1: v, u;
1891 added p1: v, u;
1901 ##### revision "q-1 r -move-> w" #####
1892 ##### revision "q-1 r -move-> w" #####
1902 1 sidedata entries
1893 1 sidedata entries
1903 entry-0014 size 24
1894 entry-0014 size 24
1904 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rw'
1895 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rw'
1905 removed : r, ;
1896 removed : r, ;
1906 added p1: w, r;
1897 added p1: w, r;
1907 ##### revision "q-2 w -move-> v" #####
1898 ##### revision "q-2 w -move-> v" #####
1908 1 sidedata entries
1899 1 sidedata entries
1909 entry-0014 size 24
1900 entry-0014 size 24
1910 '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00vw'
1901 '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00vw'
1911 added p1: v, w;
1902 added p1: v, w;
1912 removed : w, ;
1903 removed : w, ;
1913 ##### revision "mBAm-0 simple merge - A side" #####
1904 ##### revision "mBAm-0 simple merge - A side" #####
1914 1 sidedata entries
1905 1 sidedata entries
1915 entry-0014 size 4
1906 entry-0014 size 4
1916 '\x00\x00\x00\x00'
1907 '\x00\x00\x00\x00'
1917 ##### revision "mABm-0 simple merge - A side" #####
1908 ##### revision "mABm-0 simple merge - A side" #####
1918 1 sidedata entries
1909 1 sidedata entries
1919 entry-0014 size 4
1910 entry-0014 size 4
1920 '\x00\x00\x00\x00'
1911 '\x00\x00\x00\x00'
1921 ##### revision "mBCm-0 simple merge - C side" #####
1912 ##### revision "mBCm-0 simple merge - C side" #####
1922 1 sidedata entries
1913 1 sidedata entries
1923 entry-0014 size 4
1914 entry-0014 size 4
1924 '\x00\x00\x00\x00'
1915 '\x00\x00\x00\x00'
1925 ##### revision "mBCm-1 re-add d" #####
1916 ##### revision "mBCm-1 re-add d" #####
1926 1 sidedata entries
1917 1 sidedata entries
1927 entry-0014 size 14
1918 entry-0014 size 14
1928 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1919 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1929 added : d, ;
1920 added : d, ;
1930 ##### revision "mCBm-0 simple merge - C side" #####
1921 ##### revision "mCBm-0 simple merge - C side" #####
1931 1 sidedata entries
1922 1 sidedata entries
1932 entry-0014 size 4
1923 entry-0014 size 4
1933 '\x00\x00\x00\x00'
1924 '\x00\x00\x00\x00'
1934 ##### revision "mCBm-1 re-add d" #####
1925 ##### revision "mCBm-1 re-add d" #####
1935 1 sidedata entries
1926 1 sidedata entries
1936 entry-0014 size 14
1927 entry-0014 size 14
1937 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1928 '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d'
1938 added : d, ;
1929 added : d, ;
1939 ##### revision "mBDm-0 simple merge - B side" #####
1930 ##### revision "mBDm-0 simple merge - B side" #####
1940 1 sidedata entries
1931 1 sidedata entries
1941 entry-0014 size 4
1932 entry-0014 size 4
1942 '\x00\x00\x00\x00'
1933 '\x00\x00\x00\x00'
1943 ##### revision "mDBm-0 simple merge - B side" #####
1934 ##### revision "mDBm-0 simple merge - B side" #####
1944 1 sidedata entries
1935 1 sidedata entries
1945 entry-0014 size 4
1936 entry-0014 size 4
1946 '\x00\x00\x00\x00'
1937 '\x00\x00\x00\x00'
1947 ##### revision "mAEm-0 merge with copies info on both side - A side" #####
1938 ##### revision "mAEm-0 merge with copies info on both side - A side" #####
1948 1 sidedata entries
1939 1 sidedata entries
1949 entry-0014 size 14
1940 entry-0014 size 14
1950 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1941 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1951 merged : f, ;
1942 merged : f, ;
1952 ##### revision "mEAm-0 merge with copies info on both side - A side" #####
1943 ##### revision "mEAm-0 merge with copies info on both side - A side" #####
1953 1 sidedata entries
1944 1 sidedata entries
1954 entry-0014 size 14
1945 entry-0014 size 14
1955 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1946 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
1956 merged : f, ;
1947 merged : f, ;
1957 ##### revision "mPQm-0 merge with copies info on both side - P side" #####
1948 ##### revision "mPQm-0 merge with copies info on both side - P side" #####
1958 1 sidedata entries
1949 1 sidedata entries
1959 entry-0014 size 14
1950 entry-0014 size 14
1960 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v'
1951 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v'
1961 merged : v, ;
1952 merged : v, ;
1962 ##### revision "mQPm-0 merge with copies info on both side - P side" #####
1953 ##### revision "mQPm-0 merge with copies info on both side - P side" #####
1963 1 sidedata entries
1954 1 sidedata entries
1964 entry-0014 size 14
1955 entry-0014 size 14
1965 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v'
1956 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v'
1966 merged : v, ;
1957 merged : v, ;
1967 ##### revision "f-1" #####
1958 ##### revision "f-1" #####
1968 1 sidedata entries
1959 1 sidedata entries
1969 entry-0014 size 24
1960 entry-0014 size 24
1970 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi'
1961 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi'
1971 removed : h, ;
1962 removed : h, ;
1972 added p1: i, h;
1963 added p1: i, h;
1973 ##### revision "f-2" #####
1964 ##### revision "f-2" #####
1974 1 sidedata entries
1965 1 sidedata entries
1975 entry-0014 size 24
1966 entry-0014 size 24
1976 '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di'
1967 '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di'
1977 touched p1: d, i;
1968 touched p1: d, i;
1978 removed : i, ;
1969 removed : i, ;
1979 ##### revision "mBFm-0 simple merge - B side" #####
1970 ##### revision "mBFm-0 simple merge - B side" #####
1980 1 sidedata entries
1971 1 sidedata entries
1981 entry-0014 size 4
1972 entry-0014 size 4
1982 '\x00\x00\x00\x00'
1973 '\x00\x00\x00\x00'
1983 ##### revision "mFBm-0 simple merge - B side" #####
1974 ##### revision "mFBm-0 simple merge - B side" #####
1984 1 sidedata entries
1975 1 sidedata entries
1985 entry-0014 size 4
1976 entry-0014 size 4
1986 '\x00\x00\x00\x00'
1977 '\x00\x00\x00\x00'
1987 ##### revision "r-1" #####
1978 ##### revision "r-1" #####
1988 1 sidedata entries
1979 1 sidedata entries
1989 entry-0014 size 24
1980 entry-0014 size 24
1990 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rx'
1981 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rx'
1991 removed : r, ;
1982 removed : r, ;
1992 added p1: x, r;
1983 added p1: x, r;
1993 ##### revision "r-2" #####
1984 ##### revision "r-2" #####
1994 1 sidedata entries
1985 1 sidedata entries
1995 entry-0014 size 24
1986 entry-0014 size 24
1996 '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00tx'
1987 '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00tx'
1997 touched p1: t, x;
1988 touched p1: t, x;
1998 removed : x, ;
1989 removed : x, ;
1999 ##### revision "mBRm-0 simple merge - B side" #####
1990 ##### revision "mBRm-0 simple merge - B side" #####
2000 1 sidedata entries
1991 1 sidedata entries
2001 entry-0014 size 4
1992 entry-0014 size 4
2002 '\x00\x00\x00\x00'
1993 '\x00\x00\x00\x00'
2003 ##### revision "mRBm-0 simple merge - B side" #####
1994 ##### revision "mRBm-0 simple merge - B side" #####
2004 1 sidedata entries
1995 1 sidedata entries
2005 entry-0014 size 4
1996 entry-0014 size 4
2006 '\x00\x00\x00\x00'
1997 '\x00\x00\x00\x00'
2007 ##### revision "g-1" #####
1998 ##### revision "g-1" #####
2008 1 sidedata entries
1999 1 sidedata entries
2009 entry-0014 size 14
2000 entry-0014 size 14
2010 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
2001 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
2011 touched : d, ;
2002 touched : d, ;
2012 ##### revision "mDGm-0 actual content merge, copies on one side - D side" #####
2003 ##### revision "mDGm-0 actual content merge, copies on one side - D side" #####
2013 1 sidedata entries
2004 1 sidedata entries
2014 entry-0014 size 14
2005 entry-0014 size 14
2015 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
2006 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
2016 merged : d, ;
2007 merged : d, ;
2017 ##### revision "mGDm-0 actual content merge, copies on one side - D side" #####
2008 ##### revision "mGDm-0 actual content merge, copies on one side - D side" #####
2018 1 sidedata entries
2009 1 sidedata entries
2019 entry-0014 size 14
2010 entry-0014 size 14
2020 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
2011 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
2021 merged : d, ;
2012 merged : d, ;
2022 ##### revision "mFGm-0 merge - G side" #####
2013 ##### revision "mFGm-0 merge - G side" #####
2023 1 sidedata entries
2014 1 sidedata entries
2024 entry-0014 size 14
2015 entry-0014 size 14
2025 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
2016 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
2026 merged : d, ;
2017 merged : d, ;
2027 ##### revision "mGFm-0 merge - G side" #####
2018 ##### revision "mGFm-0 merge - G side" #####
2028 1 sidedata entries
2019 1 sidedata entries
2029 entry-0014 size 14
2020 entry-0014 size 14
2030 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
2021 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d'
2031 merged : d, ;
2022 merged : d, ;
2032 ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" #####
2023 ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" #####
2033 1 sidedata entries
2024 1 sidedata entries
2034 entry-0014 size 14
2025 entry-0014 size 14
2035 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2026 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2036 salvaged : d, ;
2027 salvaged : d, ;
2037 ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" #####
2028 ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" #####
2038 1 sidedata entries
2029 1 sidedata entries
2039 entry-0014 size 14
2030 entry-0014 size 14
2040 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2031 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2041 salvaged : d, ;
2032 salvaged : d, ;
2042 ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" #####
2033 ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" #####
2043 1 sidedata entries
2034 1 sidedata entries
2044 entry-0014 size 14
2035 entry-0014 size 14
2045 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2036 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2046 salvaged : d, ;
2037 salvaged : d, ;
2047 ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" #####
2038 ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" #####
2048 1 sidedata entries
2039 1 sidedata entries
2049 entry-0014 size 14
2040 entry-0014 size 14
2050 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2041 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2051 salvaged : d, ;
2042 salvaged : d, ;
2052 ##### revision "h-1" #####
2043 ##### revision "h-1" #####
2053 1 sidedata entries
2044 1 sidedata entries
2054 entry-0014 size 24
2045 entry-0014 size 24
2055 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd'
2046 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd'
2056 removed : b, ;
2047 removed : b, ;
2057 added p1: d, b;
2048 added p1: d, b;
2058 ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" #####
2049 ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" #####
2059 1 sidedata entries
2050 1 sidedata entries
2060 entry-0014 size 4
2051 entry-0014 size 4
2061 '\x00\x00\x00\x00'
2052 '\x00\x00\x00\x00'
2062 ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" #####
2053 ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" #####
2063 1 sidedata entries
2054 1 sidedata entries
2064 entry-0014 size 4
2055 entry-0014 size 4
2065 '\x00\x00\x00\x00'
2056 '\x00\x00\x00\x00'
2066 ##### revision "mAE-change-m-0 merge with file update and copies info on both side - A side" #####
2057 ##### revision "mAE-change-m-0 merge with file update and copies info on both side - A side" #####
2067 1 sidedata entries
2058 1 sidedata entries
2068 entry-0014 size 14
2059 entry-0014 size 14
2069 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
2060 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
2070 merged : f, ;
2061 merged : f, ;
2071 ##### revision "mEA-change-m-0 merge with file update and copies info on both side - A side" #####
2062 ##### revision "mEA-change-m-0 merge with file update and copies info on both side - A side" #####
2072 1 sidedata entries
2063 1 sidedata entries
2073 entry-0014 size 14
2064 entry-0014 size 14
2074 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
2065 '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f'
2075 merged : f, ;
2066 merged : f, ;
2076 ##### revision "mBF-change-m-0 merge with extra change - B side" #####
2067 ##### revision "mBF-change-m-0 merge with extra change - B side" #####
2077 1 sidedata entries
2068 1 sidedata entries
2078 entry-0014 size 14
2069 entry-0014 size 14
2079 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
2070 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
2080 touched : d, ;
2071 touched : d, ;
2081 ##### revision "mFB-change-m-0 merge with extra change - B side" #####
2072 ##### revision "mFB-change-m-0 merge with extra change - B side" #####
2082 1 sidedata entries
2073 1 sidedata entries
2083 entry-0014 size 14
2074 entry-0014 size 14
2084 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
2075 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d'
2085 touched : d, ;
2076 touched : d, ;
2086 ##### revision "mCB-change-m-0 merge explicitely revive deleted file - B side" #####
2077 ##### revision "mCB-change-m-0 merge explicitely revive deleted file - B side" #####
2087 1 sidedata entries
2078 1 sidedata entries
2088 entry-0014 size 14
2079 entry-0014 size 14
2089 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2080 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2090 salvaged : d, ;
2081 salvaged : d, ;
2091 ##### revision "mBC-change-m-0 merge explicitely revive deleted file - B side" #####
2082 ##### revision "mBC-change-m-0 merge explicitely revive deleted file - B side" #####
2092 1 sidedata entries
2083 1 sidedata entries
2093 entry-0014 size 14
2084 entry-0014 size 14
2094 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2085 '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d'
2095 salvaged : d, ;
2086 salvaged : d, ;
2096 ##### revision "j-1" #####
2087 ##### revision "j-1" #####
2097 1 sidedata entries
2088 1 sidedata entries
2098 entry-0014 size 24
2089 entry-0014 size 24
2099 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2090 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2100 added : unrelated-j, ;
2091 added : unrelated-j, ;
2101 ##### revision "k-1" #####
2092 ##### revision "k-1" #####
2102 1 sidedata entries
2093 1 sidedata entries
2103 entry-0014 size 24
2094 entry-0014 size 24
2104 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k'
2095 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k'
2105 added : unrelated-k, ;
2096 added : unrelated-k, ;
2106 ##### revision "mAE,Km" #####
2097 ##### revision "mAE,Km" #####
2107 1 sidedata entries
2098 1 sidedata entries
2108 entry-0014 size 4
2099 entry-0014 size 4
2109 '\x00\x00\x00\x00'
2100 '\x00\x00\x00\x00'
2110 ##### revision "mK,AEm" #####
2101 ##### revision "mK,AEm" #####
2111 1 sidedata entries
2102 1 sidedata entries
2112 entry-0014 size 4
2103 entry-0014 size 4
2113 '\x00\x00\x00\x00'
2104 '\x00\x00\x00\x00'
2114 ##### revision "mEA,Jm" #####
2105 ##### revision "mEA,Jm" #####
2115 1 sidedata entries
2106 1 sidedata entries
2116 entry-0014 size 24
2107 entry-0014 size 24
2117 '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2108 '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2118 touched : unrelated-j, ;
2109 touched : unrelated-j, ;
2119 ##### revision "mJ,EAm" #####
2110 ##### revision "mJ,EAm" #####
2120 1 sidedata entries
2111 1 sidedata entries
2121 entry-0014 size 24
2112 entry-0014 size 24
2122 '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2113 '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j'
2123 touched : unrelated-j, ;
2114 touched : unrelated-j, ;
2124 ##### revision "s-1" #####
2115 ##### revision "s-1" #####
2125 1 sidedata entries
2116 1 sidedata entries
2126 entry-0014 size 24
2117 entry-0014 size 24
2127 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-s'
2118 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-s'
2128 added : unrelated-s, ;
2119 added : unrelated-s, ;
2129 ##### revision "t-1" #####
2120 ##### revision "t-1" #####
2130 1 sidedata entries
2121 1 sidedata entries
2131 entry-0014 size 24
2122 entry-0014 size 24
2132 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-t'
2123 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-t'
2133 added : unrelated-t, ;
2124 added : unrelated-t, ;
2134 ##### revision "mPQ,Tm" #####
2125 ##### revision "mPQ,Tm" #####
2135 1 sidedata entries
2126 1 sidedata entries
2136 entry-0014 size 4
2127 entry-0014 size 4
2137 '\x00\x00\x00\x00'
2128 '\x00\x00\x00\x00'
2138 ##### revision "mT,PQm" #####
2129 ##### revision "mT,PQm" #####
2139 1 sidedata entries
2130 1 sidedata entries
2140 entry-0014 size 4
2131 entry-0014 size 4
2141 '\x00\x00\x00\x00'
2132 '\x00\x00\x00\x00'
2142 ##### revision "mQP,Sm" #####
2133 ##### revision "mQP,Sm" #####
2143 1 sidedata entries
2134 1 sidedata entries
2144 entry-0014 size 4
2135 entry-0014 size 4
2145 '\x00\x00\x00\x00'
2136 '\x00\x00\x00\x00'
2146 ##### revision "mS,QPm" #####
2137 ##### revision "mS,QPm" #####
2147 1 sidedata entries
2138 1 sidedata entries
2148 entry-0014 size 4
2139 entry-0014 size 4
2149 '\x00\x00\x00\x00'
2140 '\x00\x00\x00\x00'
2150 ##### revision "l-1" #####
2141 ##### revision "l-1" #####
2151 1 sidedata entries
2142 1 sidedata entries
2152 entry-0014 size 24
2143 entry-0014 size 24
2153 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l'
2144 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l'
2154 added : unrelated-l, ;
2145 added : unrelated-l, ;
2155 ##### revision "mBC+revert,Lm" #####
2146 ##### revision "mBC+revert,Lm" #####
2156 1 sidedata entries
2147 1 sidedata entries
2157 entry-0014 size 4
2148 entry-0014 size 4
2158 '\x00\x00\x00\x00'
2149 '\x00\x00\x00\x00'
2159 ##### revision "mCB+revert,Lm" #####
2150 ##### revision "mCB+revert,Lm" #####
2160 1 sidedata entries
2151 1 sidedata entries
2161 entry-0014 size 4
2152 entry-0014 size 4
2162 '\x00\x00\x00\x00'
2153 '\x00\x00\x00\x00'
2163 ##### revision "mL,BC+revertm" #####
2154 ##### revision "mL,BC+revertm" #####
2164 1 sidedata entries
2155 1 sidedata entries
2165 entry-0014 size 4
2156 entry-0014 size 4
2166 '\x00\x00\x00\x00'
2157 '\x00\x00\x00\x00'
2167 ##### revision "mL,CB+revertm" #####
2158 ##### revision "mL,CB+revertm" #####
2168 1 sidedata entries
2159 1 sidedata entries
2169 entry-0014 size 4
2160 entry-0014 size 4
2170 '\x00\x00\x00\x00'
2161 '\x00\x00\x00\x00'
2171 ##### revision "n-1" #####
2162 ##### revision "n-1" #####
2172 1 sidedata entries
2163 1 sidedata entries
2173 entry-0014 size 24
2164 entry-0014 size 24
2174 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n'
2165 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n'
2175 added : unrelated-n, ;
2166 added : unrelated-n, ;
2176 ##### revision "o-1" #####
2167 ##### revision "o-1" #####
2177 1 sidedata entries
2168 1 sidedata entries
2178 entry-0014 size 24
2169 entry-0014 size 24
2179 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o'
2170 '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o'
2180 added : unrelated-o, ;
2171 added : unrelated-o, ;
2181 ##### revision "mFG,Om" #####
2172 ##### revision "mFG,Om" #####
2182 1 sidedata entries
2173 1 sidedata entries
2183 entry-0014 size 4
2174 entry-0014 size 4
2184 '\x00\x00\x00\x00'
2175 '\x00\x00\x00\x00'
2185 ##### revision "mO,FGm" #####
2176 ##### revision "mO,FGm" #####
2186 1 sidedata entries
2177 1 sidedata entries
2187 entry-0014 size 4
2178 entry-0014 size 4
2188 '\x00\x00\x00\x00'
2179 '\x00\x00\x00\x00'
2189 ##### revision "mGF,Nm" #####
2180 ##### revision "mGF,Nm" #####
2190 1 sidedata entries
2181 1 sidedata entries
2191 entry-0014 size 4
2182 entry-0014 size 4
2192 '\x00\x00\x00\x00'
2183 '\x00\x00\x00\x00'
2193 ##### revision "mN,GFm" #####
2184 ##### revision "mN,GFm" #####
2194 1 sidedata entries
2185 1 sidedata entries
2195 entry-0014 size 4
2186 entry-0014 size 4
2196 '\x00\x00\x00\x00'
2187 '\x00\x00\x00\x00'
2197 ##### revision "mAE-change,Km" #####
2188 ##### revision "mAE-change,Km" #####
2198 1 sidedata entries
2189 1 sidedata entries
2199 entry-0014 size 4
2190 entry-0014 size 4
2200 '\x00\x00\x00\x00'
2191 '\x00\x00\x00\x00'
2201 ##### revision "mK,AE-change-m" #####
2192 ##### revision "mK,AE-change-m" #####
2202 1 sidedata entries
2193 1 sidedata entries
2203 entry-0014 size 4
2194 entry-0014 size 4
2204 '\x00\x00\x00\x00'
2195 '\x00\x00\x00\x00'
2205 ##### revision "mEA-change,Jm" #####
2196 ##### revision "mEA-change,Jm" #####
2206 1 sidedata entries
2197 1 sidedata entries
2207 entry-0014 size 4
2198 entry-0014 size 4
2208 '\x00\x00\x00\x00'
2199 '\x00\x00\x00\x00'
2209 ##### revision "mJ,EA-change-m" #####
2200 ##### revision "mJ,EA-change-m" #####
2210 1 sidedata entries
2201 1 sidedata entries
2211 entry-0014 size 4
2202 entry-0014 size 4
2212 '\x00\x00\x00\x00'
2203 '\x00\x00\x00\x00'
2213
2204
2214 #endif
2205 #endif
2215
2206
2216
2207
2217 Test copy information chaining
2208 Test copy information chaining
2218 ==============================
2209 ==============================
2219
2210
2220 Check that matching only affect the destination and not intermediate path
2211 Check that matching only affect the destination and not intermediate path
2221 -------------------------------------------------------------------------
2212 -------------------------------------------------------------------------
2222
2213
2223 The two status call should give the same value for f
2214 The two status call should give the same value for f
2224
2215
2225 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")'
2216 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")'
2226 A f
2217 A f
2227 a
2218 a
2228 A t
2219 A t
2229 p
2220 p
2230 R a
2221 R a
2231 R p
2222 R p
2232 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f
2223 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f
2233 A f
2224 A f
2234 a (no-changeset no-compatibility !)
2225 a (no-changeset no-compatibility !)
2235
2226
2236 merging with unrelated change does not interfere with the renames
2227 merging with unrelated change does not interfere with the renames
2237 ---------------------------------------------------------------
2228 ---------------------------------------------------------------
2238
2229
2239 - rename on one side
2230 - rename on one side
2240 - unrelated change on the other side
2231 - unrelated change on the other side
2241
2232
2242 $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))'
2233 $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))'
2243 o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
2234 o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way
2244 |\
2235 |\
2245 +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
2236 +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way
2246 | |/
2237 | |/
2247 | o b-1: b update
2238 | o b-1: b update
2248 | |
2239 | |
2249 o | a-2: e -move-> f
2240 o | a-2: e -move-> f
2250 | |
2241 | |
2251 o | a-1: d -move-> e
2242 o | a-1: d -move-> e
2252 |/
2243 |/
2253 o i-2: c -move-> d, s -move-> t
2244 o i-2: c -move-> d, s -move-> t
2254 |
2245 |
2255 o i-1: a -move-> c, p -move-> s
2246 o i-1: a -move-> c, p -move-> s
2256 |
2247 |
2257 o i-0 initial commit: a b h p q r
2248 o i-0 initial commit: a b h p q r
2258
2249
2259
2250
2260 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")'
2251 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")'
2261 A f
2252 A f
2262 d
2253 d
2263 R d
2254 R d
2264 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")'
2255 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")'
2265 A f
2256 A f
2266 d
2257 d
2267 R d
2258 R d
2268 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")'
2259 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")'
2269 M b
2260 M b
2270 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")'
2261 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")'
2271 M b
2262 M b
2272 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")'
2263 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")'
2273 M b
2264 M b
2274 A f
2265 A f
2275 d
2266 d
2276 R d
2267 R d
2277 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")'
2268 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")'
2278 M b
2269 M b
2279 A f
2270 A f
2280 d
2271 d
2281 R d
2272 R d
2282 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")'
2273 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")'
2283 M b
2274 M b
2284 A f
2275 A f
2285 a
2276 a
2286 A t
2277 A t
2287 p
2278 p
2288 R a
2279 R a
2289 R p
2280 R p
2290 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")'
2281 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")'
2291 M b
2282 M b
2292 A f
2283 A f
2293 a
2284 a
2294 A t
2285 A t
2295 p
2286 p
2296 R a
2287 R a
2297 R p
2288 R p
2298
2289
2299 merging with the side having a delete
2290 merging with the side having a delete
2300 -------------------------------------
2291 -------------------------------------
2301
2292
2302 case summary:
2293 case summary:
2303 - one with change to an unrelated file
2294 - one with change to an unrelated file
2304 - one deleting the change
2295 - one deleting the change
2305 and recreate an unrelated file after the merge
2296 and recreate an unrelated file after the merge
2306
2297
2307 $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))'
2298 $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))'
2308 o mCBm-1 re-add d
2299 o mCBm-1 re-add d
2309 |
2300 |
2310 o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
2301 o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way
2311 |\
2302 |\
2312 | | o mBCm-1 re-add d
2303 | | o mBCm-1 re-add d
2313 | | |
2304 | | |
2314 +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
2305 +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way
2315 | |/
2306 | |/
2316 | o c-1 delete d
2307 | o c-1 delete d
2317 | |
2308 | |
2318 o | b-1: b update
2309 o | b-1: b update
2319 |/
2310 |/
2320 o i-2: c -move-> d, s -move-> t
2311 o i-2: c -move-> d, s -move-> t
2321 |
2312 |
2322 o i-1: a -move-> c, p -move-> s
2313 o i-1: a -move-> c, p -move-> s
2323 |
2314 |
2324 o i-0 initial commit: a b h p q r
2315 o i-0 initial commit: a b h p q r
2325
2316
2326 - comparing from the merge
2317 - comparing from the merge
2327
2318
2328 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")'
2319 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")'
2329 R d
2320 R d
2330 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")'
2321 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")'
2331 R d
2322 R d
2332 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")'
2323 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")'
2333 M b
2324 M b
2334 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")'
2325 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")'
2335 M b
2326 M b
2336 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")'
2327 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")'
2337 M b
2328 M b
2338 R d
2329 R d
2339 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")'
2330 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")'
2340 M b
2331 M b
2341 R d
2332 R d
2342 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")'
2333 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")'
2343 M b
2334 M b
2344 A t
2335 A t
2345 p
2336 p
2346 R a
2337 R a
2347 R p
2338 R p
2348 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")'
2339 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")'
2349 M b
2340 M b
2350 A t
2341 A t
2351 p
2342 p
2352 R a
2343 R a
2353 R p
2344 R p
2354
2345
2355 - comparing with the merge children re-adding the file
2346 - comparing with the merge children re-adding the file
2356
2347
2357 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")'
2348 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")'
2358 M d
2349 M d
2359 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")'
2350 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")'
2360 M d
2351 M d
2361 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")'
2352 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")'
2362 M b
2353 M b
2363 A d
2354 A d
2364 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")'
2355 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")'
2365 M b
2356 M b
2366 A d
2357 A d
2367 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")'
2358 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")'
2368 M b
2359 M b
2369 M d
2360 M d
2370 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")'
2361 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")'
2371 M b
2362 M b
2372 M d
2363 M d
2373 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")'
2364 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")'
2374 M b
2365 M b
2375 A d
2366 A d
2376 A t
2367 A t
2377 p
2368 p
2378 R a
2369 R a
2379 R p
2370 R p
2380 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")'
2371 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")'
2381 M b
2372 M b
2382 A d
2373 A d
2383 A t
2374 A t
2384 p
2375 p
2385 R a
2376 R a
2386 R p
2377 R p
2387
2378
2388 Comparing with a merge re-adding the file afterward
2379 Comparing with a merge re-adding the file afterward
2389 ---------------------------------------------------
2380 ---------------------------------------------------
2390
2381
2391 Merge:
2382 Merge:
2392 - one with change to an unrelated file
2383 - one with change to an unrelated file
2393 - one deleting and recreating the change
2384 - one deleting and recreating the change
2394
2385
2395 $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))'
2386 $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))'
2396 o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
2387 o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way
2397 |\
2388 |\
2398 +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
2389 +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way
2399 | |/
2390 | |/
2400 | o d-2 re-add d
2391 | o d-2 re-add d
2401 | |
2392 | |
2402 | o d-1 delete d
2393 | o d-1 delete d
2403 | |
2394 | |
2404 o | b-1: b update
2395 o | b-1: b update
2405 |/
2396 |/
2406 o i-2: c -move-> d, s -move-> t
2397 o i-2: c -move-> d, s -move-> t
2407 |
2398 |
2408 o i-1: a -move-> c, p -move-> s
2399 o i-1: a -move-> c, p -move-> s
2409 |
2400 |
2410 o i-0 initial commit: a b h p q r
2401 o i-0 initial commit: a b h p q r
2411
2402
2412 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")'
2403 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")'
2413 M d
2404 M d
2414 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")'
2405 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")'
2415 M d
2406 M d
2416 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")'
2407 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")'
2417 M b
2408 M b
2418 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")'
2409 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")'
2419 M b
2410 M b
2420 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")'
2411 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")'
2421 M b
2412 M b
2422 M d
2413 M d
2423 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")'
2414 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")'
2424 M b
2415 M b
2425 M d
2416 M d
2426
2417
2427 The bugs makes recorded copy is different depending of where we started the merge from since
2418 The bugs makes recorded copy is different depending of where we started the merge from since
2428
2419
2429 $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d'
2420 $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d'
2430 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2421 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2431 $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d'
2422 $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d'
2432 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2423 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2433
2424
2434 $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d'
2425 $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d'
2435 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2426 b004912a8510032a0350a74daa2803dadfb00e12 644 d
2436 $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d'
2427 $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d'
2437 d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !)
2428 d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !)
2438 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !)
2429 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !)
2439 $ hg debugindex d | head -n 4 | "$PYTHON" ../no-linkrev
2430 $ hg debugindex d | head -n 4 | "$PYTHON" ../no-linkrev
2440 rev linkrev nodeid p1 p2
2431 rev linkrev nodeid p1 p2
2441 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !)
2432 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !)
2442 0 * ae258f702dfe 000000000000 000000000000 (changeset !)
2433 0 * ae258f702dfe 000000000000 000000000000 (changeset !)
2443 1 * b004912a8510 000000000000 000000000000
2434 1 * b004912a8510 000000000000 000000000000
2444 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !)
2435 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !)
2445 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !)
2436 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !)
2446
2437
2447 Log output should not include a merge commit as it did not happen
2438 Log output should not include a merge commit as it did not happen
2448
2439
2449 $ hg log -Gfr 'desc("mBDm-0")' d
2440 $ hg log -Gfr 'desc("mBDm-0")' d
2450 o d-2 re-add d
2441 o d-2 re-add d
2451 |
2442 |
2452 ~
2443 ~
2453
2444
2454 $ hg log -Gfr 'desc("mDBm-0")' d
2445 $ hg log -Gfr 'desc("mDBm-0")' d
2455 o d-2 re-add d
2446 o d-2 re-add d
2456 |
2447 |
2457 ~
2448 ~
2458
2449
2459 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")'
2450 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")'
2460 M b
2451 M b
2461 A d
2452 A d
2462 A t
2453 A t
2463 p
2454 p
2464 R a
2455 R a
2465 R p
2456 R p
2466 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")'
2457 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")'
2467 M b
2458 M b
2468 A d
2459 A d
2469 A t
2460 A t
2470 p
2461 p
2471 R a
2462 R a
2472 R p
2463 R p
2473
2464
2474
2465
2475 Comparing with a merge with colliding rename
2466 Comparing with a merge with colliding rename
2476 --------------------------------------------
2467 --------------------------------------------
2477
2468
2478 Subcase: new copy information on both side
2469 Subcase: new copy information on both side
2479 ``````````````````````````````````````````
2470 ``````````````````````````````````````````
2480
2471
2481 - the "e-" branch renaming b to f (through 'g')
2472 - the "e-" branch renaming b to f (through 'g')
2482 - the "a-" branch renaming d to f (through e)
2473 - the "a-" branch renaming d to f (through e)
2483
2474
2484 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
2475 $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))'
2485 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
2476 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
2486 |\
2477 |\
2487 +---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
2478 +---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
2488 | |/
2479 | |/
2489 | o e-2 g -move-> f
2480 | o e-2 g -move-> f
2490 | |
2481 | |
2491 | o e-1 b -move-> g
2482 | o e-1 b -move-> g
2492 | |
2483 | |
2493 o | a-2: e -move-> f
2484 o | a-2: e -move-> f
2494 | |
2485 | |
2495 o | a-1: d -move-> e
2486 o | a-1: d -move-> e
2496 |/
2487 |/
2497 o i-2: c -move-> d, s -move-> t
2488 o i-2: c -move-> d, s -move-> t
2498 |
2489 |
2499 o i-1: a -move-> c, p -move-> s
2490 o i-1: a -move-> c, p -move-> s
2500 |
2491 |
2501 o i-0 initial commit: a b h p q r
2492 o i-0 initial commit: a b h p q r
2502
2493
2503 #if no-changeset
2494 #if no-changeset
2504 $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f'
2495 $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f'
2505 2ff93c643948464ee1f871867910ae43a45b0bea 644 f
2496 2ff93c643948464ee1f871867910ae43a45b0bea 644 f
2506 $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f'
2497 $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f'
2507 2ff93c643948464ee1f871867910ae43a45b0bea 644 f
2498 2ff93c643948464ee1f871867910ae43a45b0bea 644 f
2508 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
2499 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
2509 b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f
2500 b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f
2510 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
2501 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
2511 e8825b386367b29fec957283a80bb47b47483fe1 644 f
2502 e8825b386367b29fec957283a80bb47b47483fe1 644 f
2512 $ hg debugindex f | "$PYTHON" ../no-linkrev
2503 $ hg debugindex f | "$PYTHON" ../no-linkrev
2513 rev linkrev nodeid p1 p2
2504 rev linkrev nodeid p1 p2
2514 0 * b76eb76580df 000000000000 000000000000
2505 0 * b76eb76580df 000000000000 000000000000
2515 1 * e8825b386367 000000000000 000000000000
2506 1 * e8825b386367 000000000000 000000000000
2516 2 * 2ff93c643948 b76eb76580df e8825b386367
2507 2 * 2ff93c643948 b76eb76580df e8825b386367
2517 3 * 2f649fba7eb2 b76eb76580df e8825b386367
2508 3 * 2f649fba7eb2 b76eb76580df e8825b386367
2518 4 * 774e7c1637d5 e8825b386367 b76eb76580df
2509 4 * 774e7c1637d5 e8825b386367 b76eb76580df
2519 #else
2510 #else
2520 $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f'
2511 $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f'
2521 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2512 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2522 $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f'
2513 $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f'
2523 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2514 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2524 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
2515 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
2525 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2516 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2526 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
2517 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
2527 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2518 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
2528 $ hg debugindex f | "$PYTHON" ../no-linkrev
2519 $ hg debugindex f | "$PYTHON" ../no-linkrev
2529 rev linkrev nodeid p1 p2
2520 rev linkrev nodeid p1 p2
2530 0 * ae258f702dfe 000000000000 000000000000
2521 0 * ae258f702dfe 000000000000 000000000000
2531 1 * d3613c1ec831 ae258f702dfe 000000000000
2522 1 * d3613c1ec831 ae258f702dfe 000000000000
2532 2 * 05e03c868bbc ae258f702dfe 000000000000
2523 2 * 05e03c868bbc ae258f702dfe 000000000000
2533 #endif
2524 #endif
2534
2525
2535 # Here the filelog based implementation is not looking at the rename
2526 # Here the filelog based implementation is not looking at the rename
2536 # information (because the file exist on both side). However the changelog
2527 # information (because the file exist on both side). However the changelog
2537 # based on works fine. We have different output.
2528 # based on works fine. We have different output.
2538
2529
2539 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")'
2530 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")'
2540 M f (no-changeset !)
2531 M f (no-changeset !)
2541 b (no-filelog no-changeset !)
2532 b (no-filelog no-changeset !)
2542 R b
2533 R b
2543 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")'
2534 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")'
2544 M f (no-changeset !)
2535 M f (no-changeset !)
2545 b (no-filelog no-changeset !)
2536 b (no-filelog no-changeset !)
2546 R b
2537 R b
2547 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")'
2538 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")'
2548 M f (no-changeset !)
2539 M f (no-changeset !)
2549 d (no-filelog no-changeset !)
2540 d (no-filelog no-changeset !)
2550 R d
2541 R d
2551 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")'
2542 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")'
2552 M f (no-changeset !)
2543 M f (no-changeset !)
2553 d (no-filelog no-changeset !)
2544 d (no-filelog no-changeset !)
2554 R d
2545 R d
2555 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
2546 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
2556 A f
2547 A f
2557 d
2548 d
2558 R d
2549 R d
2559 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")'
2550 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")'
2560 A f
2551 A f
2561 b
2552 b
2562 R b
2553 R b
2563
2554
2564 # From here, we run status against revision where both source file exists.
2555 # From here, we run status against revision where both source file exists.
2565 #
2556 #
2566 # The filelog based implementation picks an arbitrary side based on revision
2557 # The filelog based implementation picks an arbitrary side based on revision
2567 # numbers. So the same side "wins" whatever the parents order is. This is
2558 # numbers. So the same side "wins" whatever the parents order is. This is
2568 # sub-optimal because depending on revision numbers means the result can be
2559 # sub-optimal because depending on revision numbers means the result can be
2569 # different from one repository to the next.
2560 # different from one repository to the next.
2570 #
2561 #
2571 # The changeset based algorithm use the parent order to break tie on conflicting
2562 # The changeset based algorithm use the parent order to break tie on conflicting
2572 # information and will have a different order depending on who is p1 and p2.
2563 # information and will have a different order depending on who is p1 and p2.
2573 # That order is stable accross repositories. (data from p1 prevails)
2564 # That order is stable accross repositories. (data from p1 prevails)
2574
2565
2575 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")'
2566 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")'
2576 A f
2567 A f
2577 d
2568 d
2578 R b
2569 R b
2579 R d
2570 R d
2580 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")'
2571 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")'
2581 A f
2572 A f
2582 d (filelog !)
2573 d (filelog !)
2583 b (no-filelog !)
2574 b (no-filelog !)
2584 R b
2575 R b
2585 R d
2576 R d
2586 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")'
2577 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")'
2587 A f
2578 A f
2588 a
2579 a
2589 A t
2580 A t
2590 p
2581 p
2591 R a
2582 R a
2592 R b
2583 R b
2593 R p
2584 R p
2594 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")'
2585 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")'
2595 A f
2586 A f
2596 a (filelog !)
2587 a (filelog !)
2597 b (no-filelog !)
2588 b (no-filelog !)
2598 A t
2589 A t
2599 p
2590 p
2600 R a
2591 R a
2601 R b
2592 R b
2602 R p
2593 R p
2603
2594
2604
2595
2605 Subcase: existing copy information overwritten on one branch
2596 Subcase: existing copy information overwritten on one branch
2606 ````````````````````````````````````````````````````````````
2597 ````````````````````````````````````````````````````````````
2607
2598
2608 Note:
2599 Note:
2609 | In this case, one of the merge wrongly record a merge while there is none.
2600 | In this case, one of the merge wrongly record a merge while there is none.
2610 | This lead to bad copy tracing information to be dug up.
2601 | This lead to bad copy tracing information to be dug up.
2611
2602
2612
2603
2613 Merge:
2604 Merge:
2614 - one with change to an unrelated file (b)
2605 - one with change to an unrelated file (b)
2615 - one overwriting a file (d) with a rename (from h to i to d)
2606 - one overwriting a file (d) with a rename (from h to i to d)
2616
2607
2617 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
2608 $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))'
2618 o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
2609 o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way
2619 |\
2610 |\
2620 +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
2611 +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way
2621 | |/
2612 | |/
2622 | o f-2: rename i -> d
2613 | o f-2: rename i -> d
2623 | |
2614 | |
2624 | o f-1: rename h -> i
2615 | o f-1: rename h -> i
2625 | |
2616 | |
2626 o | b-1: b update
2617 o | b-1: b update
2627 |/
2618 |/
2628 o i-2: c -move-> d, s -move-> t
2619 o i-2: c -move-> d, s -move-> t
2629 |
2620 |
2630 o i-1: a -move-> c, p -move-> s
2621 o i-1: a -move-> c, p -move-> s
2631 |
2622 |
2632 o i-0 initial commit: a b h p q r
2623 o i-0 initial commit: a b h p q r
2633
2624
2634 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")'
2625 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")'
2635 M b
2626 M b
2636 A d
2627 A d
2637 h
2628 h
2638 A t
2629 A t
2639 p
2630 p
2640 R a
2631 R a
2641 R h
2632 R h
2642 R p
2633 R p
2643 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")'
2634 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")'
2644 M b
2635 M b
2645 A d
2636 A d
2646 h
2637 h
2647 A t
2638 A t
2648 p
2639 p
2649 R a
2640 R a
2650 R h
2641 R h
2651 R p
2642 R p
2652 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")'
2643 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")'
2653 M d (no-changeset !)
2644 M d (no-changeset !)
2654 h (no-filelog no-changeset !)
2645 h (no-filelog no-changeset !)
2655 R h
2646 R h
2656 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")'
2647 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")'
2657 M b
2648 M b
2658 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")'
2649 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")'
2659 M b
2650 M b
2660 M d (no-changeset !)
2651 M d (no-changeset !)
2661 i (no-filelog no-changeset !)
2652 i (no-filelog no-changeset !)
2662 R i
2653 R i
2663 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")'
2654 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")'
2664 M d (no-changeset !)
2655 M d (no-changeset !)
2665 h (no-filelog no-changeset !)
2656 h (no-filelog no-changeset !)
2666 R h
2657 R h
2667 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")'
2658 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")'
2668 M b
2659 M b
2669 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")'
2660 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")'
2670 M b
2661 M b
2671 M d (no-changeset !)
2662 M d (no-changeset !)
2672 i (no-filelog no-changeset !)
2663 i (no-filelog no-changeset !)
2673 R i
2664 R i
2674
2665
2675 #if no-changeset
2666 #if no-changeset
2676 $ hg log -Gfr 'desc("mBFm-0")' d
2667 $ hg log -Gfr 'desc("mBFm-0")' d
2677 o f-2: rename i -> d
2668 o f-2: rename i -> d
2678 |
2669 |
2679 o f-1: rename h -> i
2670 o f-1: rename h -> i
2680 :
2671 :
2681 o i-0 initial commit: a b h p q r
2672 o i-0 initial commit: a b h p q r
2682
2673
2683 #else
2674 #else
2684 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2675 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2685 $ hg log -Gfr 'desc("mBFm-0")' d
2676 $ hg log -Gfr 'desc("mBFm-0")' d
2686 o i-2: c -move-> d, s -move-> t
2677 o i-2: c -move-> d, s -move-> t
2687 |
2678 |
2688 ~
2679 ~
2689 #endif
2680 #endif
2690
2681
2691 #if no-changeset
2682 #if no-changeset
2692 $ hg log -Gfr 'desc("mFBm-0")' d
2683 $ hg log -Gfr 'desc("mFBm-0")' d
2693 o f-2: rename i -> d
2684 o f-2: rename i -> d
2694 |
2685 |
2695 o f-1: rename h -> i
2686 o f-1: rename h -> i
2696 :
2687 :
2697 o i-0 initial commit: a b h p q r
2688 o i-0 initial commit: a b h p q r
2698
2689
2699 #else
2690 #else
2700 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2691 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2701 $ hg log -Gfr 'desc("mFBm-0")' d
2692 $ hg log -Gfr 'desc("mFBm-0")' d
2702 o i-2: c -move-> d, s -move-> t
2693 o i-2: c -move-> d, s -move-> t
2703 |
2694 |
2704 ~
2695 ~
2705 #endif
2696 #endif
2706
2697
2707
2698
2708 Subcase: existing copy information overwritten on one branch, with different content)
2699 Subcase: existing copy information overwritten on one branch, with different content)
2709 `````````````````````````````````````````````````````````````````````````````````````
2700 `````````````````````````````````````````````````````````````````````````````````````
2710
2701
2711 Merge:
2702 Merge:
2712 - one with change to an unrelated file (b)
2703 - one with change to an unrelated file (b)
2713 - 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
2704 - 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
2714
2705
2715 $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))'
2706 $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))'
2716 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
2707 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
2717 |\
2708 |\
2718 +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
2709 +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way
2719 | |/
2710 | |/
2720 | o r-2: rename t -> x
2711 | o r-2: rename t -> x
2721 | |
2712 | |
2722 | o r-1: rename r -> x
2713 | o r-1: rename r -> x
2723 | |
2714 | |
2724 o | b-1: b update
2715 o | b-1: b update
2725 |/
2716 |/
2726 o i-2: c -move-> d, s -move-> t
2717 o i-2: c -move-> d, s -move-> t
2727 |
2718 |
2728 o i-1: a -move-> c, p -move-> s
2719 o i-1: a -move-> c, p -move-> s
2729 |
2720 |
2730 o i-0 initial commit: a b h p q r
2721 o i-0 initial commit: a b h p q r
2731
2722
2732 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBRm-0")'
2723 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBRm-0")'
2733 M b
2724 M b
2734 A d
2725 A d
2735 a
2726 a
2736 A t
2727 A t
2737 r
2728 r
2738 R a
2729 R a
2739 R p
2730 R p
2740 R r
2731 R r
2741 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mRBm-0")'
2732 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mRBm-0")'
2742 M b
2733 M b
2743 A d
2734 A d
2744 a
2735 a
2745 A t
2736 A t
2746 r
2737 r
2747 R a
2738 R a
2748 R p
2739 R p
2749 R r
2740 R r
2750 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBRm-0")'
2741 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBRm-0")'
2751 M t
2742 M t
2752 r (no-filelog !)
2743 r (no-filelog !)
2753 R r
2744 R r
2754 $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mBRm-0")'
2745 $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mBRm-0")'
2755 M b
2746 M b
2756 $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mBRm-0")'
2747 $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mBRm-0")'
2757 M b
2748 M b
2758 M t
2749 M t
2759 x (no-filelog !)
2750 x (no-filelog !)
2760 R x
2751 R x
2761 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mRBm-0")'
2752 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mRBm-0")'
2762 M t
2753 M t
2763 r (no-filelog !)
2754 r (no-filelog !)
2764 R r
2755 R r
2765 $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mRBm-0")'
2756 $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mRBm-0")'
2766 M b
2757 M b
2767 $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mRBm-0")'
2758 $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mRBm-0")'
2768 M b
2759 M b
2769 M t
2760 M t
2770 x (no-filelog !)
2761 x (no-filelog !)
2771 R x
2762 R x
2772
2763
2773 #if no-changeset
2764 #if no-changeset
2774 $ hg log -Gfr 'desc("mBRm-0")' d
2765 $ hg log -Gfr 'desc("mBRm-0")' d
2775 o i-2: c -move-> d, s -move-> t
2766 o i-2: c -move-> d, s -move-> t
2776 |
2767 |
2777 o i-1: a -move-> c, p -move-> s
2768 o i-1: a -move-> c, p -move-> s
2778 |
2769 |
2779 o i-0 initial commit: a b h p q r
2770 o i-0 initial commit: a b h p q r
2780
2771
2781 #else
2772 #else
2782 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2773 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2783 $ hg log -Gfr 'desc("mBRm-0")' d
2774 $ hg log -Gfr 'desc("mBRm-0")' d
2784 o i-2: c -move-> d, s -move-> t
2775 o i-2: c -move-> d, s -move-> t
2785 |
2776 |
2786 ~
2777 ~
2787 #endif
2778 #endif
2788
2779
2789 #if no-changeset
2780 #if no-changeset
2790 $ hg log -Gfr 'desc("mRBm-0")' d
2781 $ hg log -Gfr 'desc("mRBm-0")' d
2791 o i-2: c -move-> d, s -move-> t
2782 o i-2: c -move-> d, s -move-> t
2792 |
2783 |
2793 o i-1: a -move-> c, p -move-> s
2784 o i-1: a -move-> c, p -move-> s
2794 |
2785 |
2795 o i-0 initial commit: a b h p q r
2786 o i-0 initial commit: a b h p q r
2796
2787
2797 #else
2788 #else
2798 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2789 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2799 $ hg log -Gfr 'desc("mRBm-0")' d
2790 $ hg log -Gfr 'desc("mRBm-0")' d
2800 o i-2: c -move-> d, s -move-> t
2791 o i-2: c -move-> d, s -move-> t
2801 |
2792 |
2802 ~
2793 ~
2803 #endif
2794 #endif
2804
2795
2805 Subcase: reset of the copy history on one side
2796 Subcase: reset of the copy history on one side
2806 ``````````````````````````````````````````````
2797 ``````````````````````````````````````````````
2807
2798
2808 Merge:
2799 Merge:
2809 - one with change to a file
2800 - one with change to a file
2810 - one deleting and recreating the file
2801 - one deleting and recreating the file
2811
2802
2812 Unlike in the 'BD/DB' cases, an actual merge happened here. So we should
2803 Unlike in the 'BD/DB' cases, an actual merge happened here. So we should
2813 consider history and rename on both branch of the merge.
2804 consider history and rename on both branch of the merge.
2814
2805
2815 $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))'
2806 $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))'
2816 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
2807 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
2817 |\
2808 |\
2818 +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2809 +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2819 | |/
2810 | |/
2820 | o g-1: update d
2811 | o g-1: update d
2821 | |
2812 | |
2822 o | d-2 re-add d
2813 o | d-2 re-add d
2823 | |
2814 | |
2824 o | d-1 delete d
2815 o | d-1 delete d
2825 |/
2816 |/
2826 o i-2: c -move-> d, s -move-> t
2817 o i-2: c -move-> d, s -move-> t
2827 |
2818 |
2828 o i-1: a -move-> c, p -move-> s
2819 o i-1: a -move-> c, p -move-> s
2829 |
2820 |
2830 o i-0 initial commit: a b h p q r
2821 o i-0 initial commit: a b h p q r
2831
2822
2832 One side of the merge have a long history with rename. The other side of the
2823 One side of the merge have a long history with rename. The other side of the
2833 merge point to a new file with a smaller history. Each side is "valid".
2824 merge point to a new file with a smaller history. Each side is "valid".
2834
2825
2835 (and again the filelog based algorithm only explore one, with a pick based on
2826 (and again the filelog based algorithm only explore one, with a pick based on
2836 revision numbers)
2827 revision numbers)
2837
2828
2838 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")'
2829 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")'
2839 A d
2830 A d
2840 a (filelog !)
2831 a (filelog !)
2841 A t
2832 A t
2842 p
2833 p
2843 R a
2834 R a
2844 R p
2835 R p
2845 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")'
2836 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")'
2846 A d
2837 A d
2847 a
2838 a
2848 A t
2839 A t
2849 p
2840 p
2850 R a
2841 R a
2851 R p
2842 R p
2852 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")'
2843 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")'
2853 M d
2844 M d
2854 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")'
2845 $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")'
2855 M d
2846 M d
2856 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")'
2847 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")'
2857 M d
2848 M d
2858 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")'
2849 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")'
2859 M d
2850 M d
2860
2851
2861 #if no-changeset
2852 #if no-changeset
2862 $ hg log -Gfr 'desc("mDGm-0")' d
2853 $ hg log -Gfr 'desc("mDGm-0")' d
2863 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2854 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2864 |\
2855 |\
2865 | o g-1: update d
2856 | o g-1: update d
2866 | |
2857 | |
2867 o | d-2 re-add d
2858 o | d-2 re-add d
2868 |/
2859 |/
2869 o i-2: c -move-> d, s -move-> t
2860 o i-2: c -move-> d, s -move-> t
2870 |
2861 |
2871 o i-1: a -move-> c, p -move-> s
2862 o i-1: a -move-> c, p -move-> s
2872 |
2863 |
2873 o i-0 initial commit: a b h p q r
2864 o i-0 initial commit: a b h p q r
2874
2865
2875 #else
2866 #else
2876 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2867 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2877 $ hg log -Gfr 'desc("mDGm-0")' d
2868 $ hg log -Gfr 'desc("mDGm-0")' d
2878 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2869 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2879 |\
2870 |\
2880 | o g-1: update d
2871 | o g-1: update d
2881 | |
2872 | |
2882 o | d-2 re-add d
2873 o | d-2 re-add d
2883 |/
2874 |/
2884 o i-2: c -move-> d, s -move-> t
2875 o i-2: c -move-> d, s -move-> t
2885 |
2876 |
2886 ~
2877 ~
2887 #endif
2878 #endif
2888
2879
2889
2880
2890 #if no-changeset
2881 #if no-changeset
2891 $ hg log -Gfr 'desc("mDGm-0")' d
2882 $ hg log -Gfr 'desc("mDGm-0")' d
2892 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2883 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2893 |\
2884 |\
2894 | o g-1: update d
2885 | o g-1: update d
2895 | |
2886 | |
2896 o | d-2 re-add d
2887 o | d-2 re-add d
2897 |/
2888 |/
2898 o i-2: c -move-> d, s -move-> t
2889 o i-2: c -move-> d, s -move-> t
2899 |
2890 |
2900 o i-1: a -move-> c, p -move-> s
2891 o i-1: a -move-> c, p -move-> s
2901 |
2892 |
2902 o i-0 initial commit: a b h p q r
2893 o i-0 initial commit: a b h p q r
2903
2894
2904 #else
2895 #else
2905 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2896 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
2906 $ hg log -Gfr 'desc("mDGm-0")' d
2897 $ hg log -Gfr 'desc("mDGm-0")' d
2907 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2898 o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way
2908 |\
2899 |\
2909 | o g-1: update d
2900 | o g-1: update d
2910 | |
2901 | |
2911 o | d-2 re-add d
2902 o | d-2 re-add d
2912 |/
2903 |/
2913 o i-2: c -move-> d, s -move-> t
2904 o i-2: c -move-> d, s -move-> t
2914 |
2905 |
2915 ~
2906 ~
2916 #endif
2907 #endif
2917
2908
2918 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
2909 Subcase: merging a change to a file with a "copy overwrite" to that file from another branch
2919 ````````````````````````````````````````````````````````````````````````````````````````````
2910 ````````````````````````````````````````````````````````````````````````````````````````````
2920
2911
2921 Merge:
2912 Merge:
2922 - one with change to a file (d)
2913 - one with change to a file (d)
2923 - one overwriting that file with a rename (from h to i, to d)
2914 - one overwriting that file with a rename (from h to i, to d)
2924
2915
2925 This case is similar to BF/FB, but an actual merge happens, so both side of the
2916 This case is similar to BF/FB, but an actual merge happens, so both side of the
2926 history are relevant.
2917 history are relevant.
2927
2918
2928
2919
2929 $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))'
2920 $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))'
2930 o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
2921 o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
2931 |\
2922 |\
2932 +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
2923 +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
2933 | |/
2924 | |/
2934 | o g-1: update d
2925 | o g-1: update d
2935 | |
2926 | |
2936 o | f-2: rename i -> d
2927 o | f-2: rename i -> d
2937 | |
2928 | |
2938 o | f-1: rename h -> i
2929 o | f-1: rename h -> i
2939 |/
2930 |/
2940 o i-2: c -move-> d, s -move-> t
2931 o i-2: c -move-> d, s -move-> t
2941 |
2932 |
2942 o i-1: a -move-> c, p -move-> s
2933 o i-1: a -move-> c, p -move-> s
2943 |
2934 |
2944 o i-0 initial commit: a b h p q r
2935 o i-0 initial commit: a b h p q r
2945
2936
2946
2937
2947 Note:
2938 Note:
2948 | In this case, the merge get conflicting information since on one side we have
2939 | In this case, the merge get conflicting information since on one side we have
2949 | "a -> c -> d". and one the other one we have "h -> i -> d".
2940 | "a -> c -> d". and one the other one we have "h -> i -> d".
2950 |
2941 |
2951 | The current code arbitrarily pick one side depending the ordering of the merged hash:
2942 | The current code arbitrarily pick one side depending the ordering of the merged hash:
2952
2943
2953 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"):
2944 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"):
2954
2945
2955 Details on this hash ordering pick:
2946 Details on this hash ordering pick:
2956
2947
2957 $ hg manifest --debug 'desc("g-1")' | egrep 'd$'
2948 $ hg manifest --debug 'desc("g-1")' | egrep 'd$'
2958 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !)
2949 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !)
2959 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !)
2950 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !)
2960 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d
2951 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d
2961 A d
2952 A d
2962 a (no-changeset no-compatibility !)
2953 a (no-changeset no-compatibility !)
2963
2954
2964 $ hg manifest --debug 'desc("f-2")' | egrep 'd$'
2955 $ hg manifest --debug 'desc("f-2")' | egrep 'd$'
2965 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !)
2956 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !)
2966 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !)
2957 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !)
2967 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d
2958 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d
2968 A d
2959 A d
2969 h (no-changeset no-compatibility !)
2960 h (no-changeset no-compatibility !)
2970
2961
2971 Copy tracing data on the resulting merge:
2962 Copy tracing data on the resulting merge:
2972
2963
2973 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")'
2964 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")'
2974 A d
2965 A d
2975 h (no-filelog !)
2966 h (no-filelog !)
2976 a (filelog !)
2967 a (filelog !)
2977 A t
2968 A t
2978 p
2969 p
2979 R a
2970 R a
2980 R h
2971 R h
2981 R p
2972 R p
2982 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")'
2973 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")'
2983 A d
2974 A d
2984 a (no-changeset !)
2975 a (no-changeset !)
2985 h (changeset !)
2976 h (changeset !)
2986 A t
2977 A t
2987 p
2978 p
2988 R a
2979 R a
2989 R h
2980 R h
2990 R p
2981 R p
2991 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")'
2982 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")'
2992 M d
2983 M d
2993 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")'
2984 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")'
2994 M d
2985 M d
2995 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")'
2986 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")'
2996 M d
2987 M d
2997 i (no-filelog !)
2988 i (no-filelog !)
2998 R i
2989 R i
2999 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")'
2990 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")'
3000 M d
2991 M d
3001 i (no-filelog !)
2992 i (no-filelog !)
3002 R i
2993 R i
3003 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")'
2994 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")'
3004 M d (no-changeset !)
2995 M d (no-changeset !)
3005 h (no-filelog no-changeset !)
2996 h (no-filelog no-changeset !)
3006 R h
2997 R h
3007 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")'
2998 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")'
3008 M d (no-changeset !)
2999 M d (no-changeset !)
3009 h (no-filelog no-changeset !)
3000 h (no-filelog no-changeset !)
3010 R h
3001 R h
3011
3002
3012 #if no-changeset
3003 #if no-changeset
3013 $ hg log -Gfr 'desc("mFGm-0")' d
3004 $ hg log -Gfr 'desc("mFGm-0")' d
3014 o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
3005 o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way
3015 |\
3006 |\
3016 | o g-1: update d
3007 | o g-1: update d
3017 | |
3008 | |
3018 o | f-2: rename i -> d
3009 o | f-2: rename i -> d
3019 | |
3010 | |
3020 o | f-1: rename h -> i
3011 o | f-1: rename h -> i
3021 |/
3012 |/
3022 o i-2: c -move-> d, s -move-> t
3013 o i-2: c -move-> d, s -move-> t
3023 |
3014 |
3024 o i-1: a -move-> c, p -move-> s
3015 o i-1: a -move-> c, p -move-> s
3025 |
3016 |
3026 o i-0 initial commit: a b h p q r
3017 o i-0 initial commit: a b h p q r
3027
3018
3028 #else
3019 #else
3029 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3020 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3030 $ hg log -Gfr 'desc("mFGm-0")' d
3021 $ hg log -Gfr 'desc("mFGm-0")' d
3031 o g-1: update d
3022 o g-1: update d
3032 |
3023 |
3033 o i-2: c -move-> d, s -move-> t
3024 o i-2: c -move-> d, s -move-> t
3034 |
3025 |
3035 ~
3026 ~
3036 #endif
3027 #endif
3037
3028
3038 #if no-changeset
3029 #if no-changeset
3039 $ hg log -Gfr 'desc("mGFm-0")' d
3030 $ hg log -Gfr 'desc("mGFm-0")' d
3040 o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
3031 o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way
3041 |\
3032 |\
3042 | o g-1: update d
3033 | o g-1: update d
3043 | |
3034 | |
3044 o | f-2: rename i -> d
3035 o | f-2: rename i -> d
3045 | |
3036 | |
3046 o | f-1: rename h -> i
3037 o | f-1: rename h -> i
3047 |/
3038 |/
3048 o i-2: c -move-> d, s -move-> t
3039 o i-2: c -move-> d, s -move-> t
3049 |
3040 |
3050 o i-1: a -move-> c, p -move-> s
3041 o i-1: a -move-> c, p -move-> s
3051 |
3042 |
3052 o i-0 initial commit: a b h p q r
3043 o i-0 initial commit: a b h p q r
3053
3044
3054 #else
3045 #else
3055 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3046 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3056 $ hg log -Gfr 'desc("mGFm-0")' d
3047 $ hg log -Gfr 'desc("mGFm-0")' d
3057 o g-1: update d
3048 o g-1: update d
3058 |
3049 |
3059 o i-2: c -move-> d, s -move-> t
3050 o i-2: c -move-> d, s -move-> t
3060 |
3051 |
3061 ~
3052 ~
3062 #endif
3053 #endif
3063
3054
3064 Subcase: new copy information on both side with an actual merge happening
3055 Subcase: new copy information on both side with an actual merge happening
3065 `````````````````````````````````````````````````````````````````````````
3056 `````````````````````````````````````````````````````````````````````````
3066
3057
3067 - the "p-" branch renaming 't' to 'v' (through 'u')
3058 - the "p-" branch renaming 't' to 'v' (through 'u')
3068 - the "q-" branch renaming 'r' to 'v' (through 'w')
3059 - the "q-" branch renaming 'r' to 'v' (through 'w')
3069
3060
3070
3061
3071 $ hg log -G --rev '::(desc("mPQm")+desc("mQPm"))'
3062 $ hg log -G --rev '::(desc("mPQm")+desc("mQPm"))'
3072 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
3063 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
3073 |\
3064 |\
3074 +---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
3065 +---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
3075 | |/
3066 | |/
3076 | o q-2 w -move-> v
3067 | o q-2 w -move-> v
3077 | |
3068 | |
3078 | o q-1 r -move-> w
3069 | o q-1 r -move-> w
3079 | |
3070 | |
3080 o | p-2: u -move-> v
3071 o | p-2: u -move-> v
3081 | |
3072 | |
3082 o | p-1: t -move-> u
3073 o | p-1: t -move-> u
3083 |/
3074 |/
3084 o i-2: c -move-> d, s -move-> t
3075 o i-2: c -move-> d, s -move-> t
3085 |
3076 |
3086 o i-1: a -move-> c, p -move-> s
3077 o i-1: a -move-> c, p -move-> s
3087 |
3078 |
3088 o i-0 initial commit: a b h p q r
3079 o i-0 initial commit: a b h p q r
3089
3080
3090
3081
3091 #if no-changeset
3082 #if no-changeset
3092 $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v'
3083 $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v'
3093 0946c662ef16e4e67397fd717389eb6693d41749 644 v
3084 0946c662ef16e4e67397fd717389eb6693d41749 644 v
3094 $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v'
3085 $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v'
3095 0db3aad7fcc1ec27fab57060e327b9e864ea0cc9 644 v
3086 0db3aad7fcc1ec27fab57060e327b9e864ea0cc9 644 v
3096 $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v'
3087 $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v'
3097 3f91841cd75cadc9a1f1b4e7c1aa6d411f76032e 644 v
3088 3f91841cd75cadc9a1f1b4e7c1aa6d411f76032e 644 v
3098 $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v'
3089 $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v'
3099 c43c088b811fd27983c0a9aadf44f3343cd4cd7e 644 v
3090 c43c088b811fd27983c0a9aadf44f3343cd4cd7e 644 v
3100 $ hg debugindex v | "$PYTHON" ../no-linkrev
3091 $ hg debugindex v | "$PYTHON" ../no-linkrev
3101 rev linkrev nodeid p1 p2
3092 rev linkrev nodeid p1 p2
3102 0 * 3f91841cd75c 000000000000 000000000000
3093 0 * 3f91841cd75c 000000000000 000000000000
3103 1 * c43c088b811f 000000000000 000000000000
3094 1 * c43c088b811f 000000000000 000000000000
3104 2 * 0946c662ef16 3f91841cd75c c43c088b811f
3095 2 * 0946c662ef16 3f91841cd75c c43c088b811f
3105 3 * 0db3aad7fcc1 c43c088b811f 3f91841cd75c
3096 3 * 0db3aad7fcc1 c43c088b811f 3f91841cd75c
3106 #else
3097 #else
3107 $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v'
3098 $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v'
3108 65fde9f6e4d4da23b3f610e07b53673ea9541d75 644 v
3099 65fde9f6e4d4da23b3f610e07b53673ea9541d75 644 v
3109 $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v'
3100 $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v'
3110 a098dda6413aecf154eefc976afc38b295acb7e5 644 v
3101 a098dda6413aecf154eefc976afc38b295acb7e5 644 v
3111 $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v'
3102 $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v'
3112 5aed6a8dbff0301328c08360d24354d3d064cf0d 644 v
3103 5aed6a8dbff0301328c08360d24354d3d064cf0d 644 v
3113 $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v'
3104 $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v'
3114 a38b2fa170219750dac9bc7d19df831f213ba708 644 v
3105 a38b2fa170219750dac9bc7d19df831f213ba708 644 v
3115 $ hg debugindex v | "$PYTHON" ../no-linkrev
3106 $ hg debugindex v | "$PYTHON" ../no-linkrev
3116 rev linkrev nodeid p1 p2
3107 rev linkrev nodeid p1 p2
3117 0 * 5aed6a8dbff0 000000000000 000000000000
3108 0 * 5aed6a8dbff0 000000000000 000000000000
3118 1 * a38b2fa17021 000000000000 000000000000
3109 1 * a38b2fa17021 000000000000 000000000000
3119 2 * 65fde9f6e4d4 5aed6a8dbff0 a38b2fa17021
3110 2 * 65fde9f6e4d4 5aed6a8dbff0 a38b2fa17021
3120 3 * a098dda6413a a38b2fa17021 5aed6a8dbff0
3111 3 * a098dda6413a a38b2fa17021 5aed6a8dbff0
3121 #endif
3112 #endif
3122
3113
3123 # Here the filelog based implementation is not looking at the rename
3114 # Here the filelog based implementation is not looking at the rename
3124 # information (because the file exist on both side). However the changelog
3115 # information (because the file exist on both side). However the changelog
3125 # based on works fine. We have different output.
3116 # based on works fine. We have different output.
3126
3117
3127 $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mPQm-0")'
3118 $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mPQm-0")'
3128 M v
3119 M v
3129 r (no-filelog !)
3120 r (no-filelog !)
3130 R r
3121 R r
3131 $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mQPm-0")'
3122 $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mQPm-0")'
3132 M v
3123 M v
3133 r (no-filelog !)
3124 r (no-filelog !)
3134 R r
3125 R r
3135 $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mPQm-0")'
3126 $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mPQm-0")'
3136 M v
3127 M v
3137 t (no-filelog !)
3128 t (no-filelog !)
3138 R t
3129 R t
3139 $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mQPm-0")'
3130 $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mQPm-0")'
3140 M v
3131 M v
3141 t (no-filelog !)
3132 t (no-filelog !)
3142 R t
3133 R t
3143 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("p-2")'
3134 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("p-2")'
3144 A v
3135 A v
3145 t
3136 t
3146 R t
3137 R t
3147 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("q-2")'
3138 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("q-2")'
3148 A v
3139 A v
3149 r
3140 r
3150 R r
3141 R r
3151
3142
3152 # From here, we run status against revision where both source file exists.
3143 # From here, we run status against revision where both source file exists.
3153 #
3144 #
3154 # The filelog based implementation picks an arbitrary side based on revision
3145 # The filelog based implementation picks an arbitrary side based on revision
3155 # numbers. So the same side "wins" whatever the parents order is. This is
3146 # numbers. So the same side "wins" whatever the parents order is. This is
3156 # sub-optimal because depending on revision numbers means the result can be
3147 # sub-optimal because depending on revision numbers means the result can be
3157 # different from one repository to the next.
3148 # different from one repository to the next.
3158 #
3149 #
3159 # The changeset based algorithm use the parent order to break tie on conflicting
3150 # The changeset based algorithm use the parent order to break tie on conflicting
3160 # information and will have a different order depending on who is p1 and p2.
3151 # information and will have a different order depending on who is p1 and p2.
3161 # That order is stable accross repositories. (data from p1 prevails)
3152 # That order is stable accross repositories. (data from p1 prevails)
3162
3153
3163 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mPQm-0")'
3154 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mPQm-0")'
3164 A v
3155 A v
3165 t
3156 t
3166 R r
3157 R r
3167 R t
3158 R t
3168 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mQPm-0")'
3159 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mQPm-0")'
3169 A v
3160 A v
3170 t (filelog !)
3161 t (filelog !)
3171 r (no-filelog !)
3162 r (no-filelog !)
3172 R r
3163 R r
3173 R t
3164 R t
3174 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm-0")'
3165 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm-0")'
3175 A d
3166 A d
3176 a
3167 a
3177 A v
3168 A v
3178 r (filelog !)
3169 r (filelog !)
3179 p (no-filelog !)
3170 p (no-filelog !)
3180 R a
3171 R a
3181 R p
3172 R p
3182 R r
3173 R r
3183 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm-0")'
3174 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm-0")'
3184 A d
3175 A d
3185 a
3176 a
3186 A v
3177 A v
3187 r
3178 r
3188 R a
3179 R a
3189 R p
3180 R p
3190 R r
3181 R r
3191
3182
3192
3183
3193 Comparing with merging with a deletion (and keeping the file)
3184 Comparing with merging with a deletion (and keeping the file)
3194 -------------------------------------------------------------
3185 -------------------------------------------------------------
3195
3186
3196 Merge:
3187 Merge:
3197 - one removing a file (d)
3188 - one removing a file (d)
3198 - one updating that file
3189 - one updating that file
3199 - the merge keep the modified version of the file (canceling the delete)
3190 - the merge keep the modified version of the file (canceling the delete)
3200
3191
3201 In this case, the file keep on living after the merge. So we should not drop its
3192 In this case, the file keep on living after the merge. So we should not drop its
3202 copy tracing chain.
3193 copy tracing chain.
3203
3194
3204 $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))'
3195 $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))'
3205 o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
3196 o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way
3206 |\
3197 |\
3207 +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way
3198 +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way
3208 | |/
3199 | |/
3209 | o g-1: update d
3200 | o g-1: update d
3210 | |
3201 | |
3211 o | c-1 delete d
3202 o | c-1 delete d
3212 |/
3203 |/
3213 o i-2: c -move-> d, s -move-> t
3204 o i-2: c -move-> d, s -move-> t
3214 |
3205 |
3215 o i-1: a -move-> c, p -move-> s
3206 o i-1: a -move-> c, p -move-> s
3216 |
3207 |
3217 o i-0 initial commit: a b h p q r
3208 o i-0 initial commit: a b h p q r
3218
3209
3219
3210
3220 'a' is the copy source of 'd'
3211 'a' is the copy source of 'd'
3221
3212
3222 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")'
3213 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")'
3223 A d
3214 A d
3224 a (no-compatibility no-changeset !)
3215 a (no-compatibility no-changeset !)
3225 A t
3216 A t
3226 p
3217 p
3227 R a
3218 R a
3228 R p
3219 R p
3229 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")'
3220 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")'
3230 A d
3221 A d
3231 a (no-compatibility no-changeset !)
3222 a (no-compatibility no-changeset !)
3232 A t
3223 A t
3233 p
3224 p
3234 R a
3225 R a
3235 R p
3226 R p
3236 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")'
3227 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")'
3237 A d
3228 A d
3238 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")'
3229 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")'
3239 A d
3230 A d
3240 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")'
3231 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")'
3241 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")'
3232 $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")'
3242
3233
3243
3234
3244 Comparing with merge restoring an untouched deleted file
3235 Comparing with merge restoring an untouched deleted file
3245 --------------------------------------------------------
3236 --------------------------------------------------------
3246
3237
3247 Merge:
3238 Merge:
3248 - one removing a file (d)
3239 - one removing a file (d)
3249 - one leaving the file untouched
3240 - one leaving the file untouched
3250 - the merge actively restore the file to the same content.
3241 - the merge actively restore the file to the same content.
3251
3242
3252 In this case, the file keep on living after the merge. So we should not drop its
3243 In this case, the file keep on living after the merge. So we should not drop its
3253 copy tracing chain.
3244 copy tracing chain.
3254
3245
3255 $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))'
3246 $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))'
3256 o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
3247 o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
3257 |\
3248 |\
3258 +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
3249 +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
3259 | |/
3250 | |/
3260 | o c-1 delete d
3251 | o c-1 delete d
3261 | |
3252 | |
3262 o | b-1: b update
3253 o | b-1: b update
3263 |/
3254 |/
3264 o i-2: c -move-> d, s -move-> t
3255 o i-2: c -move-> d, s -move-> t
3265 |
3256 |
3266 o i-1: a -move-> c, p -move-> s
3257 o i-1: a -move-> c, p -move-> s
3267 |
3258 |
3268 o i-0 initial commit: a b h p q r
3259 o i-0 initial commit: a b h p q r
3269
3260
3270
3261
3271 'a' is the the copy source of 'd'
3262 'a' is the the copy source of 'd'
3272
3263
3273 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
3264 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
3274 M b
3265 M b
3275 A d
3266 A d
3276 a (no-compatibility no-changeset !)
3267 a (no-compatibility no-changeset !)
3277 A t
3268 A t
3278 p
3269 p
3279 R a
3270 R a
3280 R p
3271 R p
3281 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
3272 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
3282 M b
3273 M b
3283 A d
3274 A d
3284 a (no-compatibility no-changeset !)
3275 a (no-compatibility no-changeset !)
3285 A t
3276 A t
3286 p
3277 p
3287 R a
3278 R a
3288 R p
3279 R p
3289 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")'
3280 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")'
3290 M b
3281 M b
3291 A d
3282 A d
3292 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")'
3283 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")'
3293 M b
3284 M b
3294 A d
3285 A d
3295 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")'
3286 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")'
3296 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")'
3287 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")'
3297
3288
3298
3289
3299 Merging a branch where a rename was deleted with a branch where the same file was renamed
3290 Merging a branch where a rename was deleted with a branch where the same file was renamed
3300 ------------------------------------------------------------------------------------------
3291 ------------------------------------------------------------------------------------------
3301
3292
3302 Create a "conflicting" merge where `d` get removed on one branch before its
3293 Create a "conflicting" merge where `d` get removed on one branch before its
3303 rename information actually conflict with the other branch.
3294 rename information actually conflict with the other branch.
3304
3295
3305 (the copy information from the branch that was not deleted should win).
3296 (the copy information from the branch that was not deleted should win).
3306
3297
3307 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
3298 $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))'
3308 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
3299 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
3309 |\
3300 |\
3310 +---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
3301 +---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
3311 | |/
3302 | |/
3312 | o h-1: b -(move)-> d
3303 | o h-1: b -(move)-> d
3313 | |
3304 | |
3314 o | c-1 delete d
3305 o | c-1 delete d
3315 | |
3306 | |
3316 o | i-2: c -move-> d, s -move-> t
3307 o | i-2: c -move-> d, s -move-> t
3317 | |
3308 | |
3318 o | i-1: a -move-> c, p -move-> s
3309 o | i-1: a -move-> c, p -move-> s
3319 |/
3310 |/
3320 o i-0 initial commit: a b h p q r
3311 o i-0 initial commit: a b h p q r
3321
3312
3322
3313
3323 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")'
3314 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")'
3324 A d
3315 A d
3325 b (no-compatibility no-changeset !)
3316 b (no-compatibility no-changeset !)
3326 A t
3317 A t
3327 p
3318 p
3328 R a
3319 R a
3329 R b
3320 R b
3330 R p
3321 R p
3331 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")'
3322 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")'
3332 A d
3323 A d
3333 b
3324 b
3334 A t
3325 A t
3335 p
3326 p
3336 R a
3327 R a
3337 R b
3328 R b
3338 R p
3329 R p
3339 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")'
3330 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")'
3340 A d
3331 A d
3341 b
3332 b
3342 R b
3333 R b
3343 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")'
3334 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")'
3344 A d
3335 A d
3345 b
3336 b
3346 R b
3337 R b
3347 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")'
3338 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")'
3348 A t
3339 A t
3349 p
3340 p
3350 R a
3341 R a
3351 R p
3342 R p
3352 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")'
3343 $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")'
3353 A t
3344 A t
3354 p
3345 p
3355 R a
3346 R a
3356 R p
3347 R p
3357
3348
3358 Variant of previous with extra changes introduced by the merge
3349 Variant of previous with extra changes introduced by the merge
3359 --------------------------------------------------------------
3350 --------------------------------------------------------------
3360
3351
3361 (see case declaration for details)
3352 (see case declaration for details)
3362
3353
3363 Subcase: merge has same initial content on both side, but merge introduced a change
3354 Subcase: merge has same initial content on both side, but merge introduced a change
3364 ```````````````````````````````````````````````````````````````````````````````````
3355 ```````````````````````````````````````````````````````````````````````````````````
3365
3356
3366 - the "e-" branch renaming b to f (through 'g')
3357 - the "e-" branch renaming b to f (through 'g')
3367 - the "a-" branch renaming d to f (through e)
3358 - the "a-" branch renaming d to f (through e)
3368 - the merge add new change to b
3359 - the merge add new change to b
3369
3360
3370 $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))'
3361 $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))'
3371 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
3362 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
3372 |\
3363 |\
3373 +---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
3364 +---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
3374 | |/
3365 | |/
3375 | o e-2 g -move-> f
3366 | o e-2 g -move-> f
3376 | |
3367 | |
3377 | o e-1 b -move-> g
3368 | o e-1 b -move-> g
3378 | |
3369 | |
3379 o | a-2: e -move-> f
3370 o | a-2: e -move-> f
3380 | |
3371 | |
3381 o | a-1: d -move-> e
3372 o | a-1: d -move-> e
3382 |/
3373 |/
3383 o i-2: c -move-> d, s -move-> t
3374 o i-2: c -move-> d, s -move-> t
3384 |
3375 |
3385 o i-1: a -move-> c, p -move-> s
3376 o i-1: a -move-> c, p -move-> s
3386 |
3377 |
3387 o i-0 initial commit: a b h p q r
3378 o i-0 initial commit: a b h p q r
3388
3379
3389 #if no-changeset
3380 #if no-changeset
3390 $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f'
3381 $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f'
3391 2f649fba7eb284e720d02b61f0546fcef694c045 644 f
3382 2f649fba7eb284e720d02b61f0546fcef694c045 644 f
3392 $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f'
3383 $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f'
3393 774e7c1637d536b99e2d8ef16fd731f87a82bd09 644 f
3384 774e7c1637d536b99e2d8ef16fd731f87a82bd09 644 f
3394 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
3385 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
3395 b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f
3386 b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f
3396 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
3387 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
3397 e8825b386367b29fec957283a80bb47b47483fe1 644 f
3388 e8825b386367b29fec957283a80bb47b47483fe1 644 f
3398 $ hg debugindex f | "$PYTHON" ../no-linkrev
3389 $ hg debugindex f | "$PYTHON" ../no-linkrev
3399 rev linkrev nodeid p1 p2
3390 rev linkrev nodeid p1 p2
3400 0 * b76eb76580df 000000000000 000000000000
3391 0 * b76eb76580df 000000000000 000000000000
3401 1 * e8825b386367 000000000000 000000000000
3392 1 * e8825b386367 000000000000 000000000000
3402 2 * 2ff93c643948 b76eb76580df e8825b386367
3393 2 * 2ff93c643948 b76eb76580df e8825b386367
3403 3 * 2f649fba7eb2 b76eb76580df e8825b386367
3394 3 * 2f649fba7eb2 b76eb76580df e8825b386367
3404 4 * 774e7c1637d5 e8825b386367 b76eb76580df
3395 4 * 774e7c1637d5 e8825b386367 b76eb76580df
3405 #else
3396 #else
3406 $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f'
3397 $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f'
3407 d3613c1ec8310a812ac4268fd853ac576b6caea5 644 f
3398 d3613c1ec8310a812ac4268fd853ac576b6caea5 644 f
3408 $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f'
3399 $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f'
3409 05e03c868bbcab4a649cb33a238d7aa07398a469 644 f
3400 05e03c868bbcab4a649cb33a238d7aa07398a469 644 f
3410 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
3401 $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f'
3411 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
3402 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
3412 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
3403 $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f'
3413 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
3404 ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f
3414 $ hg debugindex f | "$PYTHON" ../no-linkrev
3405 $ hg debugindex f | "$PYTHON" ../no-linkrev
3415 rev linkrev nodeid p1 p2
3406 rev linkrev nodeid p1 p2
3416 0 * ae258f702dfe 000000000000 000000000000
3407 0 * ae258f702dfe 000000000000 000000000000
3417 1 * d3613c1ec831 ae258f702dfe 000000000000
3408 1 * d3613c1ec831 ae258f702dfe 000000000000
3418 2 * 05e03c868bbc ae258f702dfe 000000000000
3409 2 * 05e03c868bbc ae258f702dfe 000000000000
3419 #endif
3410 #endif
3420
3411
3421 # Here the filelog based implementation is not looking at the rename
3412 # Here the filelog based implementation is not looking at the rename
3422 # information (because the file exist on both side). However the changelog
3413 # information (because the file exist on both side). However the changelog
3423 # based on works fine. We have different output.
3414 # based on works fine. We have different output.
3424
3415
3425 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAE-change-m-0")'
3416 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAE-change-m-0")'
3426 M f
3417 M f
3427 b (no-filelog !)
3418 b (no-filelog !)
3428 R b
3419 R b
3429 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEA-change-m-0")'
3420 $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEA-change-m-0")'
3430 M f
3421 M f
3431 b (no-filelog !)
3422 b (no-filelog !)
3432 R b
3423 R b
3433 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAE-change-m-0")'
3424 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAE-change-m-0")'
3434 M f
3425 M f
3435 d (no-filelog !)
3426 d (no-filelog !)
3436 R d
3427 R d
3437 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEA-change-m-0")'
3428 $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEA-change-m-0")'
3438 M f
3429 M f
3439 d (no-filelog !)
3430 d (no-filelog !)
3440 R d
3431 R d
3441 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
3432 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
3442 A f
3433 A f
3443 d
3434 d
3444 R d
3435 R d
3445 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")'
3436 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")'
3446 A f
3437 A f
3447 b
3438 b
3448 R b
3439 R b
3449
3440
3450 # From here, we run status against revision where both source file exists.
3441 # From here, we run status against revision where both source file exists.
3451 #
3442 #
3452 # The filelog based implementation picks an arbitrary side based on revision
3443 # The filelog based implementation picks an arbitrary side based on revision
3453 # numbers. So the same side "wins" whatever the parents order is. This is
3444 # numbers. So the same side "wins" whatever the parents order is. This is
3454 # sub-optimal because depending on revision numbers means the result can be
3445 # sub-optimal because depending on revision numbers means the result can be
3455 # different from one repository to the next.
3446 # different from one repository to the next.
3456 #
3447 #
3457 # The changeset based algorithm use the parent order to break tie on conflicting
3448 # The changeset based algorithm use the parent order to break tie on conflicting
3458 # information and will have a different order depending on who is p1 and p2.
3449 # information and will have a different order depending on who is p1 and p2.
3459 # That order is stable accross repositories. (data from p1 prevails)
3450 # That order is stable accross repositories. (data from p1 prevails)
3460
3451
3461 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAE-change-m-0")'
3452 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAE-change-m-0")'
3462 A f
3453 A f
3463 d
3454 d
3464 R b
3455 R b
3465 R d
3456 R d
3466 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEA-change-m-0")'
3457 $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEA-change-m-0")'
3467 A f
3458 A f
3468 d (filelog !)
3459 d (filelog !)
3469 b (no-filelog !)
3460 b (no-filelog !)
3470 R b
3461 R b
3471 R d
3462 R d
3472 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")'
3463 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")'
3473 A f
3464 A f
3474 a
3465 a
3475 A t
3466 A t
3476 p
3467 p
3477 R a
3468 R a
3478 R b
3469 R b
3479 R p
3470 R p
3480 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")'
3471 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")'
3481 A f
3472 A f
3482 a (filelog !)
3473 a (filelog !)
3483 b (no-filelog !)
3474 b (no-filelog !)
3484 A t
3475 A t
3485 p
3476 p
3486 R a
3477 R a
3487 R b
3478 R b
3488 R p
3479 R p
3489
3480
3490
3481
3491 Subcase: merge overwrite common copy information, but with extra change during the merge
3482 Subcase: merge overwrite common copy information, but with extra change during the merge
3492 ```````````````````````````````````````````````````````````````````````````````````
3483 ```````````````````````````````````````````````````````````````````````````````````
3493
3484
3494 Merge:
3485 Merge:
3495 - one with change to an unrelated file (b)
3486 - one with change to an unrelated file (b)
3496 - one overwriting a file (d) with a rename (from h to i to d)
3487 - one overwriting a file (d) with a rename (from h to i to d)
3497
3488
3498 $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))'
3489 $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))'
3499 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
3490 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
3500 |\
3491 |\
3501 +---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
3492 +---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
3502 | |/
3493 | |/
3503 | o f-2: rename i -> d
3494 | o f-2: rename i -> d
3504 | |
3495 | |
3505 | o f-1: rename h -> i
3496 | o f-1: rename h -> i
3506 | |
3497 | |
3507 o | b-1: b update
3498 o | b-1: b update
3508 |/
3499 |/
3509 o i-2: c -move-> d, s -move-> t
3500 o i-2: c -move-> d, s -move-> t
3510 |
3501 |
3511 o i-1: a -move-> c, p -move-> s
3502 o i-1: a -move-> c, p -move-> s
3512 |
3503 |
3513 o i-0 initial commit: a b h p q r
3504 o i-0 initial commit: a b h p q r
3514
3505
3515 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBF-change-m-0")'
3506 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBF-change-m-0")'
3516 M b
3507 M b
3517 A d
3508 A d
3518 h
3509 h
3519 A t
3510 A t
3520 p
3511 p
3521 R a
3512 R a
3522 R h
3513 R h
3523 R p
3514 R p
3524 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")'
3515 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")'
3525 M b
3516 M b
3526 A d
3517 A d
3527 h
3518 h
3528 A t
3519 A t
3529 p
3520 p
3530 R a
3521 R a
3531 R h
3522 R h
3532 R p
3523 R p
3533 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBF-change-m-0")'
3524 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBF-change-m-0")'
3534 M d
3525 M d
3535 h (no-filelog !)
3526 h (no-filelog !)
3536 R h
3527 R h
3537 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBF-change-m-0")'
3528 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBF-change-m-0")'
3538 M b
3529 M b
3539 M d
3530 M d
3540 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBF-change-m-0")'
3531 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBF-change-m-0")'
3541 M b
3532 M b
3542 M d
3533 M d
3543 i (no-filelog !)
3534 i (no-filelog !)
3544 R i
3535 R i
3545 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFB-change-m-0")'
3536 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFB-change-m-0")'
3546 M d
3537 M d
3547 h (no-filelog !)
3538 h (no-filelog !)
3548 R h
3539 R h
3549 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFB-change-m-0")'
3540 $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFB-change-m-0")'
3550 M b
3541 M b
3551 M d
3542 M d
3552 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFB-change-m-0")'
3543 $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFB-change-m-0")'
3553 M b
3544 M b
3554 M d
3545 M d
3555 i (no-filelog !)
3546 i (no-filelog !)
3556 R i
3547 R i
3557
3548
3558 #if no-changeset
3549 #if no-changeset
3559 $ hg log -Gfr 'desc("mBF-change-m-0")' d
3550 $ hg log -Gfr 'desc("mBF-change-m-0")' d
3560 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
3551 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
3561 |\
3552 |\
3562 o : f-2: rename i -> d
3553 o : f-2: rename i -> d
3563 | :
3554 | :
3564 o : f-1: rename h -> i
3555 o : f-1: rename h -> i
3565 :/
3556 :/
3566 o i-0 initial commit: a b h p q r
3557 o i-0 initial commit: a b h p q r
3567
3558
3568 #else
3559 #else
3569 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3560 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3570 $ hg log -Gfr 'desc("mBF-change-m-0")' d
3561 $ hg log -Gfr 'desc("mBF-change-m-0")' d
3571 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
3562 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
3572 :
3563 :
3573 o i-2: c -move-> d, s -move-> t
3564 o i-2: c -move-> d, s -move-> t
3574 |
3565 |
3575 ~
3566 ~
3576 #endif
3567 #endif
3577
3568
3578 #if no-changeset
3569 #if no-changeset
3579 $ hg log -Gfr 'desc("mFB-change-m-0")' d
3570 $ hg log -Gfr 'desc("mFB-change-m-0")' d
3580 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
3571 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
3581 |\
3572 |\
3582 o : f-2: rename i -> d
3573 o : f-2: rename i -> d
3583 | :
3574 | :
3584 o : f-1: rename h -> i
3575 o : f-1: rename h -> i
3585 :/
3576 :/
3586 o i-0 initial commit: a b h p q r
3577 o i-0 initial commit: a b h p q r
3587
3578
3588 #else
3579 #else
3589 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3580 BROKEN: `hg log --follow <file>` relies on filelog metadata to work
3590 $ hg log -Gfr 'desc("mFB-change-m-0")' d
3581 $ hg log -Gfr 'desc("mFB-change-m-0")' d
3591 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
3582 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
3592 :
3583 :
3593 o i-2: c -move-> d, s -move-> t
3584 o i-2: c -move-> d, s -move-> t
3594 |
3585 |
3595 ~
3586 ~
3596 #endif
3587 #endif
3597
3588
3598
3589
3599 Subcase: restoring and untouched deleted file, while touching it
3590 Subcase: restoring and untouched deleted file, while touching it
3600 ````````````````````````````````````````````````````````````````
3591 ````````````````````````````````````````````````````````````````
3601
3592
3602 Merge:
3593 Merge:
3603 - one removing a file (d)
3594 - one removing a file (d)
3604 - one leaving the file untouched
3595 - one leaving the file untouched
3605 - the merge actively restore the file to the same content.
3596 - the merge actively restore the file to the same content.
3606
3597
3607 In this case, the file keep on living after the merge. So we should not drop its
3598 In this case, the file keep on living after the merge. So we should not drop its
3608 copy tracing chain.
3599 copy tracing chain.
3609
3600
3610 $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))'
3601 $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))'
3611 o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
3602 o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way
3612 |\
3603 |\
3613 +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
3604 +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way
3614 | |/
3605 | |/
3615 | o c-1 delete d
3606 | o c-1 delete d
3616 | |
3607 | |
3617 o | b-1: b update
3608 o | b-1: b update
3618 |/
3609 |/
3619 o i-2: c -move-> d, s -move-> t
3610 o i-2: c -move-> d, s -move-> t
3620 |
3611 |
3621 o i-1: a -move-> c, p -move-> s
3612 o i-1: a -move-> c, p -move-> s
3622 |
3613 |
3623 o i-0 initial commit: a b h p q r
3614 o i-0 initial commit: a b h p q r
3624
3615
3625
3616
3626 'a' is the the copy source of 'd'
3617 'a' is the the copy source of 'd'
3627
3618
3628 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-change-m-0")'
3619 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-change-m-0")'
3629 M b
3620 M b
3630 A d
3621 A d
3631 a (no-compatibility no-changeset !)
3622 a (no-compatibility no-changeset !)
3632 A t
3623 A t
3633 p
3624 p
3634 R a
3625 R a
3635 R p
3626 R p
3636 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-change-m-0")'
3627 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-change-m-0")'
3637 M b
3628 M b
3638 A d
3629 A d
3639 a (no-compatibility no-changeset !)
3630 a (no-compatibility no-changeset !)
3640 A t
3631 A t
3641 p
3632 p
3642 R a
3633 R a
3643 R p
3634 R p
3644 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-change-m-0")'
3635 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-change-m-0")'
3645 M b
3636 M b
3646 A d
3637 A d
3647 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-change-m-0")'
3638 $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-change-m-0")'
3648 M b
3639 M b
3649 A d
3640 A d
3650 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-change-m-0")'
3641 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-change-m-0")'
3651 M d
3642 M d
3652 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-change-m-0")'
3643 $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-change-m-0")'
3653 M d
3644 M d
3654
3645
3655
3646
3656 Decision from previous merge are properly chained with later merge
3647 Decision from previous merge are properly chained with later merge
3657 ------------------------------------------------------------------
3648 ------------------------------------------------------------------
3658
3649
3659
3650
3660 Subcase: chaining conflicting rename resolution
3651 Subcase: chaining conflicting rename resolution
3661 ```````````````````````````````````````````````
3652 ```````````````````````````````````````````````
3662
3653
3663 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
3654 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
3664 add more change on the respective branch and merge again. These second merge
3655 add more change on the respective branch and merge again. These second merge
3665 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
3656 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
3666 about that file should stay unchanged.
3657 about that file should stay unchanged.
3667
3658
3668 The result from mAEm is the same for the subsequent merge:
3659 The result from mAEm is the same for the subsequent merge:
3669
3660
3670 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f
3661 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f
3671 A f
3662 A f
3672 a (no-changeset no-compatibility !)
3663 a (no-changeset no-compatibility !)
3673
3664
3674 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f
3665 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f
3675 A f
3666 A f
3676 a (no-changeset no-compatibility !)
3667 a (no-changeset no-compatibility !)
3677
3668
3678 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f
3669 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f
3679 A f
3670 A f
3680 a (no-changeset no-compatibility !)
3671 a (no-changeset no-compatibility !)
3681
3672
3682
3673
3683 The result from mEAm is the same for the subsequent merge:
3674 The result from mEAm is the same for the subsequent merge:
3684
3675
3685 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f
3676 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f
3686 A f
3677 A f
3687 a (filelog !)
3678 a (filelog !)
3688 b (no-changeset no-compatibility no-filelog !)
3679 b (no-changeset no-compatibility no-filelog !)
3689
3680
3690 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f
3681 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f
3691 A f
3682 A f
3692 a (filelog !)
3683 a (filelog !)
3693 b (no-changeset no-compatibility no-filelog !)
3684 b (no-changeset no-compatibility no-filelog !)
3694
3685
3695 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f
3686 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f
3696 A f
3687 A f
3697 a (filelog !)
3688 a (filelog !)
3698 b (no-changeset no-compatibility no-filelog !)
3689 b (no-changeset no-compatibility no-filelog !)
3699
3690
3700 Subcase: chaining conflicting rename resolution
3691 Subcase: chaining conflicting rename resolution
3701 ```````````````````````````````````````````````
3692 ```````````````````````````````````````````````
3702
3693
3703 The "mPQm" and "mQPm" case create a rename tracking conflict on file 'v'. We
3694 The "mPQm" and "mQPm" case create a rename tracking conflict on file 'v'. We
3704 add more change on the respective branch and merge again. These second merge
3695 add more change on the respective branch and merge again. These second merge
3705 does not involve the file 'v' and the arbitration done within "mPQm" and "mQP"
3696 does not involve the file 'v' and the arbitration done within "mPQm" and "mQP"
3706 about that file should stay unchanged.
3697 about that file should stay unchanged.
3707
3698
3708 The result from mPQm is the same for the subsequent merge:
3699 The result from mPQm is the same for the subsequent merge:
3709
3700
3710 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm")' v
3701 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm")' v
3711 A v
3702 A v
3712 r (filelog !)
3703 r (filelog !)
3713 p (no-changeset no-compatibility no-filelog !)
3704 p (no-changeset no-compatibility no-filelog !)
3714
3705
3715 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v
3706 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v
3716 A v
3707 A v
3717 r (filelog !)
3708 r (filelog !)
3718 p (no-changeset no-compatibility no-filelog !)
3709 p (no-changeset no-compatibility no-filelog !)
3719
3710
3720 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v
3711 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v
3721 A v
3712 A v
3722 r (filelog !)
3713 r (filelog !)
3723 p (no-changeset no-compatibility no-filelog !)
3714 p (no-changeset no-compatibility no-filelog !)
3724
3715
3725 The result from mQPm is the same for the subsequent merge:
3716 The result from mQPm is the same for the subsequent merge:
3726
3717
3727 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm")' v
3718 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm")' v
3728 A v
3719 A v
3729 r (no-changeset no-compatibility !)
3720 r (no-changeset no-compatibility !)
3730
3721
3731 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQP,Sm")' v
3722 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQP,Sm")' v
3732 A v
3723 A v
3733 r (no-changeset no-compatibility !)
3724 r (no-changeset no-compatibility !)
3734
3725
3735 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mS,QPm")' v
3726 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mS,QPm")' v
3736 A v
3727 A v
3737 r (filelog !)
3728 r (filelog !)
3738 r (no-changeset no-compatibility no-filelog !)
3729 r (no-changeset no-compatibility no-filelog !)
3739
3730
3740
3731
3741 Subcase: chaining salvage information during a merge
3732 Subcase: chaining salvage information during a merge
3742 ````````````````````````````````````````````````````
3733 ````````````````````````````````````````````````````
3743
3734
3744 We add more change on the branch were the file was deleted. merging again
3735 We add more change on the branch were the file was deleted. merging again
3745 should preserve the fact eh file was salvaged.
3736 should preserve the fact eh file was salvaged.
3746
3737
3747 reference output:
3738 reference output:
3748
3739
3749 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
3740 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")'
3750 M b
3741 M b
3751 A d
3742 A d
3752 a (no-changeset no-compatibility !)
3743 a (no-changeset no-compatibility !)
3753 A t
3744 A t
3754 p
3745 p
3755 R a
3746 R a
3756 R p
3747 R p
3757 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
3748 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")'
3758 M b
3749 M b
3759 A d
3750 A d
3760 a (no-changeset no-compatibility !)
3751 a (no-changeset no-compatibility !)
3761 A t
3752 A t
3762 p
3753 p
3763 R a
3754 R a
3764 R p
3755 R p
3765
3756
3766 chained output
3757 chained output
3767 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")'
3758 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")'
3768 M b
3759 M b
3769 A d
3760 A d
3770 a (no-changeset no-compatibility !)
3761 a (no-changeset no-compatibility !)
3771 A t
3762 A t
3772 p
3763 p
3773 A unrelated-l
3764 A unrelated-l
3774 R a
3765 R a
3775 R p
3766 R p
3776 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")'
3767 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")'
3777 M b
3768 M b
3778 A d
3769 A d
3779 a (no-changeset no-compatibility !)
3770 a (no-changeset no-compatibility !)
3780 A t
3771 A t
3781 p
3772 p
3782 A unrelated-l
3773 A unrelated-l
3783 R a
3774 R a
3784 R p
3775 R p
3785 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")'
3776 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")'
3786 M b
3777 M b
3787 A d
3778 A d
3788 a (no-changeset no-compatibility !)
3779 a (no-changeset no-compatibility !)
3789 A t
3780 A t
3790 p
3781 p
3791 A unrelated-l
3782 A unrelated-l
3792 R a
3783 R a
3793 R p
3784 R p
3794 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")'
3785 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")'
3795 M b
3786 M b
3796 A d
3787 A d
3797 a (no-changeset no-compatibility !)
3788 a (no-changeset no-compatibility !)
3798 A t
3789 A t
3799 p
3790 p
3800 A unrelated-l
3791 A unrelated-l
3801 R a
3792 R a
3802 R p
3793 R p
3803
3794
3804 Subcase: chaining "merged" information during a merge
3795 Subcase: chaining "merged" information during a merge
3805 ``````````````````````````````````````````````````````
3796 ``````````````````````````````````````````````````````
3806
3797
3807 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.
3798 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.
3808
3799
3809
3800
3810 reference output:
3801 reference output:
3811
3802
3812 (for details about the filelog pick, check the mFGm/mGFm case)
3803 (for details about the filelog pick, check the mFGm/mGFm case)
3813
3804
3814 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d
3805 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d
3815 A d
3806 A d
3816 a (filelog !)
3807 a (filelog !)
3817 h (no-changeset no-compatibility no-filelog !)
3808 h (no-changeset no-compatibility no-filelog !)
3818 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d
3809 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d
3819 A d
3810 A d
3820 a (filelog !)
3811 a (filelog !)
3821 a (no-changeset no-compatibility no-filelog !)
3812 a (no-changeset no-compatibility no-filelog !)
3822
3813
3823 Chained output
3814 Chained output
3824
3815
3825 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d
3816 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d
3826 A d
3817 A d
3827 a (filelog !)
3818 a (filelog !)
3828 h (no-changeset no-compatibility no-filelog !)
3819 h (no-changeset no-compatibility no-filelog !)
3829 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d
3820 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d
3830 A d
3821 A d
3831 a (filelog !)
3822 a (filelog !)
3832 h (no-changeset no-compatibility no-filelog !)
3823 h (no-changeset no-compatibility no-filelog !)
3833
3824
3834
3825
3835 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d
3826 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d
3836 A d
3827 A d
3837 a (no-changeset no-compatibility !)
3828 a (no-changeset no-compatibility !)
3838 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d
3829 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d
3839 A d
3830 A d
3840 a (no-changeset no-compatibility !)
3831 a (no-changeset no-compatibility !)
3841
3832
3842
3833
3843 Subcase: chaining conflicting rename resolution, with extra change during the merge
3834 Subcase: chaining conflicting rename resolution, with extra change during the merge
3844 ```````````````````````````````````````````````````````````````````````````````````
3835 ```````````````````````````````````````````````````````````````````````````````````
3845
3836
3846 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
3837 The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We
3847 add more change on the respective branch and merge again. These second merge
3838 add more change on the respective branch and merge again. These second merge
3848 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
3839 does not involve the file 'f' and the arbitration done within "mAEm" and "mEA"
3849 about that file should stay unchanged.
3840 about that file should stay unchanged.
3850
3841
3851 The result from mAEm is the same for the subsequent merge:
3842 The result from mAEm is the same for the subsequent merge:
3852
3843
3853 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m")' f
3844 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m")' f
3854 A f
3845 A f
3855 a (no-changeset no-compatibility !)
3846 a (no-changeset no-compatibility !)
3856
3847
3857 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f
3848 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f
3858 A f
3849 A f
3859 a (no-changeset no-compatibility !)
3850 a (no-changeset no-compatibility !)
3860
3851
3861 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AE-change-m")' f
3852 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AE-change-m")' f
3862 A f
3853 A f
3863 a (no-changeset no-compatibility !)
3854 a (no-changeset no-compatibility !)
3864
3855
3865
3856
3866 The result from mEAm is the same for the subsequent merge:
3857 The result from mEAm is the same for the subsequent merge:
3867
3858
3868 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m")' f
3859 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m")' f
3869 A f
3860 A f
3870 a (filelog !)
3861 a (filelog !)
3871 b (no-changeset no-compatibility no-filelog !)
3862 b (no-changeset no-compatibility no-filelog !)
3872
3863
3873 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f
3864 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f
3874 A f
3865 A f
3875 a (filelog !)
3866 a (filelog !)
3876 b (no-changeset no-compatibility no-filelog !)
3867 b (no-changeset no-compatibility no-filelog !)
3877
3868
3878 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f
3869 $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f
3879 A f
3870 A f
3880 a (filelog !)
3871 a (filelog !)
3881 b (no-changeset no-compatibility no-filelog !)
3872 b (no-changeset no-compatibility no-filelog !)
@@ -1,503 +1,504 b''
1 #testcases extra sidedata
1 #testcases extra sidedata
2
2
3 #if extra
3 #if extra
4 $ cat >> $HGRCPATH << EOF
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
5 > [experimental]
6 > copies.write-to=changeset-only
6 > copies.write-to=changeset-only
7 > copies.read-from=changeset-only
7 > copies.read-from=changeset-only
8 > [alias]
8 > [alias]
9 > changesetcopies = log -r . -T 'files: {files}
9 > changesetcopies = log -r . -T 'files: {files}
10 > {extras % "{ifcontains("files", key, "{key}: {value}\n")}"}
10 > {extras % "{ifcontains("files", key, "{key}: {value}\n")}"}
11 > {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}'
11 > {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}'
12 > EOF
12 > EOF
13 #endif
13 #endif
14
14
15 #if sidedata
15 #if sidedata
16 $ cat >> $HGRCPATH << EOF
16 $ cat >> $HGRCPATH << EOF
17 > [format]
17 > [format]
18 > exp-use-copies-side-data-changeset = yes
18 > exp-use-copies-side-data-changeset = yes
19 > EOF
19 > EOF
20 #endif
20 #endif
21
21
22 $ cat >> $HGRCPATH << EOF
22 $ cat >> $HGRCPATH << EOF
23 > [alias]
23 > [alias]
24 > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}'
24 > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}'
25 > [extensions]
25 > [extensions]
26 > rebase =
26 > rebase =
27 > split =
27 > split =
28 > EOF
28 > EOF
29
29
30 Check that copies are recorded correctly
30 Check that copies are recorded correctly
31
31
32 $ hg init repo
32 $ hg init repo
33 $ cd repo
33 $ cd repo
34 #if sidedata
34 #if sidedata
35 $ hg debugformat -v
35 $ hg debugformat -v
36 format-variant repo config default
36 format-variant repo config default
37 fncache: yes yes yes
37 fncache: yes yes yes
38 dotencode: yes yes yes
38 dotencode: yes yes yes
39 generaldelta: yes yes yes
39 generaldelta: yes yes yes
40 share-safe: no no no
40 share-safe: no no no
41 sparserevlog: yes yes yes
41 sparserevlog: yes yes yes
42 persistent-nodemap: no no no (no-rust !)
42 persistent-nodemap: no no no (no-rust !)
43 persistent-nodemap: yes yes no (rust !)
43 persistent-nodemap: yes yes no (rust !)
44 copies-sdc: yes yes no
44 copies-sdc: yes yes no
45 revlog-v2: yes yes no
45 revlog-v2: yes yes no
46 plain-cl-delta: yes yes yes
46 plain-cl-delta: yes yes yes
47 compression: zlib zlib zlib (no-zstd !)
47 compression: zlib zlib zlib (no-zstd !)
48 compression: zstd zstd zstd (zstd !)
48 compression: zstd zstd zstd (zstd !)
49 compression-level: default default default
49 compression-level: default default default
50 #else
50 #else
51 $ hg debugformat -v
51 $ hg debugformat -v
52 format-variant repo config default
52 format-variant repo config default
53 fncache: yes yes yes
53 fncache: yes yes yes
54 dotencode: yes yes yes
54 dotencode: yes yes yes
55 generaldelta: yes yes yes
55 generaldelta: yes yes yes
56 share-safe: no no no
56 share-safe: no no no
57 sparserevlog: yes yes yes
57 sparserevlog: yes yes yes
58 persistent-nodemap: no no no (no-rust !)
58 persistent-nodemap: no no no (no-rust !)
59 persistent-nodemap: yes yes no (rust !)
59 persistent-nodemap: yes yes no (rust !)
60 copies-sdc: no no no
60 copies-sdc: no no no
61 revlog-v2: no no no
61 revlog-v2: no no no
62 plain-cl-delta: yes yes yes
62 plain-cl-delta: yes yes yes
63 compression: zlib zlib zlib (no-zstd !)
63 compression: zlib zlib zlib (no-zstd !)
64 compression: zstd zstd zstd (zstd !)
64 compression: zstd zstd zstd (zstd !)
65 compression-level: default default default
65 compression-level: default default default
66 #endif
66 #endif
67 $ echo a > a
67 $ echo a > a
68 $ hg add a
68 $ hg add a
69 $ hg ci -m initial
69 $ hg ci -m initial
70 $ hg cp a b
70 $ hg cp a b
71 $ hg cp a c
71 $ hg cp a c
72 $ hg cp a d
72 $ hg cp a d
73 $ hg ci -m 'copy a to b, c, and d'
73 $ hg ci -m 'copy a to b, c, and d'
74
74
75 #if extra
75 #if extra
76
76
77 $ hg changesetcopies
77 $ hg changesetcopies
78 files: b c d
78 files: b c d
79 filesadded: 0
79 filesadded: 0
80 1
80 1
81 2
81 2
82
82
83 p1copies: 0\x00a (esc)
83 p1copies: 0\x00a (esc)
84 1\x00a (esc)
84 1\x00a (esc)
85 2\x00a (esc)
85 2\x00a (esc)
86 #else
86 #else
87 $ hg debugsidedata -c -v -- -1
87 $ hg debugsidedata -c -v -- -1
88 1 sidedata entries
88 1 sidedata entries
89 entry-0014 size 44
89 entry-0014 size 44
90 '\x00\x00\x00\x04\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00abcd'
90 '\x00\x00\x00\x04\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00abcd'
91 #endif
91 #endif
92
92
93 $ hg showcopies
93 $ hg showcopies
94 a -> b
94 a -> b
95 a -> c
95 a -> c
96 a -> d
96 a -> d
97
97
98 #if extra
98 #if extra
99
99
100 $ hg showcopies --config experimental.copies.read-from=compatibility
100 $ hg showcopies --config experimental.copies.read-from=compatibility
101 a -> b
101 a -> b
102 a -> c
102 a -> c
103 a -> d
103 a -> d
104 $ hg showcopies --config experimental.copies.read-from=filelog-only
104 $ hg showcopies --config experimental.copies.read-from=filelog-only
105
105
106 #endif
106 #endif
107
107
108 Check that renames are recorded correctly
108 Check that renames are recorded correctly
109
109
110 $ hg mv b b2
110 $ hg mv b b2
111 $ hg ci -m 'rename b to b2'
111 $ hg ci -m 'rename b to b2'
112
112
113 #if extra
113 #if extra
114
114
115 $ hg changesetcopies
115 $ hg changesetcopies
116 files: b b2
116 files: b b2
117 filesadded: 1
117 filesadded: 1
118 filesremoved: 0
118 filesremoved: 0
119
119
120 p1copies: 1\x00b (esc)
120 p1copies: 1\x00b (esc)
121
121
122 #else
122 #else
123 $ hg debugsidedata -c -v -- -1
123 $ hg debugsidedata -c -v -- -1
124 1 sidedata entries
124 1 sidedata entries
125 entry-0014 size 25
125 entry-0014 size 25
126 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00bb2'
126 '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00bb2'
127 #endif
127 #endif
128
128
129 $ hg showcopies
129 $ hg showcopies
130 b -> b2
130 b -> b2
131
131
132
132
133 Rename onto existing file. This should get recorded in the changeset files list and in the extras,
133 Rename onto existing file. This should get recorded in the changeset files list and in the extras,
134 even though there is no filelog entry.
134 even though there is no filelog entry.
135
135
136 $ hg cp b2 c --force
136 $ hg cp b2 c --force
137 $ hg st --copies
137 $ hg st --copies
138 M c
138 M c
139 b2
139 b2
140
140
141 #if extra
141 #if extra
142
142
143 $ hg debugindex c
143 $ hg debugindex c
144 rev linkrev nodeid p1 p2
144 rev linkrev nodeid p1 p2
145 0 1 b789fdd96dc2 000000000000 000000000000
145 0 1 b789fdd96dc2 000000000000 000000000000
146
146
147 #else
147 #else
148
148
149 $ hg debugindex c
149 $ hg debugindex c
150 rev linkrev nodeid p1 p2
150 rev linkrev nodeid p1 p2
151 0 1 37d9b5d994ea 000000000000 000000000000
151 0 1 37d9b5d994ea 000000000000 000000000000
152
152
153 #endif
153 #endif
154
154
155
155
156 $ hg ci -m 'move b onto d'
156 $ hg ci -m 'move b onto d'
157
157
158 #if extra
158 #if extra
159
159
160 $ hg changesetcopies
160 $ hg changesetcopies
161 files: c
161 files: c
162
162
163 p1copies: 0\x00b2 (esc)
163 p1copies: 0\x00b2 (esc)
164
164
165 #else
165 #else
166 $ hg debugsidedata -c -v -- -1
166 $ hg debugsidedata -c -v -- -1
167 1 sidedata entries
167 1 sidedata entries
168 entry-0014 size 25
168 entry-0014 size 25
169 '\x00\x00\x00\x02\x00\x00\x00\x00\x02\x00\x00\x00\x00\x16\x00\x00\x00\x03\x00\x00\x00\x00b2c'
169 '\x00\x00\x00\x02\x00\x00\x00\x00\x02\x00\x00\x00\x00\x16\x00\x00\x00\x03\x00\x00\x00\x00b2c'
170 #endif
170 #endif
171
171
172 $ hg showcopies
172 $ hg showcopies
173 b2 -> c
173 b2 -> c
174
174
175 #if extra
175 #if extra
176
176
177 $ hg debugindex c
177 $ hg debugindex c
178 rev linkrev nodeid p1 p2
178 rev linkrev nodeid p1 p2
179 0 1 b789fdd96dc2 000000000000 000000000000
179 0 1 b789fdd96dc2 000000000000 000000000000
180
180
181 #else
181 #else
182
182
183 $ hg debugindex c
183 $ hg debugindex c
184 rev linkrev nodeid p1 p2
184 rev linkrev nodeid p1 p2
185 0 1 37d9b5d994ea 000000000000 000000000000
185 0 1 37d9b5d994ea 000000000000 000000000000
186 1 3 029625640347 000000000000 000000000000
186 1 3 029625640347 000000000000 000000000000
187
187
188 #endif
188 #endif
189
189
190 Create a merge commit with copying done during merge.
190 Create a merge commit with copying done during merge.
191
191
192 $ hg co 0
192 $ hg co 0
193 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
193 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
194 $ hg cp a e
194 $ hg cp a e
195 $ hg cp a f
195 $ hg cp a f
196 $ hg ci -m 'copy a to e and f'
196 $ hg ci -m 'copy a to e and f'
197 created new head
197 created new head
198 $ hg merge 3
198 $ hg merge 3
199 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
199 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
200 (branch merge, don't forget to commit)
200 (branch merge, don't forget to commit)
201 File 'a' exists on both sides, so 'g' could be recorded as being from p1 or p2, but we currently
201 File 'a' exists on both sides, so 'g' could be recorded as being from p1 or p2, but we currently
202 always record it as being from p1
202 always record it as being from p1
203 $ hg cp a g
203 $ hg cp a g
204 File 'd' exists only in p2, so 'h' should be from p2
204 File 'd' exists only in p2, so 'h' should be from p2
205 $ hg cp d h
205 $ hg cp d h
206 File 'f' exists only in p1, so 'i' should be from p1
206 File 'f' exists only in p1, so 'i' should be from p1
207 $ hg cp f i
207 $ hg cp f i
208 $ hg ci -m 'merge'
208 $ hg ci -m 'merge'
209
209
210 #if extra
210 #if extra
211
211
212 $ hg changesetcopies
212 $ hg changesetcopies
213 files: g h i
213 files: g h i
214 filesadded: 0
214 filesadded: 0
215 1
215 1
216 2
216 2
217
217
218 p1copies: 0\x00a (esc)
218 p1copies: 0\x00a (esc)
219 2\x00f (esc)
219 2\x00f (esc)
220 p2copies: 1\x00d (esc)
220 p2copies: 1\x00d (esc)
221
221
222 #else
222 #else
223 $ hg debugsidedata -c -v -- -1
223 $ hg debugsidedata -c -v -- -1
224 1 sidedata entries
224 1 sidedata entries
225 entry-0014 size 64
225 entry-0014 size 64
226 '\x00\x00\x00\x06\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00\x07\x00\x00\x00\x05\x00\x00\x00\x01\x06\x00\x00\x00\x06\x00\x00\x00\x02adfghi'
226 '\x00\x00\x00\x06\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00\x07\x00\x00\x00\x05\x00\x00\x00\x01\x06\x00\x00\x00\x06\x00\x00\x00\x02adfghi'
227 #endif
227 #endif
228
228
229 $ hg showcopies
229 $ hg showcopies
230 a -> g
230 a -> g
231 d -> h
231 d -> h
232 f -> i
232 f -> i
233
233
234 Test writing to both changeset and filelog
234 Test writing to both changeset and filelog
235
235
236 $ hg cp a j
236 $ hg cp a j
237 #if extra
237 #if extra
238 $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility
238 $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility
239 $ hg changesetcopies
239 $ hg changesetcopies
240 files: j
240 files: j
241 filesadded: 0
241 filesadded: 0
242 filesremoved:
242 filesremoved:
243
243
244 p1copies: 0\x00a (esc)
244 p1copies: 0\x00a (esc)
245 p2copies:
245 p2copies:
246 #else
246 #else
247 $ hg ci -m 'copy a to j'
247 $ hg ci -m 'copy a to j'
248 $ hg debugsidedata -c -v -- -1
248 $ hg debugsidedata -c -v -- -1
249 1 sidedata entries
249 1 sidedata entries
250 entry-0014 size 24
250 entry-0014 size 24
251 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
251 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
252 #endif
252 #endif
253 $ hg debugdata j 0
253 $ hg debugdata j 0
254 \x01 (esc)
254 \x01 (esc)
255 copy: a
255 copy: a
256 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
256 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
257 \x01 (esc)
257 \x01 (esc)
258 a
258 a
259 $ hg showcopies
259 $ hg showcopies
260 a -> j
260 a -> j
261 $ hg showcopies --config experimental.copies.read-from=compatibility
261 $ hg showcopies --config experimental.copies.read-from=compatibility
262 a -> j
262 a -> j
263 $ hg showcopies --config experimental.copies.read-from=filelog-only
263 $ hg showcopies --config experimental.copies.read-from=filelog-only
264 a -> j
264 a -> j
265 Existing copy information in the changeset gets removed on amend and writing
265 Existing copy information in the changeset gets removed on amend and writing
266 copy information on to the filelog
266 copy information on to the filelog
267 #if extra
267 #if extra
268 $ hg ci --amend -m 'copy a to j, v2' \
268 $ hg ci --amend -m 'copy a to j, v2' \
269 > --config experimental.copies.write-to=filelog-only
269 > --config experimental.copies.write-to=filelog-only
270 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
270 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
271 $ hg changesetcopies
271 $ hg changesetcopies
272 files: j
272 files: j
273
273
274 #else
274 #else
275 $ hg ci --amend -m 'copy a to j, v2'
275 $ hg ci --amend -m 'copy a to j, v2'
276 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
276 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
277 $ hg debugsidedata -c -v -- -1
277 $ hg debugsidedata -c -v -- -1
278 1 sidedata entries
278 1 sidedata entries
279 entry-0014 size 24
279 entry-0014 size 24
280 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
280 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
281 #endif
281 #endif
282 $ hg showcopies --config experimental.copies.read-from=filelog-only
282 $ hg showcopies --config experimental.copies.read-from=filelog-only
283 a -> j
283 a -> j
284 The entries should be written to extras even if they're empty (so the client
284 The entries should be written to extras even if they're empty (so the client
285 won't have to fall back to reading from filelogs)
285 won't have to fall back to reading from filelogs)
286 $ echo x >> j
286 $ echo x >> j
287 #if extra
287 #if extra
288 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
288 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
289 $ hg changesetcopies
289 $ hg changesetcopies
290 files: j
290 files: j
291 filesadded:
291 filesadded:
292 filesremoved:
292 filesremoved:
293
293
294 p1copies:
294 p1copies:
295 p2copies:
295 p2copies:
296 #else
296 #else
297 $ hg ci -m 'modify j'
297 $ hg ci -m 'modify j'
298 $ hg debugsidedata -c -v -- -1
298 $ hg debugsidedata -c -v -- -1
299 1 sidedata entries
299 1 sidedata entries
300 entry-0014 size 14
300 entry-0014 size 14
301 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00j'
301 '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00j'
302 #endif
302 #endif
303
303
304 Test writing only to filelog
304 Test writing only to filelog
305
305
306 $ hg cp a k
306 $ hg cp a k
307 #if extra
307 #if extra
308 $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only
308 $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only
309
309
310 $ hg changesetcopies
310 $ hg changesetcopies
311 files: k
311 files: k
312
312
313 #else
313 #else
314 $ hg ci -m 'copy a to k'
314 $ hg ci -m 'copy a to k'
315 $ hg debugsidedata -c -v -- -1
315 $ hg debugsidedata -c -v -- -1
316 1 sidedata entries
316 1 sidedata entries
317 entry-0014 size 24
317 entry-0014 size 24
318 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ak'
318 '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ak'
319 #endif
319 #endif
320
320
321 $ hg debugdata k 0
321 $ hg debugdata k 0
322 \x01 (esc)
322 \x01 (esc)
323 copy: a
323 copy: a
324 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
324 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
325 \x01 (esc)
325 \x01 (esc)
326 a
326 a
327 #if extra
327 #if extra
328 $ hg showcopies
328 $ hg showcopies
329
329
330 $ hg showcopies --config experimental.copies.read-from=compatibility
330 $ hg showcopies --config experimental.copies.read-from=compatibility
331 a -> k
331 a -> k
332 $ hg showcopies --config experimental.copies.read-from=filelog-only
332 $ hg showcopies --config experimental.copies.read-from=filelog-only
333 a -> k
333 a -> k
334 #else
334 #else
335 $ hg showcopies
335 $ hg showcopies
336 a -> k
336 a -> k
337 #endif
337 #endif
338
338
339 $ cd ..
339 $ cd ..
340
340
341 Test rebasing a commit with copy information
341 Test rebasing a commit with copy information
342
342
343 $ hg init rebase-rename
343 $ hg init rebase-rename
344 $ cd rebase-rename
344 $ cd rebase-rename
345 $ echo a > a
345 $ echo a > a
346 $ hg ci -Aqm 'add a'
346 $ hg ci -Aqm 'add a'
347 $ echo a2 > a
347 $ echo a2 > a
348 $ hg ci -m 'modify a'
348 $ hg ci -m 'modify a'
349 $ hg co -q 0
349 $ hg co -q 0
350 $ hg mv a b
350 $ hg mv a b
351 $ hg ci -qm 'rename a to b'
351 $ hg ci -qm 'rename a to b'
352 Not only do we want this to run in-memory, it shouldn't fall back to
352 Not only do we want this to run in-memory, it shouldn't fall back to
353 on-disk merge (no conflicts), so we force it to be in-memory
353 on-disk merge (no conflicts), so we force it to be in-memory
354 with no fallback.
354 with no fallback.
355 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes --config devel.rebase.force-in-memory-merge=yes
355 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes --config devel.rebase.force-in-memory-merge=yes
356 rebasing 2:* tip "rename a to b" (glob)
356 rebasing 2:* tip "rename a to b" (glob)
357 merging a and b to b
357 merging a and b to b
358 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
358 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
359 $ hg st --change . --copies
359 $ hg st --change . --copies
360 A b
360 A b
361 a
361 a
362 R a
362 R a
363 $ cd ..
363 $ cd ..
364
364
365 Test splitting a commit
365 Test splitting a commit
366
366
367 $ hg init split
367 $ hg init split
368 $ cd split
368 $ cd split
369 $ echo a > a
369 $ echo a > a
370 $ echo b > b
370 $ echo b > b
371 $ hg ci -Aqm 'add a and b'
371 $ hg ci -Aqm 'add a and b'
372 $ echo a2 > a
372 $ echo a2 > a
373 $ hg mv b c
373 $ hg mv b c
374 $ hg ci -m 'modify a, move b to c'
374 $ hg ci -m 'modify a, move b to c'
375 $ hg --config ui.interactive=yes split <<EOF
375 $ hg --config ui.interactive=yes split <<EOF
376 > y
376 > y
377 > y
377 > y
378 > n
378 > n
379 > y
379 > y
380 > EOF
380 > EOF
381 diff --git a/a b/a
381 diff --git a/a b/a
382 1 hunks, 1 lines changed
382 1 hunks, 1 lines changed
383 examine changes to 'a'?
383 examine changes to 'a'?
384 (enter ? for help) [Ynesfdaq?] y
384 (enter ? for help) [Ynesfdaq?] y
385
385
386 @@ -1,1 +1,1 @@
386 @@ -1,1 +1,1 @@
387 -a
387 -a
388 +a2
388 +a2
389 record this change to 'a'?
389 record this change to 'a'?
390 (enter ? for help) [Ynesfdaq?] y
390 (enter ? for help) [Ynesfdaq?] y
391
391
392 diff --git a/b b/c
392 diff --git a/b b/c
393 rename from b
393 rename from b
394 rename to c
394 rename to c
395 examine changes to 'b' and 'c'?
395 examine changes to 'b' and 'c'?
396 (enter ? for help) [Ynesfdaq?] n
396 (enter ? for help) [Ynesfdaq?] n
397
397
398 created new head
398 created new head
399 diff --git a/b b/c
399 diff --git a/b b/c
400 rename from b
400 rename from b
401 rename to c
401 rename to c
402 examine changes to 'b' and 'c'?
402 examine changes to 'b' and 'c'?
403 (enter ? for help) [Ynesfdaq?] y
403 (enter ? for help) [Ynesfdaq?] y
404
404
405 saved backup bundle to $TESTTMP/split/.hg/strip-backup/*-*-split.hg (glob)
405 saved backup bundle to $TESTTMP/split/.hg/strip-backup/*-*-split.hg (glob)
406 $ cd ..
406 $ cd ..
407
407
408 Test committing half a rename
408 Test committing half a rename
409
409
410 $ hg init partial
410 $ hg init partial
411 $ cd partial
411 $ cd partial
412 $ echo a > a
412 $ echo a > a
413 $ hg ci -Aqm 'add a'
413 $ hg ci -Aqm 'add a'
414 $ hg mv a b
414 $ hg mv a b
415 $ hg ci -m 'remove a' a
415 $ hg ci -m 'remove a' a
416
416
417 #if sidedata
417 #if sidedata
418
418
419 Test upgrading/downgrading to sidedata storage
419 Test upgrading/downgrading to sidedata storage
420 ==============================================
420 ==============================================
421
421
422 downgrading
422 downgrading
423
423
424 $ hg debugformat -v
424 $ hg debugformat -v
425 format-variant repo config default
425 format-variant repo config default
426 fncache: yes yes yes
426 fncache: yes yes yes
427 dotencode: yes yes yes
427 dotencode: yes yes yes
428 generaldelta: yes yes yes
428 generaldelta: yes yes yes
429 share-safe: no no no
429 share-safe: no no no
430 sparserevlog: yes yes yes
430 sparserevlog: yes yes yes
431 persistent-nodemap: no no no (no-rust !)
431 persistent-nodemap: no no no (no-rust !)
432 persistent-nodemap: yes yes no (rust !)
432 persistent-nodemap: yes yes no (rust !)
433 copies-sdc: yes yes no
433 copies-sdc: yes yes no
434 revlog-v2: yes yes no
434 revlog-v2: yes yes no
435 plain-cl-delta: yes yes yes
435 plain-cl-delta: yes yes yes
436 compression: zlib zlib zlib (no-zstd !)
436 compression: zlib zlib zlib (no-zstd !)
437 compression: zstd zstd zstd (zstd !)
437 compression: zstd zstd zstd (zstd !)
438 compression-level: default default default
438 compression-level: default default default
439 $ hg debugsidedata -c -- 0
439 $ hg debugsidedata -c -- 0
440 1 sidedata entries
440 1 sidedata entries
441 entry-0014 size 14
441 entry-0014 size 14
442 $ hg debugsidedata -c -- 1
442 $ hg debugsidedata -c -- 1
443 1 sidedata entries
443 1 sidedata entries
444 entry-0014 size 14
444 entry-0014 size 14
445 $ hg debugsidedata -m -- 0
445 $ hg debugsidedata -m -- 0
446 $ cat << EOF > .hg/hgrc
446 $ cat << EOF > .hg/hgrc
447 > [format]
447 > [format]
448 > exp-use-side-data = yes
449 > exp-use-copies-side-data-changeset = no
448 > exp-use-copies-side-data-changeset = no
449 > [experimental]
450 > revlogv2 = enable-unstable-format-and-corrupt-my-data
450 > EOF
451 > EOF
451 $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
452 $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
452 $ hg debugformat -v
453 $ hg debugformat -v
453 format-variant repo config default
454 format-variant repo config default
454 fncache: yes yes yes
455 fncache: yes yes yes
455 dotencode: yes yes yes
456 dotencode: yes yes yes
456 generaldelta: yes yes yes
457 generaldelta: yes yes yes
457 share-safe: no no no
458 share-safe: no no no
458 sparserevlog: yes yes yes
459 sparserevlog: yes yes yes
459 persistent-nodemap: no no no (no-rust !)
460 persistent-nodemap: no no no (no-rust !)
460 persistent-nodemap: yes yes no (rust !)
461 persistent-nodemap: yes yes no (rust !)
461 copies-sdc: no no no
462 copies-sdc: no no no
462 revlog-v2: yes yes no
463 revlog-v2: yes yes no
463 plain-cl-delta: yes yes yes
464 plain-cl-delta: yes yes yes
464 compression: zlib zlib zlib (no-zstd !)
465 compression: zlib zlib zlib (no-zstd !)
465 compression: zstd zstd zstd (zstd !)
466 compression: zstd zstd zstd (zstd !)
466 compression-level: default default default
467 compression-level: default default default
467 $ hg debugsidedata -c -- 0
468 $ hg debugsidedata -c -- 0
468 $ hg debugsidedata -c -- 1
469 $ hg debugsidedata -c -- 1
469 $ hg debugsidedata -m -- 0
470 $ hg debugsidedata -m -- 0
470
471
471 upgrading
472 upgrading
472
473
473 $ cat << EOF > .hg/hgrc
474 $ cat << EOF > .hg/hgrc
474 > [format]
475 > [format]
475 > exp-use-copies-side-data-changeset = yes
476 > exp-use-copies-side-data-changeset = yes
476 > EOF
477 > EOF
477 $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
478 $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
478 $ hg debugformat -v
479 $ hg debugformat -v
479 format-variant repo config default
480 format-variant repo config default
480 fncache: yes yes yes
481 fncache: yes yes yes
481 dotencode: yes yes yes
482 dotencode: yes yes yes
482 generaldelta: yes yes yes
483 generaldelta: yes yes yes
483 share-safe: no no no
484 share-safe: no no no
484 sparserevlog: yes yes yes
485 sparserevlog: yes yes yes
485 persistent-nodemap: no no no (no-rust !)
486 persistent-nodemap: no no no (no-rust !)
486 persistent-nodemap: yes yes no (rust !)
487 persistent-nodemap: yes yes no (rust !)
487 copies-sdc: yes yes no
488 copies-sdc: yes yes no
488 revlog-v2: yes yes no
489 revlog-v2: yes yes no
489 plain-cl-delta: yes yes yes
490 plain-cl-delta: yes yes yes
490 compression: zlib zlib zlib (no-zstd !)
491 compression: zlib zlib zlib (no-zstd !)
491 compression: zstd zstd zstd (zstd !)
492 compression: zstd zstd zstd (zstd !)
492 compression-level: default default default
493 compression-level: default default default
493 $ hg debugsidedata -c -- 0
494 $ hg debugsidedata -c -- 0
494 1 sidedata entries
495 1 sidedata entries
495 entry-0014 size 14
496 entry-0014 size 14
496 $ hg debugsidedata -c -- 1
497 $ hg debugsidedata -c -- 1
497 1 sidedata entries
498 1 sidedata entries
498 entry-0014 size 14
499 entry-0014 size 14
499 $ hg debugsidedata -m -- 0
500 $ hg debugsidedata -m -- 0
500
501
501 #endif
502 #endif
502
503
503 $ cd ..
504 $ cd ..
@@ -1,473 +1,473 b''
1 ===========================
1 ===========================
2 Tests for sidedata exchange
2 Tests for sidedata exchange
3 ===========================
3 ===========================
4
4
5 Check simple exchange behavior
5 Check simple exchange behavior
6 ==============================
6 ==============================
7
7
8 Pusher and pushed have sidedata enabled
8 Pusher and pushed have sidedata enabled
9 ---------------------------------------
9 ---------------------------------------
10
10
11 $ hg init sidedata-source --config format.exp-use-side-data=yes
11 $ hg init sidedata-source --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
12 $ cat << EOF >> sidedata-source/.hg/hgrc
12 $ cat << EOF >> sidedata-source/.hg/hgrc
13 > [extensions]
13 > [extensions]
14 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
14 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
15 > EOF
15 > EOF
16 $ hg init sidedata-target --config format.exp-use-side-data=yes
16 $ hg init sidedata-target --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
17 $ cat << EOF >> sidedata-target/.hg/hgrc
17 $ cat << EOF >> sidedata-target/.hg/hgrc
18 > [extensions]
18 > [extensions]
19 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
19 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
20 > EOF
20 > EOF
21 $ cd sidedata-source
21 $ cd sidedata-source
22 $ echo a > a
22 $ echo a > a
23 $ echo b > b
23 $ echo b > b
24 $ echo c > c
24 $ echo c > c
25 $ hg commit -Am "initial"
25 $ hg commit -Am "initial"
26 adding a
26 adding a
27 adding b
27 adding b
28 adding c
28 adding c
29 $ echo aa > a
29 $ echo aa > a
30 $ hg commit -m "other"
30 $ hg commit -m "other"
31 $ hg push -r . ../sidedata-target
31 $ hg push -r . ../sidedata-target
32 pushing to ../sidedata-target
32 pushing to ../sidedata-target
33 searching for changes
33 searching for changes
34 adding changesets
34 adding changesets
35 adding manifests
35 adding manifests
36 adding file changes
36 adding file changes
37 added 2 changesets with 4 changes to 3 files
37 added 2 changesets with 4 changes to 3 files
38 $ hg -R ../sidedata-target debugsidedata -c 0
38 $ hg -R ../sidedata-target debugsidedata -c 0
39 2 sidedata entries
39 2 sidedata entries
40 entry-0001 size 4
40 entry-0001 size 4
41 entry-0002 size 32
41 entry-0002 size 32
42 $ hg -R ../sidedata-target debugsidedata -c 1 -v
42 $ hg -R ../sidedata-target debugsidedata -c 1 -v
43 2 sidedata entries
43 2 sidedata entries
44 entry-0001 size 4
44 entry-0001 size 4
45 '\x00\x00\x00:'
45 '\x00\x00\x00:'
46 entry-0002 size 32
46 entry-0002 size 32
47 '\xa3\xee4v\x99\x85$\x9f\x1f\x8dKe\x0f\xc3\x9d-\xc9\xb5%[\x15=h\xe9\xf2O\xb5\xd9\x1f*\xff\xe5'
47 '\xa3\xee4v\x99\x85$\x9f\x1f\x8dKe\x0f\xc3\x9d-\xc9\xb5%[\x15=h\xe9\xf2O\xb5\xd9\x1f*\xff\xe5'
48 $ hg -R ../sidedata-target debugsidedata -m 0
48 $ hg -R ../sidedata-target debugsidedata -m 0
49 2 sidedata entries
49 2 sidedata entries
50 entry-0001 size 4
50 entry-0001 size 4
51 entry-0002 size 32
51 entry-0002 size 32
52 $ hg -R ../sidedata-target debugsidedata -m 1 -v
52 $ hg -R ../sidedata-target debugsidedata -m 1 -v
53 2 sidedata entries
53 2 sidedata entries
54 entry-0001 size 4
54 entry-0001 size 4
55 '\x00\x00\x00\x81'
55 '\x00\x00\x00\x81'
56 entry-0002 size 32
56 entry-0002 size 32
57 '-bL\xc5\xa4uu"#\xac\x1b`,\xc0\xbc\x9d\xf5\xac\xf0\x1d\x89)2\xf8N\xb1\x14m\xce\xd7\xbc\xae'
57 '-bL\xc5\xa4uu"#\xac\x1b`,\xc0\xbc\x9d\xf5\xac\xf0\x1d\x89)2\xf8N\xb1\x14m\xce\xd7\xbc\xae'
58 $ hg -R ../sidedata-target debugsidedata a 0
58 $ hg -R ../sidedata-target debugsidedata a 0
59 2 sidedata entries
59 2 sidedata entries
60 entry-0001 size 4
60 entry-0001 size 4
61 entry-0002 size 32
61 entry-0002 size 32
62 $ hg -R ../sidedata-target debugsidedata a 1 -v
62 $ hg -R ../sidedata-target debugsidedata a 1 -v
63 2 sidedata entries
63 2 sidedata entries
64 entry-0001 size 4
64 entry-0001 size 4
65 '\x00\x00\x00\x03'
65 '\x00\x00\x00\x03'
66 entry-0002 size 32
66 entry-0002 size 32
67 '\xd9\xcd\x81UvL5C\xf1\x0f\xad\x8aH\rt17Fo\x8dU!<\x8e\xae\xfc\xd1/\x06\xd4:\x80'
67 '\xd9\xcd\x81UvL5C\xf1\x0f\xad\x8aH\rt17Fo\x8dU!<\x8e\xae\xfc\xd1/\x06\xd4:\x80'
68 $ cd ..
68 $ cd ..
69
69
70 Puller and pulled have sidedata enabled
70 Puller and pulled have sidedata enabled
71 ---------------------------------------
71 ---------------------------------------
72
72
73 $ rm -rf sidedata-source sidedata-target
73 $ rm -rf sidedata-source sidedata-target
74 $ hg init sidedata-source --config format.exp-use-side-data=yes
74 $ hg init sidedata-source --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
75 $ cat << EOF >> sidedata-source/.hg/hgrc
75 $ cat << EOF >> sidedata-source/.hg/hgrc
76 > [extensions]
76 > [extensions]
77 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
77 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
78 > EOF
78 > EOF
79 $ hg init sidedata-target --config format.exp-use-side-data=yes
79 $ hg init sidedata-target --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
80 $ cat << EOF >> sidedata-target/.hg/hgrc
80 $ cat << EOF >> sidedata-target/.hg/hgrc
81 > [extensions]
81 > [extensions]
82 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
82 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
83 > EOF
83 > EOF
84 $ cd sidedata-source
84 $ cd sidedata-source
85 $ echo a > a
85 $ echo a > a
86 $ echo b > b
86 $ echo b > b
87 $ echo c > c
87 $ echo c > c
88 $ hg commit -Am "initial"
88 $ hg commit -Am "initial"
89 adding a
89 adding a
90 adding b
90 adding b
91 adding c
91 adding c
92 $ echo aa > a
92 $ echo aa > a
93 $ hg commit -m "other"
93 $ hg commit -m "other"
94 $ hg pull -R ../sidedata-target ../sidedata-source
94 $ hg pull -R ../sidedata-target ../sidedata-source
95 pulling from ../sidedata-source
95 pulling from ../sidedata-source
96 requesting all changes
96 requesting all changes
97 adding changesets
97 adding changesets
98 adding manifests
98 adding manifests
99 adding file changes
99 adding file changes
100 added 2 changesets with 4 changes to 3 files
100 added 2 changesets with 4 changes to 3 files
101 new changesets 05da661850d7:7ec8b4049447
101 new changesets 05da661850d7:7ec8b4049447
102 (run 'hg update' to get a working copy)
102 (run 'hg update' to get a working copy)
103 $ hg -R ../sidedata-target debugsidedata -c 0
103 $ hg -R ../sidedata-target debugsidedata -c 0
104 2 sidedata entries
104 2 sidedata entries
105 entry-0001 size 4
105 entry-0001 size 4
106 entry-0002 size 32
106 entry-0002 size 32
107 $ hg -R ../sidedata-target debugsidedata -c 1 -v
107 $ hg -R ../sidedata-target debugsidedata -c 1 -v
108 2 sidedata entries
108 2 sidedata entries
109 entry-0001 size 4
109 entry-0001 size 4
110 '\x00\x00\x00:'
110 '\x00\x00\x00:'
111 entry-0002 size 32
111 entry-0002 size 32
112 '\xa3\xee4v\x99\x85$\x9f\x1f\x8dKe\x0f\xc3\x9d-\xc9\xb5%[\x15=h\xe9\xf2O\xb5\xd9\x1f*\xff\xe5'
112 '\xa3\xee4v\x99\x85$\x9f\x1f\x8dKe\x0f\xc3\x9d-\xc9\xb5%[\x15=h\xe9\xf2O\xb5\xd9\x1f*\xff\xe5'
113 $ hg -R ../sidedata-target debugsidedata -m 0
113 $ hg -R ../sidedata-target debugsidedata -m 0
114 2 sidedata entries
114 2 sidedata entries
115 entry-0001 size 4
115 entry-0001 size 4
116 entry-0002 size 32
116 entry-0002 size 32
117 $ hg -R ../sidedata-target debugsidedata -m 1 -v
117 $ hg -R ../sidedata-target debugsidedata -m 1 -v
118 2 sidedata entries
118 2 sidedata entries
119 entry-0001 size 4
119 entry-0001 size 4
120 '\x00\x00\x00\x81'
120 '\x00\x00\x00\x81'
121 entry-0002 size 32
121 entry-0002 size 32
122 '-bL\xc5\xa4uu"#\xac\x1b`,\xc0\xbc\x9d\xf5\xac\xf0\x1d\x89)2\xf8N\xb1\x14m\xce\xd7\xbc\xae'
122 '-bL\xc5\xa4uu"#\xac\x1b`,\xc0\xbc\x9d\xf5\xac\xf0\x1d\x89)2\xf8N\xb1\x14m\xce\xd7\xbc\xae'
123 $ hg -R ../sidedata-target debugsidedata a 0
123 $ hg -R ../sidedata-target debugsidedata a 0
124 2 sidedata entries
124 2 sidedata entries
125 entry-0001 size 4
125 entry-0001 size 4
126 entry-0002 size 32
126 entry-0002 size 32
127 $ hg -R ../sidedata-target debugsidedata a 1 -v
127 $ hg -R ../sidedata-target debugsidedata a 1 -v
128 2 sidedata entries
128 2 sidedata entries
129 entry-0001 size 4
129 entry-0001 size 4
130 '\x00\x00\x00\x03'
130 '\x00\x00\x00\x03'
131 entry-0002 size 32
131 entry-0002 size 32
132 '\xd9\xcd\x81UvL5C\xf1\x0f\xad\x8aH\rt17Fo\x8dU!<\x8e\xae\xfc\xd1/\x06\xd4:\x80'
132 '\xd9\xcd\x81UvL5C\xf1\x0f\xad\x8aH\rt17Fo\x8dU!<\x8e\xae\xfc\xd1/\x06\xd4:\x80'
133 $ cd ..
133 $ cd ..
134
134
135 Now on to asymmetric configs.
135 Now on to asymmetric configs.
136
136
137 Pusher has sidedata enabled, pushed does not
137 Pusher has sidedata enabled, pushed does not
138 --------------------------------------------
138 --------------------------------------------
139
139
140 $ rm -rf sidedata-source sidedata-target
140 $ rm -rf sidedata-source sidedata-target
141 $ hg init sidedata-source --config format.exp-use-side-data=yes
141 $ hg init sidedata-source --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
142 $ cat << EOF >> sidedata-source/.hg/hgrc
142 $ cat << EOF >> sidedata-source/.hg/hgrc
143 > [extensions]
143 > [extensions]
144 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
144 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
145 > EOF
145 > EOF
146 $ hg init sidedata-target --config format.exp-use-side-data=no
146 $ hg init sidedata-target --config experimental.revlogv2=no
147 $ cd sidedata-source
147 $ cd sidedata-source
148 $ echo a > a
148 $ echo a > a
149 $ echo b > b
149 $ echo b > b
150 $ echo c > c
150 $ echo c > c
151 $ hg commit -Am "initial"
151 $ hg commit -Am "initial"
152 adding a
152 adding a
153 adding b
153 adding b
154 adding c
154 adding c
155 $ echo aa > a
155 $ echo aa > a
156 $ hg commit -m "other"
156 $ hg commit -m "other"
157 $ hg push -r . ../sidedata-target --traceback
157 $ hg push -r . ../sidedata-target --traceback
158 pushing to ../sidedata-target
158 pushing to ../sidedata-target
159 searching for changes
159 searching for changes
160 adding changesets
160 adding changesets
161 adding manifests
161 adding manifests
162 adding file changes
162 adding file changes
163 added 2 changesets with 4 changes to 3 files
163 added 2 changesets with 4 changes to 3 files
164 $ hg -R ../sidedata-target log -G
164 $ hg -R ../sidedata-target log -G
165 o changeset: 1:7ec8b4049447
165 o changeset: 1:7ec8b4049447
166 | tag: tip
166 | tag: tip
167 | user: test
167 | user: test
168 | date: Thu Jan 01 00:00:00 1970 +0000
168 | date: Thu Jan 01 00:00:00 1970 +0000
169 | summary: other
169 | summary: other
170 |
170 |
171 o changeset: 0:05da661850d7
171 o changeset: 0:05da661850d7
172 user: test
172 user: test
173 date: Thu Jan 01 00:00:00 1970 +0000
173 date: Thu Jan 01 00:00:00 1970 +0000
174 summary: initial
174 summary: initial
175
175
176
176
177 $ hg -R ../sidedata-target debugsidedata -c 0
177 $ hg -R ../sidedata-target debugsidedata -c 0
178 $ hg -R ../sidedata-target debugsidedata -c 1 -v
178 $ hg -R ../sidedata-target debugsidedata -c 1 -v
179 $ hg -R ../sidedata-target debugsidedata -m 0
179 $ hg -R ../sidedata-target debugsidedata -m 0
180 $ hg -R ../sidedata-target debugsidedata -m 1 -v
180 $ hg -R ../sidedata-target debugsidedata -m 1 -v
181 $ hg -R ../sidedata-target debugsidedata a 0
181 $ hg -R ../sidedata-target debugsidedata a 0
182 $ hg -R ../sidedata-target debugsidedata a 1 -v
182 $ hg -R ../sidedata-target debugsidedata a 1 -v
183 $ cd ..
183 $ cd ..
184
184
185 Pulled has sidedata enabled, puller does not
185 Pulled has sidedata enabled, puller does not
186 --------------------------------------------
186 --------------------------------------------
187
187
188 $ rm -rf sidedata-source sidedata-target
188 $ rm -rf sidedata-source sidedata-target
189 $ hg init sidedata-source --config format.exp-use-side-data=yes
189 $ hg init sidedata-source --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
190 $ cat << EOF >> sidedata-source/.hg/hgrc
190 $ cat << EOF >> sidedata-source/.hg/hgrc
191 > [extensions]
191 > [extensions]
192 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
192 > testsidedata=$TESTDIR/testlib/ext-sidedata-5.py
193 > EOF
193 > EOF
194 $ hg init sidedata-target --config format.exp-use-side-data=no
194 $ hg init sidedata-target --config experimental.revlogv2=no
195 $ cd sidedata-source
195 $ cd sidedata-source
196 $ echo a > a
196 $ echo a > a
197 $ echo b > b
197 $ echo b > b
198 $ echo c > c
198 $ echo c > c
199 $ hg commit -Am "initial"
199 $ hg commit -Am "initial"
200 adding a
200 adding a
201 adding b
201 adding b
202 adding c
202 adding c
203 $ echo aa > a
203 $ echo aa > a
204 $ hg commit -m "other"
204 $ hg commit -m "other"
205 $ hg pull -R ../sidedata-target ../sidedata-source
205 $ hg pull -R ../sidedata-target ../sidedata-source
206 pulling from ../sidedata-source
206 pulling from ../sidedata-source
207 requesting all changes
207 requesting all changes
208 adding changesets
208 adding changesets
209 adding manifests
209 adding manifests
210 adding file changes
210 adding file changes
211 added 2 changesets with 4 changes to 3 files
211 added 2 changesets with 4 changes to 3 files
212 new changesets 05da661850d7:7ec8b4049447
212 new changesets 05da661850d7:7ec8b4049447
213 (run 'hg update' to get a working copy)
213 (run 'hg update' to get a working copy)
214 $ hg -R ../sidedata-target log -G
214 $ hg -R ../sidedata-target log -G
215 o changeset: 1:7ec8b4049447
215 o changeset: 1:7ec8b4049447
216 | tag: tip
216 | tag: tip
217 | user: test
217 | user: test
218 | date: Thu Jan 01 00:00:00 1970 +0000
218 | date: Thu Jan 01 00:00:00 1970 +0000
219 | summary: other
219 | summary: other
220 |
220 |
221 o changeset: 0:05da661850d7
221 o changeset: 0:05da661850d7
222 user: test
222 user: test
223 date: Thu Jan 01 00:00:00 1970 +0000
223 date: Thu Jan 01 00:00:00 1970 +0000
224 summary: initial
224 summary: initial
225
225
226
226
227 $ hg -R ../sidedata-target debugsidedata -c 0
227 $ hg -R ../sidedata-target debugsidedata -c 0
228 $ hg -R ../sidedata-target debugsidedata -c 1 -v
228 $ hg -R ../sidedata-target debugsidedata -c 1 -v
229 $ hg -R ../sidedata-target debugsidedata -m 0
229 $ hg -R ../sidedata-target debugsidedata -m 0
230 $ hg -R ../sidedata-target debugsidedata -m 1 -v
230 $ hg -R ../sidedata-target debugsidedata -m 1 -v
231 $ hg -R ../sidedata-target debugsidedata a 0
231 $ hg -R ../sidedata-target debugsidedata a 0
232 $ hg -R ../sidedata-target debugsidedata a 1 -v
232 $ hg -R ../sidedata-target debugsidedata a 1 -v
233 $ cd ..
233 $ cd ..
234
234
235
235
236 Check sidedata exchange with on-the-fly generation and removal
236 Check sidedata exchange with on-the-fly generation and removal
237 ==============================================================
237 ==============================================================
238
238
239 (Push) Target has strict superset of the source
239 (Push) Target has strict superset of the source
240 -----------------------------------------------
240 -----------------------------------------------
241
241
242 $ hg init source-repo --config format.exp-use-side-data=yes
242 $ hg init source-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
243 $ hg init target-repo --config format.exp-use-side-data=yes
243 $ hg init target-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
244 $ cat << EOF >> target-repo/.hg/hgrc
244 $ cat << EOF >> target-repo/.hg/hgrc
245 > [extensions]
245 > [extensions]
246 > testsidedata=$TESTDIR/testlib/ext-sidedata.py
246 > testsidedata=$TESTDIR/testlib/ext-sidedata.py
247 > EOF
247 > EOF
248 $ cd source-repo
248 $ cd source-repo
249 $ echo aaa > a
249 $ echo aaa > a
250 $ hg add a
250 $ hg add a
251 $ hg commit -m a
251 $ hg commit -m a
252 $ echo aaa > b
252 $ echo aaa > b
253 $ hg add b
253 $ hg add b
254 $ hg commit -m b
254 $ hg commit -m b
255 $ echo xxx >> a
255 $ echo xxx >> a
256 $ hg commit -m aa
256 $ hg commit -m aa
257
257
258 No sidedata is generated in the source
258 No sidedata is generated in the source
259 $ hg debugsidedata -c 0
259 $ hg debugsidedata -c 0
260
260
261 Check that sidedata capabilities are advertised
261 Check that sidedata capabilities are advertised
262 $ hg debugcapabilities ../target-repo | grep sidedata
262 $ hg debugcapabilities ../target-repo | grep sidedata
263 exp-wanted-sidedata=1,2
263 exp-wanted-sidedata=1,2
264
264
265 We expect the client to abort the push since it's not capable of generating
265 We expect the client to abort the push since it's not capable of generating
266 what the server is asking
266 what the server is asking
267 $ hg push -r . ../target-repo
267 $ hg push -r . ../target-repo
268 pushing to ../target-repo
268 pushing to ../target-repo
269 abort: cannot push: required sidedata category not supported by this client: '1'
269 abort: cannot push: required sidedata category not supported by this client: '1'
270 [255]
270 [255]
271
271
272 Add the required capabilities
272 Add the required capabilities
273 $ cat << EOF >> .hg/hgrc
273 $ cat << EOF >> .hg/hgrc
274 > [extensions]
274 > [extensions]
275 > testsidedata2=$TESTDIR/testlib/ext-sidedata-2.py
275 > testsidedata2=$TESTDIR/testlib/ext-sidedata-2.py
276 > EOF
276 > EOF
277
277
278 We expect the target to have sidedata that was generated by the source on push
278 We expect the target to have sidedata that was generated by the source on push
279 $ hg push -r . ../target-repo
279 $ hg push -r . ../target-repo
280 pushing to ../target-repo
280 pushing to ../target-repo
281 searching for changes
281 searching for changes
282 adding changesets
282 adding changesets
283 adding manifests
283 adding manifests
284 adding file changes
284 adding file changes
285 added 3 changesets with 3 changes to 2 files
285 added 3 changesets with 3 changes to 2 files
286 $ cd ../target-repo
286 $ cd ../target-repo
287 $ hg debugsidedata -c 0
287 $ hg debugsidedata -c 0
288 2 sidedata entries
288 2 sidedata entries
289 entry-0001 size 4
289 entry-0001 size 4
290 entry-0002 size 32
290 entry-0002 size 32
291 $ hg debugsidedata -c 1 -v
291 $ hg debugsidedata -c 1 -v
292 2 sidedata entries
292 2 sidedata entries
293 entry-0001 size 4
293 entry-0001 size 4
294 '\x00\x00\x006'
294 '\x00\x00\x006'
295 entry-0002 size 32
295 entry-0002 size 32
296 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
296 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
297 $ hg debugsidedata -m 2
297 $ hg debugsidedata -m 2
298 2 sidedata entries
298 2 sidedata entries
299 entry-0001 size 4
299 entry-0001 size 4
300 entry-0002 size 32
300 entry-0002 size 32
301 $ hg debugsidedata a 1
301 $ hg debugsidedata a 1
302 2 sidedata entries
302 2 sidedata entries
303 entry-0001 size 4
303 entry-0001 size 4
304 entry-0002 size 32
304 entry-0002 size 32
305 $ cd ..
305 $ cd ..
306
306
307 (Push) Difference is not subset/superset
307 (Push) Difference is not subset/superset
308 ----------------------------------------
308 ----------------------------------------
309
309
310 Source has one in common, one missing and one more sidedata category with the
310 Source has one in common, one missing and one more sidedata category with the
311 target.
311 target.
312
312
313 $ rm -rf source-repo target-repo
313 $ rm -rf source-repo target-repo
314 $ hg init source-repo --config format.exp-use-side-data=yes
314 $ hg init source-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
315 $ cat << EOF >> source-repo/.hg/hgrc
315 $ cat << EOF >> source-repo/.hg/hgrc
316 > [extensions]
316 > [extensions]
317 > testsidedata3=$TESTDIR/testlib/ext-sidedata-3.py
317 > testsidedata3=$TESTDIR/testlib/ext-sidedata-3.py
318 > EOF
318 > EOF
319 $ hg init target-repo --config format.exp-use-side-data=yes
319 $ hg init target-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
320 $ cat << EOF >> target-repo/.hg/hgrc
320 $ cat << EOF >> target-repo/.hg/hgrc
321 > [extensions]
321 > [extensions]
322 > testsidedata4=$TESTDIR/testlib/ext-sidedata-4.py
322 > testsidedata4=$TESTDIR/testlib/ext-sidedata-4.py
323 > EOF
323 > EOF
324 $ cd source-repo
324 $ cd source-repo
325 $ echo aaa > a
325 $ echo aaa > a
326 $ hg add a
326 $ hg add a
327 $ hg commit -m a
327 $ hg commit -m a
328 $ echo aaa > b
328 $ echo aaa > b
329 $ hg add b
329 $ hg add b
330 $ hg commit -m b
330 $ hg commit -m b
331 $ echo xxx >> a
331 $ echo xxx >> a
332 $ hg commit -m aa
332 $ hg commit -m aa
333
333
334 Check that sidedata capabilities are advertised
334 Check that sidedata capabilities are advertised
335 $ hg debugcapabilities . | grep sidedata
335 $ hg debugcapabilities . | grep sidedata
336 exp-wanted-sidedata=1,2
336 exp-wanted-sidedata=1,2
337 $ hg debugcapabilities ../target-repo | grep sidedata
337 $ hg debugcapabilities ../target-repo | grep sidedata
338 exp-wanted-sidedata=2,3
338 exp-wanted-sidedata=2,3
339
339
340 Sidedata is generated in the source, but only the right categories (entry-0001 and entry-0002)
340 Sidedata is generated in the source, but only the right categories (entry-0001 and entry-0002)
341 $ hg debugsidedata -c 0
341 $ hg debugsidedata -c 0
342 2 sidedata entries
342 2 sidedata entries
343 entry-0001 size 4
343 entry-0001 size 4
344 entry-0002 size 32
344 entry-0002 size 32
345 $ hg debugsidedata -c 1 -v
345 $ hg debugsidedata -c 1 -v
346 2 sidedata entries
346 2 sidedata entries
347 entry-0001 size 4
347 entry-0001 size 4
348 '\x00\x00\x006'
348 '\x00\x00\x006'
349 entry-0002 size 32
349 entry-0002 size 32
350 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
350 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
351 $ hg debugsidedata -m 2
351 $ hg debugsidedata -m 2
352 2 sidedata entries
352 2 sidedata entries
353 entry-0001 size 4
353 entry-0001 size 4
354 entry-0002 size 32
354 entry-0002 size 32
355 $ hg debugsidedata a 1
355 $ hg debugsidedata a 1
356 2 sidedata entries
356 2 sidedata entries
357 entry-0001 size 4
357 entry-0001 size 4
358 entry-0002 size 32
358 entry-0002 size 32
359
359
360
360
361 We expect the target to have sidedata that was generated by the source on push,
361 We expect the target to have sidedata that was generated by the source on push,
362 and also removed the sidedata categories that are not supported by the target.
362 and also removed the sidedata categories that are not supported by the target.
363 Namely, we expect entry-0002 (only exchanged) and entry-0003 (generated),
363 Namely, we expect entry-0002 (only exchanged) and entry-0003 (generated),
364 but not entry-0001.
364 but not entry-0001.
365
365
366 $ hg push -r . ../target-repo --traceback
366 $ hg push -r . ../target-repo --traceback
367 pushing to ../target-repo
367 pushing to ../target-repo
368 searching for changes
368 searching for changes
369 adding changesets
369 adding changesets
370 adding manifests
370 adding manifests
371 adding file changes
371 adding file changes
372 added 3 changesets with 3 changes to 2 files
372 added 3 changesets with 3 changes to 2 files
373 $ cd ../target-repo
373 $ cd ../target-repo
374 $ hg log -G
374 $ hg log -G
375 o changeset: 2:40f977031323
375 o changeset: 2:40f977031323
376 | tag: tip
376 | tag: tip
377 | user: test
377 | user: test
378 | date: Thu Jan 01 00:00:00 1970 +0000
378 | date: Thu Jan 01 00:00:00 1970 +0000
379 | summary: aa
379 | summary: aa
380 |
380 |
381 o changeset: 1:2707720c6597
381 o changeset: 1:2707720c6597
382 | user: test
382 | user: test
383 | date: Thu Jan 01 00:00:00 1970 +0000
383 | date: Thu Jan 01 00:00:00 1970 +0000
384 | summary: b
384 | summary: b
385 |
385 |
386 o changeset: 0:7049e48789d7
386 o changeset: 0:7049e48789d7
387 user: test
387 user: test
388 date: Thu Jan 01 00:00:00 1970 +0000
388 date: Thu Jan 01 00:00:00 1970 +0000
389 summary: a
389 summary: a
390
390
391 $ hg debugsidedata -c 0
391 $ hg debugsidedata -c 0
392 2 sidedata entries
392 2 sidedata entries
393 entry-0002 size 32
393 entry-0002 size 32
394 entry-0003 size 48
394 entry-0003 size 48
395 $ hg debugsidedata -c 1 -v
395 $ hg debugsidedata -c 1 -v
396 2 sidedata entries
396 2 sidedata entries
397 entry-0002 size 32
397 entry-0002 size 32
398 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
398 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
399 entry-0003 size 48
399 entry-0003 size 48
400 '\x87\xcf\xdfI/\xb5\xed\xeaC\xc1\xf0S\xf3X\x1c\xcc\x00m\xee\xe6#\xc1\xe3\xcaB8Fk\x82e\xfc\xc01\xf6\xb7\xb9\xb3([\xf6D\xa6\xcf\x9b\xea\x11{\x08'
400 '\x87\xcf\xdfI/\xb5\xed\xeaC\xc1\xf0S\xf3X\x1c\xcc\x00m\xee\xe6#\xc1\xe3\xcaB8Fk\x82e\xfc\xc01\xf6\xb7\xb9\xb3([\xf6D\xa6\xcf\x9b\xea\x11{\x08'
401 $ hg debugsidedata -m 2
401 $ hg debugsidedata -m 2
402 2 sidedata entries
402 2 sidedata entries
403 entry-0002 size 32
403 entry-0002 size 32
404 entry-0003 size 48
404 entry-0003 size 48
405 $ hg debugsidedata a 1
405 $ hg debugsidedata a 1
406 2 sidedata entries
406 2 sidedata entries
407 entry-0002 size 32
407 entry-0002 size 32
408 entry-0003 size 48
408 entry-0003 size 48
409 $ cd ..
409 $ cd ..
410
410
411 (Pull) Target has strict superset of the source
411 (Pull) Target has strict superset of the source
412 -----------------------------------------------
412 -----------------------------------------------
413
413
414 $ rm -rf source-repo target-repo
414 $ rm -rf source-repo target-repo
415 $ hg init source-repo --config format.exp-use-side-data=yes
415 $ hg init source-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
416 $ hg init target-repo --config format.exp-use-side-data=yes
416 $ hg init target-repo --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
417 $ cat << EOF >> target-repo/.hg/hgrc
417 $ cat << EOF >> target-repo/.hg/hgrc
418 > [extensions]
418 > [extensions]
419 > testsidedata=$TESTDIR/testlib/ext-sidedata.py
419 > testsidedata=$TESTDIR/testlib/ext-sidedata.py
420 > EOF
420 > EOF
421 $ cd source-repo
421 $ cd source-repo
422 $ echo aaa > a
422 $ echo aaa > a
423 $ hg add a
423 $ hg add a
424 $ hg commit -m a
424 $ hg commit -m a
425 $ echo aaa > b
425 $ echo aaa > b
426 $ hg add b
426 $ hg add b
427 $ hg commit -m b
427 $ hg commit -m b
428 $ echo xxx >> a
428 $ echo xxx >> a
429 $ hg commit -m aa
429 $ hg commit -m aa
430
430
431 No sidedata is generated in the source
431 No sidedata is generated in the source
432 $ hg debugsidedata -c 0
432 $ hg debugsidedata -c 0
433
433
434 Check that sidedata capabilities are advertised
434 Check that sidedata capabilities are advertised
435 $ hg debugcapabilities ../target-repo | grep sidedata
435 $ hg debugcapabilities ../target-repo | grep sidedata
436 exp-wanted-sidedata=1,2
436 exp-wanted-sidedata=1,2
437
437
438 $ cd ../target-repo
438 $ cd ../target-repo
439
439
440 Add the required capabilities
440 Add the required capabilities
441 $ cat << EOF >> .hg/hgrc
441 $ cat << EOF >> .hg/hgrc
442 > [extensions]
442 > [extensions]
443 > testsidedata2=$TESTDIR/testlib/ext-sidedata-2.py
443 > testsidedata2=$TESTDIR/testlib/ext-sidedata-2.py
444 > EOF
444 > EOF
445
445
446 We expect the target to have sidedata that it generated on-the-fly during pull
446 We expect the target to have sidedata that it generated on-the-fly during pull
447 $ hg pull -r . ../source-repo --traceback
447 $ hg pull -r . ../source-repo --traceback
448 pulling from ../source-repo
448 pulling from ../source-repo
449 adding changesets
449 adding changesets
450 adding manifests
450 adding manifests
451 adding file changes
451 adding file changes
452 added 3 changesets with 3 changes to 2 files
452 added 3 changesets with 3 changes to 2 files
453 new changesets 7049e48789d7:40f977031323
453 new changesets 7049e48789d7:40f977031323
454 (run 'hg update' to get a working copy)
454 (run 'hg update' to get a working copy)
455 $ hg debugsidedata -c 0 --traceback
455 $ hg debugsidedata -c 0 --traceback
456 2 sidedata entries
456 2 sidedata entries
457 entry-0001 size 4
457 entry-0001 size 4
458 entry-0002 size 32
458 entry-0002 size 32
459 $ hg debugsidedata -c 1 -v --traceback
459 $ hg debugsidedata -c 1 -v --traceback
460 2 sidedata entries
460 2 sidedata entries
461 entry-0001 size 4
461 entry-0001 size 4
462 '\x00\x00\x006'
462 '\x00\x00\x006'
463 entry-0002 size 32
463 entry-0002 size 32
464 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
464 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
465 $ hg debugsidedata -m 2
465 $ hg debugsidedata -m 2
466 2 sidedata entries
466 2 sidedata entries
467 entry-0001 size 4
467 entry-0001 size 4
468 entry-0002 size 32
468 entry-0002 size 32
469 $ hg debugsidedata a 1
469 $ hg debugsidedata a 1
470 2 sidedata entries
470 2 sidedata entries
471 entry-0001 size 4
471 entry-0001 size 4
472 entry-0002 size 32
472 entry-0002 size 32
473 $ cd ..
473 $ cd ..
@@ -1,118 +1,118 b''
1 ==========================================================
1 ==========================================================
2 Test file dedicated to checking side-data related behavior
2 Test file dedicated to checking side-data related behavior
3 ==========================================================
3 ==========================================================
4
4
5 Check data can be written/read from sidedata
5 Check data can be written/read from sidedata
6 ============================================
6 ============================================
7
7
8 $ cat << EOF >> $HGRCPATH
8 $ cat << EOF >> $HGRCPATH
9 > [extensions]
9 > [extensions]
10 > testsidedata=$TESTDIR/testlib/ext-sidedata.py
10 > testsidedata=$TESTDIR/testlib/ext-sidedata.py
11 > EOF
11 > EOF
12
12
13 $ hg init test-sidedata --config format.exp-use-side-data=yes
13 $ hg init test-sidedata --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
14 $ cd test-sidedata
14 $ cd test-sidedata
15 $ echo aaa > a
15 $ echo aaa > a
16 $ hg add a
16 $ hg add a
17 $ hg commit -m a --traceback
17 $ hg commit -m a --traceback
18 $ echo aaa > b
18 $ echo aaa > b
19 $ hg add b
19 $ hg add b
20 $ hg commit -m b
20 $ hg commit -m b
21 $ echo xxx >> a
21 $ echo xxx >> a
22 $ hg commit -m aa
22 $ hg commit -m aa
23
23
24 $ hg debugsidedata -c 0
24 $ hg debugsidedata -c 0
25 2 sidedata entries
25 2 sidedata entries
26 entry-0001 size 4
26 entry-0001 size 4
27 entry-0002 size 32
27 entry-0002 size 32
28 $ hg debugsidedata -c 1 -v
28 $ hg debugsidedata -c 1 -v
29 2 sidedata entries
29 2 sidedata entries
30 entry-0001 size 4
30 entry-0001 size 4
31 '\x00\x00\x006'
31 '\x00\x00\x006'
32 entry-0002 size 32
32 entry-0002 size 32
33 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
33 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
34 $ hg debugsidedata -m 2
34 $ hg debugsidedata -m 2
35 2 sidedata entries
35 2 sidedata entries
36 entry-0001 size 4
36 entry-0001 size 4
37 entry-0002 size 32
37 entry-0002 size 32
38 $ hg debugsidedata a 1
38 $ hg debugsidedata a 1
39 2 sidedata entries
39 2 sidedata entries
40 entry-0001 size 4
40 entry-0001 size 4
41 entry-0002 size 32
41 entry-0002 size 32
42
42
43 Check upgrade behavior
43 Check upgrade behavior
44 ======================
44 ======================
45
45
46 Right now, sidedata has not upgrade support
46 Right now, sidedata has not upgrade support
47
47
48 Check that we can upgrade to sidedata
48 Check that we can upgrade to sidedata
49 -------------------------------------
49 -------------------------------------
50
50
51 $ hg init up-no-side-data --config format.exp-use-side-data=no
51 $ hg init up-no-side-data --config experimental.revlogv2=no
52 $ hg debugformat -v -R up-no-side-data
52 $ hg debugformat -v -R up-no-side-data
53 format-variant repo config default
53 format-variant repo config default
54 fncache: yes yes yes
54 fncache: yes yes yes
55 dotencode: yes yes yes
55 dotencode: yes yes yes
56 generaldelta: yes yes yes
56 generaldelta: yes yes yes
57 share-safe: no no no
57 share-safe: no no no
58 sparserevlog: yes yes yes
58 sparserevlog: yes yes yes
59 persistent-nodemap: no no no (no-rust !)
59 persistent-nodemap: no no no (no-rust !)
60 persistent-nodemap: yes yes no (rust !)
60 persistent-nodemap: yes yes no (rust !)
61 copies-sdc: no no no
61 copies-sdc: no no no
62 revlog-v2: no no no
62 revlog-v2: no no no
63 plain-cl-delta: yes yes yes
63 plain-cl-delta: yes yes yes
64 compression: zlib zlib zlib (no-zstd !)
64 compression: zlib zlib zlib (no-zstd !)
65 compression: zstd zstd zstd (zstd !)
65 compression: zstd zstd zstd (zstd !)
66 compression-level: default default default
66 compression-level: default default default
67 $ hg debugformat -v -R up-no-side-data --config format.exp-use-side-data=yes
67 $ hg debugformat -v -R up-no-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
68 format-variant repo config default
68 format-variant repo config default
69 fncache: yes yes yes
69 fncache: yes yes yes
70 dotencode: yes yes yes
70 dotencode: yes yes yes
71 generaldelta: yes yes yes
71 generaldelta: yes yes yes
72 share-safe: no no no
72 share-safe: no no no
73 sparserevlog: yes yes yes
73 sparserevlog: yes yes yes
74 persistent-nodemap: no no no (no-rust !)
74 persistent-nodemap: no no no (no-rust !)
75 persistent-nodemap: yes yes no (rust !)
75 persistent-nodemap: yes yes no (rust !)
76 copies-sdc: no no no
76 copies-sdc: no no no
77 revlog-v2: no yes no
77 revlog-v2: no yes no
78 plain-cl-delta: yes yes yes
78 plain-cl-delta: yes yes yes
79 compression: zlib zlib zlib (no-zstd !)
79 compression: zlib zlib zlib (no-zstd !)
80 compression: zstd zstd zstd (zstd !)
80 compression: zstd zstd zstd (zstd !)
81 compression-level: default default default
81 compression-level: default default default
82 $ hg debugupgraderepo -R up-no-side-data --config format.exp-use-side-data=yes > /dev/null
82 $ hg debugupgraderepo -R up-no-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data > /dev/null
83
83
84 Check that we can downgrade from sidedata
84 Check that we can downgrade from sidedata
85 -----------------------------------------
85 -----------------------------------------
86
86
87 $ hg init up-side-data --config format.exp-use-side-data=yes
87 $ hg init up-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
88 $ hg debugformat -v -R up-side-data
88 $ hg debugformat -v -R up-side-data
89 format-variant repo config default
89 format-variant repo config default
90 fncache: yes yes yes
90 fncache: yes yes yes
91 dotencode: yes yes yes
91 dotencode: yes yes yes
92 generaldelta: yes yes yes
92 generaldelta: yes yes yes
93 share-safe: no no no
93 share-safe: no no no
94 sparserevlog: yes yes yes
94 sparserevlog: yes yes yes
95 persistent-nodemap: no no no (no-rust !)
95 persistent-nodemap: no no no (no-rust !)
96 persistent-nodemap: yes yes no (rust !)
96 persistent-nodemap: yes yes no (rust !)
97 copies-sdc: no no no
97 copies-sdc: no no no
98 revlog-v2: yes no no
98 revlog-v2: yes no no
99 plain-cl-delta: yes yes yes
99 plain-cl-delta: yes yes yes
100 compression: zlib zlib zlib (no-zstd !)
100 compression: zlib zlib zlib (no-zstd !)
101 compression: zstd zstd zstd (zstd !)
101 compression: zstd zstd zstd (zstd !)
102 compression-level: default default default
102 compression-level: default default default
103 $ hg debugformat -v -R up-side-data --config format.exp-use-side-data=no
103 $ hg debugformat -v -R up-side-data --config experimental.revlogv2=no
104 format-variant repo config default
104 format-variant repo config default
105 fncache: yes yes yes
105 fncache: yes yes yes
106 dotencode: yes yes yes
106 dotencode: yes yes yes
107 generaldelta: yes yes yes
107 generaldelta: yes yes yes
108 share-safe: no no no
108 share-safe: no no no
109 sparserevlog: yes yes yes
109 sparserevlog: yes yes yes
110 persistent-nodemap: no no no (no-rust !)
110 persistent-nodemap: no no no (no-rust !)
111 persistent-nodemap: yes yes no (rust !)
111 persistent-nodemap: yes yes no (rust !)
112 copies-sdc: no no no
112 copies-sdc: no no no
113 revlog-v2: yes no no
113 revlog-v2: yes no no
114 plain-cl-delta: yes yes yes
114 plain-cl-delta: yes yes yes
115 compression: zlib zlib zlib (no-zstd !)
115 compression: zlib zlib zlib (no-zstd !)
116 compression: zstd zstd zstd (zstd !)
116 compression: zstd zstd zstd (zstd !)
117 compression-level: default default default
117 compression-level: default default default
118 $ hg debugupgraderepo -R up-side-data --config format.exp-use-side-data=no > /dev/null
118 $ hg debugupgraderepo -R up-side-data --config experimental.revlogv2=no > /dev/null
@@ -1,1597 +1,1595 b''
1 #require no-reposimplestore
1 #require no-reposimplestore
2
2
3 $ cat >> $HGRCPATH << EOF
3 $ cat >> $HGRCPATH << EOF
4 > [extensions]
4 > [extensions]
5 > share =
5 > share =
6 > [format]
6 > [format]
7 > # stabilize test accross variant
7 > # stabilize test accross variant
8 > revlog-compression=zlib
8 > revlog-compression=zlib
9 > EOF
9 > EOF
10
10
11 store and revlogv1 are required in source
11 store and revlogv1 are required in source
12
12
13 $ hg --config format.usestore=false init no-store
13 $ hg --config format.usestore=false init no-store
14 $ hg -R no-store debugupgraderepo
14 $ hg -R no-store debugupgraderepo
15 abort: cannot upgrade repository; requirement missing: store
15 abort: cannot upgrade repository; requirement missing: store
16 [255]
16 [255]
17
17
18 $ hg init no-revlogv1
18 $ hg init no-revlogv1
19 $ cat > no-revlogv1/.hg/requires << EOF
19 $ cat > no-revlogv1/.hg/requires << EOF
20 > dotencode
20 > dotencode
21 > fncache
21 > fncache
22 > generaldelta
22 > generaldelta
23 > store
23 > store
24 > EOF
24 > EOF
25
25
26 $ hg -R no-revlogv1 debugupgraderepo
26 $ hg -R no-revlogv1 debugupgraderepo
27 abort: cannot upgrade repository; missing a revlog version
27 abort: cannot upgrade repository; missing a revlog version
28 [255]
28 [255]
29
29
30 Cannot upgrade shared repositories
30 Cannot upgrade shared repositories
31
31
32 $ hg init share-parent
32 $ hg init share-parent
33 $ hg -q share share-parent share-child
33 $ hg -q share share-parent share-child
34
34
35 $ hg -R share-child debugupgraderepo
35 $ hg -R share-child debugupgraderepo
36 abort: cannot upgrade repository; unsupported source requirement: shared
36 abort: cannot upgrade repository; unsupported source requirement: shared
37 [255]
37 [255]
38
38
39 Do not yet support upgrading treemanifest repos
39 Do not yet support upgrading treemanifest repos
40
40
41 $ hg --config experimental.treemanifest=true init treemanifest
41 $ hg --config experimental.treemanifest=true init treemanifest
42 $ hg -R treemanifest debugupgraderepo
42 $ hg -R treemanifest debugupgraderepo
43 abort: cannot upgrade repository; unsupported source requirement: treemanifest
43 abort: cannot upgrade repository; unsupported source requirement: treemanifest
44 [255]
44 [255]
45
45
46 Cannot add treemanifest requirement during upgrade
46 Cannot add treemanifest requirement during upgrade
47
47
48 $ hg init disallowaddedreq
48 $ hg init disallowaddedreq
49 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
49 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
50 abort: cannot upgrade repository; do not support adding requirement: treemanifest
50 abort: cannot upgrade repository; do not support adding requirement: treemanifest
51 [255]
51 [255]
52
52
53 An upgrade of a repository created with recommended settings only suggests optimizations
53 An upgrade of a repository created with recommended settings only suggests optimizations
54
54
55 $ hg init empty
55 $ hg init empty
56 $ cd empty
56 $ cd empty
57 $ hg debugformat
57 $ hg debugformat
58 format-variant repo
58 format-variant repo
59 fncache: yes
59 fncache: yes
60 dotencode: yes
60 dotencode: yes
61 generaldelta: yes
61 generaldelta: yes
62 share-safe: no
62 share-safe: no
63 sparserevlog: yes
63 sparserevlog: yes
64 persistent-nodemap: no (no-rust !)
64 persistent-nodemap: no (no-rust !)
65 persistent-nodemap: yes (rust !)
65 persistent-nodemap: yes (rust !)
66 copies-sdc: no
66 copies-sdc: no
67 revlog-v2: no
67 revlog-v2: no
68 plain-cl-delta: yes
68 plain-cl-delta: yes
69 compression: zlib
69 compression: zlib
70 compression-level: default
70 compression-level: default
71 $ hg debugformat --verbose
71 $ hg debugformat --verbose
72 format-variant repo config default
72 format-variant repo config default
73 fncache: yes yes yes
73 fncache: yes yes yes
74 dotencode: yes yes yes
74 dotencode: yes yes yes
75 generaldelta: yes yes yes
75 generaldelta: yes yes yes
76 share-safe: no no no
76 share-safe: no no no
77 sparserevlog: yes yes yes
77 sparserevlog: yes yes yes
78 persistent-nodemap: no no no (no-rust !)
78 persistent-nodemap: no no no (no-rust !)
79 persistent-nodemap: yes yes no (rust !)
79 persistent-nodemap: yes yes no (rust !)
80 copies-sdc: no no no
80 copies-sdc: no no no
81 revlog-v2: no no no
81 revlog-v2: no no no
82 plain-cl-delta: yes yes yes
82 plain-cl-delta: yes yes yes
83 compression: zlib zlib zlib (no-zstd !)
83 compression: zlib zlib zlib (no-zstd !)
84 compression: zlib zlib zstd (zstd !)
84 compression: zlib zlib zstd (zstd !)
85 compression-level: default default default
85 compression-level: default default default
86 $ hg debugformat --verbose --config format.usefncache=no
86 $ hg debugformat --verbose --config format.usefncache=no
87 format-variant repo config default
87 format-variant repo config default
88 fncache: yes no yes
88 fncache: yes no yes
89 dotencode: yes no yes
89 dotencode: yes no yes
90 generaldelta: yes yes yes
90 generaldelta: yes yes yes
91 share-safe: no no no
91 share-safe: no no no
92 sparserevlog: yes yes yes
92 sparserevlog: yes yes yes
93 persistent-nodemap: no no no (no-rust !)
93 persistent-nodemap: no no no (no-rust !)
94 persistent-nodemap: yes yes no (rust !)
94 persistent-nodemap: yes yes no (rust !)
95 copies-sdc: no no no
95 copies-sdc: no no no
96 revlog-v2: no no no
96 revlog-v2: no no no
97 plain-cl-delta: yes yes yes
97 plain-cl-delta: yes yes yes
98 compression: zlib zlib zlib (no-zstd !)
98 compression: zlib zlib zlib (no-zstd !)
99 compression: zlib zlib zstd (zstd !)
99 compression: zlib zlib zstd (zstd !)
100 compression-level: default default default
100 compression-level: default default default
101 $ hg debugformat --verbose --config format.usefncache=no --color=debug
101 $ hg debugformat --verbose --config format.usefncache=no --color=debug
102 format-variant repo config default
102 format-variant repo config default
103 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
103 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
104 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
104 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
105 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
105 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
106 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
106 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
107 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
107 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
108 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
108 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
109 [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
109 [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
110 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
110 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
111 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
111 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
112 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
112 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
113 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
113 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
114 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
114 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
115 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
115 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
116 $ hg debugformat -Tjson
116 $ hg debugformat -Tjson
117 [
117 [
118 {
118 {
119 "config": true,
119 "config": true,
120 "default": true,
120 "default": true,
121 "name": "fncache",
121 "name": "fncache",
122 "repo": true
122 "repo": true
123 },
123 },
124 {
124 {
125 "config": true,
125 "config": true,
126 "default": true,
126 "default": true,
127 "name": "dotencode",
127 "name": "dotencode",
128 "repo": true
128 "repo": true
129 },
129 },
130 {
130 {
131 "config": true,
131 "config": true,
132 "default": true,
132 "default": true,
133 "name": "generaldelta",
133 "name": "generaldelta",
134 "repo": true
134 "repo": true
135 },
135 },
136 {
136 {
137 "config": false,
137 "config": false,
138 "default": false,
138 "default": false,
139 "name": "share-safe",
139 "name": "share-safe",
140 "repo": false
140 "repo": false
141 },
141 },
142 {
142 {
143 "config": true,
143 "config": true,
144 "default": true,
144 "default": true,
145 "name": "sparserevlog",
145 "name": "sparserevlog",
146 "repo": true
146 "repo": true
147 },
147 },
148 {
148 {
149 "config": false, (no-rust !)
149 "config": false, (no-rust !)
150 "config": true, (rust !)
150 "config": true, (rust !)
151 "default": false,
151 "default": false,
152 "name": "persistent-nodemap",
152 "name": "persistent-nodemap",
153 "repo": false (no-rust !)
153 "repo": false (no-rust !)
154 "repo": true (rust !)
154 "repo": true (rust !)
155 },
155 },
156 {
156 {
157 "config": false,
157 "config": false,
158 "default": false,
158 "default": false,
159 "name": "copies-sdc",
159 "name": "copies-sdc",
160 "repo": false
160 "repo": false
161 },
161 },
162 {
162 {
163 "config": false,
163 "config": false,
164 "default": false,
164 "default": false,
165 "name": "revlog-v2",
165 "name": "revlog-v2",
166 "repo": false
166 "repo": false
167 },
167 },
168 {
168 {
169 "config": true,
169 "config": true,
170 "default": true,
170 "default": true,
171 "name": "plain-cl-delta",
171 "name": "plain-cl-delta",
172 "repo": true
172 "repo": true
173 },
173 },
174 {
174 {
175 "config": "zlib",
175 "config": "zlib",
176 "default": "zlib", (no-zstd !)
176 "default": "zlib", (no-zstd !)
177 "default": "zstd", (zstd !)
177 "default": "zstd", (zstd !)
178 "name": "compression",
178 "name": "compression",
179 "repo": "zlib"
179 "repo": "zlib"
180 },
180 },
181 {
181 {
182 "config": "default",
182 "config": "default",
183 "default": "default",
183 "default": "default",
184 "name": "compression-level",
184 "name": "compression-level",
185 "repo": "default"
185 "repo": "default"
186 }
186 }
187 ]
187 ]
188 $ hg debugupgraderepo
188 $ hg debugupgraderepo
189 (no format upgrades found in existing repository)
189 (no format upgrades found in existing repository)
190 performing an upgrade with "--run" will make the following changes:
190 performing an upgrade with "--run" will make the following changes:
191
191
192 requirements
192 requirements
193 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
193 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
194 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
194 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
195
195
196 processed revlogs:
196 processed revlogs:
197 - all-filelogs
197 - all-filelogs
198 - changelog
198 - changelog
199 - manifest
199 - manifest
200
200
201 additional optimizations are available by specifying "--optimize <name>":
201 additional optimizations are available by specifying "--optimize <name>":
202
202
203 re-delta-parent
203 re-delta-parent
204 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
204 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
205
205
206 re-delta-multibase
206 re-delta-multibase
207 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
207 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
208
208
209 re-delta-all
209 re-delta-all
210 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
210 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
211
211
212 re-delta-fulladd
212 re-delta-fulladd
213 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
213 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
214
214
215
215
216 $ hg debugupgraderepo --quiet
216 $ hg debugupgraderepo --quiet
217 requirements
217 requirements
218 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
218 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
219 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
219 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
220
220
221 processed revlogs:
221 processed revlogs:
222 - all-filelogs
222 - all-filelogs
223 - changelog
223 - changelog
224 - manifest
224 - manifest
225
225
226
226
227 --optimize can be used to add optimizations
227 --optimize can be used to add optimizations
228
228
229 $ hg debugupgrade --optimize 're-delta-parent'
229 $ hg debugupgrade --optimize 're-delta-parent'
230 (no format upgrades found in existing repository)
230 (no format upgrades found in existing repository)
231 performing an upgrade with "--run" will make the following changes:
231 performing an upgrade with "--run" will make the following changes:
232
232
233 requirements
233 requirements
234 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
234 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
235 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
235 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
236
236
237 optimisations: re-delta-parent
237 optimisations: re-delta-parent
238
238
239 re-delta-parent
239 re-delta-parent
240 deltas within internal storage will choose a new base revision if needed
240 deltas within internal storage will choose a new base revision if needed
241
241
242 processed revlogs:
242 processed revlogs:
243 - all-filelogs
243 - all-filelogs
244 - changelog
244 - changelog
245 - manifest
245 - manifest
246
246
247 additional optimizations are available by specifying "--optimize <name>":
247 additional optimizations are available by specifying "--optimize <name>":
248
248
249 re-delta-multibase
249 re-delta-multibase
250 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
250 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
251
251
252 re-delta-all
252 re-delta-all
253 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
253 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
254
254
255 re-delta-fulladd
255 re-delta-fulladd
256 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
256 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
257
257
258
258
259 modern form of the option
259 modern form of the option
260
260
261 $ hg debugupgrade --optimize re-delta-parent
261 $ hg debugupgrade --optimize re-delta-parent
262 (no format upgrades found in existing repository)
262 (no format upgrades found in existing repository)
263 performing an upgrade with "--run" will make the following changes:
263 performing an upgrade with "--run" will make the following changes:
264
264
265 requirements
265 requirements
266 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
266 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
267 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
267 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
268
268
269 optimisations: re-delta-parent
269 optimisations: re-delta-parent
270
270
271 re-delta-parent
271 re-delta-parent
272 deltas within internal storage will choose a new base revision if needed
272 deltas within internal storage will choose a new base revision if needed
273
273
274 processed revlogs:
274 processed revlogs:
275 - all-filelogs
275 - all-filelogs
276 - changelog
276 - changelog
277 - manifest
277 - manifest
278
278
279 additional optimizations are available by specifying "--optimize <name>":
279 additional optimizations are available by specifying "--optimize <name>":
280
280
281 re-delta-multibase
281 re-delta-multibase
282 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
282 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
283
283
284 re-delta-all
284 re-delta-all
285 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
285 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
286
286
287 re-delta-fulladd
287 re-delta-fulladd
288 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
288 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
289
289
290 $ hg debugupgrade --optimize re-delta-parent --quiet
290 $ hg debugupgrade --optimize re-delta-parent --quiet
291 requirements
291 requirements
292 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
292 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
293 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
293 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
294
294
295 optimisations: re-delta-parent
295 optimisations: re-delta-parent
296
296
297 processed revlogs:
297 processed revlogs:
298 - all-filelogs
298 - all-filelogs
299 - changelog
299 - changelog
300 - manifest
300 - manifest
301
301
302
302
303 unknown optimization:
303 unknown optimization:
304
304
305 $ hg debugupgrade --optimize foobar
305 $ hg debugupgrade --optimize foobar
306 abort: unknown optimization action requested: foobar
306 abort: unknown optimization action requested: foobar
307 (run without arguments to see valid optimizations)
307 (run without arguments to see valid optimizations)
308 [255]
308 [255]
309
309
310 Various sub-optimal detections work
310 Various sub-optimal detections work
311
311
312 $ cat > .hg/requires << EOF
312 $ cat > .hg/requires << EOF
313 > revlogv1
313 > revlogv1
314 > store
314 > store
315 > EOF
315 > EOF
316
316
317 $ hg debugformat
317 $ hg debugformat
318 format-variant repo
318 format-variant repo
319 fncache: no
319 fncache: no
320 dotencode: no
320 dotencode: no
321 generaldelta: no
321 generaldelta: no
322 share-safe: no
322 share-safe: no
323 sparserevlog: no
323 sparserevlog: no
324 persistent-nodemap: no
324 persistent-nodemap: no
325 copies-sdc: no
325 copies-sdc: no
326 revlog-v2: no
326 revlog-v2: no
327 plain-cl-delta: yes
327 plain-cl-delta: yes
328 compression: zlib
328 compression: zlib
329 compression-level: default
329 compression-level: default
330 $ hg debugformat --verbose
330 $ hg debugformat --verbose
331 format-variant repo config default
331 format-variant repo config default
332 fncache: no yes yes
332 fncache: no yes yes
333 dotencode: no yes yes
333 dotencode: no yes yes
334 generaldelta: no yes yes
334 generaldelta: no yes yes
335 share-safe: no no no
335 share-safe: no no no
336 sparserevlog: no yes yes
336 sparserevlog: no yes yes
337 persistent-nodemap: no no no (no-rust !)
337 persistent-nodemap: no no no (no-rust !)
338 persistent-nodemap: no yes no (rust !)
338 persistent-nodemap: no yes no (rust !)
339 copies-sdc: no no no
339 copies-sdc: no no no
340 revlog-v2: no no no
340 revlog-v2: no no no
341 plain-cl-delta: yes yes yes
341 plain-cl-delta: yes yes yes
342 compression: zlib zlib zlib (no-zstd !)
342 compression: zlib zlib zlib (no-zstd !)
343 compression: zlib zlib zstd (zstd !)
343 compression: zlib zlib zstd (zstd !)
344 compression-level: default default default
344 compression-level: default default default
345 $ hg debugformat --verbose --config format.usegeneraldelta=no
345 $ hg debugformat --verbose --config format.usegeneraldelta=no
346 format-variant repo config default
346 format-variant repo config default
347 fncache: no yes yes
347 fncache: no yes yes
348 dotencode: no yes yes
348 dotencode: no yes yes
349 generaldelta: no no yes
349 generaldelta: no no yes
350 share-safe: no no no
350 share-safe: no no no
351 sparserevlog: no no yes
351 sparserevlog: no no yes
352 persistent-nodemap: no no no (no-rust !)
352 persistent-nodemap: no no no (no-rust !)
353 persistent-nodemap: no yes no (rust !)
353 persistent-nodemap: no yes no (rust !)
354 copies-sdc: no no no
354 copies-sdc: no no no
355 revlog-v2: no no no
355 revlog-v2: no no no
356 plain-cl-delta: yes yes yes
356 plain-cl-delta: yes yes yes
357 compression: zlib zlib zlib (no-zstd !)
357 compression: zlib zlib zlib (no-zstd !)
358 compression: zlib zlib zstd (zstd !)
358 compression: zlib zlib zstd (zstd !)
359 compression-level: default default default
359 compression-level: default default default
360 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
360 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
361 format-variant repo config default
361 format-variant repo config default
362 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
362 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
363 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
363 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
364 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
364 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
365 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
365 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
366 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
366 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
367 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
367 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
368 [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
368 [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
369 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
369 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
370 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
370 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
371 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
371 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
372 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
372 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
373 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
373 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
374 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
374 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
375 $ hg debugupgraderepo
375 $ hg debugupgraderepo
376 repository lacks features recommended by current config options:
376 repository lacks features recommended by current config options:
377
377
378 fncache
378 fncache
379 long and reserved filenames may not work correctly; repository performance is sub-optimal
379 long and reserved filenames may not work correctly; repository performance is sub-optimal
380
380
381 dotencode
381 dotencode
382 storage of filenames beginning with a period or space may not work correctly
382 storage of filenames beginning with a period or space may not work correctly
383
383
384 generaldelta
384 generaldelta
385 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
385 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
386
386
387 sparserevlog
387 sparserevlog
388 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
388 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
389
389
390 persistent-nodemap (rust !)
390 persistent-nodemap (rust !)
391 persist the node -> rev mapping on disk to speedup lookup (rust !)
391 persist the node -> rev mapping on disk to speedup lookup (rust !)
392 (rust !)
392 (rust !)
393
393
394 performing an upgrade with "--run" will make the following changes:
394 performing an upgrade with "--run" will make the following changes:
395
395
396 requirements
396 requirements
397 preserved: revlogv1, store
397 preserved: revlogv1, store
398 added: dotencode, fncache, generaldelta, sparserevlog (no-rust !)
398 added: dotencode, fncache, generaldelta, sparserevlog (no-rust !)
399 added: dotencode, fncache, generaldelta, persistent-nodemap, sparserevlog (rust !)
399 added: dotencode, fncache, generaldelta, persistent-nodemap, sparserevlog (rust !)
400
400
401 fncache
401 fncache
402 repository will be more resilient to storing certain paths and performance of certain operations should be improved
402 repository will be more resilient to storing certain paths and performance of certain operations should be improved
403
403
404 dotencode
404 dotencode
405 repository will be better able to store files beginning with a space or period
405 repository will be better able to store files beginning with a space or period
406
406
407 generaldelta
407 generaldelta
408 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
408 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
409
409
410 sparserevlog
410 sparserevlog
411 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
411 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
412
412
413 persistent-nodemap (rust !)
413 persistent-nodemap (rust !)
414 Speedup revision lookup by node id. (rust !)
414 Speedup revision lookup by node id. (rust !)
415 (rust !)
415 (rust !)
416 processed revlogs:
416 processed revlogs:
417 - all-filelogs
417 - all-filelogs
418 - changelog
418 - changelog
419 - manifest
419 - manifest
420
420
421 additional optimizations are available by specifying "--optimize <name>":
421 additional optimizations are available by specifying "--optimize <name>":
422
422
423 re-delta-parent
423 re-delta-parent
424 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
424 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
425
425
426 re-delta-multibase
426 re-delta-multibase
427 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
427 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
428
428
429 re-delta-all
429 re-delta-all
430 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
430 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
431
431
432 re-delta-fulladd
432 re-delta-fulladd
433 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
433 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
434
434
435 $ hg debugupgraderepo --quiet
435 $ hg debugupgraderepo --quiet
436 requirements
436 requirements
437 preserved: revlogv1, store
437 preserved: revlogv1, store
438 added: dotencode, fncache, generaldelta, sparserevlog (no-rust !)
438 added: dotencode, fncache, generaldelta, sparserevlog (no-rust !)
439 added: dotencode, fncache, generaldelta, persistent-nodemap, sparserevlog (rust !)
439 added: dotencode, fncache, generaldelta, persistent-nodemap, sparserevlog (rust !)
440
440
441 processed revlogs:
441 processed revlogs:
442 - all-filelogs
442 - all-filelogs
443 - changelog
443 - changelog
444 - manifest
444 - manifest
445
445
446
446
447 $ hg --config format.dotencode=false debugupgraderepo
447 $ hg --config format.dotencode=false debugupgraderepo
448 repository lacks features recommended by current config options:
448 repository lacks features recommended by current config options:
449
449
450 fncache
450 fncache
451 long and reserved filenames may not work correctly; repository performance is sub-optimal
451 long and reserved filenames may not work correctly; repository performance is sub-optimal
452
452
453 generaldelta
453 generaldelta
454 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
454 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
455
455
456 sparserevlog
456 sparserevlog
457 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
457 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
458
458
459 persistent-nodemap (rust !)
459 persistent-nodemap (rust !)
460 persist the node -> rev mapping on disk to speedup lookup (rust !)
460 persist the node -> rev mapping on disk to speedup lookup (rust !)
461 (rust !)
461 (rust !)
462 repository lacks features used by the default config options:
462 repository lacks features used by the default config options:
463
463
464 dotencode
464 dotencode
465 storage of filenames beginning with a period or space may not work correctly
465 storage of filenames beginning with a period or space may not work correctly
466
466
467
467
468 performing an upgrade with "--run" will make the following changes:
468 performing an upgrade with "--run" will make the following changes:
469
469
470 requirements
470 requirements
471 preserved: revlogv1, store
471 preserved: revlogv1, store
472 added: fncache, generaldelta, sparserevlog (no-rust !)
472 added: fncache, generaldelta, sparserevlog (no-rust !)
473 added: fncache, generaldelta, persistent-nodemap, sparserevlog (rust !)
473 added: fncache, generaldelta, persistent-nodemap, sparserevlog (rust !)
474
474
475 fncache
475 fncache
476 repository will be more resilient to storing certain paths and performance of certain operations should be improved
476 repository will be more resilient to storing certain paths and performance of certain operations should be improved
477
477
478 generaldelta
478 generaldelta
479 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
479 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
480
480
481 sparserevlog
481 sparserevlog
482 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
482 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
483
483
484 persistent-nodemap (rust !)
484 persistent-nodemap (rust !)
485 Speedup revision lookup by node id. (rust !)
485 Speedup revision lookup by node id. (rust !)
486 (rust !)
486 (rust !)
487 processed revlogs:
487 processed revlogs:
488 - all-filelogs
488 - all-filelogs
489 - changelog
489 - changelog
490 - manifest
490 - manifest
491
491
492 additional optimizations are available by specifying "--optimize <name>":
492 additional optimizations are available by specifying "--optimize <name>":
493
493
494 re-delta-parent
494 re-delta-parent
495 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
495 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
496
496
497 re-delta-multibase
497 re-delta-multibase
498 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
498 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
499
499
500 re-delta-all
500 re-delta-all
501 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
501 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
502
502
503 re-delta-fulladd
503 re-delta-fulladd
504 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
504 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
505
505
506
506
507 $ cd ..
507 $ cd ..
508
508
509 Upgrading a repository that is already modern essentially no-ops
509 Upgrading a repository that is already modern essentially no-ops
510
510
511 $ hg init modern
511 $ hg init modern
512 $ hg -R modern debugupgraderepo --run
512 $ hg -R modern debugupgraderepo --run
513 nothing to do
513 nothing to do
514
514
515 Upgrading a repository to generaldelta works
515 Upgrading a repository to generaldelta works
516
516
517 $ hg --config format.usegeneraldelta=false init upgradegd
517 $ hg --config format.usegeneraldelta=false init upgradegd
518 $ cd upgradegd
518 $ cd upgradegd
519 $ touch f0
519 $ touch f0
520 $ hg -q commit -A -m initial
520 $ hg -q commit -A -m initial
521 $ mkdir FooBarDirectory.d
521 $ mkdir FooBarDirectory.d
522 $ touch FooBarDirectory.d/f1
522 $ touch FooBarDirectory.d/f1
523 $ hg -q commit -A -m 'add f1'
523 $ hg -q commit -A -m 'add f1'
524 $ hg -q up -r 0
524 $ hg -q up -r 0
525 >>> from __future__ import absolute_import, print_function
525 >>> from __future__ import absolute_import, print_function
526 >>> import random
526 >>> import random
527 >>> random.seed(0) # have a reproducible content
527 >>> random.seed(0) # have a reproducible content
528 >>> with open("f2", "wb") as f:
528 >>> with open("f2", "wb") as f:
529 ... for i in range(100000):
529 ... for i in range(100000):
530 ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None
530 ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None
531 $ hg -q commit -A -m 'add f2'
531 $ hg -q commit -A -m 'add f2'
532
532
533 make sure we have a .d file
533 make sure we have a .d file
534
534
535 $ ls -d .hg/store/data/*
535 $ ls -d .hg/store/data/*
536 .hg/store/data/_foo_bar_directory.d.hg
536 .hg/store/data/_foo_bar_directory.d.hg
537 .hg/store/data/f0.i
537 .hg/store/data/f0.i
538 .hg/store/data/f2.d
538 .hg/store/data/f2.d
539 .hg/store/data/f2.i
539 .hg/store/data/f2.i
540
540
541 $ hg debugupgraderepo --run --config format.sparse-revlog=false
541 $ hg debugupgraderepo --run --config format.sparse-revlog=false
542 upgrade will perform the following actions:
542 upgrade will perform the following actions:
543
543
544 requirements
544 requirements
545 preserved: dotencode, fncache, revlogv1, store (no-rust !)
545 preserved: dotencode, fncache, revlogv1, store (no-rust !)
546 preserved: dotencode, fncache, persistent-nodemap, revlogv1, store (rust !)
546 preserved: dotencode, fncache, persistent-nodemap, revlogv1, store (rust !)
547 added: generaldelta
547 added: generaldelta
548
548
549 generaldelta
549 generaldelta
550 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
550 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
551
551
552 processed revlogs:
552 processed revlogs:
553 - all-filelogs
553 - all-filelogs
554 - changelog
554 - changelog
555 - manifest
555 - manifest
556
556
557 beginning upgrade...
557 beginning upgrade...
558 repository locked and read-only
558 repository locked and read-only
559 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
559 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
560 (it is safe to interrupt this process any time before data migration completes)
560 (it is safe to interrupt this process any time before data migration completes)
561 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
561 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
562 migrating 519 KB in store; 1.05 MB tracked data
562 migrating 519 KB in store; 1.05 MB tracked data
563 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
563 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
564 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
564 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
565 migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data)
565 migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data)
566 finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes
566 finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes
567 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
567 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
568 finished migrating 3 changelog revisions; change in size: 0 bytes
568 finished migrating 3 changelog revisions; change in size: 0 bytes
569 finished migrating 9 total revisions; total change in store size: -17 bytes
569 finished migrating 9 total revisions; total change in store size: -17 bytes
570 copying phaseroots
570 copying phaseroots
571 data fully upgraded in a temporary repository
571 data fully upgraded in a temporary repository
572 marking source repository as being upgraded; clients will be unable to read from repository
572 marking source repository as being upgraded; clients will be unable to read from repository
573 starting in-place swap of repository data
573 starting in-place swap of repository data
574 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
574 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
575 replacing store...
575 replacing store...
576 store replacement complete; repository was inconsistent for *s (glob)
576 store replacement complete; repository was inconsistent for *s (glob)
577 finalizing requirements file and making repository readable again
577 finalizing requirements file and making repository readable again
578 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
578 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
579 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
579 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
580 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
580 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
581
581
582 Original requirements backed up
582 Original requirements backed up
583
583
584 $ cat .hg/upgradebackup.*/requires
584 $ cat .hg/upgradebackup.*/requires
585 dotencode
585 dotencode
586 fncache
586 fncache
587 persistent-nodemap (rust !)
587 persistent-nodemap (rust !)
588 revlogv1
588 revlogv1
589 store
589 store
590
590
591 generaldelta added to original requirements files
591 generaldelta added to original requirements files
592
592
593 $ cat .hg/requires
593 $ cat .hg/requires
594 dotencode
594 dotencode
595 fncache
595 fncache
596 generaldelta
596 generaldelta
597 persistent-nodemap (rust !)
597 persistent-nodemap (rust !)
598 revlogv1
598 revlogv1
599 store
599 store
600
600
601 store directory has files we expect
601 store directory has files we expect
602
602
603 $ ls .hg/store
603 $ ls .hg/store
604 00changelog.i
604 00changelog.i
605 00manifest.i
605 00manifest.i
606 data
606 data
607 fncache
607 fncache
608 phaseroots
608 phaseroots
609 undo
609 undo
610 undo.backupfiles
610 undo.backupfiles
611 undo.phaseroots
611 undo.phaseroots
612
612
613 manifest should be generaldelta
613 manifest should be generaldelta
614
614
615 $ hg debugrevlog -m | grep flags
615 $ hg debugrevlog -m | grep flags
616 flags : inline, generaldelta
616 flags : inline, generaldelta
617
617
618 verify should be happy
618 verify should be happy
619
619
620 $ hg verify
620 $ hg verify
621 checking changesets
621 checking changesets
622 checking manifests
622 checking manifests
623 crosschecking files in changesets and manifests
623 crosschecking files in changesets and manifests
624 checking files
624 checking files
625 checked 3 changesets with 3 changes to 3 files
625 checked 3 changesets with 3 changes to 3 files
626
626
627 old store should be backed up
627 old store should be backed up
628
628
629 $ ls -d .hg/upgradebackup.*/
629 $ ls -d .hg/upgradebackup.*/
630 .hg/upgradebackup.*/ (glob)
630 .hg/upgradebackup.*/ (glob)
631 $ ls .hg/upgradebackup.*/store
631 $ ls .hg/upgradebackup.*/store
632 00changelog.i
632 00changelog.i
633 00manifest.i
633 00manifest.i
634 data
634 data
635 fncache
635 fncache
636 phaseroots
636 phaseroots
637 undo
637 undo
638 undo.backup.fncache
638 undo.backup.fncache
639 undo.backupfiles
639 undo.backupfiles
640 undo.phaseroots
640 undo.phaseroots
641
641
642 unless --no-backup is passed
642 unless --no-backup is passed
643
643
644 $ rm -rf .hg/upgradebackup.*/
644 $ rm -rf .hg/upgradebackup.*/
645 $ hg debugupgraderepo --run --no-backup
645 $ hg debugupgraderepo --run --no-backup
646 upgrade will perform the following actions:
646 upgrade will perform the following actions:
647
647
648 requirements
648 requirements
649 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
649 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
650 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
650 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
651 added: sparserevlog
651 added: sparserevlog
652
652
653 sparserevlog
653 sparserevlog
654 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
654 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
655
655
656 processed revlogs:
656 processed revlogs:
657 - all-filelogs
657 - all-filelogs
658 - changelog
658 - changelog
659 - manifest
659 - manifest
660
660
661 beginning upgrade...
661 beginning upgrade...
662 repository locked and read-only
662 repository locked and read-only
663 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
663 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
664 (it is safe to interrupt this process any time before data migration completes)
664 (it is safe to interrupt this process any time before data migration completes)
665 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
665 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
666 migrating 519 KB in store; 1.05 MB tracked data
666 migrating 519 KB in store; 1.05 MB tracked data
667 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
667 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
668 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
668 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
669 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
669 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
670 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
670 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
671 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
671 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
672 finished migrating 3 changelog revisions; change in size: 0 bytes
672 finished migrating 3 changelog revisions; change in size: 0 bytes
673 finished migrating 9 total revisions; total change in store size: 0 bytes
673 finished migrating 9 total revisions; total change in store size: 0 bytes
674 copying phaseroots
674 copying phaseroots
675 data fully upgraded in a temporary repository
675 data fully upgraded in a temporary repository
676 marking source repository as being upgraded; clients will be unable to read from repository
676 marking source repository as being upgraded; clients will be unable to read from repository
677 starting in-place swap of repository data
677 starting in-place swap of repository data
678 replacing store...
678 replacing store...
679 store replacement complete; repository was inconsistent for * (glob)
679 store replacement complete; repository was inconsistent for * (glob)
680 finalizing requirements file and making repository readable again
680 finalizing requirements file and making repository readable again
681 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
681 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
682 $ ls -1 .hg/ | grep upgradebackup
682 $ ls -1 .hg/ | grep upgradebackup
683 [1]
683 [1]
684
684
685 We can restrict optimization to some revlog:
685 We can restrict optimization to some revlog:
686
686
687 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
687 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
688 upgrade will perform the following actions:
688 upgrade will perform the following actions:
689
689
690 requirements
690 requirements
691 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
691 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
692 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
692 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
693
693
694 optimisations: re-delta-parent
694 optimisations: re-delta-parent
695
695
696 re-delta-parent
696 re-delta-parent
697 deltas within internal storage will choose a new base revision if needed
697 deltas within internal storage will choose a new base revision if needed
698
698
699 processed revlogs:
699 processed revlogs:
700 - manifest
700 - manifest
701
701
702 beginning upgrade...
702 beginning upgrade...
703 repository locked and read-only
703 repository locked and read-only
704 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
704 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
705 (it is safe to interrupt this process any time before data migration completes)
705 (it is safe to interrupt this process any time before data migration completes)
706 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
706 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
707 migrating 519 KB in store; 1.05 MB tracked data
707 migrating 519 KB in store; 1.05 MB tracked data
708 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
708 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
709 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
709 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
710 blindly copying data/f0.i containing 1 revisions
710 blindly copying data/f0.i containing 1 revisions
711 blindly copying data/f2.i containing 1 revisions
711 blindly copying data/f2.i containing 1 revisions
712 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
712 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
713 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
713 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
714 cloning 3 revisions from 00manifest.i
714 cloning 3 revisions from 00manifest.i
715 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
715 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
716 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
716 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
717 blindly copying 00changelog.i containing 3 revisions
717 blindly copying 00changelog.i containing 3 revisions
718 finished migrating 3 changelog revisions; change in size: 0 bytes
718 finished migrating 3 changelog revisions; change in size: 0 bytes
719 finished migrating 9 total revisions; total change in store size: 0 bytes
719 finished migrating 9 total revisions; total change in store size: 0 bytes
720 copying phaseroots
720 copying phaseroots
721 data fully upgraded in a temporary repository
721 data fully upgraded in a temporary repository
722 marking source repository as being upgraded; clients will be unable to read from repository
722 marking source repository as being upgraded; clients will be unable to read from repository
723 starting in-place swap of repository data
723 starting in-place swap of repository data
724 replacing store...
724 replacing store...
725 store replacement complete; repository was inconsistent for *s (glob)
725 store replacement complete; repository was inconsistent for *s (glob)
726 finalizing requirements file and making repository readable again
726 finalizing requirements file and making repository readable again
727 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
727 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
728
728
729 Check that the repo still works fine
729 Check that the repo still works fine
730
730
731 $ hg log -G --stat
731 $ hg log -G --stat
732 @ changeset: 2:76d4395f5413 (no-py3 !)
732 @ changeset: 2:76d4395f5413 (no-py3 !)
733 @ changeset: 2:fca376863211 (py3 !)
733 @ changeset: 2:fca376863211 (py3 !)
734 | tag: tip
734 | tag: tip
735 | parent: 0:ba592bf28da2
735 | parent: 0:ba592bf28da2
736 | user: test
736 | user: test
737 | date: Thu Jan 01 00:00:00 1970 +0000
737 | date: Thu Jan 01 00:00:00 1970 +0000
738 | summary: add f2
738 | summary: add f2
739 |
739 |
740 | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
740 | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
741 | 1 files changed, 100000 insertions(+), 0 deletions(-)
741 | 1 files changed, 100000 insertions(+), 0 deletions(-)
742 |
742 |
743 | o changeset: 1:2029ce2354e2
743 | o changeset: 1:2029ce2354e2
744 |/ user: test
744 |/ user: test
745 | date: Thu Jan 01 00:00:00 1970 +0000
745 | date: Thu Jan 01 00:00:00 1970 +0000
746 | summary: add f1
746 | summary: add f1
747 |
747 |
748 |
748 |
749 o changeset: 0:ba592bf28da2
749 o changeset: 0:ba592bf28da2
750 user: test
750 user: test
751 date: Thu Jan 01 00:00:00 1970 +0000
751 date: Thu Jan 01 00:00:00 1970 +0000
752 summary: initial
752 summary: initial
753
753
754
754
755
755
756 $ hg verify
756 $ hg verify
757 checking changesets
757 checking changesets
758 checking manifests
758 checking manifests
759 crosschecking files in changesets and manifests
759 crosschecking files in changesets and manifests
760 checking files
760 checking files
761 checked 3 changesets with 3 changes to 3 files
761 checked 3 changesets with 3 changes to 3 files
762
762
763 Check we can select negatively
763 Check we can select negatively
764
764
765 $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback
765 $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback
766 upgrade will perform the following actions:
766 upgrade will perform the following actions:
767
767
768 requirements
768 requirements
769 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
769 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
770 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
770 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
771
771
772 optimisations: re-delta-parent
772 optimisations: re-delta-parent
773
773
774 re-delta-parent
774 re-delta-parent
775 deltas within internal storage will choose a new base revision if needed
775 deltas within internal storage will choose a new base revision if needed
776
776
777 processed revlogs:
777 processed revlogs:
778 - all-filelogs
778 - all-filelogs
779 - changelog
779 - changelog
780
780
781 beginning upgrade...
781 beginning upgrade...
782 repository locked and read-only
782 repository locked and read-only
783 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
783 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
784 (it is safe to interrupt this process any time before data migration completes)
784 (it is safe to interrupt this process any time before data migration completes)
785 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
785 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
786 migrating 519 KB in store; 1.05 MB tracked data
786 migrating 519 KB in store; 1.05 MB tracked data
787 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
787 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
788 cloning 1 revisions from data/FooBarDirectory.d/f1.i
788 cloning 1 revisions from data/FooBarDirectory.d/f1.i
789 cloning 1 revisions from data/f0.i
789 cloning 1 revisions from data/f0.i
790 cloning 1 revisions from data/f2.i
790 cloning 1 revisions from data/f2.i
791 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
791 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
792 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
792 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
793 blindly copying 00manifest.i containing 3 revisions
793 blindly copying 00manifest.i containing 3 revisions
794 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
794 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
795 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
795 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
796 cloning 3 revisions from 00changelog.i
796 cloning 3 revisions from 00changelog.i
797 finished migrating 3 changelog revisions; change in size: 0 bytes
797 finished migrating 3 changelog revisions; change in size: 0 bytes
798 finished migrating 9 total revisions; total change in store size: 0 bytes
798 finished migrating 9 total revisions; total change in store size: 0 bytes
799 copying phaseroots
799 copying phaseroots
800 data fully upgraded in a temporary repository
800 data fully upgraded in a temporary repository
801 marking source repository as being upgraded; clients will be unable to read from repository
801 marking source repository as being upgraded; clients will be unable to read from repository
802 starting in-place swap of repository data
802 starting in-place swap of repository data
803 replacing store...
803 replacing store...
804 store replacement complete; repository was inconsistent for *s (glob)
804 store replacement complete; repository was inconsistent for *s (glob)
805 finalizing requirements file and making repository readable again
805 finalizing requirements file and making repository readable again
806 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
806 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
807 $ hg verify
807 $ hg verify
808 checking changesets
808 checking changesets
809 checking manifests
809 checking manifests
810 crosschecking files in changesets and manifests
810 crosschecking files in changesets and manifests
811 checking files
811 checking files
812 checked 3 changesets with 3 changes to 3 files
812 checked 3 changesets with 3 changes to 3 files
813
813
814 Check that we can select changelog only
814 Check that we can select changelog only
815
815
816 $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback
816 $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback
817 upgrade will perform the following actions:
817 upgrade will perform the following actions:
818
818
819 requirements
819 requirements
820 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
820 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
821 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
821 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
822
822
823 optimisations: re-delta-parent
823 optimisations: re-delta-parent
824
824
825 re-delta-parent
825 re-delta-parent
826 deltas within internal storage will choose a new base revision if needed
826 deltas within internal storage will choose a new base revision if needed
827
827
828 processed revlogs:
828 processed revlogs:
829 - changelog
829 - changelog
830
830
831 beginning upgrade...
831 beginning upgrade...
832 repository locked and read-only
832 repository locked and read-only
833 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
833 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
834 (it is safe to interrupt this process any time before data migration completes)
834 (it is safe to interrupt this process any time before data migration completes)
835 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
835 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
836 migrating 519 KB in store; 1.05 MB tracked data
836 migrating 519 KB in store; 1.05 MB tracked data
837 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
837 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
838 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
838 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
839 blindly copying data/f0.i containing 1 revisions
839 blindly copying data/f0.i containing 1 revisions
840 blindly copying data/f2.i containing 1 revisions
840 blindly copying data/f2.i containing 1 revisions
841 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
841 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
842 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
842 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
843 blindly copying 00manifest.i containing 3 revisions
843 blindly copying 00manifest.i containing 3 revisions
844 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
844 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
845 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
845 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
846 cloning 3 revisions from 00changelog.i
846 cloning 3 revisions from 00changelog.i
847 finished migrating 3 changelog revisions; change in size: 0 bytes
847 finished migrating 3 changelog revisions; change in size: 0 bytes
848 finished migrating 9 total revisions; total change in store size: 0 bytes
848 finished migrating 9 total revisions; total change in store size: 0 bytes
849 copying phaseroots
849 copying phaseroots
850 data fully upgraded in a temporary repository
850 data fully upgraded in a temporary repository
851 marking source repository as being upgraded; clients will be unable to read from repository
851 marking source repository as being upgraded; clients will be unable to read from repository
852 starting in-place swap of repository data
852 starting in-place swap of repository data
853 replacing store...
853 replacing store...
854 store replacement complete; repository was inconsistent for *s (glob)
854 store replacement complete; repository was inconsistent for *s (glob)
855 finalizing requirements file and making repository readable again
855 finalizing requirements file and making repository readable again
856 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
856 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
857 $ hg verify
857 $ hg verify
858 checking changesets
858 checking changesets
859 checking manifests
859 checking manifests
860 crosschecking files in changesets and manifests
860 crosschecking files in changesets and manifests
861 checking files
861 checking files
862 checked 3 changesets with 3 changes to 3 files
862 checked 3 changesets with 3 changes to 3 files
863
863
864 Check that we can select filelog only
864 Check that we can select filelog only
865
865
866 $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback
866 $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback
867 upgrade will perform the following actions:
867 upgrade will perform the following actions:
868
868
869 requirements
869 requirements
870 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
870 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
871 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
871 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
872
872
873 optimisations: re-delta-parent
873 optimisations: re-delta-parent
874
874
875 re-delta-parent
875 re-delta-parent
876 deltas within internal storage will choose a new base revision if needed
876 deltas within internal storage will choose a new base revision if needed
877
877
878 processed revlogs:
878 processed revlogs:
879 - all-filelogs
879 - all-filelogs
880
880
881 beginning upgrade...
881 beginning upgrade...
882 repository locked and read-only
882 repository locked and read-only
883 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
883 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
884 (it is safe to interrupt this process any time before data migration completes)
884 (it is safe to interrupt this process any time before data migration completes)
885 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
885 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
886 migrating 519 KB in store; 1.05 MB tracked data
886 migrating 519 KB in store; 1.05 MB tracked data
887 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
887 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
888 cloning 1 revisions from data/FooBarDirectory.d/f1.i
888 cloning 1 revisions from data/FooBarDirectory.d/f1.i
889 cloning 1 revisions from data/f0.i
889 cloning 1 revisions from data/f0.i
890 cloning 1 revisions from data/f2.i
890 cloning 1 revisions from data/f2.i
891 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
891 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
892 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
892 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
893 blindly copying 00manifest.i containing 3 revisions
893 blindly copying 00manifest.i containing 3 revisions
894 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
894 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
895 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
895 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
896 blindly copying 00changelog.i containing 3 revisions
896 blindly copying 00changelog.i containing 3 revisions
897 finished migrating 3 changelog revisions; change in size: 0 bytes
897 finished migrating 3 changelog revisions; change in size: 0 bytes
898 finished migrating 9 total revisions; total change in store size: 0 bytes
898 finished migrating 9 total revisions; total change in store size: 0 bytes
899 copying phaseroots
899 copying phaseroots
900 data fully upgraded in a temporary repository
900 data fully upgraded in a temporary repository
901 marking source repository as being upgraded; clients will be unable to read from repository
901 marking source repository as being upgraded; clients will be unable to read from repository
902 starting in-place swap of repository data
902 starting in-place swap of repository data
903 replacing store...
903 replacing store...
904 store replacement complete; repository was inconsistent for *s (glob)
904 store replacement complete; repository was inconsistent for *s (glob)
905 finalizing requirements file and making repository readable again
905 finalizing requirements file and making repository readable again
906 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
906 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
907 $ hg verify
907 $ hg verify
908 checking changesets
908 checking changesets
909 checking manifests
909 checking manifests
910 crosschecking files in changesets and manifests
910 crosschecking files in changesets and manifests
911 checking files
911 checking files
912 checked 3 changesets with 3 changes to 3 files
912 checked 3 changesets with 3 changes to 3 files
913
913
914
914
915 Check you can't skip revlog clone during important format downgrade
915 Check you can't skip revlog clone during important format downgrade
916
916
917 $ echo "[format]" > .hg/hgrc
917 $ echo "[format]" > .hg/hgrc
918 $ echo "sparse-revlog=no" >> .hg/hgrc
918 $ echo "sparse-revlog=no" >> .hg/hgrc
919 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
919 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
920 ignoring revlogs selection flags, format requirements change: sparserevlog
920 ignoring revlogs selection flags, format requirements change: sparserevlog
921 upgrade will perform the following actions:
921 upgrade will perform the following actions:
922
922
923 requirements
923 requirements
924 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
924 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
925 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
925 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
926 removed: sparserevlog
926 removed: sparserevlog
927
927
928 optimisations: re-delta-parent
928 optimisations: re-delta-parent
929
929
930 re-delta-parent
930 re-delta-parent
931 deltas within internal storage will choose a new base revision if needed
931 deltas within internal storage will choose a new base revision if needed
932
932
933 processed revlogs:
933 processed revlogs:
934 - all-filelogs
934 - all-filelogs
935 - changelog
935 - changelog
936 - manifest
936 - manifest
937
937
938 beginning upgrade...
938 beginning upgrade...
939 repository locked and read-only
939 repository locked and read-only
940 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
940 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
941 (it is safe to interrupt this process any time before data migration completes)
941 (it is safe to interrupt this process any time before data migration completes)
942 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
942 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
943 migrating 519 KB in store; 1.05 MB tracked data
943 migrating 519 KB in store; 1.05 MB tracked data
944 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
944 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
945 cloning 1 revisions from data/FooBarDirectory.d/f1.i
945 cloning 1 revisions from data/FooBarDirectory.d/f1.i
946 cloning 1 revisions from data/f0.i
946 cloning 1 revisions from data/f0.i
947 cloning 1 revisions from data/f2.i
947 cloning 1 revisions from data/f2.i
948 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
948 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
949 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
949 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
950 cloning 3 revisions from 00manifest.i
950 cloning 3 revisions from 00manifest.i
951 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
951 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
952 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
952 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
953 cloning 3 revisions from 00changelog.i
953 cloning 3 revisions from 00changelog.i
954 finished migrating 3 changelog revisions; change in size: 0 bytes
954 finished migrating 3 changelog revisions; change in size: 0 bytes
955 finished migrating 9 total revisions; total change in store size: 0 bytes
955 finished migrating 9 total revisions; total change in store size: 0 bytes
956 copying phaseroots
956 copying phaseroots
957 data fully upgraded in a temporary repository
957 data fully upgraded in a temporary repository
958 marking source repository as being upgraded; clients will be unable to read from repository
958 marking source repository as being upgraded; clients will be unable to read from repository
959 starting in-place swap of repository data
959 starting in-place swap of repository data
960 replacing store...
960 replacing store...
961 store replacement complete; repository was inconsistent for *s (glob)
961 store replacement complete; repository was inconsistent for *s (glob)
962 finalizing requirements file and making repository readable again
962 finalizing requirements file and making repository readable again
963 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
963 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
964 $ hg verify
964 $ hg verify
965 checking changesets
965 checking changesets
966 checking manifests
966 checking manifests
967 crosschecking files in changesets and manifests
967 crosschecking files in changesets and manifests
968 checking files
968 checking files
969 checked 3 changesets with 3 changes to 3 files
969 checked 3 changesets with 3 changes to 3 files
970
970
971 Check you can't skip revlog clone during important format upgrade
971 Check you can't skip revlog clone during important format upgrade
972
972
973 $ echo "sparse-revlog=yes" >> .hg/hgrc
973 $ echo "sparse-revlog=yes" >> .hg/hgrc
974 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
974 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
975 ignoring revlogs selection flags, format requirements change: sparserevlog
975 ignoring revlogs selection flags, format requirements change: sparserevlog
976 upgrade will perform the following actions:
976 upgrade will perform the following actions:
977
977
978 requirements
978 requirements
979 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
979 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
980 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
980 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
981 added: sparserevlog
981 added: sparserevlog
982
982
983 optimisations: re-delta-parent
983 optimisations: re-delta-parent
984
984
985 sparserevlog
985 sparserevlog
986 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
986 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
987
987
988 re-delta-parent
988 re-delta-parent
989 deltas within internal storage will choose a new base revision if needed
989 deltas within internal storage will choose a new base revision if needed
990
990
991 processed revlogs:
991 processed revlogs:
992 - all-filelogs
992 - all-filelogs
993 - changelog
993 - changelog
994 - manifest
994 - manifest
995
995
996 beginning upgrade...
996 beginning upgrade...
997 repository locked and read-only
997 repository locked and read-only
998 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
998 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
999 (it is safe to interrupt this process any time before data migration completes)
999 (it is safe to interrupt this process any time before data migration completes)
1000 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1000 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1001 migrating 519 KB in store; 1.05 MB tracked data
1001 migrating 519 KB in store; 1.05 MB tracked data
1002 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1002 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1003 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1003 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1004 cloning 1 revisions from data/f0.i
1004 cloning 1 revisions from data/f0.i
1005 cloning 1 revisions from data/f2.i
1005 cloning 1 revisions from data/f2.i
1006 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1006 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1007 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1007 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1008 cloning 3 revisions from 00manifest.i
1008 cloning 3 revisions from 00manifest.i
1009 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1009 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1010 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1010 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1011 cloning 3 revisions from 00changelog.i
1011 cloning 3 revisions from 00changelog.i
1012 finished migrating 3 changelog revisions; change in size: 0 bytes
1012 finished migrating 3 changelog revisions; change in size: 0 bytes
1013 finished migrating 9 total revisions; total change in store size: 0 bytes
1013 finished migrating 9 total revisions; total change in store size: 0 bytes
1014 copying phaseroots
1014 copying phaseroots
1015 data fully upgraded in a temporary repository
1015 data fully upgraded in a temporary repository
1016 marking source repository as being upgraded; clients will be unable to read from repository
1016 marking source repository as being upgraded; clients will be unable to read from repository
1017 starting in-place swap of repository data
1017 starting in-place swap of repository data
1018 replacing store...
1018 replacing store...
1019 store replacement complete; repository was inconsistent for *s (glob)
1019 store replacement complete; repository was inconsistent for *s (glob)
1020 finalizing requirements file and making repository readable again
1020 finalizing requirements file and making repository readable again
1021 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1021 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1022 $ hg verify
1022 $ hg verify
1023 checking changesets
1023 checking changesets
1024 checking manifests
1024 checking manifests
1025 crosschecking files in changesets and manifests
1025 crosschecking files in changesets and manifests
1026 checking files
1026 checking files
1027 checked 3 changesets with 3 changes to 3 files
1027 checked 3 changesets with 3 changes to 3 files
1028
1028
1029 $ cd ..
1029 $ cd ..
1030
1030
1031 store files with special filenames aren't encoded during copy
1031 store files with special filenames aren't encoded during copy
1032
1032
1033 $ hg init store-filenames
1033 $ hg init store-filenames
1034 $ cd store-filenames
1034 $ cd store-filenames
1035 $ touch foo
1035 $ touch foo
1036 $ hg -q commit -A -m initial
1036 $ hg -q commit -A -m initial
1037 $ touch .hg/store/.XX_special_filename
1037 $ touch .hg/store/.XX_special_filename
1038
1038
1039 $ hg debugupgraderepo --run
1039 $ hg debugupgraderepo --run
1040 nothing to do
1040 nothing to do
1041 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
1041 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
1042 upgrade will perform the following actions:
1042 upgrade will perform the following actions:
1043
1043
1044 requirements
1044 requirements
1045 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
1045 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
1046 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
1046 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
1047
1047
1048 optimisations: re-delta-fulladd
1048 optimisations: re-delta-fulladd
1049
1049
1050 re-delta-fulladd
1050 re-delta-fulladd
1051 each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it
1051 each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it
1052
1052
1053 processed revlogs:
1053 processed revlogs:
1054 - all-filelogs
1054 - all-filelogs
1055 - changelog
1055 - changelog
1056 - manifest
1056 - manifest
1057
1057
1058 beginning upgrade...
1058 beginning upgrade...
1059 repository locked and read-only
1059 repository locked and read-only
1060 creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1060 creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1061 (it is safe to interrupt this process any time before data migration completes)
1061 (it is safe to interrupt this process any time before data migration completes)
1062 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1062 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1063 migrating 301 bytes in store; 107 bytes tracked data
1063 migrating 301 bytes in store; 107 bytes tracked data
1064 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1064 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1065 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1065 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1066 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1066 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1067 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1067 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1068 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
1068 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
1069 finished migrating 1 changelog revisions; change in size: 0 bytes
1069 finished migrating 1 changelog revisions; change in size: 0 bytes
1070 finished migrating 3 total revisions; total change in store size: 0 bytes
1070 finished migrating 3 total revisions; total change in store size: 0 bytes
1071 copying .XX_special_filename
1071 copying .XX_special_filename
1072 copying phaseroots
1072 copying phaseroots
1073 data fully upgraded in a temporary repository
1073 data fully upgraded in a temporary repository
1074 marking source repository as being upgraded; clients will be unable to read from repository
1074 marking source repository as being upgraded; clients will be unable to read from repository
1075 starting in-place swap of repository data
1075 starting in-place swap of repository data
1076 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1076 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1077 replacing store...
1077 replacing store...
1078 store replacement complete; repository was inconsistent for *s (glob)
1078 store replacement complete; repository was inconsistent for *s (glob)
1079 finalizing requirements file and making repository readable again
1079 finalizing requirements file and making repository readable again
1080 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1080 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1081 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1081 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1082 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1082 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1083
1083
1084 fncache is valid after upgrade
1084 fncache is valid after upgrade
1085
1085
1086 $ hg debugrebuildfncache
1086 $ hg debugrebuildfncache
1087 fncache already up to date
1087 fncache already up to date
1088
1088
1089 $ cd ..
1089 $ cd ..
1090
1090
1091 Check upgrading a large file repository
1091 Check upgrading a large file repository
1092 ---------------------------------------
1092 ---------------------------------------
1093
1093
1094 $ hg init largefilesrepo
1094 $ hg init largefilesrepo
1095 $ cat << EOF >> largefilesrepo/.hg/hgrc
1095 $ cat << EOF >> largefilesrepo/.hg/hgrc
1096 > [extensions]
1096 > [extensions]
1097 > largefiles =
1097 > largefiles =
1098 > EOF
1098 > EOF
1099
1099
1100 $ cd largefilesrepo
1100 $ cd largefilesrepo
1101 $ touch foo
1101 $ touch foo
1102 $ hg add --large foo
1102 $ hg add --large foo
1103 $ hg -q commit -m initial
1103 $ hg -q commit -m initial
1104 $ cat .hg/requires
1104 $ cat .hg/requires
1105 dotencode
1105 dotencode
1106 fncache
1106 fncache
1107 generaldelta
1107 generaldelta
1108 largefiles
1108 largefiles
1109 persistent-nodemap (rust !)
1109 persistent-nodemap (rust !)
1110 revlogv1
1110 revlogv1
1111 sparserevlog
1111 sparserevlog
1112 store
1112 store
1113
1113
1114 $ hg debugupgraderepo --run
1114 $ hg debugupgraderepo --run
1115 nothing to do
1115 nothing to do
1116 $ cat .hg/requires
1116 $ cat .hg/requires
1117 dotencode
1117 dotencode
1118 fncache
1118 fncache
1119 generaldelta
1119 generaldelta
1120 largefiles
1120 largefiles
1121 persistent-nodemap (rust !)
1121 persistent-nodemap (rust !)
1122 revlogv1
1122 revlogv1
1123 sparserevlog
1123 sparserevlog
1124 store
1124 store
1125
1125
1126 $ cat << EOF >> .hg/hgrc
1126 $ cat << EOF >> .hg/hgrc
1127 > [extensions]
1127 > [extensions]
1128 > lfs =
1128 > lfs =
1129 > [lfs]
1129 > [lfs]
1130 > threshold = 10
1130 > threshold = 10
1131 > EOF
1131 > EOF
1132 $ echo '123456789012345' > lfs.bin
1132 $ echo '123456789012345' > lfs.bin
1133 $ hg ci -Am 'lfs.bin'
1133 $ hg ci -Am 'lfs.bin'
1134 adding lfs.bin
1134 adding lfs.bin
1135 $ grep lfs .hg/requires
1135 $ grep lfs .hg/requires
1136 lfs
1136 lfs
1137 $ find .hg/store/lfs -type f
1137 $ find .hg/store/lfs -type f
1138 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1138 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1139
1139
1140 $ hg debugupgraderepo --run
1140 $ hg debugupgraderepo --run
1141 nothing to do
1141 nothing to do
1142
1142
1143 $ grep lfs .hg/requires
1143 $ grep lfs .hg/requires
1144 lfs
1144 lfs
1145 $ find .hg/store/lfs -type f
1145 $ find .hg/store/lfs -type f
1146 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1146 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1147 $ hg verify
1147 $ hg verify
1148 checking changesets
1148 checking changesets
1149 checking manifests
1149 checking manifests
1150 crosschecking files in changesets and manifests
1150 crosschecking files in changesets and manifests
1151 checking files
1151 checking files
1152 checked 2 changesets with 2 changes to 2 files
1152 checked 2 changesets with 2 changes to 2 files
1153 $ hg debugdata lfs.bin 0
1153 $ hg debugdata lfs.bin 0
1154 version https://git-lfs.github.com/spec/v1
1154 version https://git-lfs.github.com/spec/v1
1155 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1155 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1156 size 16
1156 size 16
1157 x-is-binary 0
1157 x-is-binary 0
1158
1158
1159 $ cd ..
1159 $ cd ..
1160
1160
1161 repository config is taken in account
1161 repository config is taken in account
1162 -------------------------------------
1162 -------------------------------------
1163
1163
1164 $ cat << EOF >> $HGRCPATH
1164 $ cat << EOF >> $HGRCPATH
1165 > [format]
1165 > [format]
1166 > maxchainlen = 1
1166 > maxchainlen = 1
1167 > EOF
1167 > EOF
1168
1168
1169 $ hg init localconfig
1169 $ hg init localconfig
1170 $ cd localconfig
1170 $ cd localconfig
1171 $ cat << EOF > file
1171 $ cat << EOF > file
1172 > some content
1172 > some content
1173 > with some length
1173 > with some length
1174 > to make sure we get a delta
1174 > to make sure we get a delta
1175 > after changes
1175 > after changes
1176 > very long
1176 > very long
1177 > very long
1177 > very long
1178 > very long
1178 > very long
1179 > very long
1179 > very long
1180 > very long
1180 > very long
1181 > very long
1181 > very long
1182 > very long
1182 > very long
1183 > very long
1183 > very long
1184 > very long
1184 > very long
1185 > very long
1185 > very long
1186 > very long
1186 > very long
1187 > EOF
1187 > EOF
1188 $ hg -q commit -A -m A
1188 $ hg -q commit -A -m A
1189 $ echo "new line" >> file
1189 $ echo "new line" >> file
1190 $ hg -q commit -m B
1190 $ hg -q commit -m B
1191 $ echo "new line" >> file
1191 $ echo "new line" >> file
1192 $ hg -q commit -m C
1192 $ hg -q commit -m C
1193
1193
1194 $ cat << EOF >> .hg/hgrc
1194 $ cat << EOF >> .hg/hgrc
1195 > [format]
1195 > [format]
1196 > maxchainlen = 9001
1196 > maxchainlen = 9001
1197 > EOF
1197 > EOF
1198 $ hg config format
1198 $ hg config format
1199 format.revlog-compression=$BUNDLE2_COMPRESSIONS$
1199 format.revlog-compression=$BUNDLE2_COMPRESSIONS$
1200 format.maxchainlen=9001
1200 format.maxchainlen=9001
1201 $ hg debugdeltachain file
1201 $ hg debugdeltachain file
1202 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1202 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1203 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1203 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1204 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1204 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1205 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1205 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1206
1206
1207 $ hg debugupgraderepo --run --optimize 're-delta-all'
1207 $ hg debugupgraderepo --run --optimize 're-delta-all'
1208 upgrade will perform the following actions:
1208 upgrade will perform the following actions:
1209
1209
1210 requirements
1210 requirements
1211 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
1211 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
1212 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
1212 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
1213
1213
1214 optimisations: re-delta-all
1214 optimisations: re-delta-all
1215
1215
1216 re-delta-all
1216 re-delta-all
1217 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
1217 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
1218
1218
1219 processed revlogs:
1219 processed revlogs:
1220 - all-filelogs
1220 - all-filelogs
1221 - changelog
1221 - changelog
1222 - manifest
1222 - manifest
1223
1223
1224 beginning upgrade...
1224 beginning upgrade...
1225 repository locked and read-only
1225 repository locked and read-only
1226 creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
1226 creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
1227 (it is safe to interrupt this process any time before data migration completes)
1227 (it is safe to interrupt this process any time before data migration completes)
1228 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1228 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1229 migrating 1019 bytes in store; 882 bytes tracked data
1229 migrating 1019 bytes in store; 882 bytes tracked data
1230 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
1230 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
1231 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
1231 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
1232 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
1232 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
1233 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1233 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1234 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
1234 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
1235 finished migrating 3 changelog revisions; change in size: 0 bytes
1235 finished migrating 3 changelog revisions; change in size: 0 bytes
1236 finished migrating 9 total revisions; total change in store size: -9 bytes
1236 finished migrating 9 total revisions; total change in store size: -9 bytes
1237 copying phaseroots
1237 copying phaseroots
1238 data fully upgraded in a temporary repository
1238 data fully upgraded in a temporary repository
1239 marking source repository as being upgraded; clients will be unable to read from repository
1239 marking source repository as being upgraded; clients will be unable to read from repository
1240 starting in-place swap of repository data
1240 starting in-place swap of repository data
1241 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1241 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1242 replacing store...
1242 replacing store...
1243 store replacement complete; repository was inconsistent for *s (glob)
1243 store replacement complete; repository was inconsistent for *s (glob)
1244 finalizing requirements file and making repository readable again
1244 finalizing requirements file and making repository readable again
1245 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1245 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1246 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1246 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1247 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1247 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1248 $ hg debugdeltachain file
1248 $ hg debugdeltachain file
1249 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1249 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1250 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1250 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1251 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1251 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1252 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
1252 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
1253 $ cd ..
1253 $ cd ..
1254
1254
1255 $ cat << EOF >> $HGRCPATH
1255 $ cat << EOF >> $HGRCPATH
1256 > [format]
1256 > [format]
1257 > maxchainlen = 9001
1257 > maxchainlen = 9001
1258 > EOF
1258 > EOF
1259
1259
1260 Check upgrading a sparse-revlog repository
1260 Check upgrading a sparse-revlog repository
1261 ---------------------------------------
1261 ---------------------------------------
1262
1262
1263 $ hg init sparserevlogrepo --config format.sparse-revlog=no
1263 $ hg init sparserevlogrepo --config format.sparse-revlog=no
1264 $ cd sparserevlogrepo
1264 $ cd sparserevlogrepo
1265 $ touch foo
1265 $ touch foo
1266 $ hg add foo
1266 $ hg add foo
1267 $ hg -q commit -m "foo"
1267 $ hg -q commit -m "foo"
1268 $ cat .hg/requires
1268 $ cat .hg/requires
1269 dotencode
1269 dotencode
1270 fncache
1270 fncache
1271 generaldelta
1271 generaldelta
1272 persistent-nodemap (rust !)
1272 persistent-nodemap (rust !)
1273 revlogv1
1273 revlogv1
1274 store
1274 store
1275
1275
1276 Check that we can add the sparse-revlog format requirement
1276 Check that we can add the sparse-revlog format requirement
1277 $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet
1277 $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet
1278 upgrade will perform the following actions:
1278 upgrade will perform the following actions:
1279
1279
1280 requirements
1280 requirements
1281 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
1281 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
1282 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
1282 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
1283 added: sparserevlog
1283 added: sparserevlog
1284
1284
1285 processed revlogs:
1285 processed revlogs:
1286 - all-filelogs
1286 - all-filelogs
1287 - changelog
1287 - changelog
1288 - manifest
1288 - manifest
1289
1289
1290 $ cat .hg/requires
1290 $ cat .hg/requires
1291 dotencode
1291 dotencode
1292 fncache
1292 fncache
1293 generaldelta
1293 generaldelta
1294 persistent-nodemap (rust !)
1294 persistent-nodemap (rust !)
1295 revlogv1
1295 revlogv1
1296 sparserevlog
1296 sparserevlog
1297 store
1297 store
1298
1298
1299 Check that we can remove the sparse-revlog format requirement
1299 Check that we can remove the sparse-revlog format requirement
1300 $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet
1300 $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet
1301 upgrade will perform the following actions:
1301 upgrade will perform the following actions:
1302
1302
1303 requirements
1303 requirements
1304 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
1304 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
1305 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
1305 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
1306 removed: sparserevlog
1306 removed: sparserevlog
1307
1307
1308 processed revlogs:
1308 processed revlogs:
1309 - all-filelogs
1309 - all-filelogs
1310 - changelog
1310 - changelog
1311 - manifest
1311 - manifest
1312
1312
1313 $ cat .hg/requires
1313 $ cat .hg/requires
1314 dotencode
1314 dotencode
1315 fncache
1315 fncache
1316 generaldelta
1316 generaldelta
1317 persistent-nodemap (rust !)
1317 persistent-nodemap (rust !)
1318 revlogv1
1318 revlogv1
1319 store
1319 store
1320
1320
1321 #if zstd
1321 #if zstd
1322
1322
1323 Check upgrading to a zstd revlog
1323 Check upgrading to a zstd revlog
1324 --------------------------------
1324 --------------------------------
1325
1325
1326 upgrade
1326 upgrade
1327
1327
1328 $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet
1328 $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet
1329 upgrade will perform the following actions:
1329 upgrade will perform the following actions:
1330
1330
1331 requirements
1331 requirements
1332 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
1332 preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !)
1333 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
1333 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !)
1334 added: revlog-compression-zstd, sparserevlog
1334 added: revlog-compression-zstd, sparserevlog
1335
1335
1336 processed revlogs:
1336 processed revlogs:
1337 - all-filelogs
1337 - all-filelogs
1338 - changelog
1338 - changelog
1339 - manifest
1339 - manifest
1340
1340
1341 $ hg debugformat -v
1341 $ hg debugformat -v
1342 format-variant repo config default
1342 format-variant repo config default
1343 fncache: yes yes yes
1343 fncache: yes yes yes
1344 dotencode: yes yes yes
1344 dotencode: yes yes yes
1345 generaldelta: yes yes yes
1345 generaldelta: yes yes yes
1346 share-safe: no no no
1346 share-safe: no no no
1347 sparserevlog: yes yes yes
1347 sparserevlog: yes yes yes
1348 persistent-nodemap: no no no (no-rust !)
1348 persistent-nodemap: no no no (no-rust !)
1349 persistent-nodemap: yes yes no (rust !)
1349 persistent-nodemap: yes yes no (rust !)
1350 copies-sdc: no no no
1350 copies-sdc: no no no
1351 revlog-v2: no no no
1351 revlog-v2: no no no
1352 plain-cl-delta: yes yes yes
1352 plain-cl-delta: yes yes yes
1353 compression: zlib zlib zlib (no-zstd !)
1353 compression: zlib zlib zlib (no-zstd !)
1354 compression: zstd zlib zstd (zstd !)
1354 compression: zstd zlib zstd (zstd !)
1355 compression-level: default default default
1355 compression-level: default default default
1356 $ cat .hg/requires
1356 $ cat .hg/requires
1357 dotencode
1357 dotencode
1358 fncache
1358 fncache
1359 generaldelta
1359 generaldelta
1360 persistent-nodemap (rust !)
1360 persistent-nodemap (rust !)
1361 revlog-compression-zstd
1361 revlog-compression-zstd
1362 revlogv1
1362 revlogv1
1363 sparserevlog
1363 sparserevlog
1364 store
1364 store
1365
1365
1366 downgrade
1366 downgrade
1367
1367
1368 $ hg debugupgraderepo --run --no-backup --quiet
1368 $ hg debugupgraderepo --run --no-backup --quiet
1369 upgrade will perform the following actions:
1369 upgrade will perform the following actions:
1370
1370
1371 requirements
1371 requirements
1372 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
1372 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
1373 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
1373 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
1374 removed: revlog-compression-zstd
1374 removed: revlog-compression-zstd
1375
1375
1376 processed revlogs:
1376 processed revlogs:
1377 - all-filelogs
1377 - all-filelogs
1378 - changelog
1378 - changelog
1379 - manifest
1379 - manifest
1380
1380
1381 $ hg debugformat -v
1381 $ hg debugformat -v
1382 format-variant repo config default
1382 format-variant repo config default
1383 fncache: yes yes yes
1383 fncache: yes yes yes
1384 dotencode: yes yes yes
1384 dotencode: yes yes yes
1385 generaldelta: yes yes yes
1385 generaldelta: yes yes yes
1386 share-safe: no no no
1386 share-safe: no no no
1387 sparserevlog: yes yes yes
1387 sparserevlog: yes yes yes
1388 persistent-nodemap: no no no (no-rust !)
1388 persistent-nodemap: no no no (no-rust !)
1389 persistent-nodemap: yes yes no (rust !)
1389 persistent-nodemap: yes yes no (rust !)
1390 copies-sdc: no no no
1390 copies-sdc: no no no
1391 revlog-v2: no no no
1391 revlog-v2: no no no
1392 plain-cl-delta: yes yes yes
1392 plain-cl-delta: yes yes yes
1393 compression: zlib zlib zlib (no-zstd !)
1393 compression: zlib zlib zlib (no-zstd !)
1394 compression: zlib zlib zstd (zstd !)
1394 compression: zlib zlib zstd (zstd !)
1395 compression-level: default default default
1395 compression-level: default default default
1396 $ cat .hg/requires
1396 $ cat .hg/requires
1397 dotencode
1397 dotencode
1398 fncache
1398 fncache
1399 generaldelta
1399 generaldelta
1400 persistent-nodemap (rust !)
1400 persistent-nodemap (rust !)
1401 revlogv1
1401 revlogv1
1402 sparserevlog
1402 sparserevlog
1403 store
1403 store
1404
1404
1405 upgrade from hgrc
1405 upgrade from hgrc
1406
1406
1407 $ cat >> .hg/hgrc << EOF
1407 $ cat >> .hg/hgrc << EOF
1408 > [format]
1408 > [format]
1409 > revlog-compression=zstd
1409 > revlog-compression=zstd
1410 > EOF
1410 > EOF
1411 $ hg debugupgraderepo --run --no-backup --quiet
1411 $ hg debugupgraderepo --run --no-backup --quiet
1412 upgrade will perform the following actions:
1412 upgrade will perform the following actions:
1413
1413
1414 requirements
1414 requirements
1415 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
1415 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !)
1416 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
1416 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !)
1417 added: revlog-compression-zstd
1417 added: revlog-compression-zstd
1418
1418
1419 processed revlogs:
1419 processed revlogs:
1420 - all-filelogs
1420 - all-filelogs
1421 - changelog
1421 - changelog
1422 - manifest
1422 - manifest
1423
1423
1424 $ hg debugformat -v
1424 $ hg debugformat -v
1425 format-variant repo config default
1425 format-variant repo config default
1426 fncache: yes yes yes
1426 fncache: yes yes yes
1427 dotencode: yes yes yes
1427 dotencode: yes yes yes
1428 generaldelta: yes yes yes
1428 generaldelta: yes yes yes
1429 share-safe: no no no
1429 share-safe: no no no
1430 sparserevlog: yes yes yes
1430 sparserevlog: yes yes yes
1431 persistent-nodemap: no no no (no-rust !)
1431 persistent-nodemap: no no no (no-rust !)
1432 persistent-nodemap: yes yes no (rust !)
1432 persistent-nodemap: yes yes no (rust !)
1433 copies-sdc: no no no
1433 copies-sdc: no no no
1434 revlog-v2: no no no
1434 revlog-v2: no no no
1435 plain-cl-delta: yes yes yes
1435 plain-cl-delta: yes yes yes
1436 compression: zlib zlib zlib (no-zstd !)
1436 compression: zlib zlib zlib (no-zstd !)
1437 compression: zstd zstd zstd (zstd !)
1437 compression: zstd zstd zstd (zstd !)
1438 compression-level: default default default
1438 compression-level: default default default
1439 $ cat .hg/requires
1439 $ cat .hg/requires
1440 dotencode
1440 dotencode
1441 fncache
1441 fncache
1442 generaldelta
1442 generaldelta
1443 persistent-nodemap (rust !)
1443 persistent-nodemap (rust !)
1444 revlog-compression-zstd
1444 revlog-compression-zstd
1445 revlogv1
1445 revlogv1
1446 sparserevlog
1446 sparserevlog
1447 store
1447 store
1448
1448
1449 #endif
1449 #endif
1450
1450
1451 Check upgrading to a side-data revlog
1451 Check upgrading to a revlog format supporting sidedata
1452 -------------------------------------
1452 ------------------------------------------------------
1453
1453
1454 upgrade
1454 upgrade
1455
1455
1456 $ hg debugsidedata -c 0
1456 $ hg debugsidedata -c 0
1457 $ hg --config format.exp-use-side-data=yes debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
1457 $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
1458 upgrade will perform the following actions:
1458 upgrade will perform the following actions:
1459
1459
1460 requirements
1460 requirements
1461 preserved: dotencode, fncache, generaldelta, store (no-zstd !)
1461 preserved: dotencode, fncache, generaldelta, store (no-zstd !)
1462 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
1462 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
1463 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
1463 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
1464 removed: revlogv1
1464 removed: revlogv1
1465 added: exp-revlogv2.2, exp-sidedata-flag (zstd !)
1465 added: exp-revlogv2.2 (zstd !)
1466 added: exp-revlogv2.2, exp-sidedata-flag, sparserevlog (no-zstd !)
1466 added: exp-revlogv2.2, sparserevlog (no-zstd !)
1467
1467
1468 processed revlogs:
1468 processed revlogs:
1469 - all-filelogs
1469 - all-filelogs
1470 - changelog
1470 - changelog
1471 - manifest
1471 - manifest
1472
1472
1473 $ hg debugformat -v
1473 $ hg debugformat -v
1474 format-variant repo config default
1474 format-variant repo config default
1475 fncache: yes yes yes
1475 fncache: yes yes yes
1476 dotencode: yes yes yes
1476 dotencode: yes yes yes
1477 generaldelta: yes yes yes
1477 generaldelta: yes yes yes
1478 share-safe: no no no
1478 share-safe: no no no
1479 sparserevlog: yes yes yes
1479 sparserevlog: yes yes yes
1480 persistent-nodemap: no no no (no-rust !)
1480 persistent-nodemap: no no no (no-rust !)
1481 persistent-nodemap: yes yes no (rust !)
1481 persistent-nodemap: yes yes no (rust !)
1482 copies-sdc: no no no
1482 copies-sdc: no no no
1483 revlog-v2: yes no no
1483 revlog-v2: yes no no
1484 plain-cl-delta: yes yes yes
1484 plain-cl-delta: yes yes yes
1485 compression: zlib zlib zlib (no-zstd !)
1485 compression: zlib zlib zlib (no-zstd !)
1486 compression: zstd zstd zstd (zstd !)
1486 compression: zstd zstd zstd (zstd !)
1487 compression-level: default default default
1487 compression-level: default default default
1488 $ cat .hg/requires
1488 $ cat .hg/requires
1489 dotencode
1489 dotencode
1490 exp-revlogv2.2
1490 exp-revlogv2.2
1491 exp-sidedata-flag
1492 fncache
1491 fncache
1493 generaldelta
1492 generaldelta
1494 persistent-nodemap (rust !)
1493 persistent-nodemap (rust !)
1495 revlog-compression-zstd (zstd !)
1494 revlog-compression-zstd (zstd !)
1496 sparserevlog
1495 sparserevlog
1497 store
1496 store
1498 $ hg debugsidedata -c 0
1497 $ hg debugsidedata -c 0
1499 2 sidedata entries
1498 2 sidedata entries
1500 entry-0001 size 4
1499 entry-0001 size 4
1501 entry-0002 size 32
1500 entry-0002 size 32
1502
1501
1503 downgrade
1502 downgrade
1504
1503
1505 $ hg debugupgraderepo --config format.exp-use-side-data=no --run --no-backup --quiet
1504 $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet
1506 upgrade will perform the following actions:
1505 upgrade will perform the following actions:
1507
1506
1508 requirements
1507 requirements
1509 preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
1508 preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
1510 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
1509 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
1511 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
1510 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
1512 removed: exp-revlogv2.2, exp-sidedata-flag
1511 removed: exp-revlogv2.2
1513 added: revlogv1
1512 added: revlogv1
1514
1513
1515 processed revlogs:
1514 processed revlogs:
1516 - all-filelogs
1515 - all-filelogs
1517 - changelog
1516 - changelog
1518 - manifest
1517 - manifest
1519
1518
1520 $ hg debugformat -v
1519 $ hg debugformat -v
1521 format-variant repo config default
1520 format-variant repo config default
1522 fncache: yes yes yes
1521 fncache: yes yes yes
1523 dotencode: yes yes yes
1522 dotencode: yes yes yes
1524 generaldelta: yes yes yes
1523 generaldelta: yes yes yes
1525 share-safe: no no no
1524 share-safe: no no no
1526 sparserevlog: yes yes yes
1525 sparserevlog: yes yes yes
1527 persistent-nodemap: no no no (no-rust !)
1526 persistent-nodemap: no no no (no-rust !)
1528 persistent-nodemap: yes yes no (rust !)
1527 persistent-nodemap: yes yes no (rust !)
1529 copies-sdc: no no no
1528 copies-sdc: no no no
1530 revlog-v2: no no no
1529 revlog-v2: no no no
1531 plain-cl-delta: yes yes yes
1530 plain-cl-delta: yes yes yes
1532 compression: zlib zlib zlib (no-zstd !)
1531 compression: zlib zlib zlib (no-zstd !)
1533 compression: zstd zstd zstd (zstd !)
1532 compression: zstd zstd zstd (zstd !)
1534 compression-level: default default default
1533 compression-level: default default default
1535 $ cat .hg/requires
1534 $ cat .hg/requires
1536 dotencode
1535 dotencode
1537 fncache
1536 fncache
1538 generaldelta
1537 generaldelta
1539 persistent-nodemap (rust !)
1538 persistent-nodemap (rust !)
1540 revlog-compression-zstd (zstd !)
1539 revlog-compression-zstd (zstd !)
1541 revlogv1
1540 revlogv1
1542 sparserevlog
1541 sparserevlog
1543 store
1542 store
1544 $ hg debugsidedata -c 0
1543 $ hg debugsidedata -c 0
1545
1544
1546 upgrade from hgrc
1545 upgrade from hgrc
1547
1546
1548 $ cat >> .hg/hgrc << EOF
1547 $ cat >> .hg/hgrc << EOF
1549 > [format]
1548 > [experimental]
1550 > exp-use-side-data=yes
1549 > revlogv2=enable-unstable-format-and-corrupt-my-data
1551 > EOF
1550 > EOF
1552 $ hg debugupgraderepo --run --no-backup --quiet
1551 $ hg debugupgraderepo --run --no-backup --quiet
1553 upgrade will perform the following actions:
1552 upgrade will perform the following actions:
1554
1553
1555 requirements
1554 requirements
1556 preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
1555 preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !)
1557 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
1556 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !)
1558 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
1557 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !)
1559 removed: revlogv1
1558 removed: revlogv1
1560 added: exp-revlogv2.2, exp-sidedata-flag
1559 added: exp-revlogv2.2
1561
1560
1562 processed revlogs:
1561 processed revlogs:
1563 - all-filelogs
1562 - all-filelogs
1564 - changelog
1563 - changelog
1565 - manifest
1564 - manifest
1566
1565
1567 $ hg debugformat -v
1566 $ hg debugformat -v
1568 format-variant repo config default
1567 format-variant repo config default
1569 fncache: yes yes yes
1568 fncache: yes yes yes
1570 dotencode: yes yes yes
1569 dotencode: yes yes yes
1571 generaldelta: yes yes yes
1570 generaldelta: yes yes yes
1572 share-safe: no no no
1571 share-safe: no no no
1573 sparserevlog: yes yes yes
1572 sparserevlog: yes yes yes
1574 persistent-nodemap: no no no (no-rust !)
1573 persistent-nodemap: no no no (no-rust !)
1575 persistent-nodemap: yes yes no (rust !)
1574 persistent-nodemap: yes yes no (rust !)
1576 copies-sdc: no no no
1575 copies-sdc: no no no
1577 revlog-v2: yes yes no
1576 revlog-v2: yes yes no
1578 plain-cl-delta: yes yes yes
1577 plain-cl-delta: yes yes yes
1579 compression: zlib zlib zlib (no-zstd !)
1578 compression: zlib zlib zlib (no-zstd !)
1580 compression: zstd zstd zstd (zstd !)
1579 compression: zstd zstd zstd (zstd !)
1581 compression-level: default default default
1580 compression-level: default default default
1582 $ cat .hg/requires
1581 $ cat .hg/requires
1583 dotencode
1582 dotencode
1584 exp-revlogv2.2
1583 exp-revlogv2.2
1585 exp-sidedata-flag
1586 fncache
1584 fncache
1587 generaldelta
1585 generaldelta
1588 persistent-nodemap (rust !)
1586 persistent-nodemap (rust !)
1589 revlog-compression-zstd (zstd !)
1587 revlog-compression-zstd (zstd !)
1590 sparserevlog
1588 sparserevlog
1591 store
1589 store
1592 $ hg debugsidedata -c 0
1590 $ hg debugsidedata -c 0
1593
1591
1594 Demonstrate that nothing to perform upgrade will still run all the way through
1592 Demonstrate that nothing to perform upgrade will still run all the way through
1595
1593
1596 $ hg debugupgraderepo --run
1594 $ hg debugupgraderepo --run
1597 nothing to do
1595 nothing to do
General Comments 0
You need to be logged in to leave comments. Login now