Show More
@@ -1,2345 +1,2358 b'' | |||||
1 | #testcases filelog compatibility changeset sidedata upgraded |
|
1 | #testcases filelog compatibility changeset sidedata upgraded | |
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 | |||
|
18 | > #!$PYTHON | |||
|
19 | > # filter out linkrev part of the debugindex command | |||
|
20 | > import sys | |||
|
21 | > for line in sys.stdin: | |||
|
22 | > if " linkrev " in line: | |||
|
23 | > print(line.rstrip()) | |||
|
24 | > else: | |||
|
25 | > l = "%s *%s" % (line[:6], line[14:].rstrip()) | |||
|
26 | > print(l) | |||
|
27 | > EOF | |||
|
28 | $ chmod +x no-linkrev | |||
|
29 | ||||
17 | $ cat << EOF >> $HGRCPATH |
|
30 | $ cat << EOF >> $HGRCPATH | |
18 | > [diff] |
|
31 | > [diff] | |
19 | > git=yes |
|
32 | > git=yes | |
20 | > [command-templates] |
|
33 | > [command-templates] | |
21 | > log={desc}\n |
|
34 | > log={desc}\n | |
22 | > EOF |
|
35 | > EOF | |
23 |
|
36 | |||
24 | #if compatibility |
|
37 | #if compatibility | |
25 | $ cat >> $HGRCPATH << EOF |
|
38 | $ cat >> $HGRCPATH << EOF | |
26 | > [experimental] |
|
39 | > [experimental] | |
27 | > copies.read-from = compatibility |
|
40 | > copies.read-from = compatibility | |
28 | > EOF |
|
41 | > EOF | |
29 | #endif |
|
42 | #endif | |
30 |
|
43 | |||
31 | #if changeset |
|
44 | #if changeset | |
32 | $ cat >> $HGRCPATH << EOF |
|
45 | $ cat >> $HGRCPATH << EOF | |
33 | > [experimental] |
|
46 | > [experimental] | |
34 | > copies.read-from = changeset-only |
|
47 | > copies.read-from = changeset-only | |
35 | > copies.write-to = changeset-only |
|
48 | > copies.write-to = changeset-only | |
36 | > EOF |
|
49 | > EOF | |
37 | #endif |
|
50 | #endif | |
38 |
|
51 | |||
39 | #if sidedata |
|
52 | #if sidedata | |
40 | $ cat >> $HGRCPATH << EOF |
|
53 | $ cat >> $HGRCPATH << EOF | |
41 | > [format] |
|
54 | > [format] | |
42 | > exp-use-side-data = yes |
|
55 | > exp-use-side-data = yes | |
43 | > exp-use-copies-side-data-changeset = yes |
|
56 | > exp-use-copies-side-data-changeset = yes | |
44 | > EOF |
|
57 | > EOF | |
45 | #endif |
|
58 | #endif | |
46 |
|
59 | |||
47 |
|
60 | |||
48 | $ cat > same-content.txt << EOF |
|
61 | $ cat > same-content.txt << EOF | |
49 | > Here is some content that will be the same accros multiple file. |
|
62 | > Here is some content that will be the same accros multiple file. | |
50 | > |
|
63 | > | |
51 | > This is done on purpose so that we end up in some merge situation, were the |
|
64 | > This is done on purpose so that we end up in some merge situation, were the | |
52 | > resulting content is the same as in the parent(s), but a new filenodes still |
|
65 | > resulting content is the same as in the parent(s), but a new filenodes still | |
53 | > need to be created to record some file history information (especially |
|
66 | > need to be created to record some file history information (especially | |
54 | > about copies). |
|
67 | > about copies). | |
55 | > EOF |
|
68 | > EOF | |
56 |
|
69 | |||
57 | $ hg init repo-chain |
|
70 | $ hg init repo-chain | |
58 | $ cd repo-chain |
|
71 | $ cd repo-chain | |
59 |
|
72 | |||
60 | Add some linear rename initialy |
|
73 | Add some linear rename initialy | |
61 |
|
74 | |||
62 | $ cp ../same-content.txt a |
|
75 | $ cp ../same-content.txt a | |
63 | $ cp ../same-content.txt b |
|
76 | $ cp ../same-content.txt b | |
64 | $ cp ../same-content.txt h |
|
77 | $ cp ../same-content.txt h | |
65 | $ hg ci -Am 'i-0 initial commit: a b h' |
|
78 | $ hg ci -Am 'i-0 initial commit: a b h' | |
66 | adding a |
|
79 | adding a | |
67 | adding b |
|
80 | adding b | |
68 | adding h |
|
81 | adding h | |
69 | $ hg mv a c |
|
82 | $ hg mv a c | |
70 | $ hg ci -Am 'i-1: a -move-> c' |
|
83 | $ hg ci -Am 'i-1: a -move-> c' | |
71 | $ hg mv c d |
|
84 | $ hg mv c d | |
72 | $ hg ci -Am 'i-2: c -move-> d' |
|
85 | $ hg ci -Am 'i-2: c -move-> d' | |
73 | $ hg log -G |
|
86 | $ hg log -G | |
74 | @ i-2: c -move-> d |
|
87 | @ i-2: c -move-> d | |
75 | | |
|
88 | | | |
76 | o i-1: a -move-> c |
|
89 | o i-1: a -move-> c | |
77 | | |
|
90 | | | |
78 | o i-0 initial commit: a b h |
|
91 | o i-0 initial commit: a b h | |
79 |
|
92 | |||
80 |
|
93 | |||
81 | And having another branch with renames on the other side |
|
94 | And having another branch with renames on the other side | |
82 |
|
95 | |||
83 | $ hg mv d e |
|
96 | $ hg mv d e | |
84 | $ hg ci -Am 'a-1: d -move-> e' |
|
97 | $ hg ci -Am 'a-1: d -move-> e' | |
85 | $ hg mv e f |
|
98 | $ hg mv e f | |
86 | $ hg ci -Am 'a-2: e -move-> f' |
|
99 | $ hg ci -Am 'a-2: e -move-> f' | |
87 | $ hg log -G --rev '::.' |
|
100 | $ hg log -G --rev '::.' | |
88 | @ a-2: e -move-> f |
|
101 | @ a-2: e -move-> f | |
89 | | |
|
102 | | | |
90 | o a-1: d -move-> e |
|
103 | o a-1: d -move-> e | |
91 | | |
|
104 | | | |
92 | o i-2: c -move-> d |
|
105 | o i-2: c -move-> d | |
93 | | |
|
106 | | | |
94 | o i-1: a -move-> c |
|
107 | o i-1: a -move-> c | |
95 | | |
|
108 | | | |
96 | o i-0 initial commit: a b h |
|
109 | o i-0 initial commit: a b h | |
97 |
|
110 | |||
98 |
|
111 | |||
99 | Have a branching with nothing on one side |
|
112 | Have a branching with nothing on one side | |
100 |
|
113 | |||
101 | $ hg up 'desc("i-2")' |
|
114 | $ hg up 'desc("i-2")' | |
102 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
115 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
103 | $ echo foo > b |
|
116 | $ echo foo > b | |
104 | $ hg ci -m 'b-1: b update' |
|
117 | $ hg ci -m 'b-1: b update' | |
105 | created new head |
|
118 | created new head | |
106 | $ hg log -G --rev '::.' |
|
119 | $ hg log -G --rev '::.' | |
107 | @ b-1: b update |
|
120 | @ b-1: b update | |
108 | | |
|
121 | | | |
109 | o i-2: c -move-> d |
|
122 | o i-2: c -move-> d | |
110 | | |
|
123 | | | |
111 | o i-1: a -move-> c |
|
124 | o i-1: a -move-> c | |
112 | | |
|
125 | | | |
113 | o i-0 initial commit: a b h |
|
126 | o i-0 initial commit: a b h | |
114 |
|
127 | |||
115 |
|
128 | |||
116 | Create a branch that delete a file previous renamed |
|
129 | Create a branch that delete a file previous renamed | |
117 |
|
130 | |||
118 | $ hg up 'desc("i-2")' |
|
131 | $ hg up 'desc("i-2")' | |
119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
132 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
120 | $ hg rm d |
|
133 | $ hg rm d | |
121 | $ hg ci -m 'c-1 delete d' |
|
134 | $ hg ci -m 'c-1 delete d' | |
122 | created new head |
|
135 | created new head | |
123 | $ hg log -G --rev '::.' |
|
136 | $ hg log -G --rev '::.' | |
124 | @ c-1 delete d |
|
137 | @ c-1 delete d | |
125 | | |
|
138 | | | |
126 | o i-2: c -move-> d |
|
139 | o i-2: c -move-> d | |
127 | | |
|
140 | | | |
128 | o i-1: a -move-> c |
|
141 | o i-1: a -move-> c | |
129 | | |
|
142 | | | |
130 | o i-0 initial commit: a b h |
|
143 | o i-0 initial commit: a b h | |
131 |
|
144 | |||
132 |
|
145 | |||
133 | Create a branch that delete a file previous renamed and recreate it |
|
146 | Create a branch that delete a file previous renamed and recreate it | |
134 |
|
147 | |||
135 | $ hg up 'desc("i-2")' |
|
148 | $ hg up 'desc("i-2")' | |
136 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
137 | $ hg rm d |
|
150 | $ hg rm d | |
138 | $ hg ci -m 'd-1 delete d' |
|
151 | $ hg ci -m 'd-1 delete d' | |
139 | created new head |
|
152 | created new head | |
140 | $ echo bar > d |
|
153 | $ echo bar > d | |
141 | $ hg add d |
|
154 | $ hg add d | |
142 | $ hg ci -m 'd-2 re-add d' |
|
155 | $ hg ci -m 'd-2 re-add d' | |
143 | $ hg log -G --rev '::.' |
|
156 | $ hg log -G --rev '::.' | |
144 | @ d-2 re-add d |
|
157 | @ d-2 re-add d | |
145 | | |
|
158 | | | |
146 | o d-1 delete d |
|
159 | o d-1 delete d | |
147 | | |
|
160 | | | |
148 | o i-2: c -move-> d |
|
161 | o i-2: c -move-> d | |
149 | | |
|
162 | | | |
150 | o i-1: a -move-> c |
|
163 | o i-1: a -move-> c | |
151 | | |
|
164 | | | |
152 | o i-0 initial commit: a b h |
|
165 | o i-0 initial commit: a b h | |
153 |
|
166 | |||
154 |
|
167 | |||
155 | Having another branch renaming a different file to the same filename as another |
|
168 | Having another branch renaming a different file to the same filename as another | |
156 |
|
169 | |||
157 | $ hg up 'desc("i-2")' |
|
170 | $ hg up 'desc("i-2")' | |
158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
171 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
159 | $ hg mv b g |
|
172 | $ hg mv b g | |
160 | $ hg ci -m 'e-1 b -move-> g' |
|
173 | $ hg ci -m 'e-1 b -move-> g' | |
161 | created new head |
|
174 | created new head | |
162 | $ hg mv g f |
|
175 | $ hg mv g f | |
163 | $ hg ci -m 'e-2 g -move-> f' |
|
176 | $ hg ci -m 'e-2 g -move-> f' | |
164 | $ hg log -G --rev '::.' |
|
177 | $ hg log -G --rev '::.' | |
165 | @ e-2 g -move-> f |
|
178 | @ e-2 g -move-> f | |
166 | | |
|
179 | | | |
167 | o e-1 b -move-> g |
|
180 | o e-1 b -move-> g | |
168 | | |
|
181 | | | |
169 | o i-2: c -move-> d |
|
182 | o i-2: c -move-> d | |
170 | | |
|
183 | | | |
171 | o i-1: a -move-> c |
|
184 | o i-1: a -move-> c | |
172 | | |
|
185 | | | |
173 | o i-0 initial commit: a b h |
|
186 | o i-0 initial commit: a b h | |
174 |
|
187 | |||
175 |
|
188 | |||
176 | Setup all merge |
|
189 | Setup all merge | |
177 | =============== |
|
190 | =============== | |
178 |
|
191 | |||
179 | This is done beforehand to validate that the upgrade process creates valid copy |
|
192 | This is done beforehand to validate that the upgrade process creates valid copy | |
180 | information. |
|
193 | information. | |
181 |
|
194 | |||
182 | merging with unrelated change does not interfere with the renames |
|
195 | merging with unrelated change does not interfere with the renames | |
183 | --------------------------------------------------------------- |
|
196 | --------------------------------------------------------------- | |
184 |
|
197 | |||
185 | - rename on one side |
|
198 | - rename on one side | |
186 | - unrelated change on the other side |
|
199 | - unrelated change on the other side | |
187 |
|
200 | |||
188 | $ case_desc="simple merge - A side: multiple renames, B side: unrelated update" |
|
201 | $ case_desc="simple merge - A side: multiple renames, B side: unrelated update" | |
189 |
|
202 | |||
190 | $ hg up 'desc("b-1")' |
|
203 | $ hg up 'desc("b-1")' | |
191 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
204 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
192 | $ hg merge 'desc("a-2")' |
|
205 | $ hg merge 'desc("a-2")' | |
193 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
206 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
194 | (branch merge, don't forget to commit) |
|
207 | (branch merge, don't forget to commit) | |
195 | $ hg ci -m "mBAm-0 $case_desc - one way" |
|
208 | $ hg ci -m "mBAm-0 $case_desc - one way" | |
196 | $ hg up 'desc("a-2")' |
|
209 | $ hg up 'desc("a-2")' | |
197 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
210 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
198 | $ hg merge 'desc("b-1")' |
|
211 | $ hg merge 'desc("b-1")' | |
199 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
200 | (branch merge, don't forget to commit) |
|
213 | (branch merge, don't forget to commit) | |
201 | $ hg ci -m "mABm-0 $case_desc - the other way" |
|
214 | $ hg ci -m "mABm-0 $case_desc - the other way" | |
202 | created new head |
|
215 | created new head | |
203 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
216 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | |
204 | @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
217 | @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | |
205 | |\ |
|
218 | |\ | |
206 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
219 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | |
207 | | |/ |
|
220 | | |/ | |
208 | | o b-1: b update |
|
221 | | o b-1: b update | |
209 | | | |
|
222 | | | | |
210 | o | a-2: e -move-> f |
|
223 | o | a-2: e -move-> f | |
211 | | | |
|
224 | | | | |
212 | o | a-1: d -move-> e |
|
225 | o | a-1: d -move-> e | |
213 | |/ |
|
226 | |/ | |
214 | o i-2: c -move-> d |
|
227 | o i-2: c -move-> d | |
215 | | |
|
228 | | | |
216 | o i-1: a -move-> c |
|
229 | o i-1: a -move-> c | |
217 | | |
|
230 | | | |
218 | o i-0 initial commit: a b h |
|
231 | o i-0 initial commit: a b h | |
219 |
|
232 | |||
220 |
|
233 | |||
221 |
|
234 | |||
222 | merging with the side having a delete |
|
235 | merging with the side having a delete | |
223 | ------------------------------------- |
|
236 | ------------------------------------- | |
224 |
|
237 | |||
225 | case summary: |
|
238 | case summary: | |
226 | - one with change to an unrelated file |
|
239 | - one with change to an unrelated file | |
227 | - one deleting the change |
|
240 | - one deleting the change | |
228 | and recreate an unrelated file after the merge |
|
241 | and recreate an unrelated file after the merge | |
229 |
|
242 | |||
230 | $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update" |
|
243 | $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update" | |
231 |
|
244 | |||
232 | $ hg up 'desc("b-1")' |
|
245 | $ hg up 'desc("b-1")' | |
233 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
246 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
234 | $ hg merge 'desc("c-1")' |
|
247 | $ hg merge 'desc("c-1")' | |
235 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
248 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
236 | (branch merge, don't forget to commit) |
|
249 | (branch merge, don't forget to commit) | |
237 | $ hg ci -m "mBCm-0 $case_desc - one way" |
|
250 | $ hg ci -m "mBCm-0 $case_desc - one way" | |
238 | $ echo bar > d |
|
251 | $ echo bar > d | |
239 | $ hg add d |
|
252 | $ hg add d | |
240 | $ hg ci -m 'mBCm-1 re-add d' |
|
253 | $ hg ci -m 'mBCm-1 re-add d' | |
241 | $ hg up 'desc("c-1")' |
|
254 | $ hg up 'desc("c-1")' | |
242 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
255 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
243 | $ hg merge 'desc("b-1")' |
|
256 | $ hg merge 'desc("b-1")' | |
244 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
257 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
245 | (branch merge, don't forget to commit) |
|
258 | (branch merge, don't forget to commit) | |
246 | $ hg ci -m "mCBm-0 $case_desc - the other way" |
|
259 | $ hg ci -m "mCBm-0 $case_desc - the other way" | |
247 | created new head |
|
260 | created new head | |
248 | $ echo bar > d |
|
261 | $ echo bar > d | |
249 | $ hg add d |
|
262 | $ hg add d | |
250 | $ hg ci -m 'mCBm-1 re-add d' |
|
263 | $ hg ci -m 'mCBm-1 re-add d' | |
251 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
264 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | |
252 | @ mCBm-1 re-add d |
|
265 | @ mCBm-1 re-add d | |
253 | | |
|
266 | | | |
254 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
267 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | |
255 | |\ |
|
268 | |\ | |
256 | | | o mBCm-1 re-add d |
|
269 | | | o mBCm-1 re-add d | |
257 | | | | |
|
270 | | | | | |
258 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
271 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | |
259 | | |/ |
|
272 | | |/ | |
260 | | o c-1 delete d |
|
273 | | o c-1 delete d | |
261 | | | |
|
274 | | | | |
262 | o | b-1: b update |
|
275 | o | b-1: b update | |
263 | |/ |
|
276 | |/ | |
264 | o i-2: c -move-> d |
|
277 | o i-2: c -move-> d | |
265 | | |
|
278 | | | |
266 | o i-1: a -move-> c |
|
279 | o i-1: a -move-> c | |
267 | | |
|
280 | | | |
268 | o i-0 initial commit: a b h |
|
281 | o i-0 initial commit: a b h | |
269 |
|
282 | |||
270 |
|
283 | |||
271 | Comparing with a merge re-adding the file afterward |
|
284 | Comparing with a merge re-adding the file afterward | |
272 | --------------------------------------------------- |
|
285 | --------------------------------------------------- | |
273 |
|
286 | |||
274 | Merge: |
|
287 | Merge: | |
275 | - one with change to an unrelated file |
|
288 | - one with change to an unrelated file | |
276 | - one deleting and recreating the change |
|
289 | - one deleting and recreating the change | |
277 |
|
290 | |||
278 | $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)" |
|
291 | $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)" | |
279 |
|
292 | |||
280 | $ hg up 'desc("b-1")' |
|
293 | $ hg up 'desc("b-1")' | |
281 | 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 | |
282 | $ hg merge 'desc("d-2")' |
|
295 | $ hg merge 'desc("d-2")' | |
283 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
296 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
284 | (branch merge, don't forget to commit) |
|
297 | (branch merge, don't forget to commit) | |
285 | $ hg ci -m "mBDm-0 $case_desc - one way" |
|
298 | $ hg ci -m "mBDm-0 $case_desc - one way" | |
286 | $ hg up 'desc("d-2")' |
|
299 | $ hg up 'desc("d-2")' | |
287 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
300 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
288 | $ hg merge 'desc("b-1")' |
|
301 | $ hg merge 'desc("b-1")' | |
289 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
302 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
290 | (branch merge, don't forget to commit) |
|
303 | (branch merge, don't forget to commit) | |
291 | $ hg ci -m "mDBm-0 $case_desc - the other way" |
|
304 | $ hg ci -m "mDBm-0 $case_desc - the other way" | |
292 | created new head |
|
305 | created new head | |
293 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
306 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
294 | @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
307 | @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | |
295 | |\ |
|
308 | |\ | |
296 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
309 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | |
297 | | |/ |
|
310 | | |/ | |
298 | | o d-2 re-add d |
|
311 | | o d-2 re-add d | |
299 | | | |
|
312 | | | | |
300 | | o d-1 delete d |
|
313 | | o d-1 delete d | |
301 | | | |
|
314 | | | | |
302 | o | b-1: b update |
|
315 | o | b-1: b update | |
303 | |/ |
|
316 | |/ | |
304 | o i-2: c -move-> d |
|
317 | o i-2: c -move-> d | |
305 | | |
|
318 | | | |
306 | o i-1: a -move-> c |
|
319 | o i-1: a -move-> c | |
307 | | |
|
320 | | | |
308 | o i-0 initial commit: a b h |
|
321 | o i-0 initial commit: a b h | |
309 |
|
322 | |||
310 |
|
323 | |||
311 |
|
324 | |||
312 | Comparing with a merge with colliding rename |
|
325 | Comparing with a merge with colliding rename | |
313 | -------------------------------------------- |
|
326 | -------------------------------------------- | |
314 |
|
327 | |||
315 | Subcase: new copy information on both side |
|
328 | Subcase: new copy information on both side | |
316 | `````````````````````````````````````````` |
|
329 | `````````````````````````````````````````` | |
317 |
|
330 | |||
318 | - the "e-" branch renaming b to f (through 'g') |
|
331 | - the "e-" branch renaming b to f (through 'g') | |
319 | - the "a-" branch renaming d to f (through e) |
|
332 | - the "a-" branch renaming d to f (through e) | |
320 |
|
333 | |||
321 | $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)" |
|
334 | $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)" | |
322 |
|
335 | |||
323 | $ hg up 'desc("a-2")' |
|
336 | $ hg up 'desc("a-2")' | |
324 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
337 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
325 | $ hg merge 'desc("e-2")' |
|
338 | $ hg merge 'desc("e-2")' | |
326 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
339 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
327 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
340 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
328 | (branch merge, don't forget to commit) |
|
341 | (branch merge, don't forget to commit) | |
329 | $ hg ci -m "mAEm-0 $case_desc - one way" |
|
342 | $ hg ci -m "mAEm-0 $case_desc - one way" | |
330 | $ hg up 'desc("e-2")' |
|
343 | $ hg up 'desc("e-2")' | |
331 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
344 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
332 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
345 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
333 | $ hg merge 'desc("a-2")' |
|
346 | $ hg merge 'desc("a-2")' | |
334 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
347 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
335 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
348 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
336 | (branch merge, don't forget to commit) |
|
349 | (branch merge, don't forget to commit) | |
337 | $ hg ci -m "mEAm-0 $case_desc - the other way" |
|
350 | $ hg ci -m "mEAm-0 $case_desc - the other way" | |
338 | created new head |
|
351 | created new head | |
339 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
352 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
340 | @ 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 |
|
353 | @ 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 | |
341 | |\ |
|
354 | |\ | |
342 | +---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 |
|
355 | +---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 | |
343 | | |/ |
|
356 | | |/ | |
344 | | o e-2 g -move-> f |
|
357 | | o e-2 g -move-> f | |
345 | | | |
|
358 | | | | |
346 | | o e-1 b -move-> g |
|
359 | | o e-1 b -move-> g | |
347 | | | |
|
360 | | | | |
348 | o | a-2: e -move-> f |
|
361 | o | a-2: e -move-> f | |
349 | | | |
|
362 | | | | |
350 | o | a-1: d -move-> e |
|
363 | o | a-1: d -move-> e | |
351 | |/ |
|
364 | |/ | |
352 | o i-2: c -move-> d |
|
365 | o i-2: c -move-> d | |
353 | | |
|
366 | | | |
354 | o i-1: a -move-> c |
|
367 | o i-1: a -move-> c | |
355 | | |
|
368 | | | |
356 | o i-0 initial commit: a b h |
|
369 | o i-0 initial commit: a b h | |
357 |
|
370 | |||
358 |
|
371 | |||
359 | Subcase: existing copy information overwritten on one branch |
|
372 | Subcase: existing copy information overwritten on one branch | |
360 | ```````````````````````````````````````````````````````````` |
|
373 | ```````````````````````````````````````````````````````````` | |
361 |
|
374 | |||
362 | Merge: |
|
375 | Merge: | |
363 | - one with change to an unrelated file (b) |
|
376 | - one with change to an unrelated file (b) | |
364 | - one overwriting a file (d) with a rename (from h to i to d) |
|
377 | - one overwriting a file (d) with a rename (from h to i to d) | |
365 |
|
378 | |||
366 | $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" |
|
379 | $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" | |
367 |
|
380 | |||
368 | $ hg up 'desc("i-2")' |
|
381 | $ hg up 'desc("i-2")' | |
369 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
382 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
370 | $ hg mv h i |
|
383 | $ hg mv h i | |
371 | $ hg commit -m "f-1: rename h -> i" |
|
384 | $ hg commit -m "f-1: rename h -> i" | |
372 | created new head |
|
385 | created new head | |
373 | $ hg mv --force i d |
|
386 | $ hg mv --force i d | |
374 | $ hg commit -m "f-2: rename i -> d" |
|
387 | $ hg commit -m "f-2: rename i -> d" | |
375 | $ hg debugindex d |
|
388 | $ hg debugindex d | ../no-linkrev | |
376 | rev linkrev nodeid p1 p2 |
|
389 | rev linkrev nodeid p1 p2 | |
377 |
0 |
|
390 | 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) | |
378 |
0 |
|
391 | 0 * ae258f702dfe 000000000000 000000000000 (changeset !) | |
379 |
1 |
|
392 | 1 * b004912a8510 000000000000 000000000000 | |
380 |
2 |
|
393 | 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) | |
381 | $ hg up 'desc("b-1")' |
|
394 | $ hg up 'desc("b-1")' | |
382 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
395 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
383 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
396 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
384 | $ hg merge 'desc("f-2")' |
|
397 | $ hg merge 'desc("f-2")' | |
385 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
398 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
386 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
399 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
387 | (branch merge, don't forget to commit) |
|
400 | (branch merge, don't forget to commit) | |
388 | $ hg ci -m "mBFm-0 $case_desc - one way" |
|
401 | $ hg ci -m "mBFm-0 $case_desc - one way" | |
389 | $ hg up 'desc("f-2")' |
|
402 | $ hg up 'desc("f-2")' | |
390 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
403 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
391 | $ hg merge 'desc("b-1")' |
|
404 | $ hg merge 'desc("b-1")' | |
392 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
405 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
393 | (branch merge, don't forget to commit) |
|
406 | (branch merge, don't forget to commit) | |
394 | $ hg ci -m "mFBm-0 $case_desc - the other way" |
|
407 | $ hg ci -m "mFBm-0 $case_desc - the other way" | |
395 | created new head |
|
408 | created new head | |
396 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
409 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |
397 | @ mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
410 | @ mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
398 | |\ |
|
411 | |\ | |
399 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
412 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
400 | | |/ |
|
413 | | |/ | |
401 | | o f-2: rename i -> d |
|
414 | | o f-2: rename i -> d | |
402 | | | |
|
415 | | | | |
403 | | o f-1: rename h -> i |
|
416 | | o f-1: rename h -> i | |
404 | | | |
|
417 | | | | |
405 | o | b-1: b update |
|
418 | o | b-1: b update | |
406 | |/ |
|
419 | |/ | |
407 | o i-2: c -move-> d |
|
420 | o i-2: c -move-> d | |
408 | | |
|
421 | | | |
409 | o i-1: a -move-> c |
|
422 | o i-1: a -move-> c | |
410 | | |
|
423 | | | |
411 | o i-0 initial commit: a b h |
|
424 | o i-0 initial commit: a b h | |
412 |
|
425 | |||
413 |
|
426 | |||
414 |
|
427 | |||
415 | Subcase: reset of the copy history on one side |
|
428 | Subcase: reset of the copy history on one side | |
416 | `````````````````````````````````````````````` |
|
429 | `````````````````````````````````````````````` | |
417 |
|
430 | |||
418 | Merge: |
|
431 | Merge: | |
419 | - one with change to a file |
|
432 | - one with change to a file | |
420 | - one deleting and recreating the file |
|
433 | - one deleting and recreating the file | |
421 |
|
434 | |||
422 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should |
|
435 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should | |
423 | consider history and rename on both branch of the merge. |
|
436 | consider history and rename on both branch of the merge. | |
424 |
|
437 | |||
425 | $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content" |
|
438 | $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content" | |
426 |
|
439 | |||
427 | $ hg up 'desc("i-2")' |
|
440 | $ hg up 'desc("i-2")' | |
428 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
441 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
429 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
442 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
430 | $ echo "some update" >> d |
|
443 | $ echo "some update" >> d | |
431 | $ hg commit -m "g-1: update d" |
|
444 | $ hg commit -m "g-1: update d" | |
432 | created new head |
|
445 | created new head | |
433 | $ hg up 'desc("d-2")' |
|
446 | $ hg up 'desc("d-2")' | |
434 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
447 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
435 | $ hg merge 'desc("g-1")' --tool :union |
|
448 | $ hg merge 'desc("g-1")' --tool :union | |
436 | merging d |
|
449 | merging d | |
437 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
450 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
438 | (branch merge, don't forget to commit) |
|
451 | (branch merge, don't forget to commit) | |
439 | $ hg ci -m "mDGm-0 $case_desc - one way" |
|
452 | $ hg ci -m "mDGm-0 $case_desc - one way" | |
440 | $ hg up 'desc("g-1")' |
|
453 | $ hg up 'desc("g-1")' | |
441 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
454 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
442 | $ hg merge 'desc("d-2")' --tool :union |
|
455 | $ hg merge 'desc("d-2")' --tool :union | |
443 | merging d |
|
456 | merging d | |
444 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
457 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
445 | (branch merge, don't forget to commit) |
|
458 | (branch merge, don't forget to commit) | |
446 | $ hg ci -m "mGDm-0 $case_desc - the other way" |
|
459 | $ hg ci -m "mGDm-0 $case_desc - the other way" | |
447 | created new head |
|
460 | created new head | |
448 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
461 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |
449 | @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
462 | @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way | |
450 | |\ |
|
463 | |\ | |
451 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
464 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
452 | | |/ |
|
465 | | |/ | |
453 | | o g-1: update d |
|
466 | | o g-1: update d | |
454 | | | |
|
467 | | | | |
455 | o | d-2 re-add d |
|
468 | o | d-2 re-add d | |
456 | | | |
|
469 | | | | |
457 | o | d-1 delete d |
|
470 | o | d-1 delete d | |
458 | |/ |
|
471 | |/ | |
459 | o i-2: c -move-> d |
|
472 | o i-2: c -move-> d | |
460 | | |
|
473 | | | |
461 | o i-1: a -move-> c |
|
474 | o i-1: a -move-> c | |
462 | | |
|
475 | | | |
463 | o i-0 initial commit: a b h |
|
476 | o i-0 initial commit: a b h | |
464 |
|
477 | |||
465 |
|
478 | |||
466 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch |
|
479 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch | |
467 | ```````````````````````````````````````````````````````````````````````````````````````````` |
|
480 | ```````````````````````````````````````````````````````````````````````````````````````````` | |
468 |
|
481 | |||
469 | Merge: |
|
482 | Merge: | |
470 | - one with change to a file (d) |
|
483 | - one with change to a file (d) | |
471 | - one overwriting that file with a rename (from h to i, to d) |
|
484 | - one overwriting that file with a rename (from h to i, to d) | |
472 |
|
485 | |||
473 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
486 | This case is similar to BF/FB, but an actual merge happens, so both side of the | |
474 | history are relevant. |
|
487 | history are relevant. | |
475 |
|
488 | |||
476 | Note: |
|
489 | Note: | |
477 | | In this case, the merge get conflicting information since on one side we have |
|
490 | | In this case, the merge get conflicting information since on one side we have | |
478 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
491 | | "a -> c -> d". and one the other one we have "h -> i -> d". | |
479 | | |
|
492 | | | |
480 | | The current code arbitrarily pick one side |
|
493 | | The current code arbitrarily pick one side | |
481 |
|
494 | |||
482 | $ case_desc="merge - G side: content change, F side: copy overwrite, no content change" |
|
495 | $ case_desc="merge - G side: content change, F side: copy overwrite, no content change" | |
483 |
|
496 | |||
484 | $ hg up 'desc("f-2")' |
|
497 | $ hg up 'desc("f-2")' | |
485 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
498 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
486 | $ hg merge 'desc("g-1")' --tool :union |
|
499 | $ hg merge 'desc("g-1")' --tool :union | |
487 | merging d (no-changeset !) |
|
500 | merging d (no-changeset !) | |
488 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
501 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
489 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
502 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
490 | (branch merge, don't forget to commit) |
|
503 | (branch merge, don't forget to commit) | |
491 | $ hg ci -m "mFGm-0 $case_desc - one way" |
|
504 | $ hg ci -m "mFGm-0 $case_desc - one way" | |
492 | created new head |
|
505 | created new head | |
493 | $ hg up 'desc("g-1")' |
|
506 | $ hg up 'desc("g-1")' | |
494 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
507 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
495 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
508 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
496 | $ hg merge 'desc("f-2")' --tool :union |
|
509 | $ hg merge 'desc("f-2")' --tool :union | |
497 | merging d (no-changeset !) |
|
510 | merging d (no-changeset !) | |
498 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
511 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
499 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
512 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
500 | (branch merge, don't forget to commit) |
|
513 | (branch merge, don't forget to commit) | |
501 | $ hg ci -m "mGFm-0 $case_desc - the other way" |
|
514 | $ hg ci -m "mGFm-0 $case_desc - the other way" | |
502 | created new head |
|
515 | created new head | |
503 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
516 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |
504 | @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
517 | @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
505 | |\ |
|
518 | |\ | |
506 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
519 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
507 | | |/ |
|
520 | | |/ | |
508 | | o g-1: update d |
|
521 | | o g-1: update d | |
509 | | | |
|
522 | | | | |
510 | o | f-2: rename i -> d |
|
523 | o | f-2: rename i -> d | |
511 | | | |
|
524 | | | | |
512 | o | f-1: rename h -> i |
|
525 | o | f-1: rename h -> i | |
513 | |/ |
|
526 | |/ | |
514 | o i-2: c -move-> d |
|
527 | o i-2: c -move-> d | |
515 | | |
|
528 | | | |
516 | o i-1: a -move-> c |
|
529 | o i-1: a -move-> c | |
517 | | |
|
530 | | | |
518 | o i-0 initial commit: a b h |
|
531 | o i-0 initial commit: a b h | |
519 |
|
532 | |||
520 |
|
533 | |||
521 |
|
534 | |||
522 | Comparing with merging with a deletion (and keeping the file) |
|
535 | Comparing with merging with a deletion (and keeping the file) | |
523 | ------------------------------------------------------------- |
|
536 | ------------------------------------------------------------- | |
524 |
|
537 | |||
525 | Merge: |
|
538 | Merge: | |
526 | - one removing a file (d) |
|
539 | - one removing a file (d) | |
527 | - one updating that file |
|
540 | - one updating that file | |
528 | - the merge keep the modified version of the file (canceling the delete) |
|
541 | - the merge keep the modified version of the file (canceling the delete) | |
529 |
|
542 | |||
530 | In this case, the file keep on living after the merge. So we should not drop its |
|
543 | In this case, the file keep on living after the merge. So we should not drop its | |
531 | copy tracing chain. |
|
544 | copy tracing chain. | |
532 |
|
545 | |||
533 | $ case_desc="merge updated/deleted - revive the file (updated content)" |
|
546 | $ case_desc="merge updated/deleted - revive the file (updated content)" | |
534 |
|
547 | |||
535 | $ hg up 'desc("c-1")' |
|
548 | $ hg up 'desc("c-1")' | |
536 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
549 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
537 | $ hg merge 'desc("g-1")' |
|
550 | $ hg merge 'desc("g-1")' | |
538 | file 'd' was deleted in local [working copy] but was modified in other [merge rev]. |
|
551 | file 'd' was deleted in local [working copy] but was modified in other [merge rev]. | |
539 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
|
552 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. | |
540 | What do you want to do? u |
|
553 | What do you want to do? u | |
541 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
554 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
542 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
555 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
543 | [1] |
|
556 | [1] | |
544 | $ hg resolve -t :other d |
|
557 | $ hg resolve -t :other d | |
545 | (no more unresolved files) |
|
558 | (no more unresolved files) | |
546 | $ hg ci -m "mCGm-0 $case_desc - one way" |
|
559 | $ hg ci -m "mCGm-0 $case_desc - one way" | |
547 | created new head |
|
560 | created new head | |
548 |
|
561 | |||
549 | $ hg up 'desc("g-1")' |
|
562 | $ hg up 'desc("g-1")' | |
550 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
563 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
551 | $ hg merge 'desc("c-1")' |
|
564 | $ hg merge 'desc("c-1")' | |
552 | file 'd' was deleted in other [merge rev] but was modified in local [working copy]. |
|
565 | file 'd' was deleted in other [merge rev] but was modified in local [working copy]. | |
553 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
|
566 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. | |
554 | What do you want to do? u |
|
567 | What do you want to do? u | |
555 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
568 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
556 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
569 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
557 | [1] |
|
570 | [1] | |
558 | $ hg resolve -t :local d |
|
571 | $ hg resolve -t :local d | |
559 | (no more unresolved files) |
|
572 | (no more unresolved files) | |
560 | $ hg ci -m "mGCm-0 $case_desc - the other way" |
|
573 | $ hg ci -m "mGCm-0 $case_desc - the other way" | |
561 | created new head |
|
574 | created new head | |
562 |
|
575 | |||
563 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' |
|
576 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' | |
564 | @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
577 | @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | |
565 | |\ |
|
578 | |\ | |
566 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
579 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way | |
567 | | |/ |
|
580 | | |/ | |
568 | | o g-1: update d |
|
581 | | o g-1: update d | |
569 | | | |
|
582 | | | | |
570 | o | c-1 delete d |
|
583 | o | c-1 delete d | |
571 | |/ |
|
584 | |/ | |
572 | o i-2: c -move-> d |
|
585 | o i-2: c -move-> d | |
573 | | |
|
586 | | | |
574 | o i-1: a -move-> c |
|
587 | o i-1: a -move-> c | |
575 | | |
|
588 | | | |
576 | o i-0 initial commit: a b h |
|
589 | o i-0 initial commit: a b h | |
577 |
|
590 | |||
578 |
|
591 | |||
579 |
|
592 | |||
580 |
|
593 | |||
581 | Comparing with merge restoring an untouched deleted file |
|
594 | Comparing with merge restoring an untouched deleted file | |
582 | -------------------------------------------------------- |
|
595 | -------------------------------------------------------- | |
583 |
|
596 | |||
584 | Merge: |
|
597 | Merge: | |
585 | - one removing a file (d) |
|
598 | - one removing a file (d) | |
586 | - one leaving the file untouched |
|
599 | - one leaving the file untouched | |
587 | - the merge actively restore the file to the same content. |
|
600 | - the merge actively restore the file to the same content. | |
588 |
|
601 | |||
589 | In this case, the file keep on living after the merge. So we should not drop its |
|
602 | In this case, the file keep on living after the merge. So we should not drop its | |
590 | copy tracing chain. |
|
603 | copy tracing chain. | |
591 |
|
604 | |||
592 | $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" |
|
605 | $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" | |
593 |
|
606 | |||
594 | $ hg up 'desc("c-1")' |
|
607 | $ hg up 'desc("c-1")' | |
595 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
608 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
596 | $ hg merge 'desc("b-1")' |
|
609 | $ hg merge 'desc("b-1")' | |
597 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
610 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
598 | (branch merge, don't forget to commit) |
|
611 | (branch merge, don't forget to commit) | |
599 | $ hg revert --rev 'desc("b-1")' d |
|
612 | $ hg revert --rev 'desc("b-1")' d | |
600 | $ hg ci -m "mCB-revert-m-0 $case_desc - one way" |
|
613 | $ hg ci -m "mCB-revert-m-0 $case_desc - one way" | |
601 | created new head |
|
614 | created new head | |
602 |
|
615 | |||
603 | $ hg up 'desc("b-1")' |
|
616 | $ hg up 'desc("b-1")' | |
604 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
617 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
605 | $ hg merge 'desc("c-1")' |
|
618 | $ hg merge 'desc("c-1")' | |
606 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
619 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
607 | (branch merge, don't forget to commit) |
|
620 | (branch merge, don't forget to commit) | |
608 | $ hg revert --rev 'desc("b-1")' d |
|
621 | $ hg revert --rev 'desc("b-1")' d | |
609 | $ hg ci -m "mBC-revert-m-0 $case_desc - the other way" |
|
622 | $ hg ci -m "mBC-revert-m-0 $case_desc - the other way" | |
610 | created new head |
|
623 | created new head | |
611 |
|
624 | |||
612 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' |
|
625 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | |
613 | @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
626 | @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
614 | |\ |
|
627 | |\ | |
615 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
628 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
616 | | |/ |
|
629 | | |/ | |
617 | | o c-1 delete d |
|
630 | | o c-1 delete d | |
618 | | | |
|
631 | | | | |
619 | o | b-1: b update |
|
632 | o | b-1: b update | |
620 | |/ |
|
633 | |/ | |
621 | o i-2: c -move-> d |
|
634 | o i-2: c -move-> d | |
622 | | |
|
635 | | | |
623 | o i-1: a -move-> c |
|
636 | o i-1: a -move-> c | |
624 | | |
|
637 | | | |
625 | o i-0 initial commit: a b h |
|
638 | o i-0 initial commit: a b h | |
626 |
|
639 | |||
627 |
|
640 | |||
628 |
|
641 | |||
629 | $ hg up null --quiet |
|
642 | $ hg up null --quiet | |
630 |
|
643 | |||
631 | Merging a branch where a rename was deleted with a branch where the same file was renamed |
|
644 | Merging a branch where a rename was deleted with a branch where the same file was renamed | |
632 | ------------------------------------------------------------------------------------------ |
|
645 | ------------------------------------------------------------------------------------------ | |
633 |
|
646 | |||
634 | Create a "conflicting" merge where `d` get removed on one branch before its |
|
647 | Create a "conflicting" merge where `d` get removed on one branch before its | |
635 | rename information actually conflict with the other branch. |
|
648 | rename information actually conflict with the other branch. | |
636 |
|
649 | |||
637 | (the copy information from the branch that was not deleted should win). |
|
650 | (the copy information from the branch that was not deleted should win). | |
638 |
|
651 | |||
639 | $ 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)" |
|
652 | $ 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)" | |
640 |
|
653 | |||
641 | $ hg up 'desc("i-0")' |
|
654 | $ hg up 'desc("i-0")' | |
642 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
655 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
643 | $ hg mv b d |
|
656 | $ hg mv b d | |
644 | $ hg ci -m "h-1: b -(move)-> d" |
|
657 | $ hg ci -m "h-1: b -(move)-> d" | |
645 | created new head |
|
658 | created new head | |
646 |
|
659 | |||
647 | $ hg up 'desc("c-1")' |
|
660 | $ hg up 'desc("c-1")' | |
648 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
661 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
649 | $ hg merge 'desc("h-1")' |
|
662 | $ hg merge 'desc("h-1")' | |
650 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
663 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
651 | (branch merge, don't forget to commit) |
|
664 | (branch merge, don't forget to commit) | |
652 | $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way" |
|
665 | $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way" | |
653 |
|
666 | |||
654 | $ hg up 'desc("h-1")' |
|
667 | $ hg up 'desc("h-1")' | |
655 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
668 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
656 | $ hg merge 'desc("c-1")' |
|
669 | $ hg merge 'desc("c-1")' | |
657 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
670 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
658 | (branch merge, don't forget to commit) |
|
671 | (branch merge, don't forget to commit) | |
659 | $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way" |
|
672 | $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way" | |
660 | created new head |
|
673 | created new head | |
661 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' |
|
674 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' | |
662 | @ 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 |
|
675 | @ 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 | |
663 | |\ |
|
676 | |\ | |
664 | +---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 |
|
677 | +---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 | |
665 | | |/ |
|
678 | | |/ | |
666 | | o h-1: b -(move)-> d |
|
679 | | o h-1: b -(move)-> d | |
667 | | | |
|
680 | | | | |
668 | o | c-1 delete d |
|
681 | o | c-1 delete d | |
669 | | | |
|
682 | | | | |
670 | o | i-2: c -move-> d |
|
683 | o | i-2: c -move-> d | |
671 | | | |
|
684 | | | | |
672 | o | i-1: a -move-> c |
|
685 | o | i-1: a -move-> c | |
673 | |/ |
|
686 | |/ | |
674 | o i-0 initial commit: a b h |
|
687 | o i-0 initial commit: a b h | |
675 |
|
688 | |||
676 |
|
689 | |||
677 | Decision from previous merge are properly chained with later merge |
|
690 | Decision from previous merge are properly chained with later merge | |
678 | ------------------------------------------------------------------ |
|
691 | ------------------------------------------------------------------ | |
679 |
|
692 | |||
680 | Subcase: chaining conflicting rename resolution |
|
693 | Subcase: chaining conflicting rename resolution | |
681 | ``````````````````````````````````````````````` |
|
694 | ``````````````````````````````````````````````` | |
682 |
|
695 | |||
683 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We |
|
696 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We | |
684 | add more change on the respective branch and merge again. These second merge |
|
697 | add more change on the respective branch and merge again. These second merge | |
685 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
698 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" | |
686 | about that file should stay unchanged. |
|
699 | about that file should stay unchanged. | |
687 |
|
700 | |||
688 | $ case_desc="chained merges (conflict -> simple) - same content everywhere" |
|
701 | $ case_desc="chained merges (conflict -> simple) - same content everywhere" | |
689 |
|
702 | |||
690 | (extra unrelated changes) |
|
703 | (extra unrelated changes) | |
691 |
|
704 | |||
692 | $ hg up 'desc("a-2")' |
|
705 | $ hg up 'desc("a-2")' | |
693 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
706 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
694 | $ echo j > unrelated-j |
|
707 | $ echo j > unrelated-j | |
695 | $ hg add unrelated-j |
|
708 | $ hg add unrelated-j | |
696 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' |
|
709 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' | |
697 | created new head |
|
710 | created new head | |
698 |
|
711 | |||
699 | $ hg up 'desc("e-2")' |
|
712 | $ hg up 'desc("e-2")' | |
700 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
713 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |
701 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
714 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |
702 | $ echo k > unrelated-k |
|
715 | $ echo k > unrelated-k | |
703 | $ hg add unrelated-k |
|
716 | $ hg add unrelated-k | |
704 | $ hg ci -m 'k-1: unrelated changes (based on "e" changes)' |
|
717 | $ hg ci -m 'k-1: unrelated changes (based on "e" changes)' | |
705 | created new head |
|
718 | created new head | |
706 |
|
719 | |||
707 | (merge variant 1) |
|
720 | (merge variant 1) | |
708 |
|
721 | |||
709 | $ hg up 'desc("mAEm")' |
|
722 | $ hg up 'desc("mAEm")' | |
710 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
723 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |
711 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
724 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |
712 | $ hg merge 'desc("k-1")' |
|
725 | $ hg merge 'desc("k-1")' | |
713 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
726 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
714 | (branch merge, don't forget to commit) |
|
727 | (branch merge, don't forget to commit) | |
715 | $ hg ci -m "mAE,Km: $case_desc" |
|
728 | $ hg ci -m "mAE,Km: $case_desc" | |
716 |
|
729 | |||
717 | (merge variant 2) |
|
730 | (merge variant 2) | |
718 |
|
731 | |||
719 | $ hg up 'desc("k-1")' |
|
732 | $ hg up 'desc("k-1")' | |
720 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
733 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
721 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
734 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
722 |
|
735 | |||
723 | $ hg merge 'desc("mAEm")' |
|
736 | $ hg merge 'desc("mAEm")' | |
724 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
737 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
725 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
738 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
726 | (branch merge, don't forget to commit) |
|
739 | (branch merge, don't forget to commit) | |
727 | $ hg ci -m "mK,AEm: $case_desc" |
|
740 | $ hg ci -m "mK,AEm: $case_desc" | |
728 | created new head |
|
741 | created new head | |
729 |
|
742 | |||
730 | (merge variant 3) |
|
743 | (merge variant 3) | |
731 |
|
744 | |||
732 | $ hg up 'desc("mEAm")' |
|
745 | $ hg up 'desc("mEAm")' | |
733 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
746 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
734 | $ hg merge 'desc("j-1")' |
|
747 | $ hg merge 'desc("j-1")' | |
735 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
748 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
736 | (branch merge, don't forget to commit) |
|
749 | (branch merge, don't forget to commit) | |
737 | $ hg ci -m "mEA,Jm: $case_desc" |
|
750 | $ hg ci -m "mEA,Jm: $case_desc" | |
738 |
|
751 | |||
739 | (merge variant 4) |
|
752 | (merge variant 4) | |
740 |
|
753 | |||
741 | $ hg up 'desc("j-1")' |
|
754 | $ hg up 'desc("j-1")' | |
742 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
755 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
743 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
756 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
744 | $ hg merge 'desc("mEAm")' |
|
757 | $ hg merge 'desc("mEAm")' | |
745 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
758 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
746 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
759 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
747 | (branch merge, don't forget to commit) |
|
760 | (branch merge, don't forget to commit) | |
748 | $ hg ci -m "mJ,EAm: $case_desc" |
|
761 | $ hg ci -m "mJ,EAm: $case_desc" | |
749 | created new head |
|
762 | created new head | |
750 |
|
763 | |||
751 |
|
764 | |||
752 | $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))' |
|
765 | $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))' | |
753 | @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere |
|
766 | @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere | |
754 | |\ |
|
767 | |\ | |
755 | +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere |
|
768 | +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere | |
756 | | |/ |
|
769 | | |/ | |
757 | | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere |
|
770 | | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere | |
758 | | | |\ |
|
771 | | | |\ | |
759 | | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere |
|
772 | | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere | |
760 | | | | |/ |
|
773 | | | | |/ | |
761 | | | | o k-1: unrelated changes (based on "e" changes) |
|
774 | | | | o k-1: unrelated changes (based on "e" changes) | |
762 | | | | | |
|
775 | | | | | | |
763 | | o | | j-1: unrelated changes (based on the "a" series of changes) |
|
776 | | o | | j-1: unrelated changes (based on the "a" series of changes) | |
764 | | | | | |
|
777 | | | | | | |
765 | 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 |
|
778 | 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 | |
766 | |/ / / |
|
779 | |/ / / | |
767 | | 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 |
|
780 | | 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 | |
768 | |/|/ |
|
781 | |/|/ | |
769 | | o e-2 g -move-> f |
|
782 | | o e-2 g -move-> f | |
770 | | | |
|
783 | | | | |
771 | | o e-1 b -move-> g |
|
784 | | o e-1 b -move-> g | |
772 | | | |
|
785 | | | | |
773 | o | a-2: e -move-> f |
|
786 | o | a-2: e -move-> f | |
774 | | | |
|
787 | | | | |
775 | o | a-1: d -move-> e |
|
788 | o | a-1: d -move-> e | |
776 | |/ |
|
789 | |/ | |
777 | o i-2: c -move-> d |
|
790 | o i-2: c -move-> d | |
778 | | |
|
791 | | | |
779 | o i-1: a -move-> c |
|
792 | o i-1: a -move-> c | |
780 | | |
|
793 | | | |
781 | o i-0 initial commit: a b h |
|
794 | o i-0 initial commit: a b h | |
782 |
|
795 | |||
783 |
|
796 | |||
784 | Subcase: chaining salvage information during a merge |
|
797 | Subcase: chaining salvage information during a merge | |
785 | ```````````````````````````````````````````````````` |
|
798 | ```````````````````````````````````````````````````` | |
786 |
|
799 | |||
787 | We add more change on the branch were the file was deleted. merging again |
|
800 | We add more change on the branch were the file was deleted. merging again | |
788 | should preserve the fact eh file was salvaged. |
|
801 | should preserve the fact eh file was salvaged. | |
789 |
|
802 | |||
790 | $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)" |
|
803 | $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)" | |
791 |
|
804 | |||
792 | (creating the change) |
|
805 | (creating the change) | |
793 |
|
806 | |||
794 | $ hg up 'desc("c-1")' |
|
807 | $ hg up 'desc("c-1")' | |
795 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
808 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
796 | $ echo l > unrelated-l |
|
809 | $ echo l > unrelated-l | |
797 | $ hg add unrelated-l |
|
810 | $ hg add unrelated-l | |
798 | $ hg ci -m 'l-1: unrelated changes (based on "c" changes)' |
|
811 | $ hg ci -m 'l-1: unrelated changes (based on "c" changes)' | |
799 | created new head |
|
812 | created new head | |
800 |
|
813 | |||
801 | (Merge variant 1) |
|
814 | (Merge variant 1) | |
802 |
|
815 | |||
803 | $ hg up 'desc("mBC-revert-m")' |
|
816 | $ hg up 'desc("mBC-revert-m")' | |
804 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
817 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
805 | $ hg merge 'desc("l-1")' |
|
818 | $ hg merge 'desc("l-1")' | |
806 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
819 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
807 | (branch merge, don't forget to commit) |
|
820 | (branch merge, don't forget to commit) | |
808 | $ hg ci -m "mBC+revert,Lm: $case_desc" |
|
821 | $ hg ci -m "mBC+revert,Lm: $case_desc" | |
809 |
|
822 | |||
810 | (Merge variant 2) |
|
823 | (Merge variant 2) | |
811 |
|
824 | |||
812 | $ hg up 'desc("mCB-revert-m")' |
|
825 | $ hg up 'desc("mCB-revert-m")' | |
813 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
826 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
814 | $ hg merge 'desc("l-1")' |
|
827 | $ hg merge 'desc("l-1")' | |
815 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
828 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
816 | (branch merge, don't forget to commit) |
|
829 | (branch merge, don't forget to commit) | |
817 | $ hg ci -m "mCB+revert,Lm: $case_desc" |
|
830 | $ hg ci -m "mCB+revert,Lm: $case_desc" | |
818 |
|
831 | |||
819 | (Merge variant 3) |
|
832 | (Merge variant 3) | |
820 |
|
833 | |||
821 | $ hg up 'desc("l-1")' |
|
834 | $ hg up 'desc("l-1")' | |
822 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
835 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
823 |
|
836 | |||
824 | $ hg merge 'desc("mBC-revert-m")' |
|
837 | $ hg merge 'desc("mBC-revert-m")' | |
825 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
838 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
826 | (branch merge, don't forget to commit) |
|
839 | (branch merge, don't forget to commit) | |
827 | $ hg ci -m "mL,BC+revertm: $case_desc" |
|
840 | $ hg ci -m "mL,BC+revertm: $case_desc" | |
828 | created new head |
|
841 | created new head | |
829 |
|
842 | |||
830 | (Merge variant 4) |
|
843 | (Merge variant 4) | |
831 |
|
844 | |||
832 | $ hg up 'desc("l-1")' |
|
845 | $ hg up 'desc("l-1")' | |
833 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
846 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
834 |
|
847 | |||
835 | $ hg merge 'desc("mCB-revert-m")' |
|
848 | $ hg merge 'desc("mCB-revert-m")' | |
836 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
849 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
837 | (branch merge, don't forget to commit) |
|
850 | (branch merge, don't forget to commit) | |
838 | $ hg ci -m "mL,CB+revertm: $case_desc" |
|
851 | $ hg ci -m "mL,CB+revertm: $case_desc" | |
839 | created new head |
|
852 | created new head | |
840 |
|
853 | |||
841 | $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))' |
|
854 | $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))' | |
842 | @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
855 | @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) | |
843 | |\ |
|
856 | |\ | |
844 | | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
857 | | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) | |
845 | | |/| |
|
858 | | |/| | |
846 | +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
859 | +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
847 | | | | |
|
860 | | | | | |
848 | | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
861 | | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
849 | | | |/ |
|
862 | | | |/ | |
850 | | o | l-1: unrelated changes (based on "c" changes) |
|
863 | | o | l-1: unrelated changes (based on "c" changes) | |
851 | | | | |
|
864 | | | | | |
852 | | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
865 | | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
853 | | |/| |
|
866 | | |/| | |
854 | o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
867 | o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
855 | |/ / |
|
868 | |/ / | |
856 | o | c-1 delete d |
|
869 | o | c-1 delete d | |
857 | | | |
|
870 | | | | |
858 | | o b-1: b update |
|
871 | | o b-1: b update | |
859 | |/ |
|
872 | |/ | |
860 | o i-2: c -move-> d |
|
873 | o i-2: c -move-> d | |
861 | | |
|
874 | | | |
862 | o i-1: a -move-> c |
|
875 | o i-1: a -move-> c | |
863 | | |
|
876 | | | |
864 | o i-0 initial commit: a b h |
|
877 | o i-0 initial commit: a b h | |
865 |
|
878 | |||
866 |
|
879 | |||
867 |
|
880 | |||
868 | Subcase: chaining "merged" information during a merge |
|
881 | Subcase: chaining "merged" information during a merge | |
869 | `````````````````````````````````````````````````````` |
|
882 | `````````````````````````````````````````````````````` | |
870 |
|
883 | |||
871 | 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. |
|
884 | 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. | |
872 |
|
885 | |||
873 | $ case_desc="chained merges (copy-overwrite -> simple) - same content" |
|
886 | $ case_desc="chained merges (copy-overwrite -> simple) - same content" | |
874 |
|
887 | |||
875 | (extra unrelated changes) |
|
888 | (extra unrelated changes) | |
876 |
|
889 | |||
877 | $ hg up 'desc("f-2")' |
|
890 | $ hg up 'desc("f-2")' | |
878 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
891 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |
879 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
892 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |
880 | $ echo n > unrelated-n |
|
893 | $ echo n > unrelated-n | |
881 | $ hg add unrelated-n |
|
894 | $ hg add unrelated-n | |
882 | $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)' |
|
895 | $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)' | |
883 | created new head |
|
896 | created new head | |
884 |
|
897 | |||
885 | $ hg up 'desc("g-1")' |
|
898 | $ hg up 'desc("g-1")' | |
886 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
899 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
887 | $ echo o > unrelated-o |
|
900 | $ echo o > unrelated-o | |
888 | $ hg add unrelated-o |
|
901 | $ hg add unrelated-o | |
889 | $ hg ci -m 'o-1: unrelated changes (based on "g" changes)' |
|
902 | $ hg ci -m 'o-1: unrelated changes (based on "g" changes)' | |
890 | created new head |
|
903 | created new head | |
891 |
|
904 | |||
892 | (merge variant 1) |
|
905 | (merge variant 1) | |
893 |
|
906 | |||
894 | $ hg up 'desc("mFGm")' |
|
907 | $ hg up 'desc("mFGm")' | |
895 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
908 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |
896 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
909 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |
897 | $ hg merge 'desc("o-1")' |
|
910 | $ hg merge 'desc("o-1")' | |
898 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
911 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
899 | (branch merge, don't forget to commit) |
|
912 | (branch merge, don't forget to commit) | |
900 | $ hg ci -m "mFG,Om: $case_desc" |
|
913 | $ hg ci -m "mFG,Om: $case_desc" | |
901 |
|
914 | |||
902 | (merge variant 2) |
|
915 | (merge variant 2) | |
903 |
|
916 | |||
904 | $ hg up 'desc("o-1")' |
|
917 | $ hg up 'desc("o-1")' | |
905 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
918 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
906 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
919 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
907 | $ hg merge 'desc("FGm")' |
|
920 | $ hg merge 'desc("FGm")' | |
908 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
921 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
909 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
922 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
910 | (branch merge, don't forget to commit) |
|
923 | (branch merge, don't forget to commit) | |
911 | $ hg ci -m "mO,FGm: $case_desc" |
|
924 | $ hg ci -m "mO,FGm: $case_desc" | |
912 | created new head |
|
925 | created new head | |
913 |
|
926 | |||
914 | (merge variant 3) |
|
927 | (merge variant 3) | |
915 |
|
928 | |||
916 | $ hg up 'desc("mGFm")' |
|
929 | $ hg up 'desc("mGFm")' | |
917 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
930 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
918 | $ hg merge 'desc("n-1")' |
|
931 | $ hg merge 'desc("n-1")' | |
919 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
932 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
920 | (branch merge, don't forget to commit) |
|
933 | (branch merge, don't forget to commit) | |
921 | $ hg ci -m "mGF,Nm: $case_desc" |
|
934 | $ hg ci -m "mGF,Nm: $case_desc" | |
922 |
|
935 | |||
923 | (merge variant 4) |
|
936 | (merge variant 4) | |
924 |
|
937 | |||
925 | $ hg up 'desc("n-1")' |
|
938 | $ hg up 'desc("n-1")' | |
926 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
939 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
927 | $ hg merge 'desc("mGFm")' |
|
940 | $ hg merge 'desc("mGFm")' | |
928 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
941 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
929 | (branch merge, don't forget to commit) |
|
942 | (branch merge, don't forget to commit) | |
930 | $ hg ci -m "mN,GFm: $case_desc" |
|
943 | $ hg ci -m "mN,GFm: $case_desc" | |
931 | created new head |
|
944 | created new head | |
932 |
|
945 | |||
933 | $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))' |
|
946 | $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))' | |
934 | @ mN,GFm: chained merges (copy-overwrite -> simple) - same content |
|
947 | @ mN,GFm: chained merges (copy-overwrite -> simple) - same content | |
935 | |\ |
|
948 | |\ | |
936 | +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content |
|
949 | +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content | |
937 | | |/ |
|
950 | | |/ | |
938 | | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content |
|
951 | | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content | |
939 | | | |\ |
|
952 | | | |\ | |
940 | | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content |
|
953 | | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content | |
941 | | | | |/ |
|
954 | | | | |/ | |
942 | | | | o o-1: unrelated changes (based on "g" changes) |
|
955 | | | | o o-1: unrelated changes (based on "g" changes) | |
943 | | | | | |
|
956 | | | | | | |
944 | | o | | n-1: unrelated changes (based on the "f" series of changes) |
|
957 | | o | | n-1: unrelated changes (based on the "f" series of changes) | |
945 | | | | | |
|
958 | | | | | | |
946 | o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
959 | o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
947 | |/ / / |
|
960 | |/ / / | |
948 | | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
961 | | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
949 | |/|/ |
|
962 | |/|/ | |
950 | | o g-1: update d |
|
963 | | o g-1: update d | |
951 | | | |
|
964 | | | | |
952 | o | f-2: rename i -> d |
|
965 | o | f-2: rename i -> d | |
953 | | | |
|
966 | | | | |
954 | o | f-1: rename h -> i |
|
967 | o | f-1: rename h -> i | |
955 | |/ |
|
968 | |/ | |
956 | o i-2: c -move-> d |
|
969 | o i-2: c -move-> d | |
957 | | |
|
970 | | | |
958 | o i-1: a -move-> c |
|
971 | o i-1: a -move-> c | |
959 | | |
|
972 | | | |
960 | o i-0 initial commit: a b h |
|
973 | o i-0 initial commit: a b h | |
961 |
|
974 | |||
962 |
|
975 | |||
963 | Summary of all created cases |
|
976 | Summary of all created cases | |
964 | ---------------------------- |
|
977 | ---------------------------- | |
965 |
|
978 | |||
966 | $ hg up --quiet null |
|
979 | $ hg up --quiet null | |
967 |
|
980 | |||
968 | (This exists to help keeping a compact list of the various cases we have built) |
|
981 | (This exists to help keeping a compact list of the various cases we have built) | |
969 |
|
982 | |||
970 | $ hg log -T '{desc|firstline}\n'| sort |
|
983 | $ hg log -T '{desc|firstline}\n'| sort | |
971 | a-1: d -move-> e |
|
984 | a-1: d -move-> e | |
972 | a-2: e -move-> f |
|
985 | a-2: e -move-> f | |
973 | b-1: b update |
|
986 | b-1: b update | |
974 | c-1 delete d |
|
987 | c-1 delete d | |
975 | d-1 delete d |
|
988 | d-1 delete d | |
976 | d-2 re-add d |
|
989 | d-2 re-add d | |
977 | e-1 b -move-> g |
|
990 | e-1 b -move-> g | |
978 | e-2 g -move-> f |
|
991 | e-2 g -move-> f | |
979 | f-1: rename h -> i |
|
992 | f-1: rename h -> i | |
980 | f-2: rename i -> d |
|
993 | f-2: rename i -> d | |
981 | g-1: update d |
|
994 | g-1: update d | |
982 | h-1: b -(move)-> d |
|
995 | h-1: b -(move)-> d | |
983 | i-0 initial commit: a b h |
|
996 | i-0 initial commit: a b h | |
984 | i-1: a -move-> c |
|
997 | i-1: a -move-> c | |
985 | i-2: c -move-> d |
|
998 | i-2: c -move-> d | |
986 | j-1: unrelated changes (based on the "a" series of changes) |
|
999 | j-1: unrelated changes (based on the "a" series of changes) | |
987 | k-1: unrelated changes (based on "e" changes) |
|
1000 | k-1: unrelated changes (based on "e" changes) | |
988 | l-1: unrelated changes (based on "c" changes) |
|
1001 | l-1: unrelated changes (based on "c" changes) | |
989 | mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
1002 | mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | |
990 | mAE,Km: chained merges (conflict -> simple) - same content everywhere |
|
1003 | mAE,Km: chained merges (conflict -> simple) - same content everywhere | |
991 | 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 |
|
1004 | 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 | |
992 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
1005 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | |
993 | mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1006 | mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
994 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
1007 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
995 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
1008 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | |
996 | mBCm-1 re-add d |
|
1009 | mBCm-1 re-add d | |
997 | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
1010 | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | |
998 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1011 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
999 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1012 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1000 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1013 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
1001 | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
1014 | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | |
1002 | mCBm-1 re-add d |
|
1015 | mCBm-1 re-add d | |
1003 | mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
1016 | mCGm-0 merge updated/deleted - revive the file (updated content) - one way | |
1004 | 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 |
|
1017 | 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 | |
1005 | mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
1018 | mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | |
1006 | mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
1019 | mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
1007 | mEA,Jm: chained merges (conflict -> simple) - same content everywhere |
|
1020 | mEA,Jm: chained merges (conflict -> simple) - same content everywhere | |
1008 | 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 |
|
1021 | 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 | |
1009 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
1022 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
1010 | mFG,Om: chained merges (copy-overwrite -> simple) - same content |
|
1023 | mFG,Om: chained merges (copy-overwrite -> simple) - same content | |
1011 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
1024 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
1012 | mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
1025 | mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | |
1013 | mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
1026 | mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way | |
1014 | mGF,Nm: chained merges (copy-overwrite -> simple) - same content |
|
1027 | mGF,Nm: chained merges (copy-overwrite -> simple) - same content | |
1015 | mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
1028 | mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
1016 | 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 |
|
1029 | 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 | |
1017 | mJ,EAm: chained merges (conflict -> simple) - same content everywhere |
|
1030 | mJ,EAm: chained merges (conflict -> simple) - same content everywhere | |
1018 | mK,AEm: chained merges (conflict -> simple) - same content everywhere |
|
1031 | mK,AEm: chained merges (conflict -> simple) - same content everywhere | |
1019 | mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1032 | mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1020 | mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1033 | mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1021 | mN,GFm: chained merges (copy-overwrite -> simple) - same content |
|
1034 | mN,GFm: chained merges (copy-overwrite -> simple) - same content | |
1022 | mO,FGm: chained merges (copy-overwrite -> simple) - same content |
|
1035 | mO,FGm: chained merges (copy-overwrite -> simple) - same content | |
1023 | n-1: unrelated changes (based on the "f" series of changes) |
|
1036 | n-1: unrelated changes (based on the "f" series of changes) | |
1024 | o-1: unrelated changes (based on "g" changes) |
|
1037 | o-1: unrelated changes (based on "g" changes) | |
1025 |
|
1038 | |||
1026 |
|
1039 | |||
1027 | Test that sidedata computations during upgrades are correct |
|
1040 | Test that sidedata computations during upgrades are correct | |
1028 | =========================================================== |
|
1041 | =========================================================== | |
1029 |
|
1042 | |||
1030 | We upgrade a repository that is not using sidedata (the filelog case) and |
|
1043 | We upgrade a repository that is not using sidedata (the filelog case) and | |
1031 | check that the same side data have been generated as if they were computed at |
|
1044 | check that the same side data have been generated as if they were computed at | |
1032 | commit time. |
|
1045 | commit time. | |
1033 |
|
1046 | |||
1034 |
|
1047 | |||
1035 | #if upgraded |
|
1048 | #if upgraded | |
1036 | $ cat >> $HGRCPATH << EOF |
|
1049 | $ cat >> $HGRCPATH << EOF | |
1037 | > [format] |
|
1050 | > [format] | |
1038 | > exp-use-side-data = yes |
|
1051 | > exp-use-side-data = yes | |
1039 | > exp-use-copies-side-data-changeset = yes |
|
1052 | > exp-use-copies-side-data-changeset = yes | |
1040 | > EOF |
|
1053 | > EOF | |
1041 | $ hg debugformat -v |
|
1054 | $ hg debugformat -v | |
1042 | format-variant repo config default |
|
1055 | format-variant repo config default | |
1043 | fncache: yes yes yes |
|
1056 | fncache: yes yes yes | |
1044 | dotencode: yes yes yes |
|
1057 | dotencode: yes yes yes | |
1045 | generaldelta: yes yes yes |
|
1058 | generaldelta: yes yes yes | |
1046 | share-safe: no no no |
|
1059 | share-safe: no no no | |
1047 | sparserevlog: yes yes yes |
|
1060 | sparserevlog: yes yes yes | |
1048 | sidedata: no yes no |
|
1061 | sidedata: no yes no | |
1049 | persistent-nodemap: no no no |
|
1062 | persistent-nodemap: no no no | |
1050 | copies-sdc: no yes no |
|
1063 | copies-sdc: no yes no | |
1051 | plain-cl-delta: yes yes yes |
|
1064 | plain-cl-delta: yes yes yes | |
1052 | compression: * (glob) |
|
1065 | compression: * (glob) | |
1053 | compression-level: default default default |
|
1066 | compression-level: default default default | |
1054 | $ hg debugupgraderepo --run --quiet |
|
1067 | $ hg debugupgraderepo --run --quiet | |
1055 | upgrade will perform the following actions: |
|
1068 | upgrade will perform the following actions: | |
1056 |
|
1069 | |||
1057 | requirements |
|
1070 | requirements | |
1058 | preserved: * (glob) |
|
1071 | preserved: * (glob) | |
1059 | added: exp-copies-sidedata-changeset, exp-sidedata-flag |
|
1072 | added: exp-copies-sidedata-changeset, exp-sidedata-flag | |
1060 |
|
1073 | |||
1061 | processed revlogs: |
|
1074 | processed revlogs: | |
1062 | - all-filelogs |
|
1075 | - all-filelogs | |
1063 | - changelog |
|
1076 | - changelog | |
1064 | - manifest |
|
1077 | - manifest | |
1065 |
|
1078 | |||
1066 | #endif |
|
1079 | #endif | |
1067 |
|
1080 | |||
1068 |
|
1081 | |||
1069 | #if no-compatibility no-filelog no-changeset |
|
1082 | #if no-compatibility no-filelog no-changeset | |
1070 |
|
1083 | |||
1071 | $ hg debugchangedfiles --compute 0 |
|
1084 | $ hg debugchangedfiles --compute 0 | |
1072 | added : a, ; |
|
1085 | added : a, ; | |
1073 | added : b, ; |
|
1086 | added : b, ; | |
1074 | added : h, ; |
|
1087 | added : h, ; | |
1075 |
|
1088 | |||
1076 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do |
|
1089 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do | |
1077 | > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'` |
|
1090 | > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'` | |
1078 | > echo "##### revision \"$case_id\" #####" |
|
1091 | > echo "##### revision \"$case_id\" #####" | |
1079 | > hg debugsidedata -c -v -- $rev |
|
1092 | > hg debugsidedata -c -v -- $rev | |
1080 | > hg debugchangedfiles $rev |
|
1093 | > hg debugchangedfiles $rev | |
1081 | > done |
|
1094 | > done | |
1082 | ##### revision "i-0 initial commit" ##### |
|
1095 | ##### revision "i-0 initial commit" ##### | |
1083 | 1 sidedata entries |
|
1096 | 1 sidedata entries | |
1084 | entry-0014 size 34 |
|
1097 | entry-0014 size 34 | |
1085 | '\x00\x00\x00\x03\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\x00abh' |
|
1098 | '\x00\x00\x00\x03\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\x00abh' | |
1086 | added : a, ; |
|
1099 | added : a, ; | |
1087 | added : b, ; |
|
1100 | added : b, ; | |
1088 | added : h, ; |
|
1101 | added : h, ; | |
1089 | ##### revision "i-1" ##### |
|
1102 | ##### revision "i-1" ##### | |
1090 | 1 sidedata entries |
|
1103 | 1 sidedata entries | |
1091 | entry-0014 size 24 |
|
1104 | entry-0014 size 24 | |
1092 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ac' |
|
1105 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ac' | |
1093 | removed : a, ; |
|
1106 | removed : a, ; | |
1094 | added p1: c, a; |
|
1107 | added p1: c, a; | |
1095 | ##### revision "i-2" ##### |
|
1108 | ##### revision "i-2" ##### | |
1096 | 1 sidedata entries |
|
1109 | 1 sidedata entries | |
1097 | entry-0014 size 24 |
|
1110 | entry-0014 size 24 | |
1098 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00cd' |
|
1111 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00cd' | |
1099 | removed : c, ; |
|
1112 | removed : c, ; | |
1100 | added p1: d, c; |
|
1113 | added p1: d, c; | |
1101 | ##### revision "a-1" ##### |
|
1114 | ##### revision "a-1" ##### | |
1102 | 1 sidedata entries |
|
1115 | 1 sidedata entries | |
1103 | entry-0014 size 24 |
|
1116 | entry-0014 size 24 | |
1104 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' |
|
1117 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' | |
1105 | removed : d, ; |
|
1118 | removed : d, ; | |
1106 | added p1: e, d; |
|
1119 | added p1: e, d; | |
1107 | ##### revision "a-2" ##### |
|
1120 | ##### revision "a-2" ##### | |
1108 | 1 sidedata entries |
|
1121 | 1 sidedata entries | |
1109 | entry-0014 size 24 |
|
1122 | entry-0014 size 24 | |
1110 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef' |
|
1123 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef' | |
1111 | removed : e, ; |
|
1124 | removed : e, ; | |
1112 | added p1: f, e; |
|
1125 | added p1: f, e; | |
1113 | ##### revision "b-1" ##### |
|
1126 | ##### revision "b-1" ##### | |
1114 | 1 sidedata entries |
|
1127 | 1 sidedata entries | |
1115 | entry-0014 size 14 |
|
1128 | entry-0014 size 14 | |
1116 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b' |
|
1129 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b' | |
1117 | touched : b, ; |
|
1130 | touched : b, ; | |
1118 | ##### revision "c-1 delete d" ##### |
|
1131 | ##### revision "c-1 delete d" ##### | |
1119 | 1 sidedata entries |
|
1132 | 1 sidedata entries | |
1120 | entry-0014 size 14 |
|
1133 | entry-0014 size 14 | |
1121 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1134 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1122 | removed : d, ; |
|
1135 | removed : d, ; | |
1123 | ##### revision "d-1 delete d" ##### |
|
1136 | ##### revision "d-1 delete d" ##### | |
1124 | 1 sidedata entries |
|
1137 | 1 sidedata entries | |
1125 | entry-0014 size 14 |
|
1138 | entry-0014 size 14 | |
1126 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1139 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1127 | removed : d, ; |
|
1140 | removed : d, ; | |
1128 | ##### revision "d-2 re-add d" ##### |
|
1141 | ##### revision "d-2 re-add d" ##### | |
1129 | 1 sidedata entries |
|
1142 | 1 sidedata entries | |
1130 | entry-0014 size 14 |
|
1143 | entry-0014 size 14 | |
1131 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1144 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1132 | added : d, ; |
|
1145 | added : d, ; | |
1133 | ##### revision "e-1 b -move-> g" ##### |
|
1146 | ##### revision "e-1 b -move-> g" ##### | |
1134 | 1 sidedata entries |
|
1147 | 1 sidedata entries | |
1135 | entry-0014 size 24 |
|
1148 | entry-0014 size 24 | |
1136 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg' |
|
1149 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg' | |
1137 | removed : b, ; |
|
1150 | removed : b, ; | |
1138 | added p1: g, b; |
|
1151 | added p1: g, b; | |
1139 | ##### revision "e-2 g -move-> f" ##### |
|
1152 | ##### revision "e-2 g -move-> f" ##### | |
1140 | 1 sidedata entries |
|
1153 | 1 sidedata entries | |
1141 | entry-0014 size 24 |
|
1154 | entry-0014 size 24 | |
1142 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg' |
|
1155 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg' | |
1143 | added p1: f, g; |
|
1156 | added p1: f, g; | |
1144 | removed : g, ; |
|
1157 | removed : g, ; | |
1145 | ##### revision "mBAm-0 simple merge - A side" ##### |
|
1158 | ##### revision "mBAm-0 simple merge - A side" ##### | |
1146 | 1 sidedata entries |
|
1159 | 1 sidedata entries | |
1147 | entry-0014 size 4 |
|
1160 | entry-0014 size 4 | |
1148 | '\x00\x00\x00\x00' |
|
1161 | '\x00\x00\x00\x00' | |
1149 | ##### revision "mABm-0 simple merge - A side" ##### |
|
1162 | ##### revision "mABm-0 simple merge - A side" ##### | |
1150 | 1 sidedata entries |
|
1163 | 1 sidedata entries | |
1151 | entry-0014 size 4 |
|
1164 | entry-0014 size 4 | |
1152 | '\x00\x00\x00\x00' |
|
1165 | '\x00\x00\x00\x00' | |
1153 | ##### revision "mBCm-0 simple merge - C side" ##### |
|
1166 | ##### revision "mBCm-0 simple merge - C side" ##### | |
1154 | 1 sidedata entries |
|
1167 | 1 sidedata entries | |
1155 | entry-0014 size 4 |
|
1168 | entry-0014 size 4 | |
1156 | '\x00\x00\x00\x00' |
|
1169 | '\x00\x00\x00\x00' | |
1157 | ##### revision "mBCm-1 re-add d" ##### |
|
1170 | ##### revision "mBCm-1 re-add d" ##### | |
1158 | 1 sidedata entries |
|
1171 | 1 sidedata entries | |
1159 | entry-0014 size 14 |
|
1172 | entry-0014 size 14 | |
1160 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1173 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1161 | added : d, ; |
|
1174 | added : d, ; | |
1162 | ##### revision "mCBm-0 simple merge - C side" ##### |
|
1175 | ##### revision "mCBm-0 simple merge - C side" ##### | |
1163 | 1 sidedata entries |
|
1176 | 1 sidedata entries | |
1164 | entry-0014 size 4 |
|
1177 | entry-0014 size 4 | |
1165 | '\x00\x00\x00\x00' |
|
1178 | '\x00\x00\x00\x00' | |
1166 | ##### revision "mCBm-1 re-add d" ##### |
|
1179 | ##### revision "mCBm-1 re-add d" ##### | |
1167 | 1 sidedata entries |
|
1180 | 1 sidedata entries | |
1168 | entry-0014 size 14 |
|
1181 | entry-0014 size 14 | |
1169 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1182 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1170 | added : d, ; |
|
1183 | added : d, ; | |
1171 | ##### revision "mBDm-0 simple merge - B side" ##### |
|
1184 | ##### revision "mBDm-0 simple merge - B side" ##### | |
1172 | 1 sidedata entries |
|
1185 | 1 sidedata entries | |
1173 | entry-0014 size 4 |
|
1186 | entry-0014 size 4 | |
1174 | '\x00\x00\x00\x00' |
|
1187 | '\x00\x00\x00\x00' | |
1175 | ##### revision "mDBm-0 simple merge - B side" ##### |
|
1188 | ##### revision "mDBm-0 simple merge - B side" ##### | |
1176 | 1 sidedata entries |
|
1189 | 1 sidedata entries | |
1177 | entry-0014 size 4 |
|
1190 | entry-0014 size 4 | |
1178 | '\x00\x00\x00\x00' |
|
1191 | '\x00\x00\x00\x00' | |
1179 | ##### revision "mAEm-0 merge with copies info on both side - A side" ##### |
|
1192 | ##### revision "mAEm-0 merge with copies info on both side - A side" ##### | |
1180 | 1 sidedata entries |
|
1193 | 1 sidedata entries | |
1181 | entry-0014 size 14 |
|
1194 | entry-0014 size 14 | |
1182 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1195 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
1183 | merged : f, ; |
|
1196 | merged : f, ; | |
1184 | ##### revision "mEAm-0 merge with copies info on both side - A side" ##### |
|
1197 | ##### revision "mEAm-0 merge with copies info on both side - A side" ##### | |
1185 | 1 sidedata entries |
|
1198 | 1 sidedata entries | |
1186 | entry-0014 size 14 |
|
1199 | entry-0014 size 14 | |
1187 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1200 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
1188 | merged : f, ; |
|
1201 | merged : f, ; | |
1189 | ##### revision "f-1" ##### |
|
1202 | ##### revision "f-1" ##### | |
1190 | 1 sidedata entries |
|
1203 | 1 sidedata entries | |
1191 | entry-0014 size 24 |
|
1204 | entry-0014 size 24 | |
1192 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi' |
|
1205 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi' | |
1193 | removed : h, ; |
|
1206 | removed : h, ; | |
1194 | added p1: i, h; |
|
1207 | added p1: i, h; | |
1195 | ##### revision "f-2" ##### |
|
1208 | ##### revision "f-2" ##### | |
1196 | 1 sidedata entries |
|
1209 | 1 sidedata entries | |
1197 | entry-0014 size 24 |
|
1210 | entry-0014 size 24 | |
1198 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di' |
|
1211 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di' | |
1199 | touched p1: d, i; |
|
1212 | touched p1: d, i; | |
1200 | removed : i, ; |
|
1213 | removed : i, ; | |
1201 | ##### revision "mBFm-0 simple merge - B side" ##### |
|
1214 | ##### revision "mBFm-0 simple merge - B side" ##### | |
1202 | 1 sidedata entries |
|
1215 | 1 sidedata entries | |
1203 | entry-0014 size 4 |
|
1216 | entry-0014 size 4 | |
1204 | '\x00\x00\x00\x00' |
|
1217 | '\x00\x00\x00\x00' | |
1205 | ##### revision "mFBm-0 simple merge - B side" ##### |
|
1218 | ##### revision "mFBm-0 simple merge - B side" ##### | |
1206 | 1 sidedata entries |
|
1219 | 1 sidedata entries | |
1207 | entry-0014 size 4 |
|
1220 | entry-0014 size 4 | |
1208 | '\x00\x00\x00\x00' |
|
1221 | '\x00\x00\x00\x00' | |
1209 | ##### revision "g-1" ##### |
|
1222 | ##### revision "g-1" ##### | |
1210 | 1 sidedata entries |
|
1223 | 1 sidedata entries | |
1211 | entry-0014 size 14 |
|
1224 | entry-0014 size 14 | |
1212 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1225 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1213 | touched : d, ; |
|
1226 | touched : d, ; | |
1214 | ##### revision "mDGm-0 actual content merge, copies on one side - D side" ##### |
|
1227 | ##### revision "mDGm-0 actual content merge, copies on one side - D side" ##### | |
1215 | 1 sidedata entries |
|
1228 | 1 sidedata entries | |
1216 | entry-0014 size 14 |
|
1229 | entry-0014 size 14 | |
1217 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1230 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1218 | merged : d, ; |
|
1231 | merged : d, ; | |
1219 | ##### revision "mGDm-0 actual content merge, copies on one side - D side" ##### |
|
1232 | ##### revision "mGDm-0 actual content merge, copies on one side - D side" ##### | |
1220 | 1 sidedata entries |
|
1233 | 1 sidedata entries | |
1221 | entry-0014 size 14 |
|
1234 | entry-0014 size 14 | |
1222 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1235 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1223 | merged : d, ; |
|
1236 | merged : d, ; | |
1224 | ##### revision "mFGm-0 merge - G side" ##### |
|
1237 | ##### revision "mFGm-0 merge - G side" ##### | |
1225 | 1 sidedata entries |
|
1238 | 1 sidedata entries | |
1226 | entry-0014 size 14 |
|
1239 | entry-0014 size 14 | |
1227 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1240 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1228 | merged : d, ; |
|
1241 | merged : d, ; | |
1229 | ##### revision "mGFm-0 merge - G side" ##### |
|
1242 | ##### revision "mGFm-0 merge - G side" ##### | |
1230 | 1 sidedata entries |
|
1243 | 1 sidedata entries | |
1231 | entry-0014 size 14 |
|
1244 | entry-0014 size 14 | |
1232 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1245 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1233 | merged : d, ; |
|
1246 | merged : d, ; | |
1234 | ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" ##### |
|
1247 | ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" ##### | |
1235 | 1 sidedata entries |
|
1248 | 1 sidedata entries | |
1236 | entry-0014 size 14 |
|
1249 | entry-0014 size 14 | |
1237 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1250 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1238 | salvaged : d, ; |
|
1251 | salvaged : d, ; | |
1239 | ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" ##### |
|
1252 | ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" ##### | |
1240 | 1 sidedata entries |
|
1253 | 1 sidedata entries | |
1241 | entry-0014 size 14 |
|
1254 | entry-0014 size 14 | |
1242 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1255 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1243 | salvaged : d, ; |
|
1256 | salvaged : d, ; | |
1244 | ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" ##### |
|
1257 | ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" ##### | |
1245 | 1 sidedata entries |
|
1258 | 1 sidedata entries | |
1246 | entry-0014 size 14 |
|
1259 | entry-0014 size 14 | |
1247 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1260 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1248 | salvaged : d, ; |
|
1261 | salvaged : d, ; | |
1249 | ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" ##### |
|
1262 | ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" ##### | |
1250 | 1 sidedata entries |
|
1263 | 1 sidedata entries | |
1251 | entry-0014 size 14 |
|
1264 | entry-0014 size 14 | |
1252 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1265 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1253 | salvaged : d, ; |
|
1266 | salvaged : d, ; | |
1254 | ##### revision "h-1" ##### |
|
1267 | ##### revision "h-1" ##### | |
1255 | 1 sidedata entries |
|
1268 | 1 sidedata entries | |
1256 | entry-0014 size 24 |
|
1269 | entry-0014 size 24 | |
1257 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd' |
|
1270 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd' | |
1258 | removed : b, ; |
|
1271 | removed : b, ; | |
1259 | added p1: d, b; |
|
1272 | added p1: d, b; | |
1260 | ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" ##### |
|
1273 | ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" ##### | |
1261 | 1 sidedata entries |
|
1274 | 1 sidedata entries | |
1262 | entry-0014 size 4 |
|
1275 | entry-0014 size 4 | |
1263 | '\x00\x00\x00\x00' |
|
1276 | '\x00\x00\x00\x00' | |
1264 | ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" ##### |
|
1277 | ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" ##### | |
1265 | 1 sidedata entries |
|
1278 | 1 sidedata entries | |
1266 | entry-0014 size 4 |
|
1279 | entry-0014 size 4 | |
1267 | '\x00\x00\x00\x00' |
|
1280 | '\x00\x00\x00\x00' | |
1268 | ##### revision "j-1" ##### |
|
1281 | ##### revision "j-1" ##### | |
1269 | 1 sidedata entries |
|
1282 | 1 sidedata entries | |
1270 | entry-0014 size 24 |
|
1283 | entry-0014 size 24 | |
1271 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' |
|
1284 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' | |
1272 | added : unrelated-j, ; |
|
1285 | added : unrelated-j, ; | |
1273 | ##### revision "k-1" ##### |
|
1286 | ##### revision "k-1" ##### | |
1274 | 1 sidedata entries |
|
1287 | 1 sidedata entries | |
1275 | entry-0014 size 24 |
|
1288 | entry-0014 size 24 | |
1276 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k' |
|
1289 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k' | |
1277 | added : unrelated-k, ; |
|
1290 | added : unrelated-k, ; | |
1278 | ##### revision "mAE,Km" ##### |
|
1291 | ##### revision "mAE,Km" ##### | |
1279 | 1 sidedata entries |
|
1292 | 1 sidedata entries | |
1280 | entry-0014 size 4 |
|
1293 | entry-0014 size 4 | |
1281 | '\x00\x00\x00\x00' |
|
1294 | '\x00\x00\x00\x00' | |
1282 | ##### revision "mK,AEm" ##### |
|
1295 | ##### revision "mK,AEm" ##### | |
1283 | 1 sidedata entries |
|
1296 | 1 sidedata entries | |
1284 | entry-0014 size 4 |
|
1297 | entry-0014 size 4 | |
1285 | '\x00\x00\x00\x00' |
|
1298 | '\x00\x00\x00\x00' | |
1286 | ##### revision "mEA,Jm" ##### |
|
1299 | ##### revision "mEA,Jm" ##### | |
1287 | 1 sidedata entries |
|
1300 | 1 sidedata entries | |
1288 | entry-0014 size 4 |
|
1301 | entry-0014 size 4 | |
1289 | '\x00\x00\x00\x00' |
|
1302 | '\x00\x00\x00\x00' | |
1290 | ##### revision "mJ,EAm" ##### |
|
1303 | ##### revision "mJ,EAm" ##### | |
1291 | 1 sidedata entries |
|
1304 | 1 sidedata entries | |
1292 | entry-0014 size 4 |
|
1305 | entry-0014 size 4 | |
1293 | '\x00\x00\x00\x00' |
|
1306 | '\x00\x00\x00\x00' | |
1294 | ##### revision "l-1" ##### |
|
1307 | ##### revision "l-1" ##### | |
1295 | 1 sidedata entries |
|
1308 | 1 sidedata entries | |
1296 | entry-0014 size 24 |
|
1309 | entry-0014 size 24 | |
1297 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l' |
|
1310 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l' | |
1298 | added : unrelated-l, ; |
|
1311 | added : unrelated-l, ; | |
1299 | ##### revision "mBC+revert,Lm" ##### |
|
1312 | ##### revision "mBC+revert,Lm" ##### | |
1300 | 1 sidedata entries |
|
1313 | 1 sidedata entries | |
1301 | entry-0014 size 4 |
|
1314 | entry-0014 size 4 | |
1302 | '\x00\x00\x00\x00' |
|
1315 | '\x00\x00\x00\x00' | |
1303 | ##### revision "mCB+revert,Lm" ##### |
|
1316 | ##### revision "mCB+revert,Lm" ##### | |
1304 | 1 sidedata entries |
|
1317 | 1 sidedata entries | |
1305 | entry-0014 size 4 |
|
1318 | entry-0014 size 4 | |
1306 | '\x00\x00\x00\x00' |
|
1319 | '\x00\x00\x00\x00' | |
1307 | ##### revision "mL,BC+revertm" ##### |
|
1320 | ##### revision "mL,BC+revertm" ##### | |
1308 | 1 sidedata entries |
|
1321 | 1 sidedata entries | |
1309 | entry-0014 size 4 |
|
1322 | entry-0014 size 4 | |
1310 | '\x00\x00\x00\x00' |
|
1323 | '\x00\x00\x00\x00' | |
1311 | ##### revision "mL,CB+revertm" ##### |
|
1324 | ##### revision "mL,CB+revertm" ##### | |
1312 | 1 sidedata entries |
|
1325 | 1 sidedata entries | |
1313 | entry-0014 size 4 |
|
1326 | entry-0014 size 4 | |
1314 | '\x00\x00\x00\x00' |
|
1327 | '\x00\x00\x00\x00' | |
1315 | ##### revision "n-1" ##### |
|
1328 | ##### revision "n-1" ##### | |
1316 | 1 sidedata entries |
|
1329 | 1 sidedata entries | |
1317 | entry-0014 size 24 |
|
1330 | entry-0014 size 24 | |
1318 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n' |
|
1331 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n' | |
1319 | added : unrelated-n, ; |
|
1332 | added : unrelated-n, ; | |
1320 | ##### revision "o-1" ##### |
|
1333 | ##### revision "o-1" ##### | |
1321 | 1 sidedata entries |
|
1334 | 1 sidedata entries | |
1322 | entry-0014 size 24 |
|
1335 | entry-0014 size 24 | |
1323 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o' |
|
1336 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o' | |
1324 | added : unrelated-o, ; |
|
1337 | added : unrelated-o, ; | |
1325 | ##### revision "mFG,Om" ##### |
|
1338 | ##### revision "mFG,Om" ##### | |
1326 | 1 sidedata entries |
|
1339 | 1 sidedata entries | |
1327 | entry-0014 size 4 |
|
1340 | entry-0014 size 4 | |
1328 | '\x00\x00\x00\x00' |
|
1341 | '\x00\x00\x00\x00' | |
1329 | ##### revision "mO,FGm" ##### |
|
1342 | ##### revision "mO,FGm" ##### | |
1330 | 1 sidedata entries |
|
1343 | 1 sidedata entries | |
1331 | entry-0014 size 4 |
|
1344 | entry-0014 size 4 | |
1332 | '\x00\x00\x00\x00' |
|
1345 | '\x00\x00\x00\x00' | |
1333 | ##### revision "mGF,Nm" ##### |
|
1346 | ##### revision "mGF,Nm" ##### | |
1334 | 1 sidedata entries |
|
1347 | 1 sidedata entries | |
1335 | entry-0014 size 4 |
|
1348 | entry-0014 size 4 | |
1336 | '\x00\x00\x00\x00' |
|
1349 | '\x00\x00\x00\x00' | |
1337 | ##### revision "mN,GFm" ##### |
|
1350 | ##### revision "mN,GFm" ##### | |
1338 | 1 sidedata entries |
|
1351 | 1 sidedata entries | |
1339 | entry-0014 size 4 |
|
1352 | entry-0014 size 4 | |
1340 | '\x00\x00\x00\x00' |
|
1353 | '\x00\x00\x00\x00' | |
1341 |
|
1354 | |||
1342 | #endif |
|
1355 | #endif | |
1343 |
|
1356 | |||
1344 |
|
1357 | |||
1345 | Test copy information chaining |
|
1358 | Test copy information chaining | |
1346 | ============================== |
|
1359 | ============================== | |
1347 |
|
1360 | |||
1348 | Check that matching only affect the destination and not intermediate path |
|
1361 | Check that matching only affect the destination and not intermediate path | |
1349 | ------------------------------------------------------------------------- |
|
1362 | ------------------------------------------------------------------------- | |
1350 |
|
1363 | |||
1351 | The two status call should give the same value for f |
|
1364 | The two status call should give the same value for f | |
1352 |
|
1365 | |||
1353 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' |
|
1366 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' | |
1354 | A f |
|
1367 | A f | |
1355 | a |
|
1368 | a | |
1356 | R a |
|
1369 | R a | |
1357 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f |
|
1370 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f | |
1358 | A f |
|
1371 | A f | |
1359 | a (no-changeset no-compatibility !) |
|
1372 | a (no-changeset no-compatibility !) | |
1360 |
|
1373 | |||
1361 | merging with unrelated change does not interfere with the renames |
|
1374 | merging with unrelated change does not interfere with the renames | |
1362 | --------------------------------------------------------------- |
|
1375 | --------------------------------------------------------------- | |
1363 |
|
1376 | |||
1364 | - rename on one side |
|
1377 | - rename on one side | |
1365 | - unrelated change on the other side |
|
1378 | - unrelated change on the other side | |
1366 |
|
1379 | |||
1367 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
1380 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | |
1368 | o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
1381 | o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | |
1369 | |\ |
|
1382 | |\ | |
1370 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
1383 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | |
1371 | | |/ |
|
1384 | | |/ | |
1372 | | o b-1: b update |
|
1385 | | o b-1: b update | |
1373 | | | |
|
1386 | | | | |
1374 | o | a-2: e -move-> f |
|
1387 | o | a-2: e -move-> f | |
1375 | | | |
|
1388 | | | | |
1376 | o | a-1: d -move-> e |
|
1389 | o | a-1: d -move-> e | |
1377 | |/ |
|
1390 | |/ | |
1378 | o i-2: c -move-> d |
|
1391 | o i-2: c -move-> d | |
1379 | | |
|
1392 | | | |
1380 | o i-1: a -move-> c |
|
1393 | o i-1: a -move-> c | |
1381 | | |
|
1394 | | | |
1382 | o i-0 initial commit: a b h |
|
1395 | o i-0 initial commit: a b h | |
1383 |
|
1396 | |||
1384 |
|
1397 | |||
1385 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' |
|
1398 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' | |
1386 | A f |
|
1399 | A f | |
1387 | d |
|
1400 | d | |
1388 | R d |
|
1401 | R d | |
1389 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' |
|
1402 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' | |
1390 | A f |
|
1403 | A f | |
1391 | d |
|
1404 | d | |
1392 | R d |
|
1405 | R d | |
1393 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' |
|
1406 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' | |
1394 | M b |
|
1407 | M b | |
1395 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' |
|
1408 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' | |
1396 | M b |
|
1409 | M b | |
1397 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' |
|
1410 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' | |
1398 | M b |
|
1411 | M b | |
1399 | A f |
|
1412 | A f | |
1400 | d |
|
1413 | d | |
1401 | R d |
|
1414 | R d | |
1402 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' |
|
1415 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' | |
1403 | M b |
|
1416 | M b | |
1404 | A f |
|
1417 | A f | |
1405 | d |
|
1418 | d | |
1406 | R d |
|
1419 | R d | |
1407 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' |
|
1420 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' | |
1408 | M b |
|
1421 | M b | |
1409 | A f |
|
1422 | A f | |
1410 | a |
|
1423 | a | |
1411 | R a |
|
1424 | R a | |
1412 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' |
|
1425 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' | |
1413 | M b |
|
1426 | M b | |
1414 | A f |
|
1427 | A f | |
1415 | a |
|
1428 | a | |
1416 | R a |
|
1429 | R a | |
1417 |
|
1430 | |||
1418 | merging with the side having a delete |
|
1431 | merging with the side having a delete | |
1419 | ------------------------------------- |
|
1432 | ------------------------------------- | |
1420 |
|
1433 | |||
1421 | case summary: |
|
1434 | case summary: | |
1422 | - one with change to an unrelated file |
|
1435 | - one with change to an unrelated file | |
1423 | - one deleting the change |
|
1436 | - one deleting the change | |
1424 | and recreate an unrelated file after the merge |
|
1437 | and recreate an unrelated file after the merge | |
1425 |
|
1438 | |||
1426 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
1439 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | |
1427 | o mCBm-1 re-add d |
|
1440 | o mCBm-1 re-add d | |
1428 | | |
|
1441 | | | |
1429 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
1442 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | |
1430 | |\ |
|
1443 | |\ | |
1431 | | | o mBCm-1 re-add d |
|
1444 | | | o mBCm-1 re-add d | |
1432 | | | | |
|
1445 | | | | | |
1433 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
1446 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | |
1434 | | |/ |
|
1447 | | |/ | |
1435 | | o c-1 delete d |
|
1448 | | o c-1 delete d | |
1436 | | | |
|
1449 | | | | |
1437 | o | b-1: b update |
|
1450 | o | b-1: b update | |
1438 | |/ |
|
1451 | |/ | |
1439 | o i-2: c -move-> d |
|
1452 | o i-2: c -move-> d | |
1440 | | |
|
1453 | | | |
1441 | o i-1: a -move-> c |
|
1454 | o i-1: a -move-> c | |
1442 | | |
|
1455 | | | |
1443 | o i-0 initial commit: a b h |
|
1456 | o i-0 initial commit: a b h | |
1444 |
|
1457 | |||
1445 | - comparing from the merge |
|
1458 | - comparing from the merge | |
1446 |
|
1459 | |||
1447 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' |
|
1460 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' | |
1448 | R d |
|
1461 | R d | |
1449 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' |
|
1462 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' | |
1450 | R d |
|
1463 | R d | |
1451 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' |
|
1464 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' | |
1452 | M b |
|
1465 | M b | |
1453 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' |
|
1466 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' | |
1454 | M b |
|
1467 | M b | |
1455 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' |
|
1468 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' | |
1456 | M b |
|
1469 | M b | |
1457 | R d |
|
1470 | R d | |
1458 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' |
|
1471 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' | |
1459 | M b |
|
1472 | M b | |
1460 | R d |
|
1473 | R d | |
1461 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' |
|
1474 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' | |
1462 | M b |
|
1475 | M b | |
1463 | R a |
|
1476 | R a | |
1464 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' |
|
1477 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' | |
1465 | M b |
|
1478 | M b | |
1466 | R a |
|
1479 | R a | |
1467 |
|
1480 | |||
1468 | - comparing with the merge children re-adding the file |
|
1481 | - comparing with the merge children re-adding the file | |
1469 |
|
1482 | |||
1470 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' |
|
1483 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' | |
1471 | M d |
|
1484 | M d | |
1472 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' |
|
1485 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' | |
1473 | M d |
|
1486 | M d | |
1474 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' |
|
1487 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' | |
1475 | M b |
|
1488 | M b | |
1476 | A d |
|
1489 | A d | |
1477 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' |
|
1490 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' | |
1478 | M b |
|
1491 | M b | |
1479 | A d |
|
1492 | A d | |
1480 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' |
|
1493 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' | |
1481 | M b |
|
1494 | M b | |
1482 | M d |
|
1495 | M d | |
1483 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' |
|
1496 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' | |
1484 | M b |
|
1497 | M b | |
1485 | M d |
|
1498 | M d | |
1486 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' |
|
1499 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' | |
1487 | M b |
|
1500 | M b | |
1488 | A d |
|
1501 | A d | |
1489 | R a |
|
1502 | R a | |
1490 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' |
|
1503 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' | |
1491 | M b |
|
1504 | M b | |
1492 | A d |
|
1505 | A d | |
1493 | R a |
|
1506 | R a | |
1494 |
|
1507 | |||
1495 | Comparing with a merge re-adding the file afterward |
|
1508 | Comparing with a merge re-adding the file afterward | |
1496 | --------------------------------------------------- |
|
1509 | --------------------------------------------------- | |
1497 |
|
1510 | |||
1498 | Merge: |
|
1511 | Merge: | |
1499 | - one with change to an unrelated file |
|
1512 | - one with change to an unrelated file | |
1500 | - one deleting and recreating the change |
|
1513 | - one deleting and recreating the change | |
1501 |
|
1514 | |||
1502 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
1515 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
1503 | o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
1516 | o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | |
1504 | |\ |
|
1517 | |\ | |
1505 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
1518 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | |
1506 | | |/ |
|
1519 | | |/ | |
1507 | | o d-2 re-add d |
|
1520 | | o d-2 re-add d | |
1508 | | | |
|
1521 | | | | |
1509 | | o d-1 delete d |
|
1522 | | o d-1 delete d | |
1510 | | | |
|
1523 | | | | |
1511 | o | b-1: b update |
|
1524 | o | b-1: b update | |
1512 | |/ |
|
1525 | |/ | |
1513 | o i-2: c -move-> d |
|
1526 | o i-2: c -move-> d | |
1514 | | |
|
1527 | | | |
1515 | o i-1: a -move-> c |
|
1528 | o i-1: a -move-> c | |
1516 | | |
|
1529 | | | |
1517 | o i-0 initial commit: a b h |
|
1530 | o i-0 initial commit: a b h | |
1518 |
|
1531 | |||
1519 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' |
|
1532 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' | |
1520 | M d |
|
1533 | M d | |
1521 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' |
|
1534 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' | |
1522 | M d |
|
1535 | M d | |
1523 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' |
|
1536 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' | |
1524 | M b |
|
1537 | M b | |
1525 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' |
|
1538 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' | |
1526 | M b |
|
1539 | M b | |
1527 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' |
|
1540 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' | |
1528 | M b |
|
1541 | M b | |
1529 | M d |
|
1542 | M d | |
1530 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' |
|
1543 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' | |
1531 | M b |
|
1544 | M b | |
1532 | M d |
|
1545 | M d | |
1533 |
|
1546 | |||
1534 | The bugs makes recorded copy is different depending of where we started the merge from since |
|
1547 | The bugs makes recorded copy is different depending of where we started the merge from since | |
1535 |
|
1548 | |||
1536 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' |
|
1549 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' | |
1537 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
1550 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
1538 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' |
|
1551 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' | |
1539 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
1552 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
1540 |
|
1553 | |||
1541 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' |
|
1554 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' | |
1542 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
1555 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
1543 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' |
|
1556 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' | |
1544 | d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !) |
|
1557 | d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !) | |
1545 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) |
|
1558 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) | |
1546 | $ hg debugindex d | head -n 4 |
|
1559 | $ hg debugindex d | head -n 4 | ../no-linkrev | |
1547 | rev linkrev nodeid p1 p2 |
|
1560 | rev linkrev nodeid p1 p2 | |
1548 |
0 |
|
1561 | 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) | |
1549 |
0 |
|
1562 | 0 * ae258f702dfe 000000000000 000000000000 (changeset !) | |
1550 |
1 |
|
1563 | 1 * b004912a8510 000000000000 000000000000 | |
1551 |
2 |
|
1564 | 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) | |
1552 |
2 |
|
1565 | 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !) | |
1553 |
|
1566 | |||
1554 | Log output should not include a merge commit as it did not happen |
|
1567 | Log output should not include a merge commit as it did not happen | |
1555 |
|
1568 | |||
1556 | $ hg log -Gfr 'desc("mBDm-0")' d |
|
1569 | $ hg log -Gfr 'desc("mBDm-0")' d | |
1557 | o d-2 re-add d |
|
1570 | o d-2 re-add d | |
1558 | | |
|
1571 | | | |
1559 | ~ |
|
1572 | ~ | |
1560 |
|
1573 | |||
1561 | $ hg log -Gfr 'desc("mDBm-0")' d |
|
1574 | $ hg log -Gfr 'desc("mDBm-0")' d | |
1562 | o d-2 re-add d |
|
1575 | o d-2 re-add d | |
1563 | | |
|
1576 | | | |
1564 | ~ |
|
1577 | ~ | |
1565 |
|
1578 | |||
1566 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' |
|
1579 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' | |
1567 | M b |
|
1580 | M b | |
1568 | A d |
|
1581 | A d | |
1569 | R a |
|
1582 | R a | |
1570 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' |
|
1583 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' | |
1571 | M b |
|
1584 | M b | |
1572 | A d |
|
1585 | A d | |
1573 | R a |
|
1586 | R a | |
1574 |
|
1587 | |||
1575 |
|
1588 | |||
1576 | Comparing with a merge with colliding rename |
|
1589 | Comparing with a merge with colliding rename | |
1577 | -------------------------------------------- |
|
1590 | -------------------------------------------- | |
1578 |
|
1591 | |||
1579 | Subcase: new copy information on both side |
|
1592 | Subcase: new copy information on both side | |
1580 | `````````````````````````````````````````` |
|
1593 | `````````````````````````````````````````` | |
1581 |
|
1594 | |||
1582 | - the "e-" branch renaming b to f (through 'g') |
|
1595 | - the "e-" branch renaming b to f (through 'g') | |
1583 | - the "a-" branch renaming d to f (through e) |
|
1596 | - the "a-" branch renaming d to f (through e) | |
1584 |
|
1597 | |||
1585 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
1598 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
1586 | 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 |
|
1599 | 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 | |
1587 | |\ |
|
1600 | |\ | |
1588 | +---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 |
|
1601 | +---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 | |
1589 | | |/ |
|
1602 | | |/ | |
1590 | | o e-2 g -move-> f |
|
1603 | | o e-2 g -move-> f | |
1591 | | | |
|
1604 | | | | |
1592 | | o e-1 b -move-> g |
|
1605 | | o e-1 b -move-> g | |
1593 | | | |
|
1606 | | | | |
1594 | o | a-2: e -move-> f |
|
1607 | o | a-2: e -move-> f | |
1595 | | | |
|
1608 | | | | |
1596 | o | a-1: d -move-> e |
|
1609 | o | a-1: d -move-> e | |
1597 | |/ |
|
1610 | |/ | |
1598 | o i-2: c -move-> d |
|
1611 | o i-2: c -move-> d | |
1599 | | |
|
1612 | | | |
1600 | o i-1: a -move-> c |
|
1613 | o i-1: a -move-> c | |
1601 | | |
|
1614 | | | |
1602 | o i-0 initial commit: a b h |
|
1615 | o i-0 initial commit: a b h | |
1603 |
|
1616 | |||
1604 | #if no-changeset |
|
1617 | #if no-changeset | |
1605 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
1618 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |
1606 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f |
|
1619 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f | |
1607 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
1620 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |
1608 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f |
|
1621 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f | |
1609 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
1622 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
1610 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f |
|
1623 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f | |
1611 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
1624 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
1612 | e8825b386367b29fec957283a80bb47b47483fe1 644 f |
|
1625 | e8825b386367b29fec957283a80bb47b47483fe1 644 f | |
1613 | $ hg debugindex f |
|
1626 | $ hg debugindex f | ../no-linkrev | |
1614 | rev linkrev nodeid p1 p2 |
|
1627 | rev linkrev nodeid p1 p2 | |
1615 |
0 |
|
1628 | 0 * b76eb76580df 000000000000 000000000000 | |
1616 |
1 |
|
1629 | 1 * e8825b386367 000000000000 000000000000 | |
1617 |
2 |
|
1630 | 2 * 2ff93c643948 b76eb76580df e8825b386367 | |
1618 | #else |
|
1631 | #else | |
1619 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
1632 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |
1620 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
1633 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
1621 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
1634 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |
1622 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
1635 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
1623 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
1636 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
1624 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
1637 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
1625 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
1638 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
1626 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
1639 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
1627 | $ hg debugindex f |
|
1640 | $ hg debugindex f | ../no-linkrev | |
1628 | rev linkrev nodeid p1 p2 |
|
1641 | rev linkrev nodeid p1 p2 | |
1629 |
0 |
|
1642 | 0 * ae258f702dfe 000000000000 000000000000 | |
1630 | #endif |
|
1643 | #endif | |
1631 |
|
1644 | |||
1632 | # Here the filelog based implementation is not looking at the rename |
|
1645 | # Here the filelog based implementation is not looking at the rename | |
1633 | # information (because the file exist on both side). However the changelog |
|
1646 | # information (because the file exist on both side). However the changelog | |
1634 | # based on works fine. We have different output. |
|
1647 | # based on works fine. We have different output. | |
1635 |
|
1648 | |||
1636 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' |
|
1649 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' | |
1637 | M f (no-changeset !) |
|
1650 | M f (no-changeset !) | |
1638 | b (no-filelog no-changeset !) |
|
1651 | b (no-filelog no-changeset !) | |
1639 | R b |
|
1652 | R b | |
1640 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' |
|
1653 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' | |
1641 | M f (no-changeset !) |
|
1654 | M f (no-changeset !) | |
1642 | b (no-filelog no-changeset !) |
|
1655 | b (no-filelog no-changeset !) | |
1643 | R b |
|
1656 | R b | |
1644 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' |
|
1657 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' | |
1645 | M f (no-changeset !) |
|
1658 | M f (no-changeset !) | |
1646 | d (no-filelog no-changeset !) |
|
1659 | d (no-filelog no-changeset !) | |
1647 | R d |
|
1660 | R d | |
1648 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' |
|
1661 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' | |
1649 | M f (no-changeset !) |
|
1662 | M f (no-changeset !) | |
1650 | d (no-filelog no-changeset !) |
|
1663 | d (no-filelog no-changeset !) | |
1651 | R d |
|
1664 | R d | |
1652 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
|
1665 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' | |
1653 | A f |
|
1666 | A f | |
1654 | d |
|
1667 | d | |
1655 | R d |
|
1668 | R d | |
1656 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
|
1669 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' | |
1657 | A f |
|
1670 | A f | |
1658 | b |
|
1671 | b | |
1659 | R b |
|
1672 | R b | |
1660 |
|
1673 | |||
1661 | # From here, we run status against revision where both source file exists. |
|
1674 | # From here, we run status against revision where both source file exists. | |
1662 | # |
|
1675 | # | |
1663 | # The filelog based implementation picks an arbitrary side based on revision |
|
1676 | # The filelog based implementation picks an arbitrary side based on revision | |
1664 | # numbers. So the same side "wins" whatever the parents order is. This is |
|
1677 | # numbers. So the same side "wins" whatever the parents order is. This is | |
1665 | # sub-optimal because depending on revision numbers means the result can be |
|
1678 | # sub-optimal because depending on revision numbers means the result can be | |
1666 | # different from one repository to the next. |
|
1679 | # different from one repository to the next. | |
1667 | # |
|
1680 | # | |
1668 | # The changeset based algorithm use the parent order to break tie on conflicting |
|
1681 | # The changeset based algorithm use the parent order to break tie on conflicting | |
1669 | # information and will have a different order depending on who is p1 and p2. |
|
1682 | # information and will have a different order depending on who is p1 and p2. | |
1670 | # That order is stable accross repositories. (data from p1 prevails) |
|
1683 | # That order is stable accross repositories. (data from p1 prevails) | |
1671 |
|
1684 | |||
1672 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' |
|
1685 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' | |
1673 | A f |
|
1686 | A f | |
1674 | d |
|
1687 | d | |
1675 | R b |
|
1688 | R b | |
1676 | R d |
|
1689 | R d | |
1677 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' |
|
1690 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' | |
1678 | A f |
|
1691 | A f | |
1679 | d (filelog !) |
|
1692 | d (filelog !) | |
1680 | b (no-filelog !) |
|
1693 | b (no-filelog !) | |
1681 | R b |
|
1694 | R b | |
1682 | R d |
|
1695 | R d | |
1683 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' |
|
1696 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' | |
1684 | A f |
|
1697 | A f | |
1685 | a |
|
1698 | a | |
1686 | R a |
|
1699 | R a | |
1687 | R b |
|
1700 | R b | |
1688 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' |
|
1701 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' | |
1689 | A f |
|
1702 | A f | |
1690 | a (filelog !) |
|
1703 | a (filelog !) | |
1691 | b (no-filelog !) |
|
1704 | b (no-filelog !) | |
1692 | R a |
|
1705 | R a | |
1693 | R b |
|
1706 | R b | |
1694 |
|
1707 | |||
1695 |
|
1708 | |||
1696 | Subcase: existing copy information overwritten on one branch |
|
1709 | Subcase: existing copy information overwritten on one branch | |
1697 | ```````````````````````````````````````````````````````````` |
|
1710 | ```````````````````````````````````````````````````````````` | |
1698 |
|
1711 | |||
1699 | Note: |
|
1712 | Note: | |
1700 | | In this case, one of the merge wrongly record a merge while there is none. |
|
1713 | | In this case, one of the merge wrongly record a merge while there is none. | |
1701 | | This lead to bad copy tracing information to be dug up. |
|
1714 | | This lead to bad copy tracing information to be dug up. | |
1702 |
|
1715 | |||
1703 |
|
1716 | |||
1704 | Merge: |
|
1717 | Merge: | |
1705 | - one with change to an unrelated file (b) |
|
1718 | - one with change to an unrelated file (b) | |
1706 | - one overwriting a file (d) with a rename (from h to i to d) |
|
1719 | - one overwriting a file (d) with a rename (from h to i to d) | |
1707 |
|
1720 | |||
1708 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
1721 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |
1709 | o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
1722 | o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
1710 | |\ |
|
1723 | |\ | |
1711 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1724 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
1712 | | |/ |
|
1725 | | |/ | |
1713 | | o f-2: rename i -> d |
|
1726 | | o f-2: rename i -> d | |
1714 | | | |
|
1727 | | | | |
1715 | | o f-1: rename h -> i |
|
1728 | | o f-1: rename h -> i | |
1716 | | | |
|
1729 | | | | |
1717 | o | b-1: b update |
|
1730 | o | b-1: b update | |
1718 | |/ |
|
1731 | |/ | |
1719 | o i-2: c -move-> d |
|
1732 | o i-2: c -move-> d | |
1720 | | |
|
1733 | | | |
1721 | o i-1: a -move-> c |
|
1734 | o i-1: a -move-> c | |
1722 | | |
|
1735 | | | |
1723 | o i-0 initial commit: a b h |
|
1736 | o i-0 initial commit: a b h | |
1724 |
|
1737 | |||
1725 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' |
|
1738 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' | |
1726 | M b |
|
1739 | M b | |
1727 | A d |
|
1740 | A d | |
1728 | h |
|
1741 | h | |
1729 | R a |
|
1742 | R a | |
1730 | R h |
|
1743 | R h | |
1731 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' |
|
1744 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' | |
1732 | M b |
|
1745 | M b | |
1733 | A d |
|
1746 | A d | |
1734 | h |
|
1747 | h | |
1735 | R a |
|
1748 | R a | |
1736 | R h |
|
1749 | R h | |
1737 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' |
|
1750 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' | |
1738 | M d (no-changeset !) |
|
1751 | M d (no-changeset !) | |
1739 | h (no-filelog no-changeset !) |
|
1752 | h (no-filelog no-changeset !) | |
1740 | R h |
|
1753 | R h | |
1741 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' |
|
1754 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' | |
1742 | M b |
|
1755 | M b | |
1743 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' |
|
1756 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' | |
1744 | M b |
|
1757 | M b | |
1745 | M d (no-changeset !) |
|
1758 | M d (no-changeset !) | |
1746 | i (no-filelog no-changeset !) |
|
1759 | i (no-filelog no-changeset !) | |
1747 | R i |
|
1760 | R i | |
1748 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' |
|
1761 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' | |
1749 | M d (no-changeset !) |
|
1762 | M d (no-changeset !) | |
1750 | h (no-filelog no-changeset !) |
|
1763 | h (no-filelog no-changeset !) | |
1751 | R h |
|
1764 | R h | |
1752 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' |
|
1765 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' | |
1753 | M b |
|
1766 | M b | |
1754 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' |
|
1767 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' | |
1755 | M b |
|
1768 | M b | |
1756 | M d (no-changeset !) |
|
1769 | M d (no-changeset !) | |
1757 | i (no-filelog no-changeset !) |
|
1770 | i (no-filelog no-changeset !) | |
1758 | R i |
|
1771 | R i | |
1759 |
|
1772 | |||
1760 | #if no-changeset |
|
1773 | #if no-changeset | |
1761 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
1774 | $ hg log -Gfr 'desc("mBFm-0")' d | |
1762 | o f-2: rename i -> d |
|
1775 | o f-2: rename i -> d | |
1763 | | |
|
1776 | | | |
1764 | o f-1: rename h -> i |
|
1777 | o f-1: rename h -> i | |
1765 | : |
|
1778 | : | |
1766 | o i-0 initial commit: a b h |
|
1779 | o i-0 initial commit: a b h | |
1767 |
|
1780 | |||
1768 | #else |
|
1781 | #else | |
1769 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1782 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1770 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
1783 | $ hg log -Gfr 'desc("mBFm-0")' d | |
1771 | o i-2: c -move-> d |
|
1784 | o i-2: c -move-> d | |
1772 | | |
|
1785 | | | |
1773 | ~ |
|
1786 | ~ | |
1774 | #endif |
|
1787 | #endif | |
1775 |
|
1788 | |||
1776 | #if no-changeset |
|
1789 | #if no-changeset | |
1777 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
1790 | $ hg log -Gfr 'desc("mFBm-0")' d | |
1778 | o f-2: rename i -> d |
|
1791 | o f-2: rename i -> d | |
1779 | | |
|
1792 | | | |
1780 | o f-1: rename h -> i |
|
1793 | o f-1: rename h -> i | |
1781 | : |
|
1794 | : | |
1782 | o i-0 initial commit: a b h |
|
1795 | o i-0 initial commit: a b h | |
1783 |
|
1796 | |||
1784 | #else |
|
1797 | #else | |
1785 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1798 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1786 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
1799 | $ hg log -Gfr 'desc("mFBm-0")' d | |
1787 | o i-2: c -move-> d |
|
1800 | o i-2: c -move-> d | |
1788 | | |
|
1801 | | | |
1789 | ~ |
|
1802 | ~ | |
1790 | #endif |
|
1803 | #endif | |
1791 |
|
1804 | |||
1792 | Subcase: reset of the copy history on one side |
|
1805 | Subcase: reset of the copy history on one side | |
1793 | `````````````````````````````````````````````` |
|
1806 | `````````````````````````````````````````````` | |
1794 |
|
1807 | |||
1795 | Merge: |
|
1808 | Merge: | |
1796 | - one with change to a file |
|
1809 | - one with change to a file | |
1797 | - one deleting and recreating the file |
|
1810 | - one deleting and recreating the file | |
1798 |
|
1811 | |||
1799 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should |
|
1812 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should | |
1800 | consider history and rename on both branch of the merge. |
|
1813 | consider history and rename on both branch of the merge. | |
1801 |
|
1814 | |||
1802 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
1815 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |
1803 | 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 |
|
1816 | 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 | |
1804 | |\ |
|
1817 | |\ | |
1805 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
1818 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
1806 | | |/ |
|
1819 | | |/ | |
1807 | | o g-1: update d |
|
1820 | | o g-1: update d | |
1808 | | | |
|
1821 | | | | |
1809 | o | d-2 re-add d |
|
1822 | o | d-2 re-add d | |
1810 | | | |
|
1823 | | | | |
1811 | o | d-1 delete d |
|
1824 | o | d-1 delete d | |
1812 | |/ |
|
1825 | |/ | |
1813 | o i-2: c -move-> d |
|
1826 | o i-2: c -move-> d | |
1814 | | |
|
1827 | | | |
1815 | o i-1: a -move-> c |
|
1828 | o i-1: a -move-> c | |
1816 | | |
|
1829 | | | |
1817 | o i-0 initial commit: a b h |
|
1830 | o i-0 initial commit: a b h | |
1818 |
|
1831 | |||
1819 | One side of the merge have a long history with rename. The other side of the |
|
1832 | One side of the merge have a long history with rename. The other side of the | |
1820 | merge point to a new file with a smaller history. Each side is "valid". |
|
1833 | merge point to a new file with a smaller history. Each side is "valid". | |
1821 |
|
1834 | |||
1822 | (and again the filelog based algorithm only explore one, with a pick based on |
|
1835 | (and again the filelog based algorithm only explore one, with a pick based on | |
1823 | revision numbers) |
|
1836 | revision numbers) | |
1824 |
|
1837 | |||
1825 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' |
|
1838 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' | |
1826 | A d |
|
1839 | A d | |
1827 | a (filelog !) |
|
1840 | a (filelog !) | |
1828 | R a |
|
1841 | R a | |
1829 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' |
|
1842 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' | |
1830 | A d |
|
1843 | A d | |
1831 | a |
|
1844 | a | |
1832 | R a |
|
1845 | R a | |
1833 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' |
|
1846 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' | |
1834 | M d |
|
1847 | M d | |
1835 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' |
|
1848 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' | |
1836 | M d |
|
1849 | M d | |
1837 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' |
|
1850 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' | |
1838 | M d |
|
1851 | M d | |
1839 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' |
|
1852 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' | |
1840 | M d |
|
1853 | M d | |
1841 |
|
1854 | |||
1842 | #if no-changeset |
|
1855 | #if no-changeset | |
1843 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
1856 | $ hg log -Gfr 'desc("mDGm-0")' d | |
1844 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
1857 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
1845 | |\ |
|
1858 | |\ | |
1846 | | o g-1: update d |
|
1859 | | o g-1: update d | |
1847 | | | |
|
1860 | | | | |
1848 | o | d-2 re-add d |
|
1861 | o | d-2 re-add d | |
1849 | |/ |
|
1862 | |/ | |
1850 | o i-2: c -move-> d |
|
1863 | o i-2: c -move-> d | |
1851 | | |
|
1864 | | | |
1852 | o i-1: a -move-> c |
|
1865 | o i-1: a -move-> c | |
1853 | | |
|
1866 | | | |
1854 | o i-0 initial commit: a b h |
|
1867 | o i-0 initial commit: a b h | |
1855 |
|
1868 | |||
1856 | #else |
|
1869 | #else | |
1857 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1870 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1858 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
1871 | $ hg log -Gfr 'desc("mDGm-0")' d | |
1859 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
1872 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
1860 | |\ |
|
1873 | |\ | |
1861 | | o g-1: update d |
|
1874 | | o g-1: update d | |
1862 | | | |
|
1875 | | | | |
1863 | o | d-2 re-add d |
|
1876 | o | d-2 re-add d | |
1864 | |/ |
|
1877 | |/ | |
1865 | o i-2: c -move-> d |
|
1878 | o i-2: c -move-> d | |
1866 | | |
|
1879 | | | |
1867 | ~ |
|
1880 | ~ | |
1868 | #endif |
|
1881 | #endif | |
1869 |
|
1882 | |||
1870 |
|
1883 | |||
1871 | #if no-changeset |
|
1884 | #if no-changeset | |
1872 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
1885 | $ hg log -Gfr 'desc("mDGm-0")' d | |
1873 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
1886 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
1874 | |\ |
|
1887 | |\ | |
1875 | | o g-1: update d |
|
1888 | | o g-1: update d | |
1876 | | | |
|
1889 | | | | |
1877 | o | d-2 re-add d |
|
1890 | o | d-2 re-add d | |
1878 | |/ |
|
1891 | |/ | |
1879 | o i-2: c -move-> d |
|
1892 | o i-2: c -move-> d | |
1880 | | |
|
1893 | | | |
1881 | o i-1: a -move-> c |
|
1894 | o i-1: a -move-> c | |
1882 | | |
|
1895 | | | |
1883 | o i-0 initial commit: a b h |
|
1896 | o i-0 initial commit: a b h | |
1884 |
|
1897 | |||
1885 | #else |
|
1898 | #else | |
1886 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1899 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1887 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
1900 | $ hg log -Gfr 'desc("mDGm-0")' d | |
1888 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
1901 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
1889 | |\ |
|
1902 | |\ | |
1890 | | o g-1: update d |
|
1903 | | o g-1: update d | |
1891 | | | |
|
1904 | | | | |
1892 | o | d-2 re-add d |
|
1905 | o | d-2 re-add d | |
1893 | |/ |
|
1906 | |/ | |
1894 | o i-2: c -move-> d |
|
1907 | o i-2: c -move-> d | |
1895 | | |
|
1908 | | | |
1896 | ~ |
|
1909 | ~ | |
1897 | #endif |
|
1910 | #endif | |
1898 |
|
1911 | |||
1899 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch |
|
1912 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch | |
1900 | ```````````````````````````````````````````````````````````````````````````````````````````` |
|
1913 | ```````````````````````````````````````````````````````````````````````````````````````````` | |
1901 |
|
1914 | |||
1902 | Merge: |
|
1915 | Merge: | |
1903 | - one with change to a file (d) |
|
1916 | - one with change to a file (d) | |
1904 | - one overwriting that file with a rename (from h to i, to d) |
|
1917 | - one overwriting that file with a rename (from h to i, to d) | |
1905 |
|
1918 | |||
1906 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
1919 | This case is similar to BF/FB, but an actual merge happens, so both side of the | |
1907 | history are relevant. |
|
1920 | history are relevant. | |
1908 |
|
1921 | |||
1909 |
|
1922 | |||
1910 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
1923 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |
1911 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
1924 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
1912 | |\ |
|
1925 | |\ | |
1913 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
1926 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
1914 | | |/ |
|
1927 | | |/ | |
1915 | | o g-1: update d |
|
1928 | | o g-1: update d | |
1916 | | | |
|
1929 | | | | |
1917 | o | f-2: rename i -> d |
|
1930 | o | f-2: rename i -> d | |
1918 | | | |
|
1931 | | | | |
1919 | o | f-1: rename h -> i |
|
1932 | o | f-1: rename h -> i | |
1920 | |/ |
|
1933 | |/ | |
1921 | o i-2: c -move-> d |
|
1934 | o i-2: c -move-> d | |
1922 | | |
|
1935 | | | |
1923 | o i-1: a -move-> c |
|
1936 | o i-1: a -move-> c | |
1924 | | |
|
1937 | | | |
1925 | o i-0 initial commit: a b h |
|
1938 | o i-0 initial commit: a b h | |
1926 |
|
1939 | |||
1927 |
|
1940 | |||
1928 | Note: |
|
1941 | Note: | |
1929 | | In this case, the merge get conflicting information since on one side we have |
|
1942 | | In this case, the merge get conflicting information since on one side we have | |
1930 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
1943 | | "a -> c -> d". and one the other one we have "h -> i -> d". | |
1931 | | |
|
1944 | | | |
1932 | | The current code arbitrarily pick one side depending the ordering of the merged hash: |
|
1945 | | The current code arbitrarily pick one side depending the ordering of the merged hash: | |
1933 |
|
1946 | |||
1934 | 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"): |
|
1947 | 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"): | |
1935 |
|
1948 | |||
1936 | Details on this hash ordering pick: |
|
1949 | Details on this hash ordering pick: | |
1937 |
|
1950 | |||
1938 | $ hg manifest --debug 'desc("g-1")' | egrep 'd$' |
|
1951 | $ hg manifest --debug 'desc("g-1")' | egrep 'd$' | |
1939 | 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !) |
|
1952 | 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !) | |
1940 | 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !) |
|
1953 | 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !) | |
1941 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d |
|
1954 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d | |
1942 | A d |
|
1955 | A d | |
1943 | a (no-changeset no-compatibility !) |
|
1956 | a (no-changeset no-compatibility !) | |
1944 |
|
1957 | |||
1945 | $ hg manifest --debug 'desc("f-2")' | egrep 'd$' |
|
1958 | $ hg manifest --debug 'desc("f-2")' | egrep 'd$' | |
1946 | 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !) |
|
1959 | 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !) | |
1947 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) |
|
1960 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) | |
1948 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d |
|
1961 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d | |
1949 | A d |
|
1962 | A d | |
1950 | h (no-changeset no-compatibility !) |
|
1963 | h (no-changeset no-compatibility !) | |
1951 |
|
1964 | |||
1952 | Copy tracing data on the resulting merge: |
|
1965 | Copy tracing data on the resulting merge: | |
1953 |
|
1966 | |||
1954 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' |
|
1967 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' | |
1955 | A d |
|
1968 | A d | |
1956 | h (no-filelog !) |
|
1969 | h (no-filelog !) | |
1957 | a (filelog !) |
|
1970 | a (filelog !) | |
1958 | R a |
|
1971 | R a | |
1959 | R h |
|
1972 | R h | |
1960 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' |
|
1973 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' | |
1961 | A d |
|
1974 | A d | |
1962 | a (no-changeset !) |
|
1975 | a (no-changeset !) | |
1963 | h (changeset !) |
|
1976 | h (changeset !) | |
1964 | R a |
|
1977 | R a | |
1965 | R h |
|
1978 | R h | |
1966 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' |
|
1979 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' | |
1967 | M d |
|
1980 | M d | |
1968 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' |
|
1981 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' | |
1969 | M d |
|
1982 | M d | |
1970 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' |
|
1983 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' | |
1971 | M d |
|
1984 | M d | |
1972 | i (no-filelog !) |
|
1985 | i (no-filelog !) | |
1973 | R i |
|
1986 | R i | |
1974 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' |
|
1987 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' | |
1975 | M d |
|
1988 | M d | |
1976 | i (no-filelog !) |
|
1989 | i (no-filelog !) | |
1977 | R i |
|
1990 | R i | |
1978 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' |
|
1991 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' | |
1979 | M d (no-changeset !) |
|
1992 | M d (no-changeset !) | |
1980 | h (no-filelog no-changeset !) |
|
1993 | h (no-filelog no-changeset !) | |
1981 | R h |
|
1994 | R h | |
1982 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' |
|
1995 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' | |
1983 | M d (no-changeset !) |
|
1996 | M d (no-changeset !) | |
1984 | h (no-filelog no-changeset !) |
|
1997 | h (no-filelog no-changeset !) | |
1985 | R h |
|
1998 | R h | |
1986 |
|
1999 | |||
1987 | #if no-changeset |
|
2000 | #if no-changeset | |
1988 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
2001 | $ hg log -Gfr 'desc("mFGm-0")' d | |
1989 | o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
2002 | o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
1990 | |\ |
|
2003 | |\ | |
1991 | | o g-1: update d |
|
2004 | | o g-1: update d | |
1992 | | | |
|
2005 | | | | |
1993 | o | f-2: rename i -> d |
|
2006 | o | f-2: rename i -> d | |
1994 | | | |
|
2007 | | | | |
1995 | o | f-1: rename h -> i |
|
2008 | o | f-1: rename h -> i | |
1996 | |/ |
|
2009 | |/ | |
1997 | o i-2: c -move-> d |
|
2010 | o i-2: c -move-> d | |
1998 | | |
|
2011 | | | |
1999 | o i-1: a -move-> c |
|
2012 | o i-1: a -move-> c | |
2000 | | |
|
2013 | | | |
2001 | o i-0 initial commit: a b h |
|
2014 | o i-0 initial commit: a b h | |
2002 |
|
2015 | |||
2003 | #else |
|
2016 | #else | |
2004 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2017 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2005 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
2018 | $ hg log -Gfr 'desc("mFGm-0")' d | |
2006 | o g-1: update d |
|
2019 | o g-1: update d | |
2007 | | |
|
2020 | | | |
2008 | o i-2: c -move-> d |
|
2021 | o i-2: c -move-> d | |
2009 | | |
|
2022 | | | |
2010 | ~ |
|
2023 | ~ | |
2011 | #endif |
|
2024 | #endif | |
2012 |
|
2025 | |||
2013 | #if no-changeset |
|
2026 | #if no-changeset | |
2014 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
2027 | $ hg log -Gfr 'desc("mGFm-0")' d | |
2015 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
2028 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
2016 | |\ |
|
2029 | |\ | |
2017 | | o g-1: update d |
|
2030 | | o g-1: update d | |
2018 | | | |
|
2031 | | | | |
2019 | o | f-2: rename i -> d |
|
2032 | o | f-2: rename i -> d | |
2020 | | | |
|
2033 | | | | |
2021 | o | f-1: rename h -> i |
|
2034 | o | f-1: rename h -> i | |
2022 | |/ |
|
2035 | |/ | |
2023 | o i-2: c -move-> d |
|
2036 | o i-2: c -move-> d | |
2024 | | |
|
2037 | | | |
2025 | o i-1: a -move-> c |
|
2038 | o i-1: a -move-> c | |
2026 | | |
|
2039 | | | |
2027 | o i-0 initial commit: a b h |
|
2040 | o i-0 initial commit: a b h | |
2028 |
|
2041 | |||
2029 | #else |
|
2042 | #else | |
2030 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2043 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2031 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
2044 | $ hg log -Gfr 'desc("mGFm-0")' d | |
2032 | o g-1: update d |
|
2045 | o g-1: update d | |
2033 | | |
|
2046 | | | |
2034 | o i-2: c -move-> d |
|
2047 | o i-2: c -move-> d | |
2035 | | |
|
2048 | | | |
2036 | ~ |
|
2049 | ~ | |
2037 | #endif |
|
2050 | #endif | |
2038 |
|
2051 | |||
2039 |
|
2052 | |||
2040 | Comparing with merging with a deletion (and keeping the file) |
|
2053 | Comparing with merging with a deletion (and keeping the file) | |
2041 | ------------------------------------------------------------- |
|
2054 | ------------------------------------------------------------- | |
2042 |
|
2055 | |||
2043 | Merge: |
|
2056 | Merge: | |
2044 | - one removing a file (d) |
|
2057 | - one removing a file (d) | |
2045 | - one updating that file |
|
2058 | - one updating that file | |
2046 | - the merge keep the modified version of the file (canceling the delete) |
|
2059 | - the merge keep the modified version of the file (canceling the delete) | |
2047 |
|
2060 | |||
2048 | In this case, the file keep on living after the merge. So we should not drop its |
|
2061 | In this case, the file keep on living after the merge. So we should not drop its | |
2049 | copy tracing chain. |
|
2062 | copy tracing chain. | |
2050 |
|
2063 | |||
2051 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' |
|
2064 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' | |
2052 | o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
2065 | o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | |
2053 | |\ |
|
2066 | |\ | |
2054 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
2067 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way | |
2055 | | |/ |
|
2068 | | |/ | |
2056 | | o g-1: update d |
|
2069 | | o g-1: update d | |
2057 | | | |
|
2070 | | | | |
2058 | o | c-1 delete d |
|
2071 | o | c-1 delete d | |
2059 | |/ |
|
2072 | |/ | |
2060 | o i-2: c -move-> d |
|
2073 | o i-2: c -move-> d | |
2061 | | |
|
2074 | | | |
2062 | o i-1: a -move-> c |
|
2075 | o i-1: a -move-> c | |
2063 | | |
|
2076 | | | |
2064 | o i-0 initial commit: a b h |
|
2077 | o i-0 initial commit: a b h | |
2065 |
|
2078 | |||
2066 |
|
2079 | |||
2067 | 'a' is the copy source of 'd' |
|
2080 | 'a' is the copy source of 'd' | |
2068 |
|
2081 | |||
2069 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' |
|
2082 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' | |
2070 | A d |
|
2083 | A d | |
2071 | a (no-compatibility no-changeset !) |
|
2084 | a (no-compatibility no-changeset !) | |
2072 | R a |
|
2085 | R a | |
2073 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' |
|
2086 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' | |
2074 | A d |
|
2087 | A d | |
2075 | a (no-compatibility no-changeset !) |
|
2088 | a (no-compatibility no-changeset !) | |
2076 | R a |
|
2089 | R a | |
2077 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' |
|
2090 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' | |
2078 | A d |
|
2091 | A d | |
2079 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' |
|
2092 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' | |
2080 | A d |
|
2093 | A d | |
2081 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' |
|
2094 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' | |
2082 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' |
|
2095 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' | |
2083 |
|
2096 | |||
2084 |
|
2097 | |||
2085 | Comparing with merge restoring an untouched deleted file |
|
2098 | Comparing with merge restoring an untouched deleted file | |
2086 | -------------------------------------------------------- |
|
2099 | -------------------------------------------------------- | |
2087 |
|
2100 | |||
2088 | Merge: |
|
2101 | Merge: | |
2089 | - one removing a file (d) |
|
2102 | - one removing a file (d) | |
2090 | - one leaving the file untouched |
|
2103 | - one leaving the file untouched | |
2091 | - the merge actively restore the file to the same content. |
|
2104 | - the merge actively restore the file to the same content. | |
2092 |
|
2105 | |||
2093 | In this case, the file keep on living after the merge. So we should not drop its |
|
2106 | In this case, the file keep on living after the merge. So we should not drop its | |
2094 | copy tracing chain. |
|
2107 | copy tracing chain. | |
2095 |
|
2108 | |||
2096 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' |
|
2109 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | |
2097 | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
2110 | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
2098 | |\ |
|
2111 | |\ | |
2099 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
2112 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
2100 | | |/ |
|
2113 | | |/ | |
2101 | | o c-1 delete d |
|
2114 | | o c-1 delete d | |
2102 | | | |
|
2115 | | | | |
2103 | o | b-1: b update |
|
2116 | o | b-1: b update | |
2104 | |/ |
|
2117 | |/ | |
2105 | o i-2: c -move-> d |
|
2118 | o i-2: c -move-> d | |
2106 | | |
|
2119 | | | |
2107 | o i-1: a -move-> c |
|
2120 | o i-1: a -move-> c | |
2108 | | |
|
2121 | | | |
2109 | o i-0 initial commit: a b h |
|
2122 | o i-0 initial commit: a b h | |
2110 |
|
2123 | |||
2111 |
|
2124 | |||
2112 | 'a' is the the copy source of 'd' |
|
2125 | 'a' is the the copy source of 'd' | |
2113 |
|
2126 | |||
2114 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' |
|
2127 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | |
2115 | M b |
|
2128 | M b | |
2116 | A d |
|
2129 | A d | |
2117 | a (no-compatibility no-changeset !) |
|
2130 | a (no-compatibility no-changeset !) | |
2118 | R a |
|
2131 | R a | |
2119 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' |
|
2132 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | |
2120 | M b |
|
2133 | M b | |
2121 | A d |
|
2134 | A d | |
2122 | a (no-compatibility no-changeset !) |
|
2135 | a (no-compatibility no-changeset !) | |
2123 | R a |
|
2136 | R a | |
2124 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' |
|
2137 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' | |
2125 | M b |
|
2138 | M b | |
2126 | A d |
|
2139 | A d | |
2127 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' |
|
2140 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' | |
2128 | M b |
|
2141 | M b | |
2129 | A d |
|
2142 | A d | |
2130 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' |
|
2143 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' | |
2131 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' |
|
2144 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' | |
2132 |
|
2145 | |||
2133 |
|
2146 | |||
2134 | Merging a branch where a rename was deleted with a branch where the same file was renamed |
|
2147 | Merging a branch where a rename was deleted with a branch where the same file was renamed | |
2135 | ------------------------------------------------------------------------------------------ |
|
2148 | ------------------------------------------------------------------------------------------ | |
2136 |
|
2149 | |||
2137 | Create a "conflicting" merge where `d` get removed on one branch before its |
|
2150 | Create a "conflicting" merge where `d` get removed on one branch before its | |
2138 | rename information actually conflict with the other branch. |
|
2151 | rename information actually conflict with the other branch. | |
2139 |
|
2152 | |||
2140 | (the copy information from the branch that was not deleted should win). |
|
2153 | (the copy information from the branch that was not deleted should win). | |
2141 |
|
2154 | |||
2142 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' |
|
2155 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' | |
2143 | 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 |
|
2156 | 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 | |
2144 | |\ |
|
2157 | |\ | |
2145 | +---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 |
|
2158 | +---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 | |
2146 | | |/ |
|
2159 | | |/ | |
2147 | | o h-1: b -(move)-> d |
|
2160 | | o h-1: b -(move)-> d | |
2148 | | | |
|
2161 | | | | |
2149 | o | c-1 delete d |
|
2162 | o | c-1 delete d | |
2150 | | | |
|
2163 | | | | |
2151 | o | i-2: c -move-> d |
|
2164 | o | i-2: c -move-> d | |
2152 | | | |
|
2165 | | | | |
2153 | o | i-1: a -move-> c |
|
2166 | o | i-1: a -move-> c | |
2154 | |/ |
|
2167 | |/ | |
2155 | o i-0 initial commit: a b h |
|
2168 | o i-0 initial commit: a b h | |
2156 |
|
2169 | |||
2157 |
|
2170 | |||
2158 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
2171 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' | |
2159 | A d |
|
2172 | A d | |
2160 | b (no-compatibility no-changeset !) |
|
2173 | b (no-compatibility no-changeset !) | |
2161 | R a |
|
2174 | R a | |
2162 | R b |
|
2175 | R b | |
2163 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
2176 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' | |
2164 | A d |
|
2177 | A d | |
2165 | b |
|
2178 | b | |
2166 | R a |
|
2179 | R a | |
2167 | R b |
|
2180 | R b | |
2168 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
2181 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' | |
2169 | A d |
|
2182 | A d | |
2170 | b |
|
2183 | b | |
2171 | R b |
|
2184 | R b | |
2172 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
2185 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' | |
2173 | A d |
|
2186 | A d | |
2174 | b |
|
2187 | b | |
2175 | R b |
|
2188 | R b | |
2176 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
2189 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' | |
2177 | R a |
|
2190 | R a | |
2178 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
2191 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' | |
2179 | R a |
|
2192 | R a | |
2180 |
|
2193 | |||
2181 | Decision from previous merge are properly chained with later merge |
|
2194 | Decision from previous merge are properly chained with later merge | |
2182 | ------------------------------------------------------------------ |
|
2195 | ------------------------------------------------------------------ | |
2183 |
|
2196 | |||
2184 |
|
2197 | |||
2185 | Subcase: chaining conflicting rename resolution |
|
2198 | Subcase: chaining conflicting rename resolution | |
2186 | ``````````````````````````````````````````````` |
|
2199 | ``````````````````````````````````````````````` | |
2187 |
|
2200 | |||
2188 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We |
|
2201 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We | |
2189 | add more change on the respective branch and merge again. These second merge |
|
2202 | add more change on the respective branch and merge again. These second merge | |
2190 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
2203 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" | |
2191 | about that file should stay unchanged. |
|
2204 | about that file should stay unchanged. | |
2192 |
|
2205 | |||
2193 | The result from mAEm is the same for the subsequent merge: |
|
2206 | The result from mAEm is the same for the subsequent merge: | |
2194 |
|
2207 | |||
2195 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f |
|
2208 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f | |
2196 | A f |
|
2209 | A f | |
2197 | a (filelog !) |
|
2210 | a (filelog !) | |
2198 | a (sidedata !) |
|
2211 | a (sidedata !) | |
2199 | a (upgraded !) |
|
2212 | a (upgraded !) | |
2200 |
|
2213 | |||
2201 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f |
|
2214 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f | |
2202 | A f |
|
2215 | A f | |
2203 | a (filelog !) |
|
2216 | a (filelog !) | |
2204 | a (sidedata !) |
|
2217 | a (sidedata !) | |
2205 | a (upgraded !) |
|
2218 | a (upgraded !) | |
2206 |
|
2219 | |||
2207 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f |
|
2220 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f | |
2208 | A f |
|
2221 | A f | |
2209 | a (filelog !) |
|
2222 | a (filelog !) | |
2210 | a (missing-correct-output sidedata !) |
|
2223 | a (missing-correct-output sidedata !) | |
2211 | a (missing-correct-output upgraded !) |
|
2224 | a (missing-correct-output upgraded !) | |
2212 | b (known-bad-output sidedata !) |
|
2225 | b (known-bad-output sidedata !) | |
2213 | b (known-bad-output upgraded !) |
|
2226 | b (known-bad-output upgraded !) | |
2214 |
|
2227 | |||
2215 |
|
2228 | |||
2216 | The result from mEAm is the same for the subsequent merge: |
|
2229 | The result from mEAm is the same for the subsequent merge: | |
2217 |
|
2230 | |||
2218 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f |
|
2231 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f | |
2219 | A f |
|
2232 | A f | |
2220 | a (filelog !) |
|
2233 | a (filelog !) | |
2221 | b (sidedata !) |
|
2234 | b (sidedata !) | |
2222 | b (upgraded !) |
|
2235 | b (upgraded !) | |
2223 |
|
2236 | |||
2224 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f |
|
2237 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f | |
2225 | A f |
|
2238 | A f | |
2226 | a (filelog !) |
|
2239 | a (filelog !) | |
2227 | b (sidedata !) |
|
2240 | b (sidedata !) | |
2228 | b (upgraded !) |
|
2241 | b (upgraded !) | |
2229 |
|
2242 | |||
2230 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f |
|
2243 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f | |
2231 | A f |
|
2244 | A f | |
2232 | a (filelog !) |
|
2245 | a (filelog !) | |
2233 | b (missing-correct-output sidedata !) |
|
2246 | b (missing-correct-output sidedata !) | |
2234 | b (missing-correct-output upgraded !) |
|
2247 | b (missing-correct-output upgraded !) | |
2235 | a (known-bad-output sidedata !) |
|
2248 | a (known-bad-output sidedata !) | |
2236 | a (known-bad-output upgraded !) |
|
2249 | a (known-bad-output upgraded !) | |
2237 |
|
2250 | |||
2238 |
|
2251 | |||
2239 | Subcase: chaining salvage information during a merge |
|
2252 | Subcase: chaining salvage information during a merge | |
2240 | ```````````````````````````````````````````````````` |
|
2253 | ```````````````````````````````````````````````````` | |
2241 |
|
2254 | |||
2242 | We add more change on the branch were the file was deleted. merging again |
|
2255 | We add more change on the branch were the file was deleted. merging again | |
2243 | should preserve the fact eh file was salvaged. |
|
2256 | should preserve the fact eh file was salvaged. | |
2244 |
|
2257 | |||
2245 | reference output: |
|
2258 | reference output: | |
2246 |
|
2259 | |||
2247 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' |
|
2260 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | |
2248 | M b |
|
2261 | M b | |
2249 | A d |
|
2262 | A d | |
2250 | a (filelog !) |
|
2263 | a (filelog !) | |
2251 | a (sidedata !) |
|
2264 | a (sidedata !) | |
2252 | a (upgraded !) |
|
2265 | a (upgraded !) | |
2253 | R a |
|
2266 | R a | |
2254 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' |
|
2267 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | |
2255 | M b |
|
2268 | M b | |
2256 | A d |
|
2269 | A d | |
2257 | a (filelog !) |
|
2270 | a (filelog !) | |
2258 | a (sidedata !) |
|
2271 | a (sidedata !) | |
2259 | a (upgraded !) |
|
2272 | a (upgraded !) | |
2260 | R a |
|
2273 | R a | |
2261 |
|
2274 | |||
2262 | chained output |
|
2275 | chained output | |
2263 |
|
2276 | |||
2264 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")' |
|
2277 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")' | |
2265 | M b |
|
2278 | M b | |
2266 | A d |
|
2279 | A d | |
2267 | a (filelog !) |
|
2280 | a (filelog !) | |
2268 | a (missing-correct-output sidedata !) |
|
2281 | a (missing-correct-output sidedata !) | |
2269 | a (missing-correct-output upgraded !) |
|
2282 | a (missing-correct-output upgraded !) | |
2270 | A unrelated-l |
|
2283 | A unrelated-l | |
2271 | R a |
|
2284 | R a | |
2272 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")' |
|
2285 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")' | |
2273 | M b |
|
2286 | M b | |
2274 | A d |
|
2287 | A d | |
2275 | a (filelog !) |
|
2288 | a (filelog !) | |
2276 | a (missing-correct-output sidedata !) |
|
2289 | a (missing-correct-output sidedata !) | |
2277 | a (missing-correct-output upgraded !) |
|
2290 | a (missing-correct-output upgraded !) | |
2278 | A unrelated-l |
|
2291 | A unrelated-l | |
2279 | R a |
|
2292 | R a | |
2280 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")' |
|
2293 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")' | |
2281 | M b |
|
2294 | M b | |
2282 | A d |
|
2295 | A d | |
2283 | a (filelog !) |
|
2296 | a (filelog !) | |
2284 | a (missing-correct-output sidedata !) |
|
2297 | a (missing-correct-output sidedata !) | |
2285 | a (missing-correct-output upgraded !) |
|
2298 | a (missing-correct-output upgraded !) | |
2286 | A unrelated-l |
|
2299 | A unrelated-l | |
2287 | R a |
|
2300 | R a | |
2288 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")' |
|
2301 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")' | |
2289 | M b |
|
2302 | M b | |
2290 | A d |
|
2303 | A d | |
2291 | a (filelog !) |
|
2304 | a (filelog !) | |
2292 | a (missing-correct-output sidedata !) |
|
2305 | a (missing-correct-output sidedata !) | |
2293 | a (missing-correct-output upgraded !) |
|
2306 | a (missing-correct-output upgraded !) | |
2294 | A unrelated-l |
|
2307 | A unrelated-l | |
2295 | R a |
|
2308 | R a | |
2296 |
|
2309 | |||
2297 | Subcase: chaining "merged" information during a merge |
|
2310 | Subcase: chaining "merged" information during a merge | |
2298 | `````````````````````````````````````````````````````` |
|
2311 | `````````````````````````````````````````````````````` | |
2299 |
|
2312 | |||
2300 | 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. |
|
2313 | 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. | |
2301 |
|
2314 | |||
2302 |
|
2315 | |||
2303 | reference output: |
|
2316 | reference output: | |
2304 |
|
2317 | |||
2305 | (for details about the filelog pick, check the mFGm/mGFm case) |
|
2318 | (for details about the filelog pick, check the mFGm/mGFm case) | |
2306 |
|
2319 | |||
2307 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d |
|
2320 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d | |
2308 | A d |
|
2321 | A d | |
2309 | a (filelog !) |
|
2322 | a (filelog !) | |
2310 | h (sidedata !) |
|
2323 | h (sidedata !) | |
2311 | h (upgraded !) |
|
2324 | h (upgraded !) | |
2312 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d |
|
2325 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d | |
2313 | A d |
|
2326 | A d | |
2314 | a (filelog !) |
|
2327 | a (filelog !) | |
2315 | a (sidedata !) |
|
2328 | a (sidedata !) | |
2316 | a (upgraded !) |
|
2329 | a (upgraded !) | |
2317 |
|
2330 | |||
2318 | Chained output |
|
2331 | Chained output | |
2319 |
|
2332 | |||
2320 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d |
|
2333 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d | |
2321 | A d |
|
2334 | A d | |
2322 | a (filelog !) |
|
2335 | a (filelog !) | |
2323 | h (sidedata !) |
|
2336 | h (sidedata !) | |
2324 | h (upgraded !) |
|
2337 | h (upgraded !) | |
2325 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d |
|
2338 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d | |
2326 | A d |
|
2339 | A d | |
2327 | a (filelog !) |
|
2340 | a (filelog !) | |
2328 | h (sidedata !) |
|
2341 | h (sidedata !) | |
2329 | h (upgraded !) |
|
2342 | h (upgraded !) | |
2330 |
|
2343 | |||
2331 |
|
2344 | |||
2332 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d |
|
2345 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d | |
2333 | A d |
|
2346 | A d | |
2334 | a (filelog !) |
|
2347 | a (filelog !) | |
2335 | a (missing-correct-output sidedata !) |
|
2348 | a (missing-correct-output sidedata !) | |
2336 | a (missing-correct-output upgraded !) |
|
2349 | a (missing-correct-output upgraded !) | |
2337 | h (known-bad-output sidedata !) |
|
2350 | h (known-bad-output sidedata !) | |
2338 | h (known-bad-output upgraded !) |
|
2351 | h (known-bad-output upgraded !) | |
2339 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d |
|
2352 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d | |
2340 | A d |
|
2353 | A d | |
2341 | a (filelog !) |
|
2354 | a (filelog !) | |
2342 | a (missing-correct-output sidedata !) |
|
2355 | a (missing-correct-output sidedata !) | |
2343 | a (missing-correct-output upgraded !) |
|
2356 | a (missing-correct-output upgraded !) | |
2344 | h (known-bad-output sidedata !) |
|
2357 | h (known-bad-output sidedata !) | |
2345 | h (known-bad-output upgraded !) |
|
2358 | h (known-bad-output upgraded !) |
General Comments 0
You need to be logged in to leave comments.
Login now