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