Show More
@@ -1,1752 +1,1763 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 >> $HGRCPATH |
|
17 | $ cat << EOF >> $HGRCPATH | |
18 | > [diff] |
|
18 | > [diff] | |
19 | > git=yes |
|
19 | > git=yes | |
20 | > [command-templates] |
|
20 | > [command-templates] | |
21 | > log={rev} {desc}\n |
|
21 | > log={rev} {desc}\n | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 | #if compatibility |
|
24 | #if compatibility | |
25 | $ cat >> $HGRCPATH << EOF |
|
25 | $ cat >> $HGRCPATH << EOF | |
26 | > [experimental] |
|
26 | > [experimental] | |
27 | > copies.read-from = compatibility |
|
27 | > copies.read-from = compatibility | |
28 | > EOF |
|
28 | > EOF | |
29 | #endif |
|
29 | #endif | |
30 |
|
30 | |||
31 | #if changeset |
|
31 | #if changeset | |
32 | $ cat >> $HGRCPATH << EOF |
|
32 | $ cat >> $HGRCPATH << EOF | |
33 | > [experimental] |
|
33 | > [experimental] | |
34 | > copies.read-from = changeset-only |
|
34 | > copies.read-from = changeset-only | |
35 | > copies.write-to = changeset-only |
|
35 | > copies.write-to = changeset-only | |
36 | > EOF |
|
36 | > EOF | |
37 | #endif |
|
37 | #endif | |
38 |
|
38 | |||
39 | #if sidedata |
|
39 | #if sidedata | |
40 | $ cat >> $HGRCPATH << EOF |
|
40 | $ cat >> $HGRCPATH << EOF | |
41 | > [format] |
|
41 | > [format] | |
42 | > exp-use-side-data = yes |
|
42 | > exp-use-side-data = yes | |
43 | > exp-use-copies-side-data-changeset = yes |
|
43 | > exp-use-copies-side-data-changeset = yes | |
44 | > EOF |
|
44 | > EOF | |
45 | #endif |
|
45 | #endif | |
46 |
|
46 | |||
47 |
|
47 | |||
|
48 | $ cat > same-content.txt << EOF | |||
|
49 | > Here is some content that will be the same accros multiple file. | |||
|
50 | > | |||
|
51 | > This is done on purpose so that we end up in some merge situation, were the | |||
|
52 | > resulting content is the same as in the parent(s), but a new filenodes still | |||
|
53 | > need to be created to record some file history information (especially | |||
|
54 | > about copies). | |||
|
55 | > EOF | |||
|
56 | ||||
48 | $ hg init repo-chain |
|
57 | $ hg init repo-chain | |
49 | $ cd repo-chain |
|
58 | $ cd repo-chain | |
50 |
|
59 | |||
51 | Add some linear rename initialy |
|
60 | Add some linear rename initialy | |
52 |
|
61 | |||
53 | $ touch a b h |
|
62 | $ cp ../same-content.txt a | |
|
63 | $ cp ../same-content.txt b | |||
|
64 | $ cp ../same-content.txt h | |||
54 | $ hg ci -Am 'i-0 initial commit: a b h' |
|
65 | $ hg ci -Am 'i-0 initial commit: a b h' | |
55 | adding a |
|
66 | adding a | |
56 | adding b |
|
67 | adding b | |
57 | adding h |
|
68 | adding h | |
58 | $ hg mv a c |
|
69 | $ hg mv a c | |
59 | $ hg ci -Am 'i-1: a -move-> c' |
|
70 | $ hg ci -Am 'i-1: a -move-> c' | |
60 | $ hg mv c d |
|
71 | $ hg mv c d | |
61 | $ hg ci -Am 'i-2: c -move-> d' |
|
72 | $ hg ci -Am 'i-2: c -move-> d' | |
62 | $ hg log -G |
|
73 | $ hg log -G | |
63 | @ 2 i-2: c -move-> d |
|
74 | @ 2 i-2: c -move-> d | |
64 | | |
|
75 | | | |
65 | o 1 i-1: a -move-> c |
|
76 | o 1 i-1: a -move-> c | |
66 | | |
|
77 | | | |
67 | o 0 i-0 initial commit: a b h |
|
78 | o 0 i-0 initial commit: a b h | |
68 |
|
79 | |||
69 |
|
80 | |||
70 | And having another branch with renames on the other side |
|
81 | And having another branch with renames on the other side | |
71 |
|
82 | |||
72 | $ hg mv d e |
|
83 | $ hg mv d e | |
73 | $ hg ci -Am 'a-1: d -move-> e' |
|
84 | $ hg ci -Am 'a-1: d -move-> e' | |
74 | $ hg mv e f |
|
85 | $ hg mv e f | |
75 | $ hg ci -Am 'a-2: e -move-> f' |
|
86 | $ hg ci -Am 'a-2: e -move-> f' | |
76 | $ hg log -G --rev '::.' |
|
87 | $ hg log -G --rev '::.' | |
77 | @ 4 a-2: e -move-> f |
|
88 | @ 4 a-2: e -move-> f | |
78 | | |
|
89 | | | |
79 | o 3 a-1: d -move-> e |
|
90 | o 3 a-1: d -move-> e | |
80 | | |
|
91 | | | |
81 | o 2 i-2: c -move-> d |
|
92 | o 2 i-2: c -move-> d | |
82 | | |
|
93 | | | |
83 | o 1 i-1: a -move-> c |
|
94 | o 1 i-1: a -move-> c | |
84 | | |
|
95 | | | |
85 | o 0 i-0 initial commit: a b h |
|
96 | o 0 i-0 initial commit: a b h | |
86 |
|
97 | |||
87 |
|
98 | |||
88 | Have a branching with nothing on one side |
|
99 | Have a branching with nothing on one side | |
89 |
|
100 | |||
90 | $ hg up 'desc("i-2")' |
|
101 | $ hg up 'desc("i-2")' | |
91 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
102 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
92 | $ echo foo > b |
|
103 | $ echo foo > b | |
93 | $ hg ci -m 'b-1: b update' |
|
104 | $ hg ci -m 'b-1: b update' | |
94 | created new head |
|
105 | created new head | |
95 | $ hg log -G --rev '::.' |
|
106 | $ hg log -G --rev '::.' | |
96 | @ 5 b-1: b update |
|
107 | @ 5 b-1: b update | |
97 | | |
|
108 | | | |
98 | o 2 i-2: c -move-> d |
|
109 | o 2 i-2: c -move-> d | |
99 | | |
|
110 | | | |
100 | o 1 i-1: a -move-> c |
|
111 | o 1 i-1: a -move-> c | |
101 | | |
|
112 | | | |
102 | o 0 i-0 initial commit: a b h |
|
113 | o 0 i-0 initial commit: a b h | |
103 |
|
114 | |||
104 |
|
115 | |||
105 | Create a branch that delete a file previous renamed |
|
116 | Create a branch that delete a file previous renamed | |
106 |
|
117 | |||
107 | $ hg up 'desc("i-2")' |
|
118 | $ hg up 'desc("i-2")' | |
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 | $ hg rm d |
|
120 | $ hg rm d | |
110 | $ hg ci -m 'c-1 delete d' |
|
121 | $ hg ci -m 'c-1 delete d' | |
111 | created new head |
|
122 | created new head | |
112 | $ hg log -G --rev '::.' |
|
123 | $ hg log -G --rev '::.' | |
113 | @ 6 c-1 delete d |
|
124 | @ 6 c-1 delete d | |
114 | | |
|
125 | | | |
115 | o 2 i-2: c -move-> d |
|
126 | o 2 i-2: c -move-> d | |
116 | | |
|
127 | | | |
117 | o 1 i-1: a -move-> c |
|
128 | o 1 i-1: a -move-> c | |
118 | | |
|
129 | | | |
119 | o 0 i-0 initial commit: a b h |
|
130 | o 0 i-0 initial commit: a b h | |
120 |
|
131 | |||
121 |
|
132 | |||
122 | Create a branch that delete a file previous renamed and recreate it |
|
133 | Create a branch that delete a file previous renamed and recreate it | |
123 |
|
134 | |||
124 | $ hg up 'desc("i-2")' |
|
135 | $ hg up 'desc("i-2")' | |
125 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
136 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
126 | $ hg rm d |
|
137 | $ hg rm d | |
127 | $ hg ci -m 'd-1 delete d' |
|
138 | $ hg ci -m 'd-1 delete d' | |
128 | created new head |
|
139 | created new head | |
129 | $ echo bar > d |
|
140 | $ echo bar > d | |
130 | $ hg add d |
|
141 | $ hg add d | |
131 | $ hg ci -m 'd-2 re-add d' |
|
142 | $ hg ci -m 'd-2 re-add d' | |
132 | $ hg log -G --rev '::.' |
|
143 | $ hg log -G --rev '::.' | |
133 | @ 8 d-2 re-add d |
|
144 | @ 8 d-2 re-add d | |
134 | | |
|
145 | | | |
135 | o 7 d-1 delete d |
|
146 | o 7 d-1 delete d | |
136 | | |
|
147 | | | |
137 | o 2 i-2: c -move-> d |
|
148 | o 2 i-2: c -move-> d | |
138 | | |
|
149 | | | |
139 | o 1 i-1: a -move-> c |
|
150 | o 1 i-1: a -move-> c | |
140 | | |
|
151 | | | |
141 | o 0 i-0 initial commit: a b h |
|
152 | o 0 i-0 initial commit: a b h | |
142 |
|
153 | |||
143 |
|
154 | |||
144 | Having another branch renaming a different file to the same filename as another |
|
155 | Having another branch renaming a different file to the same filename as another | |
145 |
|
156 | |||
146 | $ hg up 'desc("i-2")' |
|
157 | $ hg up 'desc("i-2")' | |
147 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
148 | $ hg mv b g |
|
159 | $ hg mv b g | |
149 | $ hg ci -m 'e-1 b -move-> g' |
|
160 | $ hg ci -m 'e-1 b -move-> g' | |
150 | created new head |
|
161 | created new head | |
151 | $ hg mv g f |
|
162 | $ hg mv g f | |
152 | $ hg ci -m 'e-2 g -move-> f' |
|
163 | $ hg ci -m 'e-2 g -move-> f' | |
153 | $ hg log -G --rev '::.' |
|
164 | $ hg log -G --rev '::.' | |
154 | @ 10 e-2 g -move-> f |
|
165 | @ 10 e-2 g -move-> f | |
155 | | |
|
166 | | | |
156 | o 9 e-1 b -move-> g |
|
167 | o 9 e-1 b -move-> g | |
157 | | |
|
168 | | | |
158 | o 2 i-2: c -move-> d |
|
169 | o 2 i-2: c -move-> d | |
159 | | |
|
170 | | | |
160 | o 1 i-1: a -move-> c |
|
171 | o 1 i-1: a -move-> c | |
161 | | |
|
172 | | | |
162 | o 0 i-0 initial commit: a b h |
|
173 | o 0 i-0 initial commit: a b h | |
163 |
|
174 | |||
164 |
|
175 | |||
165 | Setup all merge |
|
176 | Setup all merge | |
166 | =============== |
|
177 | =============== | |
167 |
|
178 | |||
168 | This is done beforehand to validate that the upgrade process creates valid copy |
|
179 | This is done beforehand to validate that the upgrade process creates valid copy | |
169 | information. |
|
180 | information. | |
170 |
|
181 | |||
171 | merging with unrelated change does not interfere with the renames |
|
182 | merging with unrelated change does not interfere with the renames | |
172 | --------------------------------------------------------------- |
|
183 | --------------------------------------------------------------- | |
173 |
|
184 | |||
174 | - rename on one side |
|
185 | - rename on one side | |
175 | - unrelated change on the other side |
|
186 | - unrelated change on the other side | |
176 |
|
187 | |||
177 | $ hg up 'desc("b-1")' |
|
188 | $ hg up 'desc("b-1")' | |
178 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
189 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
179 | $ hg merge 'desc("a-2")' |
|
190 | $ hg merge 'desc("a-2")' | |
180 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
191 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
181 | (branch merge, don't forget to commit) |
|
192 | (branch merge, don't forget to commit) | |
182 | $ hg ci -m 'mBAm-0 simple merge - one way' |
|
193 | $ hg ci -m 'mBAm-0 simple merge - one way' | |
183 | $ hg up 'desc("a-2")' |
|
194 | $ hg up 'desc("a-2")' | |
184 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
195 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
185 | $ hg merge 'desc("b-1")' |
|
196 | $ hg merge 'desc("b-1")' | |
186 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
197 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
187 | (branch merge, don't forget to commit) |
|
198 | (branch merge, don't forget to commit) | |
188 | $ hg ci -m 'mABm-0 simple merge - the other way' |
|
199 | $ hg ci -m 'mABm-0 simple merge - the other way' | |
189 | created new head |
|
200 | created new head | |
190 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
201 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | |
191 | @ 12 mABm-0 simple merge - the other way |
|
202 | @ 12 mABm-0 simple merge - the other way | |
192 | |\ |
|
203 | |\ | |
193 | +---o 11 mBAm-0 simple merge - one way |
|
204 | +---o 11 mBAm-0 simple merge - one way | |
194 | | |/ |
|
205 | | |/ | |
195 | | o 5 b-1: b update |
|
206 | | o 5 b-1: b update | |
196 | | | |
|
207 | | | | |
197 | o | 4 a-2: e -move-> f |
|
208 | o | 4 a-2: e -move-> f | |
198 | | | |
|
209 | | | | |
199 | o | 3 a-1: d -move-> e |
|
210 | o | 3 a-1: d -move-> e | |
200 | |/ |
|
211 | |/ | |
201 | o 2 i-2: c -move-> d |
|
212 | o 2 i-2: c -move-> d | |
202 | | |
|
213 | | | |
203 | o 1 i-1: a -move-> c |
|
214 | o 1 i-1: a -move-> c | |
204 | | |
|
215 | | | |
205 | o 0 i-0 initial commit: a b h |
|
216 | o 0 i-0 initial commit: a b h | |
206 |
|
217 | |||
207 |
|
218 | |||
208 |
|
219 | |||
209 | merging with the side having a delete |
|
220 | merging with the side having a delete | |
210 | ------------------------------------- |
|
221 | ------------------------------------- | |
211 |
|
222 | |||
212 | case summary: |
|
223 | case summary: | |
213 | - one with change to an unrelated file |
|
224 | - one with change to an unrelated file | |
214 | - one deleting the change |
|
225 | - one deleting the change | |
215 | and recreate an unrelated file after the merge |
|
226 | and recreate an unrelated file after the merge | |
216 |
|
227 | |||
217 | $ hg up 'desc("b-1")' |
|
228 | $ hg up 'desc("b-1")' | |
218 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
229 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
219 | $ hg merge 'desc("c-1")' |
|
230 | $ hg merge 'desc("c-1")' | |
220 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
231 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
221 | (branch merge, don't forget to commit) |
|
232 | (branch merge, don't forget to commit) | |
222 | $ hg ci -m 'mBCm-0 simple merge - one way' |
|
233 | $ hg ci -m 'mBCm-0 simple merge - one way' | |
223 | $ echo bar > d |
|
234 | $ echo bar > d | |
224 | $ hg add d |
|
235 | $ hg add d | |
225 | $ hg ci -m 'mBCm-1 re-add d' |
|
236 | $ hg ci -m 'mBCm-1 re-add d' | |
226 | $ hg up 'desc("c-1")' |
|
237 | $ hg up 'desc("c-1")' | |
227 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
238 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
228 | $ hg merge 'desc("b-1")' |
|
239 | $ hg merge 'desc("b-1")' | |
229 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
240 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
230 | (branch merge, don't forget to commit) |
|
241 | (branch merge, don't forget to commit) | |
231 | $ hg ci -m 'mCBm-0 simple merge - the other way' |
|
242 | $ hg ci -m 'mCBm-0 simple merge - the other way' | |
232 | created new head |
|
243 | created new head | |
233 | $ echo bar > d |
|
244 | $ echo bar > d | |
234 | $ hg add d |
|
245 | $ hg add d | |
235 | $ hg ci -m 'mCBm-1 re-add d' |
|
246 | $ hg ci -m 'mCBm-1 re-add d' | |
236 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
247 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | |
237 | @ 16 mCBm-1 re-add d |
|
248 | @ 16 mCBm-1 re-add d | |
238 | | |
|
249 | | | |
239 | o 15 mCBm-0 simple merge - the other way |
|
250 | o 15 mCBm-0 simple merge - the other way | |
240 | |\ |
|
251 | |\ | |
241 | | | o 14 mBCm-1 re-add d |
|
252 | | | o 14 mBCm-1 re-add d | |
242 | | | | |
|
253 | | | | | |
243 | +---o 13 mBCm-0 simple merge - one way |
|
254 | +---o 13 mBCm-0 simple merge - one way | |
244 | | |/ |
|
255 | | |/ | |
245 | | o 6 c-1 delete d |
|
256 | | o 6 c-1 delete d | |
246 | | | |
|
257 | | | | |
247 | o | 5 b-1: b update |
|
258 | o | 5 b-1: b update | |
248 | |/ |
|
259 | |/ | |
249 | o 2 i-2: c -move-> d |
|
260 | o 2 i-2: c -move-> d | |
250 | | |
|
261 | | | |
251 | o 1 i-1: a -move-> c |
|
262 | o 1 i-1: a -move-> c | |
252 | | |
|
263 | | | |
253 | o 0 i-0 initial commit: a b h |
|
264 | o 0 i-0 initial commit: a b h | |
254 |
|
265 | |||
255 |
|
266 | |||
256 | Comparing with a merge re-adding the file afterward |
|
267 | Comparing with a merge re-adding the file afterward | |
257 | --------------------------------------------------- |
|
268 | --------------------------------------------------- | |
258 |
|
269 | |||
259 | Merge: |
|
270 | Merge: | |
260 | - one with change to an unrelated file |
|
271 | - one with change to an unrelated file | |
261 | - one deleting and recreating the change |
|
272 | - one deleting and recreating the change | |
262 |
|
273 | |||
263 | $ hg up 'desc("b-1")' |
|
274 | $ hg up 'desc("b-1")' | |
264 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
275 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
265 | $ hg merge 'desc("d-2")' |
|
276 | $ hg merge 'desc("d-2")' | |
266 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
277 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
267 | (branch merge, don't forget to commit) |
|
278 | (branch merge, don't forget to commit) | |
268 | $ hg ci -m 'mBDm-0 simple merge - one way' |
|
279 | $ hg ci -m 'mBDm-0 simple merge - one way' | |
269 | $ hg up 'desc("d-2")' |
|
280 | $ hg up 'desc("d-2")' | |
270 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
281 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
271 | $ hg merge 'desc("b-1")' |
|
282 | $ hg merge 'desc("b-1")' | |
272 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
283 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
273 | (branch merge, don't forget to commit) |
|
284 | (branch merge, don't forget to commit) | |
274 | $ hg ci -m 'mDBm-0 simple merge - the other way' |
|
285 | $ hg ci -m 'mDBm-0 simple merge - the other way' | |
275 | created new head |
|
286 | created new head | |
276 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
287 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
277 | @ 18 mDBm-0 simple merge - the other way |
|
288 | @ 18 mDBm-0 simple merge - the other way | |
278 | |\ |
|
289 | |\ | |
279 | +---o 17 mBDm-0 simple merge - one way |
|
290 | +---o 17 mBDm-0 simple merge - one way | |
280 | | |/ |
|
291 | | |/ | |
281 | | o 8 d-2 re-add d |
|
292 | | o 8 d-2 re-add d | |
282 | | | |
|
293 | | | | |
283 | | o 7 d-1 delete d |
|
294 | | o 7 d-1 delete d | |
284 | | | |
|
295 | | | | |
285 | o | 5 b-1: b update |
|
296 | o | 5 b-1: b update | |
286 | |/ |
|
297 | |/ | |
287 | o 2 i-2: c -move-> d |
|
298 | o 2 i-2: c -move-> d | |
288 | | |
|
299 | | | |
289 | o 1 i-1: a -move-> c |
|
300 | o 1 i-1: a -move-> c | |
290 | | |
|
301 | | | |
291 | o 0 i-0 initial commit: a b h |
|
302 | o 0 i-0 initial commit: a b h | |
292 |
|
303 | |||
293 |
|
304 | |||
294 |
|
305 | |||
295 | Comparing with a merge with colliding rename |
|
306 | Comparing with a merge with colliding rename | |
296 | -------------------------------------------- |
|
307 | -------------------------------------------- | |
297 |
|
308 | |||
298 | - the "e-" branch renaming b to f (through 'g') |
|
309 | - the "e-" branch renaming b to f (through 'g') | |
299 | - the "a-" branch renaming d to f (through e) |
|
310 | - the "a-" branch renaming d to f (through e) | |
300 |
|
311 | |||
301 | $ hg up 'desc("a-2")' |
|
312 | $ hg up 'desc("a-2")' | |
302 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
313 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
303 | $ hg merge 'desc("e-2")' |
|
314 | $ hg merge 'desc("e-2")' | |
304 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
315 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
305 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
316 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
306 | (branch merge, don't forget to commit) |
|
317 | (branch merge, don't forget to commit) | |
307 | $ hg ci -m 'mAEm-0 simple merge - one way' |
|
318 | $ hg ci -m 'mAEm-0 simple merge - one way' | |
308 | $ hg up 'desc("e-2")' |
|
319 | $ hg up 'desc("e-2")' | |
309 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
320 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
310 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
321 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
311 | $ hg merge 'desc("a-2")' |
|
322 | $ hg merge 'desc("a-2")' | |
312 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
323 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
313 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
324 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
314 | (branch merge, don't forget to commit) |
|
325 | (branch merge, don't forget to commit) | |
315 | $ hg ci -m 'mEAm-0 simple merge - the other way' |
|
326 | $ hg ci -m 'mEAm-0 simple merge - the other way' | |
316 | created new head |
|
327 | created new head | |
317 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
328 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
318 | @ 20 mEAm-0 simple merge - the other way |
|
329 | @ 20 mEAm-0 simple merge - the other way | |
319 | |\ |
|
330 | |\ | |
320 | +---o 19 mAEm-0 simple merge - one way |
|
331 | +---o 19 mAEm-0 simple merge - one way | |
321 | | |/ |
|
332 | | |/ | |
322 | | o 10 e-2 g -move-> f |
|
333 | | o 10 e-2 g -move-> f | |
323 | | | |
|
334 | | | | |
324 | | o 9 e-1 b -move-> g |
|
335 | | o 9 e-1 b -move-> g | |
325 | | | |
|
336 | | | | |
326 | o | 4 a-2: e -move-> f |
|
337 | o | 4 a-2: e -move-> f | |
327 | | | |
|
338 | | | | |
328 | o | 3 a-1: d -move-> e |
|
339 | o | 3 a-1: d -move-> e | |
329 | |/ |
|
340 | |/ | |
330 | o 2 i-2: c -move-> d |
|
341 | o 2 i-2: c -move-> d | |
331 | | |
|
342 | | | |
332 | o 1 i-1: a -move-> c |
|
343 | o 1 i-1: a -move-> c | |
333 | | |
|
344 | | | |
334 | o 0 i-0 initial commit: a b h |
|
345 | o 0 i-0 initial commit: a b h | |
335 |
|
346 | |||
336 |
|
347 | |||
337 |
|
348 | |||
338 | Merge: |
|
349 | Merge: | |
339 | - one with change to an unrelated file (b) |
|
350 | - one with change to an unrelated file (b) | |
340 | - one overwriting a file (d) with a rename (from h to i to d) |
|
351 | - one overwriting a file (d) with a rename (from h to i to d) | |
341 |
|
352 | |||
342 | $ hg up 'desc("i-2")' |
|
353 | $ hg up 'desc("i-2")' | |
343 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
354 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
344 | $ hg mv h i |
|
355 | $ hg mv h i | |
345 | $ hg commit -m "f-1: rename h -> i" |
|
356 | $ hg commit -m "f-1: rename h -> i" | |
346 | created new head |
|
357 | created new head | |
347 | $ hg mv --force i d |
|
358 | $ hg mv --force i d | |
348 | $ hg commit -m "f-2: rename i -> d" |
|
359 | $ hg commit -m "f-2: rename i -> d" | |
349 | $ hg debugindex d |
|
360 | $ hg debugindex d | |
350 | rev linkrev nodeid p1 p2 |
|
361 | rev linkrev nodeid p1 p2 | |
351 |
0 2 |
|
362 | 0 2 d8252ab2e760 000000000000 000000000000 (no-changeset !) | |
352 |
0 2 |
|
363 | 0 2 ae258f702dfe 000000000000 000000000000 (changeset !) | |
353 | 1 8 b004912a8510 000000000000 000000000000 |
|
364 | 1 8 b004912a8510 000000000000 000000000000 | |
354 |
2 22 |
|
365 | 2 22 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) | |
355 | $ hg up 'desc("b-1")' |
|
366 | $ hg up 'desc("b-1")' | |
356 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
367 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
357 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
368 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
358 | $ hg merge 'desc("f-2")' |
|
369 | $ hg merge 'desc("f-2")' | |
359 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
370 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
360 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
371 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
361 | (branch merge, don't forget to commit) |
|
372 | (branch merge, don't forget to commit) | |
362 | $ hg ci -m 'mBFm-0 simple merge - one way' |
|
373 | $ hg ci -m 'mBFm-0 simple merge - one way' | |
363 | $ hg up 'desc("f-2")' |
|
374 | $ hg up 'desc("f-2")' | |
364 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
375 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
365 | $ hg merge 'desc("b-1")' |
|
376 | $ hg merge 'desc("b-1")' | |
366 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
377 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
367 | (branch merge, don't forget to commit) |
|
378 | (branch merge, don't forget to commit) | |
368 | $ hg ci -m 'mFBm-0 simple merge - the other way' |
|
379 | $ hg ci -m 'mFBm-0 simple merge - the other way' | |
369 | created new head |
|
380 | created new head | |
370 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
381 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |
371 | @ 24 mFBm-0 simple merge - the other way |
|
382 | @ 24 mFBm-0 simple merge - the other way | |
372 | |\ |
|
383 | |\ | |
373 | +---o 23 mBFm-0 simple merge - one way |
|
384 | +---o 23 mBFm-0 simple merge - one way | |
374 | | |/ |
|
385 | | |/ | |
375 | | o 22 f-2: rename i -> d |
|
386 | | o 22 f-2: rename i -> d | |
376 | | | |
|
387 | | | | |
377 | | o 21 f-1: rename h -> i |
|
388 | | o 21 f-1: rename h -> i | |
378 | | | |
|
389 | | | | |
379 | o | 5 b-1: b update |
|
390 | o | 5 b-1: b update | |
380 | |/ |
|
391 | |/ | |
381 | o 2 i-2: c -move-> d |
|
392 | o 2 i-2: c -move-> d | |
382 | | |
|
393 | | | |
383 | o 1 i-1: a -move-> c |
|
394 | o 1 i-1: a -move-> c | |
384 | | |
|
395 | | | |
385 | o 0 i-0 initial commit: a b h |
|
396 | o 0 i-0 initial commit: a b h | |
386 |
|
397 | |||
387 |
|
398 | |||
388 |
|
399 | |||
389 | Merge: |
|
400 | Merge: | |
390 | - one with change to a file |
|
401 | - one with change to a file | |
391 | - one deleting and recreating the file |
|
402 | - one deleting and recreating the file | |
392 |
|
403 | |||
393 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should |
|
404 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should | |
394 | consider history and rename on both branch of the merge. |
|
405 | consider history and rename on both branch of the merge. | |
395 |
|
406 | |||
396 | $ hg up 'desc("i-2")' |
|
407 | $ hg up 'desc("i-2")' | |
397 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
408 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
398 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
409 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
399 | $ echo "some update" >> d |
|
410 | $ echo "some update" >> d | |
400 | $ hg commit -m "g-1: update d" |
|
411 | $ hg commit -m "g-1: update d" | |
401 | created new head |
|
412 | created new head | |
402 | $ hg up 'desc("d-2")' |
|
413 | $ hg up 'desc("d-2")' | |
403 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
414 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
404 | $ hg merge 'desc("g-1")' --tool :union |
|
415 | $ hg merge 'desc("g-1")' --tool :union | |
405 | merging d |
|
416 | merging d | |
406 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
417 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
407 | (branch merge, don't forget to commit) |
|
418 | (branch merge, don't forget to commit) | |
408 | $ hg ci -m 'mDGm-0 simple merge - one way' |
|
419 | $ hg ci -m 'mDGm-0 simple merge - one way' | |
409 | $ hg up 'desc("g-1")' |
|
420 | $ hg up 'desc("g-1")' | |
410 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
421 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
411 | $ hg merge 'desc("d-2")' --tool :union |
|
422 | $ hg merge 'desc("d-2")' --tool :union | |
412 | merging d |
|
423 | merging d | |
413 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
424 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
414 | (branch merge, don't forget to commit) |
|
425 | (branch merge, don't forget to commit) | |
415 | $ hg ci -m 'mGDm-0 simple merge - the other way' |
|
426 | $ hg ci -m 'mGDm-0 simple merge - the other way' | |
416 | created new head |
|
427 | created new head | |
417 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
428 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |
418 | @ 27 mGDm-0 simple merge - the other way |
|
429 | @ 27 mGDm-0 simple merge - the other way | |
419 | |\ |
|
430 | |\ | |
420 | +---o 26 mDGm-0 simple merge - one way |
|
431 | +---o 26 mDGm-0 simple merge - one way | |
421 | | |/ |
|
432 | | |/ | |
422 | | o 25 g-1: update d |
|
433 | | o 25 g-1: update d | |
423 | | | |
|
434 | | | | |
424 | o | 8 d-2 re-add d |
|
435 | o | 8 d-2 re-add d | |
425 | | | |
|
436 | | | | |
426 | o | 7 d-1 delete d |
|
437 | o | 7 d-1 delete d | |
427 | |/ |
|
438 | |/ | |
428 | o 2 i-2: c -move-> d |
|
439 | o 2 i-2: c -move-> d | |
429 | | |
|
440 | | | |
430 | o 1 i-1: a -move-> c |
|
441 | o 1 i-1: a -move-> c | |
431 | | |
|
442 | | | |
432 | o 0 i-0 initial commit: a b h |
|
443 | o 0 i-0 initial commit: a b h | |
433 |
|
444 | |||
434 |
|
445 | |||
435 |
|
446 | |||
436 | Merge: |
|
447 | Merge: | |
437 | - one with change to a file (d) |
|
448 | - one with change to a file (d) | |
438 | - one overwriting that file with a rename (from h to i, to d) |
|
449 | - one overwriting that file with a rename (from h to i, to d) | |
439 |
|
450 | |||
440 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
451 | This case is similar to BF/FB, but an actual merge happens, so both side of the | |
441 | history are relevant. |
|
452 | history are relevant. | |
442 |
|
453 | |||
443 | Note: |
|
454 | Note: | |
444 | | In this case, the merge get conflicting information since on one side we have |
|
455 | | In this case, the merge get conflicting information since on one side we have | |
445 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
456 | | "a -> c -> d". and one the other one we have "h -> i -> d". | |
446 | | |
|
457 | | | |
447 | | The current code arbitrarily pick one side |
|
458 | | The current code arbitrarily pick one side | |
448 |
|
459 | |||
449 | $ hg up 'desc("f-2")' |
|
460 | $ hg up 'desc("f-2")' | |
450 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
461 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
451 | $ hg merge 'desc("g-1")' --tool :union |
|
462 | $ hg merge 'desc("g-1")' --tool :union | |
452 | merging d (no-changeset !) |
|
463 | merging d (no-changeset !) | |
453 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
464 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
454 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
465 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
455 | (branch merge, don't forget to commit) |
|
466 | (branch merge, don't forget to commit) | |
456 | $ hg ci -m 'mFGm-0 simple merge - one way' |
|
467 | $ hg ci -m 'mFGm-0 simple merge - one way' | |
457 | created new head |
|
468 | created new head | |
458 | $ hg up 'desc("g-1")' |
|
469 | $ hg up 'desc("g-1")' | |
459 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
470 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
460 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
471 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
461 | $ hg merge 'desc("f-2")' --tool :union |
|
472 | $ hg merge 'desc("f-2")' --tool :union | |
462 | merging d (no-changeset !) |
|
473 | merging d (no-changeset !) | |
463 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
474 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
464 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
475 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
465 | (branch merge, don't forget to commit) |
|
476 | (branch merge, don't forget to commit) | |
466 | $ hg ci -m 'mGFm-0 simple merge - the other way' |
|
477 | $ hg ci -m 'mGFm-0 simple merge - the other way' | |
467 | created new head |
|
478 | created new head | |
468 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
479 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |
469 | @ 29 mGFm-0 simple merge - the other way |
|
480 | @ 29 mGFm-0 simple merge - the other way | |
470 | |\ |
|
481 | |\ | |
471 | +---o 28 mFGm-0 simple merge - one way |
|
482 | +---o 28 mFGm-0 simple merge - one way | |
472 | | |/ |
|
483 | | |/ | |
473 | | o 25 g-1: update d |
|
484 | | o 25 g-1: update d | |
474 | | | |
|
485 | | | | |
475 | o | 22 f-2: rename i -> d |
|
486 | o | 22 f-2: rename i -> d | |
476 | | | |
|
487 | | | | |
477 | o | 21 f-1: rename h -> i |
|
488 | o | 21 f-1: rename h -> i | |
478 | |/ |
|
489 | |/ | |
479 | o 2 i-2: c -move-> d |
|
490 | o 2 i-2: c -move-> d | |
480 | | |
|
491 | | | |
481 | o 1 i-1: a -move-> c |
|
492 | o 1 i-1: a -move-> c | |
482 | | |
|
493 | | | |
483 | o 0 i-0 initial commit: a b h |
|
494 | o 0 i-0 initial commit: a b h | |
484 |
|
495 | |||
485 |
|
496 | |||
486 |
|
497 | |||
487 | Comparing with merging with a deletion (and keeping the file) |
|
498 | Comparing with merging with a deletion (and keeping the file) | |
488 | ------------------------------------------------------------- |
|
499 | ------------------------------------------------------------- | |
489 |
|
500 | |||
490 | Merge: |
|
501 | Merge: | |
491 | - one removing a file (d) |
|
502 | - one removing a file (d) | |
492 | - one updating that file |
|
503 | - one updating that file | |
493 | - the merge keep the modified version of the file (canceling the delete) |
|
504 | - the merge keep the modified version of the file (canceling the delete) | |
494 |
|
505 | |||
495 | In this case, the file keep on living after the merge. So we should not drop its |
|
506 | In this case, the file keep on living after the merge. So we should not drop its | |
496 | copy tracing chain. |
|
507 | copy tracing chain. | |
497 |
|
508 | |||
498 | $ hg up 'desc("c-1")' |
|
509 | $ hg up 'desc("c-1")' | |
499 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
510 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
500 | $ hg merge 'desc("g-1")' |
|
511 | $ hg merge 'desc("g-1")' | |
501 | file 'd' was deleted in local [working copy] but was modified in other [merge rev]. |
|
512 | file 'd' was deleted in local [working copy] but was modified in other [merge rev]. | |
502 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
|
513 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. | |
503 | What do you want to do? u |
|
514 | What do you want to do? u | |
504 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
515 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
505 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
516 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
506 | [1] |
|
517 | [1] | |
507 | $ hg resolve -t :other d |
|
518 | $ hg resolve -t :other d | |
508 | (no more unresolved files) |
|
519 | (no more unresolved files) | |
509 | $ hg ci -m "mCGm-0" |
|
520 | $ hg ci -m "mCGm-0" | |
510 | created new head |
|
521 | created new head | |
511 |
|
522 | |||
512 | $ hg up 'desc("g-1")' |
|
523 | $ hg up 'desc("g-1")' | |
513 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
524 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
514 | $ hg merge 'desc("c-1")' |
|
525 | $ hg merge 'desc("c-1")' | |
515 | file 'd' was deleted in other [merge rev] but was modified in local [working copy]. |
|
526 | file 'd' was deleted in other [merge rev] but was modified in local [working copy]. | |
516 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
|
527 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. | |
517 | What do you want to do? u |
|
528 | What do you want to do? u | |
518 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
529 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
519 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
530 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
520 | [1] |
|
531 | [1] | |
521 | $ hg resolve -t :local d |
|
532 | $ hg resolve -t :local d | |
522 | (no more unresolved files) |
|
533 | (no more unresolved files) | |
523 | $ hg ci -m "mGCm-0" |
|
534 | $ hg ci -m "mGCm-0" | |
524 | created new head |
|
535 | created new head | |
525 |
|
536 | |||
526 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' |
|
537 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' | |
527 | @ 31 mGCm-0 |
|
538 | @ 31 mGCm-0 | |
528 | |\ |
|
539 | |\ | |
529 | +---o 30 mCGm-0 |
|
540 | +---o 30 mCGm-0 | |
530 | | |/ |
|
541 | | |/ | |
531 | | o 25 g-1: update d |
|
542 | | o 25 g-1: update d | |
532 | | | |
|
543 | | | | |
533 | o | 6 c-1 delete d |
|
544 | o | 6 c-1 delete d | |
534 | |/ |
|
545 | |/ | |
535 | o 2 i-2: c -move-> d |
|
546 | o 2 i-2: c -move-> d | |
536 | | |
|
547 | | | |
537 | o 1 i-1: a -move-> c |
|
548 | o 1 i-1: a -move-> c | |
538 | | |
|
549 | | | |
539 | o 0 i-0 initial commit: a b h |
|
550 | o 0 i-0 initial commit: a b h | |
540 |
|
551 | |||
541 |
|
552 | |||
542 |
|
553 | |||
543 |
|
554 | |||
544 | Comparing with merge restoring an untouched deleted file |
|
555 | Comparing with merge restoring an untouched deleted file | |
545 | -------------------------------------------------------- |
|
556 | -------------------------------------------------------- | |
546 |
|
557 | |||
547 | Merge: |
|
558 | Merge: | |
548 | - one removing a file (d) |
|
559 | - one removing a file (d) | |
549 | - one leaving the file untouched |
|
560 | - one leaving the file untouched | |
550 | - the merge actively restore the file to the same content. |
|
561 | - the merge actively restore the file to the same content. | |
551 |
|
562 | |||
552 | In this case, the file keep on living after the merge. So we should not drop its |
|
563 | In this case, the file keep on living after the merge. So we should not drop its | |
553 | copy tracing chain. |
|
564 | copy tracing chain. | |
554 |
|
565 | |||
555 | $ hg up 'desc("c-1")' |
|
566 | $ hg up 'desc("c-1")' | |
556 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
567 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
557 | $ hg merge 'desc("b-1")' |
|
568 | $ hg merge 'desc("b-1")' | |
558 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
569 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
559 | (branch merge, don't forget to commit) |
|
570 | (branch merge, don't forget to commit) | |
560 | $ hg revert --rev 'desc("b-1")' d |
|
571 | $ hg revert --rev 'desc("b-1")' d | |
561 | $ hg ci -m "mCB-revert-m-0" |
|
572 | $ hg ci -m "mCB-revert-m-0" | |
562 | created new head |
|
573 | created new head | |
563 |
|
574 | |||
564 | $ hg up 'desc("b-1")' |
|
575 | $ hg up 'desc("b-1")' | |
565 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
576 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
566 | $ hg merge 'desc("c-1")' |
|
577 | $ hg merge 'desc("c-1")' | |
567 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
578 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
568 | (branch merge, don't forget to commit) |
|
579 | (branch merge, don't forget to commit) | |
569 | $ hg revert --rev 'desc("b-1")' d |
|
580 | $ hg revert --rev 'desc("b-1")' d | |
570 | $ hg ci -m "mBC-revert-m-0" |
|
581 | $ hg ci -m "mBC-revert-m-0" | |
571 | created new head |
|
582 | created new head | |
572 |
|
583 | |||
573 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' |
|
584 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | |
574 | @ 33 mBC-revert-m-0 |
|
585 | @ 33 mBC-revert-m-0 | |
575 | |\ |
|
586 | |\ | |
576 | +---o 32 mCB-revert-m-0 |
|
587 | +---o 32 mCB-revert-m-0 | |
577 | | |/ |
|
588 | | |/ | |
578 | | o 6 c-1 delete d |
|
589 | | o 6 c-1 delete d | |
579 | | | |
|
590 | | | | |
580 | o | 5 b-1: b update |
|
591 | o | 5 b-1: b update | |
581 | |/ |
|
592 | |/ | |
582 | o 2 i-2: c -move-> d |
|
593 | o 2 i-2: c -move-> d | |
583 | | |
|
594 | | | |
584 | o 1 i-1: a -move-> c |
|
595 | o 1 i-1: a -move-> c | |
585 | | |
|
596 | | | |
586 | o 0 i-0 initial commit: a b h |
|
597 | o 0 i-0 initial commit: a b h | |
587 |
|
598 | |||
588 |
|
599 | |||
589 |
|
600 | |||
590 | $ hg up null --quiet |
|
601 | $ hg up null --quiet | |
591 |
|
602 | |||
592 | Merging a branch where a rename was deleted with a branch where the same file was renamed |
|
603 | Merging a branch where a rename was deleted with a branch where the same file was renamed | |
593 | ------------------------------------------------------------------------------------------ |
|
604 | ------------------------------------------------------------------------------------------ | |
594 |
|
605 | |||
595 | Create a "conflicting" merge where `d` get removed on one branch before its |
|
606 | Create a "conflicting" merge where `d` get removed on one branch before its | |
596 | rename information actually conflict with the other branch. |
|
607 | rename information actually conflict with the other branch. | |
597 |
|
608 | |||
598 | (the copy information from the branch that was not deleted should win). |
|
609 | (the copy information from the branch that was not deleted should win). | |
599 |
|
610 | |||
600 | $ hg up 'desc("i-0")' |
|
611 | $ hg up 'desc("i-0")' | |
601 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
612 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
602 | $ hg mv b d |
|
613 | $ hg mv b d | |
603 | $ hg ci -m "h-1: b -(move)-> d" |
|
614 | $ hg ci -m "h-1: b -(move)-> d" | |
604 | created new head |
|
615 | created new head | |
605 |
|
616 | |||
606 | $ hg up 'desc("c-1")' |
|
617 | $ hg up 'desc("c-1")' | |
607 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
618 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
608 | $ hg merge 'desc("h-1")' |
|
619 | $ hg merge 'desc("h-1")' | |
609 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
620 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
610 | (branch merge, don't forget to commit) |
|
621 | (branch merge, don't forget to commit) | |
611 | $ hg ci -m "mCH-delete-before-conflict-m-0" |
|
622 | $ hg ci -m "mCH-delete-before-conflict-m-0" | |
612 |
|
623 | |||
613 | $ hg up 'desc("h-1")' |
|
624 | $ hg up 'desc("h-1")' | |
614 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
625 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
615 | $ hg merge 'desc("c-1")' |
|
626 | $ hg merge 'desc("c-1")' | |
616 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
627 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
617 | (branch merge, don't forget to commit) |
|
628 | (branch merge, don't forget to commit) | |
618 | $ hg ci -m "mHC-delete-before-conflict-m-0" |
|
629 | $ hg ci -m "mHC-delete-before-conflict-m-0" | |
619 | created new head |
|
630 | created new head | |
620 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' |
|
631 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' | |
621 | @ 36 mHC-delete-before-conflict-m-0 |
|
632 | @ 36 mHC-delete-before-conflict-m-0 | |
622 | |\ |
|
633 | |\ | |
623 | +---o 35 mCH-delete-before-conflict-m-0 |
|
634 | +---o 35 mCH-delete-before-conflict-m-0 | |
624 | | |/ |
|
635 | | |/ | |
625 | | o 34 h-1: b -(move)-> d |
|
636 | | o 34 h-1: b -(move)-> d | |
626 | | | |
|
637 | | | | |
627 | o | 6 c-1 delete d |
|
638 | o | 6 c-1 delete d | |
628 | | | |
|
639 | | | | |
629 | o | 2 i-2: c -move-> d |
|
640 | o | 2 i-2: c -move-> d | |
630 | | | |
|
641 | | | | |
631 | o | 1 i-1: a -move-> c |
|
642 | o | 1 i-1: a -move-> c | |
632 | |/ |
|
643 | |/ | |
633 | o 0 i-0 initial commit: a b h |
|
644 | o 0 i-0 initial commit: a b h | |
634 |
|
645 | |||
635 |
|
646 | |||
636 |
|
647 | |||
637 | Summary of all created cases |
|
648 | Summary of all created cases | |
638 | ---------------------------- |
|
649 | ---------------------------- | |
639 |
|
650 | |||
640 | $ hg up --quiet null |
|
651 | $ hg up --quiet null | |
641 |
|
652 | |||
642 | (This exists to help keeping a compact list of the various cases we have built) |
|
653 | (This exists to help keeping a compact list of the various cases we have built) | |
643 |
|
654 | |||
644 | $ hg log -T '{desc|firstline}\n'| sort |
|
655 | $ hg log -T '{desc|firstline}\n'| sort | |
645 | a-1: d -move-> e |
|
656 | a-1: d -move-> e | |
646 | a-2: e -move-> f |
|
657 | a-2: e -move-> f | |
647 | b-1: b update |
|
658 | b-1: b update | |
648 | c-1 delete d |
|
659 | c-1 delete d | |
649 | d-1 delete d |
|
660 | d-1 delete d | |
650 | d-2 re-add d |
|
661 | d-2 re-add d | |
651 | e-1 b -move-> g |
|
662 | e-1 b -move-> g | |
652 | e-2 g -move-> f |
|
663 | e-2 g -move-> f | |
653 | f-1: rename h -> i |
|
664 | f-1: rename h -> i | |
654 | f-2: rename i -> d |
|
665 | f-2: rename i -> d | |
655 | g-1: update d |
|
666 | g-1: update d | |
656 | h-1: b -(move)-> d |
|
667 | h-1: b -(move)-> d | |
657 | i-0 initial commit: a b h |
|
668 | i-0 initial commit: a b h | |
658 | i-1: a -move-> c |
|
669 | i-1: a -move-> c | |
659 | i-2: c -move-> d |
|
670 | i-2: c -move-> d | |
660 | mABm-0 simple merge - the other way |
|
671 | mABm-0 simple merge - the other way | |
661 | mAEm-0 simple merge - one way |
|
672 | mAEm-0 simple merge - one way | |
662 | mBAm-0 simple merge - one way |
|
673 | mBAm-0 simple merge - one way | |
663 | mBC-revert-m-0 |
|
674 | mBC-revert-m-0 | |
664 | mBCm-0 simple merge - one way |
|
675 | mBCm-0 simple merge - one way | |
665 | mBCm-1 re-add d |
|
676 | mBCm-1 re-add d | |
666 | mBDm-0 simple merge - one way |
|
677 | mBDm-0 simple merge - one way | |
667 | mBFm-0 simple merge - one way |
|
678 | mBFm-0 simple merge - one way | |
668 | mCB-revert-m-0 |
|
679 | mCB-revert-m-0 | |
669 | mCBm-0 simple merge - the other way |
|
680 | mCBm-0 simple merge - the other way | |
670 | mCBm-1 re-add d |
|
681 | mCBm-1 re-add d | |
671 | mCGm-0 |
|
682 | mCGm-0 | |
672 | mCH-delete-before-conflict-m-0 |
|
683 | mCH-delete-before-conflict-m-0 | |
673 | mDBm-0 simple merge - the other way |
|
684 | mDBm-0 simple merge - the other way | |
674 | mDGm-0 simple merge - one way |
|
685 | mDGm-0 simple merge - one way | |
675 | mEAm-0 simple merge - the other way |
|
686 | mEAm-0 simple merge - the other way | |
676 | mFBm-0 simple merge - the other way |
|
687 | mFBm-0 simple merge - the other way | |
677 | mFGm-0 simple merge - one way |
|
688 | mFGm-0 simple merge - one way | |
678 | mGCm-0 |
|
689 | mGCm-0 | |
679 | mGDm-0 simple merge - the other way |
|
690 | mGDm-0 simple merge - the other way | |
680 | mGFm-0 simple merge - the other way |
|
691 | mGFm-0 simple merge - the other way | |
681 | mHC-delete-before-conflict-m-0 |
|
692 | mHC-delete-before-conflict-m-0 | |
682 |
|
693 | |||
683 |
|
694 | |||
684 | Test that sidedata computations during upgrades are correct |
|
695 | Test that sidedata computations during upgrades are correct | |
685 | =========================================================== |
|
696 | =========================================================== | |
686 |
|
697 | |||
687 | We upgrade a repository that is not using sidedata (the filelog case) and |
|
698 | We upgrade a repository that is not using sidedata (the filelog case) and | |
688 | check that the same side data have been generated as if they were computed at |
|
699 | check that the same side data have been generated as if they were computed at | |
689 | commit time. |
|
700 | commit time. | |
690 |
|
701 | |||
691 |
|
702 | |||
692 | #if upgraded |
|
703 | #if upgraded | |
693 | $ cat >> $HGRCPATH << EOF |
|
704 | $ cat >> $HGRCPATH << EOF | |
694 | > [format] |
|
705 | > [format] | |
695 | > exp-use-side-data = yes |
|
706 | > exp-use-side-data = yes | |
696 | > exp-use-copies-side-data-changeset = yes |
|
707 | > exp-use-copies-side-data-changeset = yes | |
697 | > EOF |
|
708 | > EOF | |
698 | $ hg debugformat -v |
|
709 | $ hg debugformat -v | |
699 | format-variant repo config default |
|
710 | format-variant repo config default | |
700 | fncache: yes yes yes |
|
711 | fncache: yes yes yes | |
701 | dotencode: yes yes yes |
|
712 | dotencode: yes yes yes | |
702 | generaldelta: yes yes yes |
|
713 | generaldelta: yes yes yes | |
703 | share-safe: no no no |
|
714 | share-safe: no no no | |
704 | sparserevlog: yes yes yes |
|
715 | sparserevlog: yes yes yes | |
705 | sidedata: no yes no |
|
716 | sidedata: no yes no | |
706 | persistent-nodemap: no no no |
|
717 | persistent-nodemap: no no no | |
707 | copies-sdc: no yes no |
|
718 | copies-sdc: no yes no | |
708 | plain-cl-delta: yes yes yes |
|
719 | plain-cl-delta: yes yes yes | |
709 | compression: * (glob) |
|
720 | compression: * (glob) | |
710 | compression-level: default default default |
|
721 | compression-level: default default default | |
711 | $ hg debugupgraderepo --run --quiet |
|
722 | $ hg debugupgraderepo --run --quiet | |
712 | upgrade will perform the following actions: |
|
723 | upgrade will perform the following actions: | |
713 |
|
724 | |||
714 | requirements |
|
725 | requirements | |
715 | preserved: * (glob) |
|
726 | preserved: * (glob) | |
716 | added: exp-copies-sidedata-changeset, exp-sidedata-flag |
|
727 | added: exp-copies-sidedata-changeset, exp-sidedata-flag | |
717 |
|
728 | |||
718 | processed revlogs: |
|
729 | processed revlogs: | |
719 | - all-filelogs |
|
730 | - all-filelogs | |
720 | - changelog |
|
731 | - changelog | |
721 | - manifest |
|
732 | - manifest | |
722 |
|
733 | |||
723 | #endif |
|
734 | #endif | |
724 |
|
735 | |||
725 |
|
736 | |||
726 | #if no-compatibility no-filelog no-changeset |
|
737 | #if no-compatibility no-filelog no-changeset | |
727 |
|
738 | |||
728 | $ hg debugchangedfiles --compute 0 |
|
739 | $ hg debugchangedfiles --compute 0 | |
729 | added : a, ; |
|
740 | added : a, ; | |
730 | added : b, ; |
|
741 | added : b, ; | |
731 | added : h, ; |
|
742 | added : h, ; | |
732 |
|
743 | |||
733 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do |
|
744 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do | |
734 | > echo "##### revision $rev #####" |
|
745 | > echo "##### revision $rev #####" | |
735 | > hg debugsidedata -c -v -- $rev |
|
746 | > hg debugsidedata -c -v -- $rev | |
736 | > hg debugchangedfiles $rev |
|
747 | > hg debugchangedfiles $rev | |
737 | > done |
|
748 | > done | |
738 | ##### revision 0 ##### |
|
749 | ##### revision 0 ##### | |
739 | 1 sidedata entries |
|
750 | 1 sidedata entries | |
740 | entry-0014 size 34 |
|
751 | entry-0014 size 34 | |
741 | '\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' |
|
752 | '\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' | |
742 | added : a, ; |
|
753 | added : a, ; | |
743 | added : b, ; |
|
754 | added : b, ; | |
744 | added : h, ; |
|
755 | added : h, ; | |
745 | ##### revision 1 ##### |
|
756 | ##### revision 1 ##### | |
746 | 1 sidedata entries |
|
757 | 1 sidedata entries | |
747 | entry-0014 size 24 |
|
758 | entry-0014 size 24 | |
748 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ac' |
|
759 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ac' | |
749 | removed : a, ; |
|
760 | removed : a, ; | |
750 | added p1: c, a; |
|
761 | added p1: c, a; | |
751 | ##### revision 2 ##### |
|
762 | ##### revision 2 ##### | |
752 | 1 sidedata entries |
|
763 | 1 sidedata entries | |
753 | entry-0014 size 24 |
|
764 | entry-0014 size 24 | |
754 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00cd' |
|
765 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00cd' | |
755 | removed : c, ; |
|
766 | removed : c, ; | |
756 | added p1: d, c; |
|
767 | added p1: d, c; | |
757 | ##### revision 3 ##### |
|
768 | ##### revision 3 ##### | |
758 | 1 sidedata entries |
|
769 | 1 sidedata entries | |
759 | entry-0014 size 24 |
|
770 | entry-0014 size 24 | |
760 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' |
|
771 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' | |
761 | removed : d, ; |
|
772 | removed : d, ; | |
762 | added p1: e, d; |
|
773 | added p1: e, d; | |
763 | ##### revision 4 ##### |
|
774 | ##### revision 4 ##### | |
764 | 1 sidedata entries |
|
775 | 1 sidedata entries | |
765 | entry-0014 size 24 |
|
776 | entry-0014 size 24 | |
766 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef' |
|
777 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef' | |
767 | removed : e, ; |
|
778 | removed : e, ; | |
768 | added p1: f, e; |
|
779 | added p1: f, e; | |
769 | ##### revision 5 ##### |
|
780 | ##### revision 5 ##### | |
770 | 1 sidedata entries |
|
781 | 1 sidedata entries | |
771 | entry-0014 size 14 |
|
782 | entry-0014 size 14 | |
772 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b' |
|
783 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b' | |
773 | touched : b, ; |
|
784 | touched : b, ; | |
774 | ##### revision 6 ##### |
|
785 | ##### revision 6 ##### | |
775 | 1 sidedata entries |
|
786 | 1 sidedata entries | |
776 | entry-0014 size 14 |
|
787 | entry-0014 size 14 | |
777 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
788 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' | |
778 | removed : d, ; |
|
789 | removed : d, ; | |
779 | ##### revision 7 ##### |
|
790 | ##### revision 7 ##### | |
780 | 1 sidedata entries |
|
791 | 1 sidedata entries | |
781 | entry-0014 size 14 |
|
792 | entry-0014 size 14 | |
782 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
793 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' | |
783 | removed : d, ; |
|
794 | removed : d, ; | |
784 | ##### revision 8 ##### |
|
795 | ##### revision 8 ##### | |
785 | 1 sidedata entries |
|
796 | 1 sidedata entries | |
786 | entry-0014 size 14 |
|
797 | entry-0014 size 14 | |
787 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
798 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
788 | added : d, ; |
|
799 | added : d, ; | |
789 | ##### revision 9 ##### |
|
800 | ##### revision 9 ##### | |
790 | 1 sidedata entries |
|
801 | 1 sidedata entries | |
791 | entry-0014 size 24 |
|
802 | entry-0014 size 24 | |
792 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg' |
|
803 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg' | |
793 | removed : b, ; |
|
804 | removed : b, ; | |
794 | added p1: g, b; |
|
805 | added p1: g, b; | |
795 | ##### revision 10 ##### |
|
806 | ##### revision 10 ##### | |
796 | 1 sidedata entries |
|
807 | 1 sidedata entries | |
797 | entry-0014 size 24 |
|
808 | entry-0014 size 24 | |
798 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg' |
|
809 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg' | |
799 | added p1: f, g; |
|
810 | added p1: f, g; | |
800 | removed : g, ; |
|
811 | removed : g, ; | |
801 | ##### revision 11 ##### |
|
812 | ##### revision 11 ##### | |
802 | 1 sidedata entries |
|
813 | 1 sidedata entries | |
803 | entry-0014 size 4 |
|
814 | entry-0014 size 4 | |
804 | '\x00\x00\x00\x00' |
|
815 | '\x00\x00\x00\x00' | |
805 | ##### revision 12 ##### |
|
816 | ##### revision 12 ##### | |
806 | 1 sidedata entries |
|
817 | 1 sidedata entries | |
807 | entry-0014 size 4 |
|
818 | entry-0014 size 4 | |
808 | '\x00\x00\x00\x00' |
|
819 | '\x00\x00\x00\x00' | |
809 | ##### revision 13 ##### |
|
820 | ##### revision 13 ##### | |
810 | 1 sidedata entries |
|
821 | 1 sidedata entries | |
811 | entry-0014 size 4 |
|
822 | entry-0014 size 4 | |
812 | '\x00\x00\x00\x00' |
|
823 | '\x00\x00\x00\x00' | |
813 | ##### revision 14 ##### |
|
824 | ##### revision 14 ##### | |
814 | 1 sidedata entries |
|
825 | 1 sidedata entries | |
815 | entry-0014 size 14 |
|
826 | entry-0014 size 14 | |
816 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
827 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
817 | added : d, ; |
|
828 | added : d, ; | |
818 | ##### revision 15 ##### |
|
829 | ##### revision 15 ##### | |
819 | 1 sidedata entries |
|
830 | 1 sidedata entries | |
820 | entry-0014 size 4 |
|
831 | entry-0014 size 4 | |
821 | '\x00\x00\x00\x00' |
|
832 | '\x00\x00\x00\x00' | |
822 | ##### revision 16 ##### |
|
833 | ##### revision 16 ##### | |
823 | 1 sidedata entries |
|
834 | 1 sidedata entries | |
824 | entry-0014 size 14 |
|
835 | entry-0014 size 14 | |
825 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
836 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
826 | added : d, ; |
|
837 | added : d, ; | |
827 | ##### revision 17 ##### |
|
838 | ##### revision 17 ##### | |
828 | 1 sidedata entries |
|
839 | 1 sidedata entries | |
829 | entry-0014 size 4 |
|
840 | entry-0014 size 4 | |
830 | '\x00\x00\x00\x00' |
|
841 | '\x00\x00\x00\x00' | |
831 | ##### revision 18 ##### |
|
842 | ##### revision 18 ##### | |
832 | 1 sidedata entries |
|
843 | 1 sidedata entries | |
833 | entry-0014 size 4 |
|
844 | entry-0014 size 4 | |
834 | '\x00\x00\x00\x00' |
|
845 | '\x00\x00\x00\x00' | |
835 | ##### revision 19 ##### |
|
846 | ##### revision 19 ##### | |
836 | 1 sidedata entries |
|
847 | 1 sidedata entries | |
837 | entry-0014 size 14 |
|
848 | entry-0014 size 14 | |
838 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
849 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
839 | merged : f, ; |
|
850 | merged : f, ; | |
840 | ##### revision 20 ##### |
|
851 | ##### revision 20 ##### | |
841 | 1 sidedata entries |
|
852 | 1 sidedata entries | |
842 | entry-0014 size 14 |
|
853 | entry-0014 size 14 | |
843 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
854 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
844 | merged : f, ; |
|
855 | merged : f, ; | |
845 | ##### revision 21 ##### |
|
856 | ##### revision 21 ##### | |
846 | 1 sidedata entries |
|
857 | 1 sidedata entries | |
847 | entry-0014 size 24 |
|
858 | entry-0014 size 24 | |
848 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi' |
|
859 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi' | |
849 | removed : h, ; |
|
860 | removed : h, ; | |
850 | added p1: i, h; |
|
861 | added p1: i, h; | |
851 | ##### revision 22 ##### |
|
862 | ##### revision 22 ##### | |
852 | 1 sidedata entries |
|
863 | 1 sidedata entries | |
853 | entry-0014 size 24 |
|
864 | entry-0014 size 24 | |
854 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di' |
|
865 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di' | |
855 | touched p1: d, i; |
|
866 | touched p1: d, i; | |
856 | removed : i, ; |
|
867 | removed : i, ; | |
857 | ##### revision 23 ##### |
|
868 | ##### revision 23 ##### | |
858 | 1 sidedata entries |
|
869 | 1 sidedata entries | |
859 | entry-0014 size 4 |
|
870 | entry-0014 size 4 | |
860 | '\x00\x00\x00\x00' |
|
871 | '\x00\x00\x00\x00' | |
861 | ##### revision 24 ##### |
|
872 | ##### revision 24 ##### | |
862 | 1 sidedata entries |
|
873 | 1 sidedata entries | |
863 | entry-0014 size 4 |
|
874 | entry-0014 size 4 | |
864 | '\x00\x00\x00\x00' |
|
875 | '\x00\x00\x00\x00' | |
865 | ##### revision 25 ##### |
|
876 | ##### revision 25 ##### | |
866 | 1 sidedata entries |
|
877 | 1 sidedata entries | |
867 | entry-0014 size 14 |
|
878 | entry-0014 size 14 | |
868 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
879 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' | |
869 | touched : d, ; |
|
880 | touched : d, ; | |
870 | ##### revision 26 ##### |
|
881 | ##### revision 26 ##### | |
871 | 1 sidedata entries |
|
882 | 1 sidedata entries | |
872 | entry-0014 size 14 |
|
883 | entry-0014 size 14 | |
873 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
884 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
874 | merged : d, ; |
|
885 | merged : d, ; | |
875 | ##### revision 27 ##### |
|
886 | ##### revision 27 ##### | |
876 | 1 sidedata entries |
|
887 | 1 sidedata entries | |
877 | entry-0014 size 14 |
|
888 | entry-0014 size 14 | |
878 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
889 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
879 | merged : d, ; |
|
890 | merged : d, ; | |
880 | ##### revision 28 ##### |
|
891 | ##### revision 28 ##### | |
881 | 1 sidedata entries |
|
892 | 1 sidedata entries | |
882 | entry-0014 size 14 |
|
893 | entry-0014 size 14 | |
883 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
894 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
884 | merged : d, ; |
|
895 | merged : d, ; | |
885 | ##### revision 29 ##### |
|
896 | ##### revision 29 ##### | |
886 | 1 sidedata entries |
|
897 | 1 sidedata entries | |
887 | entry-0014 size 14 |
|
898 | entry-0014 size 14 | |
888 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
899 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
889 | merged : d, ; |
|
900 | merged : d, ; | |
890 | ##### revision 30 ##### |
|
901 | ##### revision 30 ##### | |
891 | 1 sidedata entries |
|
902 | 1 sidedata entries | |
892 | entry-0014 size 14 |
|
903 | entry-0014 size 14 | |
893 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
904 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
894 | salvaged : d, ; |
|
905 | salvaged : d, ; | |
895 | ##### revision 31 ##### |
|
906 | ##### revision 31 ##### | |
896 | 1 sidedata entries |
|
907 | 1 sidedata entries | |
897 | entry-0014 size 14 |
|
908 | entry-0014 size 14 | |
898 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
909 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
899 | salvaged : d, ; |
|
910 | salvaged : d, ; | |
900 | ##### revision 32 ##### |
|
911 | ##### revision 32 ##### | |
901 | 1 sidedata entries |
|
912 | 1 sidedata entries | |
902 | entry-0014 size 14 |
|
913 | entry-0014 size 14 | |
903 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
914 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
904 | salvaged : d, ; |
|
915 | salvaged : d, ; | |
905 | ##### revision 33 ##### |
|
916 | ##### revision 33 ##### | |
906 | 1 sidedata entries |
|
917 | 1 sidedata entries | |
907 | entry-0014 size 14 |
|
918 | entry-0014 size 14 | |
908 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
919 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
909 | salvaged : d, ; |
|
920 | salvaged : d, ; | |
910 | ##### revision 34 ##### |
|
921 | ##### revision 34 ##### | |
911 | 1 sidedata entries |
|
922 | 1 sidedata entries | |
912 | entry-0014 size 24 |
|
923 | entry-0014 size 24 | |
913 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd' |
|
924 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd' | |
914 | removed : b, ; |
|
925 | removed : b, ; | |
915 | added p1: d, b; |
|
926 | added p1: d, b; | |
916 | ##### revision 35 ##### |
|
927 | ##### revision 35 ##### | |
917 | 1 sidedata entries |
|
928 | 1 sidedata entries | |
918 | entry-0014 size 4 |
|
929 | entry-0014 size 4 | |
919 | '\x00\x00\x00\x00' |
|
930 | '\x00\x00\x00\x00' | |
920 | ##### revision 36 ##### |
|
931 | ##### revision 36 ##### | |
921 | 1 sidedata entries |
|
932 | 1 sidedata entries | |
922 | entry-0014 size 4 |
|
933 | entry-0014 size 4 | |
923 | '\x00\x00\x00\x00' |
|
934 | '\x00\x00\x00\x00' | |
924 |
|
935 | |||
925 | #endif |
|
936 | #endif | |
926 |
|
937 | |||
927 |
|
938 | |||
928 | Test copy information chaining |
|
939 | Test copy information chaining | |
929 | ============================== |
|
940 | ============================== | |
930 |
|
941 | |||
931 | Check that matching only affect the destination and not intermediate path |
|
942 | Check that matching only affect the destination and not intermediate path | |
932 | ------------------------------------------------------------------------- |
|
943 | ------------------------------------------------------------------------- | |
933 |
|
944 | |||
934 | The two status call should give the same value for f |
|
945 | The two status call should give the same value for f | |
935 |
|
946 | |||
936 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' |
|
947 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' | |
937 | A f |
|
948 | A f | |
938 | a |
|
949 | a | |
939 | R a |
|
950 | R a | |
940 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f |
|
951 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f | |
941 | A f |
|
952 | A f | |
942 | a (no-changeset no-compatibility !) |
|
953 | a (no-changeset no-compatibility !) | |
943 |
|
954 | |||
944 | merging with unrelated change does not interfere with the renames |
|
955 | merging with unrelated change does not interfere with the renames | |
945 | --------------------------------------------------------------- |
|
956 | --------------------------------------------------------------- | |
946 |
|
957 | |||
947 | - rename on one side |
|
958 | - rename on one side | |
948 | - unrelated change on the other side |
|
959 | - unrelated change on the other side | |
949 |
|
960 | |||
950 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
961 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | |
951 | o 12 mABm-0 simple merge - the other way |
|
962 | o 12 mABm-0 simple merge - the other way | |
952 | |\ |
|
963 | |\ | |
953 | +---o 11 mBAm-0 simple merge - one way |
|
964 | +---o 11 mBAm-0 simple merge - one way | |
954 | | |/ |
|
965 | | |/ | |
955 | | o 5 b-1: b update |
|
966 | | o 5 b-1: b update | |
956 | | | |
|
967 | | | | |
957 | o | 4 a-2: e -move-> f |
|
968 | o | 4 a-2: e -move-> f | |
958 | | | |
|
969 | | | | |
959 | o | 3 a-1: d -move-> e |
|
970 | o | 3 a-1: d -move-> e | |
960 | |/ |
|
971 | |/ | |
961 | o 2 i-2: c -move-> d |
|
972 | o 2 i-2: c -move-> d | |
962 | | |
|
973 | | | |
963 | o 1 i-1: a -move-> c |
|
974 | o 1 i-1: a -move-> c | |
964 | | |
|
975 | | | |
965 | o 0 i-0 initial commit: a b h |
|
976 | o 0 i-0 initial commit: a b h | |
966 |
|
977 | |||
967 |
|
978 | |||
968 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' |
|
979 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' | |
969 | A f |
|
980 | A f | |
970 | d |
|
981 | d | |
971 | R d |
|
982 | R d | |
972 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' |
|
983 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' | |
973 | A f |
|
984 | A f | |
974 | d |
|
985 | d | |
975 | R d |
|
986 | R d | |
976 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' |
|
987 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' | |
977 | M b |
|
988 | M b | |
978 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' |
|
989 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' | |
979 | M b |
|
990 | M b | |
980 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' |
|
991 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' | |
981 | M b |
|
992 | M b | |
982 | A f |
|
993 | A f | |
983 | d |
|
994 | d | |
984 | R d |
|
995 | R d | |
985 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' |
|
996 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' | |
986 | M b |
|
997 | M b | |
987 | A f |
|
998 | A f | |
988 | d |
|
999 | d | |
989 | R d |
|
1000 | R d | |
990 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' |
|
1001 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' | |
991 | M b |
|
1002 | M b | |
992 | A f |
|
1003 | A f | |
993 | a |
|
1004 | a | |
994 | R a |
|
1005 | R a | |
995 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' |
|
1006 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' | |
996 | M b |
|
1007 | M b | |
997 | A f |
|
1008 | A f | |
998 | a |
|
1009 | a | |
999 | R a |
|
1010 | R a | |
1000 |
|
1011 | |||
1001 | merging with the side having a delete |
|
1012 | merging with the side having a delete | |
1002 | ------------------------------------- |
|
1013 | ------------------------------------- | |
1003 |
|
1014 | |||
1004 | case summary: |
|
1015 | case summary: | |
1005 | - one with change to an unrelated file |
|
1016 | - one with change to an unrelated file | |
1006 | - one deleting the change |
|
1017 | - one deleting the change | |
1007 | and recreate an unrelated file after the merge |
|
1018 | and recreate an unrelated file after the merge | |
1008 |
|
1019 | |||
1009 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
1020 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | |
1010 | o 16 mCBm-1 re-add d |
|
1021 | o 16 mCBm-1 re-add d | |
1011 | | |
|
1022 | | | |
1012 | o 15 mCBm-0 simple merge - the other way |
|
1023 | o 15 mCBm-0 simple merge - the other way | |
1013 | |\ |
|
1024 | |\ | |
1014 | | | o 14 mBCm-1 re-add d |
|
1025 | | | o 14 mBCm-1 re-add d | |
1015 | | | | |
|
1026 | | | | | |
1016 | +---o 13 mBCm-0 simple merge - one way |
|
1027 | +---o 13 mBCm-0 simple merge - one way | |
1017 | | |/ |
|
1028 | | |/ | |
1018 | | o 6 c-1 delete d |
|
1029 | | o 6 c-1 delete d | |
1019 | | | |
|
1030 | | | | |
1020 | o | 5 b-1: b update |
|
1031 | o | 5 b-1: b update | |
1021 | |/ |
|
1032 | |/ | |
1022 | o 2 i-2: c -move-> d |
|
1033 | o 2 i-2: c -move-> d | |
1023 | | |
|
1034 | | | |
1024 | o 1 i-1: a -move-> c |
|
1035 | o 1 i-1: a -move-> c | |
1025 | | |
|
1036 | | | |
1026 | o 0 i-0 initial commit: a b h |
|
1037 | o 0 i-0 initial commit: a b h | |
1027 |
|
1038 | |||
1028 | - comparing from the merge |
|
1039 | - comparing from the merge | |
1029 |
|
1040 | |||
1030 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' |
|
1041 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' | |
1031 | R d |
|
1042 | R d | |
1032 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' |
|
1043 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' | |
1033 | R d |
|
1044 | R d | |
1034 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' |
|
1045 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' | |
1035 | M b |
|
1046 | M b | |
1036 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' |
|
1047 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' | |
1037 | M b |
|
1048 | M b | |
1038 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' |
|
1049 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' | |
1039 | M b |
|
1050 | M b | |
1040 | R d |
|
1051 | R d | |
1041 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' |
|
1052 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' | |
1042 | M b |
|
1053 | M b | |
1043 | R d |
|
1054 | R d | |
1044 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' |
|
1055 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' | |
1045 | M b |
|
1056 | M b | |
1046 | R a |
|
1057 | R a | |
1047 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' |
|
1058 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' | |
1048 | M b |
|
1059 | M b | |
1049 | R a |
|
1060 | R a | |
1050 |
|
1061 | |||
1051 | - comparing with the merge children re-adding the file |
|
1062 | - comparing with the merge children re-adding the file | |
1052 |
|
1063 | |||
1053 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' |
|
1064 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' | |
1054 | M d |
|
1065 | M d | |
1055 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' |
|
1066 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' | |
1056 | M d |
|
1067 | M d | |
1057 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' |
|
1068 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' | |
1058 | M b |
|
1069 | M b | |
1059 | A d |
|
1070 | A d | |
1060 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' |
|
1071 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' | |
1061 | M b |
|
1072 | M b | |
1062 | A d |
|
1073 | A d | |
1063 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' |
|
1074 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' | |
1064 | M b |
|
1075 | M b | |
1065 | M d |
|
1076 | M d | |
1066 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' |
|
1077 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' | |
1067 | M b |
|
1078 | M b | |
1068 | M d |
|
1079 | M d | |
1069 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' |
|
1080 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' | |
1070 | M b |
|
1081 | M b | |
1071 | A d |
|
1082 | A d | |
1072 | R a |
|
1083 | R a | |
1073 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' |
|
1084 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' | |
1074 | M b |
|
1085 | M b | |
1075 | A d |
|
1086 | A d | |
1076 | R a |
|
1087 | R a | |
1077 |
|
1088 | |||
1078 | Comparing with a merge re-adding the file afterward |
|
1089 | Comparing with a merge re-adding the file afterward | |
1079 | --------------------------------------------------- |
|
1090 | --------------------------------------------------- | |
1080 |
|
1091 | |||
1081 | Merge: |
|
1092 | Merge: | |
1082 | - one with change to an unrelated file |
|
1093 | - one with change to an unrelated file | |
1083 | - one deleting and recreating the change |
|
1094 | - one deleting and recreating the change | |
1084 |
|
1095 | |||
1085 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
1096 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
1086 | o 18 mDBm-0 simple merge - the other way |
|
1097 | o 18 mDBm-0 simple merge - the other way | |
1087 | |\ |
|
1098 | |\ | |
1088 | +---o 17 mBDm-0 simple merge - one way |
|
1099 | +---o 17 mBDm-0 simple merge - one way | |
1089 | | |/ |
|
1100 | | |/ | |
1090 | | o 8 d-2 re-add d |
|
1101 | | o 8 d-2 re-add d | |
1091 | | | |
|
1102 | | | | |
1092 | | o 7 d-1 delete d |
|
1103 | | o 7 d-1 delete d | |
1093 | | | |
|
1104 | | | | |
1094 | o | 5 b-1: b update |
|
1105 | o | 5 b-1: b update | |
1095 | |/ |
|
1106 | |/ | |
1096 | o 2 i-2: c -move-> d |
|
1107 | o 2 i-2: c -move-> d | |
1097 | | |
|
1108 | | | |
1098 | o 1 i-1: a -move-> c |
|
1109 | o 1 i-1: a -move-> c | |
1099 | | |
|
1110 | | | |
1100 | o 0 i-0 initial commit: a b h |
|
1111 | o 0 i-0 initial commit: a b h | |
1101 |
|
1112 | |||
1102 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' |
|
1113 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' | |
1103 | M d |
|
1114 | M d | |
1104 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' |
|
1115 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' | |
1105 | M d |
|
1116 | M d | |
1106 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' |
|
1117 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' | |
1107 | M b |
|
1118 | M b | |
1108 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' |
|
1119 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' | |
1109 | M b |
|
1120 | M b | |
1110 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' |
|
1121 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' | |
1111 | M b |
|
1122 | M b | |
1112 | M d |
|
1123 | M d | |
1113 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' |
|
1124 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' | |
1114 | M b |
|
1125 | M b | |
1115 | M d |
|
1126 | M d | |
1116 |
|
1127 | |||
1117 | The bugs makes recorded copy is different depending of where we started the merge from since |
|
1128 | The bugs makes recorded copy is different depending of where we started the merge from since | |
1118 |
|
1129 | |||
1119 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' |
|
1130 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' | |
1120 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
1131 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
1121 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' |
|
1132 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' | |
1122 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
1133 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
1123 |
|
1134 | |||
1124 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' |
|
1135 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' | |
1125 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
1136 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
1126 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' |
|
1137 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' | |
1127 | 01c2f5eabdc4ce2bdee42b5f86311955e6c8f573 644 d (no-changeset !) |
|
1138 | d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !) | |
1128 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 d (changeset !) |
|
1139 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) | |
1129 | $ hg debugindex d | head -n 4 |
|
1140 | $ hg debugindex d | head -n 4 | |
1130 | rev linkrev nodeid p1 p2 |
|
1141 | rev linkrev nodeid p1 p2 | |
1131 |
0 2 |
|
1142 | 0 2 d8252ab2e760 000000000000 000000000000 (no-changeset !) | |
1132 |
0 2 |
|
1143 | 0 2 ae258f702dfe 000000000000 000000000000 (changeset !) | |
1133 | 1 8 b004912a8510 000000000000 000000000000 |
|
1144 | 1 8 b004912a8510 000000000000 000000000000 | |
1134 |
2 22 |
|
1145 | 2 22 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) | |
1135 |
2 25 |
|
1146 | 2 25 5cce88bf349f ae258f702dfe 000000000000 (changeset !) | |
1136 |
|
1147 | |||
1137 | Log output should not include a merge commit as it did not happen |
|
1148 | Log output should not include a merge commit as it did not happen | |
1138 |
|
1149 | |||
1139 | $ hg log -Gfr 'desc("mBDm-0")' d |
|
1150 | $ hg log -Gfr 'desc("mBDm-0")' d | |
1140 | o 8 d-2 re-add d |
|
1151 | o 8 d-2 re-add d | |
1141 | | |
|
1152 | | | |
1142 | ~ |
|
1153 | ~ | |
1143 |
|
1154 | |||
1144 | $ hg log -Gfr 'desc("mDBm-0")' d |
|
1155 | $ hg log -Gfr 'desc("mDBm-0")' d | |
1145 | o 8 d-2 re-add d |
|
1156 | o 8 d-2 re-add d | |
1146 | | |
|
1157 | | | |
1147 | ~ |
|
1158 | ~ | |
1148 |
|
1159 | |||
1149 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' |
|
1160 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' | |
1150 | M b |
|
1161 | M b | |
1151 | A d |
|
1162 | A d | |
1152 | R a |
|
1163 | R a | |
1153 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' |
|
1164 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' | |
1154 | M b |
|
1165 | M b | |
1155 | A d |
|
1166 | A d | |
1156 | R a |
|
1167 | R a | |
1157 |
|
1168 | |||
1158 |
|
1169 | |||
1159 | Comparing with a merge with colliding rename |
|
1170 | Comparing with a merge with colliding rename | |
1160 | -------------------------------------------- |
|
1171 | -------------------------------------------- | |
1161 |
|
1172 | |||
1162 | - the "e-" branch renaming b to f (through 'g') |
|
1173 | - the "e-" branch renaming b to f (through 'g') | |
1163 | - the "a-" branch renaming d to f (through e) |
|
1174 | - the "a-" branch renaming d to f (through e) | |
1164 |
|
1175 | |||
1165 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
1176 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
1166 | o 20 mEAm-0 simple merge - the other way |
|
1177 | o 20 mEAm-0 simple merge - the other way | |
1167 | |\ |
|
1178 | |\ | |
1168 | +---o 19 mAEm-0 simple merge - one way |
|
1179 | +---o 19 mAEm-0 simple merge - one way | |
1169 | | |/ |
|
1180 | | |/ | |
1170 | | o 10 e-2 g -move-> f |
|
1181 | | o 10 e-2 g -move-> f | |
1171 | | | |
|
1182 | | | | |
1172 | | o 9 e-1 b -move-> g |
|
1183 | | o 9 e-1 b -move-> g | |
1173 | | | |
|
1184 | | | | |
1174 | o | 4 a-2: e -move-> f |
|
1185 | o | 4 a-2: e -move-> f | |
1175 | | | |
|
1186 | | | | |
1176 | o | 3 a-1: d -move-> e |
|
1187 | o | 3 a-1: d -move-> e | |
1177 | |/ |
|
1188 | |/ | |
1178 | o 2 i-2: c -move-> d |
|
1189 | o 2 i-2: c -move-> d | |
1179 | | |
|
1190 | | | |
1180 | o 1 i-1: a -move-> c |
|
1191 | o 1 i-1: a -move-> c | |
1181 | | |
|
1192 | | | |
1182 | o 0 i-0 initial commit: a b h |
|
1193 | o 0 i-0 initial commit: a b h | |
1183 |
|
1194 | |||
1184 | #if no-changeset |
|
1195 | #if no-changeset | |
1185 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
1196 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |
1186 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f |
|
1197 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f | |
1187 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
1198 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |
1188 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f |
|
1199 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f | |
1189 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
1200 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
1190 | 0dd616bc7ab1a111921d95d76f69cda5c2ac539c 644 f |
|
1201 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f | |
1191 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
1202 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
1192 | 6da5a2eecb9c833f830b67a4972366d49a9a142c 644 f |
|
1203 | e8825b386367b29fec957283a80bb47b47483fe1 644 f | |
1193 | $ hg debugindex f |
|
1204 | $ hg debugindex f | |
1194 | rev linkrev nodeid p1 p2 |
|
1205 | rev linkrev nodeid p1 p2 | |
1195 |
0 4 |
|
1206 | 0 4 b76eb76580df 000000000000 000000000000 | |
1196 |
1 10 |
|
1207 | 1 10 e8825b386367 000000000000 000000000000 | |
1197 | 2 19 eb806e34ef6b 0dd616bc7ab1 6da5a2eecb9c |
|
1208 | 2 19 2ff93c643948 b76eb76580df e8825b386367 | |
1198 | #else |
|
1209 | #else | |
1199 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
1210 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |
1200 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 f |
|
1211 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
1201 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
1212 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |
1202 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 f |
|
1213 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
1203 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
1214 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
1204 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 f |
|
1215 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
1205 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
1216 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
1206 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 f |
|
1217 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
1207 | $ hg debugindex f |
|
1218 | $ hg debugindex f | |
1208 | rev linkrev nodeid p1 p2 |
|
1219 | rev linkrev nodeid p1 p2 | |
1209 |
0 4 |
|
1220 | 0 4 ae258f702dfe 000000000000 000000000000 | |
1210 | #endif |
|
1221 | #endif | |
1211 |
|
1222 | |||
1212 | # Here the filelog based implementation is not looking at the rename |
|
1223 | # Here the filelog based implementation is not looking at the rename | |
1213 | # information (because the file exist on both side). However the changelog |
|
1224 | # information (because the file exist on both side). However the changelog | |
1214 | # based on works fine. We have different output. |
|
1225 | # based on works fine. We have different output. | |
1215 |
|
1226 | |||
1216 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' |
|
1227 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' | |
1217 | M f (no-changeset !) |
|
1228 | M f (no-changeset !) | |
1218 | b (no-filelog no-changeset !) |
|
1229 | b (no-filelog no-changeset !) | |
1219 | R b |
|
1230 | R b | |
1220 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' |
|
1231 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' | |
1221 | M f (no-changeset !) |
|
1232 | M f (no-changeset !) | |
1222 | b (no-filelog no-changeset !) |
|
1233 | b (no-filelog no-changeset !) | |
1223 | R b |
|
1234 | R b | |
1224 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' |
|
1235 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' | |
1225 | M f (no-changeset !) |
|
1236 | M f (no-changeset !) | |
1226 | d (no-filelog no-changeset !) |
|
1237 | d (no-filelog no-changeset !) | |
1227 | R d |
|
1238 | R d | |
1228 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' |
|
1239 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' | |
1229 | M f (no-changeset !) |
|
1240 | M f (no-changeset !) | |
1230 | d (no-filelog no-changeset !) |
|
1241 | d (no-filelog no-changeset !) | |
1231 | R d |
|
1242 | R d | |
1232 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
|
1243 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' | |
1233 | A f |
|
1244 | A f | |
1234 | d |
|
1245 | d | |
1235 | R d |
|
1246 | R d | |
1236 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
|
1247 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' | |
1237 | A f |
|
1248 | A f | |
1238 | b |
|
1249 | b | |
1239 | R b |
|
1250 | R b | |
1240 |
|
1251 | |||
1241 | # From here, we run status against revision where both source file exists. |
|
1252 | # From here, we run status against revision where both source file exists. | |
1242 | # |
|
1253 | # | |
1243 | # The filelog based implementation picks an arbitrary side based on revision |
|
1254 | # The filelog based implementation picks an arbitrary side based on revision | |
1244 | # numbers. So the same side "wins" whatever the parents order is. This is |
|
1255 | # numbers. So the same side "wins" whatever the parents order is. This is | |
1245 | # sub-optimal because depending on revision numbers means the result can be |
|
1256 | # sub-optimal because depending on revision numbers means the result can be | |
1246 | # different from one repository to the next. |
|
1257 | # different from one repository to the next. | |
1247 | # |
|
1258 | # | |
1248 | # The changeset based algorithm use the parent order to break tie on conflicting |
|
1259 | # The changeset based algorithm use the parent order to break tie on conflicting | |
1249 | # information and will have a different order depending on who is p1 and p2. |
|
1260 | # information and will have a different order depending on who is p1 and p2. | |
1250 | # That order is stable accross repositories. (data from p1 prevails) |
|
1261 | # That order is stable accross repositories. (data from p1 prevails) | |
1251 |
|
1262 | |||
1252 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' |
|
1263 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' | |
1253 | A f |
|
1264 | A f | |
1254 | d |
|
1265 | d | |
1255 | R b |
|
1266 | R b | |
1256 | R d |
|
1267 | R d | |
1257 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' |
|
1268 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' | |
1258 | A f |
|
1269 | A f | |
1259 | d (filelog !) |
|
1270 | d (filelog !) | |
1260 | b (no-filelog !) |
|
1271 | b (no-filelog !) | |
1261 | R b |
|
1272 | R b | |
1262 | R d |
|
1273 | R d | |
1263 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' |
|
1274 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' | |
1264 | A f |
|
1275 | A f | |
1265 | a |
|
1276 | a | |
1266 | R a |
|
1277 | R a | |
1267 | R b |
|
1278 | R b | |
1268 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' |
|
1279 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' | |
1269 | A f |
|
1280 | A f | |
1270 | a (filelog !) |
|
1281 | a (filelog !) | |
1271 | b (no-filelog !) |
|
1282 | b (no-filelog !) | |
1272 | R a |
|
1283 | R a | |
1273 | R b |
|
1284 | R b | |
1274 |
|
1285 | |||
1275 |
|
1286 | |||
1276 | Note: |
|
1287 | Note: | |
1277 | | In this case, one of the merge wrongly record a merge while there is none. |
|
1288 | | In this case, one of the merge wrongly record a merge while there is none. | |
1278 | | This lead to bad copy tracing information to be dug up. |
|
1289 | | This lead to bad copy tracing information to be dug up. | |
1279 |
|
1290 | |||
1280 |
|
1291 | |||
1281 | Merge: |
|
1292 | Merge: | |
1282 | - one with change to an unrelated file (b) |
|
1293 | - one with change to an unrelated file (b) | |
1283 | - one overwriting a file (d) with a rename (from h to i to d) |
|
1294 | - one overwriting a file (d) with a rename (from h to i to d) | |
1284 |
|
1295 | |||
1285 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
1296 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |
1286 | o 24 mFBm-0 simple merge - the other way |
|
1297 | o 24 mFBm-0 simple merge - the other way | |
1287 | |\ |
|
1298 | |\ | |
1288 | +---o 23 mBFm-0 simple merge - one way |
|
1299 | +---o 23 mBFm-0 simple merge - one way | |
1289 | | |/ |
|
1300 | | |/ | |
1290 | | o 22 f-2: rename i -> d |
|
1301 | | o 22 f-2: rename i -> d | |
1291 | | | |
|
1302 | | | | |
1292 | | o 21 f-1: rename h -> i |
|
1303 | | o 21 f-1: rename h -> i | |
1293 | | | |
|
1304 | | | | |
1294 | o | 5 b-1: b update |
|
1305 | o | 5 b-1: b update | |
1295 | |/ |
|
1306 | |/ | |
1296 | o 2 i-2: c -move-> d |
|
1307 | o 2 i-2: c -move-> d | |
1297 | | |
|
1308 | | | |
1298 | o 1 i-1: a -move-> c |
|
1309 | o 1 i-1: a -move-> c | |
1299 | | |
|
1310 | | | |
1300 | o 0 i-0 initial commit: a b h |
|
1311 | o 0 i-0 initial commit: a b h | |
1301 |
|
1312 | |||
1302 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' |
|
1313 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' | |
1303 | M b |
|
1314 | M b | |
1304 | A d |
|
1315 | A d | |
1305 | h |
|
1316 | h | |
1306 | R a |
|
1317 | R a | |
1307 | R h |
|
1318 | R h | |
1308 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' |
|
1319 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' | |
1309 | M b |
|
1320 | M b | |
1310 | A d |
|
1321 | A d | |
1311 | h |
|
1322 | h | |
1312 | R a |
|
1323 | R a | |
1313 | R h |
|
1324 | R h | |
1314 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' |
|
1325 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' | |
1315 | M d (no-changeset !) |
|
1326 | M d (no-changeset !) | |
1316 | h (no-filelog no-changeset !) |
|
1327 | h (no-filelog no-changeset !) | |
1317 | R h |
|
1328 | R h | |
1318 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' |
|
1329 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' | |
1319 | M b |
|
1330 | M b | |
1320 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' |
|
1331 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' | |
1321 | M b |
|
1332 | M b | |
1322 | M d (no-changeset !) |
|
1333 | M d (no-changeset !) | |
1323 | i (no-filelog no-changeset !) |
|
1334 | i (no-filelog no-changeset !) | |
1324 | R i |
|
1335 | R i | |
1325 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' |
|
1336 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' | |
1326 | M d (no-changeset !) |
|
1337 | M d (no-changeset !) | |
1327 | h (no-filelog no-changeset !) |
|
1338 | h (no-filelog no-changeset !) | |
1328 | R h |
|
1339 | R h | |
1329 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' |
|
1340 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' | |
1330 | M b |
|
1341 | M b | |
1331 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' |
|
1342 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' | |
1332 | M b |
|
1343 | M b | |
1333 | M d (no-changeset !) |
|
1344 | M d (no-changeset !) | |
1334 | i (no-filelog no-changeset !) |
|
1345 | i (no-filelog no-changeset !) | |
1335 | R i |
|
1346 | R i | |
1336 |
|
1347 | |||
1337 | #if no-changeset |
|
1348 | #if no-changeset | |
1338 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
1349 | $ hg log -Gfr 'desc("mBFm-0")' d | |
1339 | o 22 f-2: rename i -> d |
|
1350 | o 22 f-2: rename i -> d | |
1340 | | |
|
1351 | | | |
1341 | o 21 f-1: rename h -> i |
|
1352 | o 21 f-1: rename h -> i | |
1342 | : |
|
1353 | : | |
1343 | o 0 i-0 initial commit: a b h |
|
1354 | o 0 i-0 initial commit: a b h | |
1344 |
|
1355 | |||
1345 | #else |
|
1356 | #else | |
1346 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1357 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1347 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
1358 | $ hg log -Gfr 'desc("mBFm-0")' d | |
1348 | o 2 i-2: c -move-> d |
|
1359 | o 2 i-2: c -move-> d | |
1349 | | |
|
1360 | | | |
1350 | ~ |
|
1361 | ~ | |
1351 | #endif |
|
1362 | #endif | |
1352 |
|
1363 | |||
1353 | #if no-changeset |
|
1364 | #if no-changeset | |
1354 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
1365 | $ hg log -Gfr 'desc("mFBm-0")' d | |
1355 | o 22 f-2: rename i -> d |
|
1366 | o 22 f-2: rename i -> d | |
1356 | | |
|
1367 | | | |
1357 | o 21 f-1: rename h -> i |
|
1368 | o 21 f-1: rename h -> i | |
1358 | : |
|
1369 | : | |
1359 | o 0 i-0 initial commit: a b h |
|
1370 | o 0 i-0 initial commit: a b h | |
1360 |
|
1371 | |||
1361 | #else |
|
1372 | #else | |
1362 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1373 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1363 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
1374 | $ hg log -Gfr 'desc("mFBm-0")' d | |
1364 | o 2 i-2: c -move-> d |
|
1375 | o 2 i-2: c -move-> d | |
1365 | | |
|
1376 | | | |
1366 | ~ |
|
1377 | ~ | |
1367 | #endif |
|
1378 | #endif | |
1368 |
|
1379 | |||
1369 |
|
1380 | |||
1370 | Merge: |
|
1381 | Merge: | |
1371 | - one with change to a file |
|
1382 | - one with change to a file | |
1372 | - one deleting and recreating the file |
|
1383 | - one deleting and recreating the file | |
1373 |
|
1384 | |||
1374 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should |
|
1385 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should | |
1375 | consider history and rename on both branch of the merge. |
|
1386 | consider history and rename on both branch of the merge. | |
1376 |
|
1387 | |||
1377 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
1388 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |
1378 | o 27 mGDm-0 simple merge - the other way |
|
1389 | o 27 mGDm-0 simple merge - the other way | |
1379 | |\ |
|
1390 | |\ | |
1380 | +---o 26 mDGm-0 simple merge - one way |
|
1391 | +---o 26 mDGm-0 simple merge - one way | |
1381 | | |/ |
|
1392 | | |/ | |
1382 | | o 25 g-1: update d |
|
1393 | | o 25 g-1: update d | |
1383 | | | |
|
1394 | | | | |
1384 | o | 8 d-2 re-add d |
|
1395 | o | 8 d-2 re-add d | |
1385 | | | |
|
1396 | | | | |
1386 | o | 7 d-1 delete d |
|
1397 | o | 7 d-1 delete d | |
1387 | |/ |
|
1398 | |/ | |
1388 | o 2 i-2: c -move-> d |
|
1399 | o 2 i-2: c -move-> d | |
1389 | | |
|
1400 | | | |
1390 | o 1 i-1: a -move-> c |
|
1401 | o 1 i-1: a -move-> c | |
1391 | | |
|
1402 | | | |
1392 | o 0 i-0 initial commit: a b h |
|
1403 | o 0 i-0 initial commit: a b h | |
1393 |
|
1404 | |||
1394 | One side of the merge have a long history with rename. The other side of the |
|
1405 | One side of the merge have a long history with rename. The other side of the | |
1395 | merge point to a new file with a smaller history. Each side is "valid". |
|
1406 | merge point to a new file with a smaller history. Each side is "valid". | |
1396 |
|
1407 | |||
1397 | (and again the filelog based algorithm only explore one, with a pick based on |
|
1408 | (and again the filelog based algorithm only explore one, with a pick based on | |
1398 | revision numbers) |
|
1409 | revision numbers) | |
1399 |
|
1410 | |||
1400 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' |
|
1411 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' | |
1401 | A d |
|
1412 | A d | |
1402 | a (filelog !) |
|
1413 | a (filelog !) | |
1403 | R a |
|
1414 | R a | |
1404 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' |
|
1415 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' | |
1405 | A d |
|
1416 | A d | |
1406 | a |
|
1417 | a | |
1407 | R a |
|
1418 | R a | |
1408 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' |
|
1419 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' | |
1409 | M d |
|
1420 | M d | |
1410 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' |
|
1421 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' | |
1411 | M d |
|
1422 | M d | |
1412 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' |
|
1423 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' | |
1413 | M d |
|
1424 | M d | |
1414 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' |
|
1425 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' | |
1415 | M d |
|
1426 | M d | |
1416 |
|
1427 | |||
1417 | #if no-changeset |
|
1428 | #if no-changeset | |
1418 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
1429 | $ hg log -Gfr 'desc("mDGm-0")' d | |
1419 | o 26 mDGm-0 simple merge - one way |
|
1430 | o 26 mDGm-0 simple merge - one way | |
1420 | |\ |
|
1431 | |\ | |
1421 | | o 25 g-1: update d |
|
1432 | | o 25 g-1: update d | |
1422 | | | |
|
1433 | | | | |
1423 | o | 8 d-2 re-add d |
|
1434 | o | 8 d-2 re-add d | |
1424 | |/ |
|
1435 | |/ | |
1425 | o 2 i-2: c -move-> d |
|
1436 | o 2 i-2: c -move-> d | |
1426 | | |
|
1437 | | | |
1427 | o 1 i-1: a -move-> c |
|
1438 | o 1 i-1: a -move-> c | |
1428 | | |
|
1439 | | | |
1429 | o 0 i-0 initial commit: a b h |
|
1440 | o 0 i-0 initial commit: a b h | |
1430 |
|
1441 | |||
1431 | #else |
|
1442 | #else | |
1432 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1443 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1433 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
1444 | $ hg log -Gfr 'desc("mDGm-0")' d | |
1434 | o 26 mDGm-0 simple merge - one way |
|
1445 | o 26 mDGm-0 simple merge - one way | |
1435 | |\ |
|
1446 | |\ | |
1436 | | o 25 g-1: update d |
|
1447 | | o 25 g-1: update d | |
1437 | | | |
|
1448 | | | | |
1438 | o | 8 d-2 re-add d |
|
1449 | o | 8 d-2 re-add d | |
1439 | |/ |
|
1450 | |/ | |
1440 | o 2 i-2: c -move-> d |
|
1451 | o 2 i-2: c -move-> d | |
1441 | | |
|
1452 | | | |
1442 | ~ |
|
1453 | ~ | |
1443 | #endif |
|
1454 | #endif | |
1444 |
|
1455 | |||
1445 |
|
1456 | |||
1446 | #if no-changeset |
|
1457 | #if no-changeset | |
1447 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
1458 | $ hg log -Gfr 'desc("mDGm-0")' d | |
1448 | o 26 mDGm-0 simple merge - one way |
|
1459 | o 26 mDGm-0 simple merge - one way | |
1449 | |\ |
|
1460 | |\ | |
1450 | | o 25 g-1: update d |
|
1461 | | o 25 g-1: update d | |
1451 | | | |
|
1462 | | | | |
1452 | o | 8 d-2 re-add d |
|
1463 | o | 8 d-2 re-add d | |
1453 | |/ |
|
1464 | |/ | |
1454 | o 2 i-2: c -move-> d |
|
1465 | o 2 i-2: c -move-> d | |
1455 | | |
|
1466 | | | |
1456 | o 1 i-1: a -move-> c |
|
1467 | o 1 i-1: a -move-> c | |
1457 | | |
|
1468 | | | |
1458 | o 0 i-0 initial commit: a b h |
|
1469 | o 0 i-0 initial commit: a b h | |
1459 |
|
1470 | |||
1460 | #else |
|
1471 | #else | |
1461 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1472 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1462 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
1473 | $ hg log -Gfr 'desc("mDGm-0")' d | |
1463 | o 26 mDGm-0 simple merge - one way |
|
1474 | o 26 mDGm-0 simple merge - one way | |
1464 | |\ |
|
1475 | |\ | |
1465 | | o 25 g-1: update d |
|
1476 | | o 25 g-1: update d | |
1466 | | | |
|
1477 | | | | |
1467 | o | 8 d-2 re-add d |
|
1478 | o | 8 d-2 re-add d | |
1468 | |/ |
|
1479 | |/ | |
1469 | o 2 i-2: c -move-> d |
|
1480 | o 2 i-2: c -move-> d | |
1470 | | |
|
1481 | | | |
1471 | ~ |
|
1482 | ~ | |
1472 | #endif |
|
1483 | #endif | |
1473 |
|
1484 | |||
1474 |
|
1485 | |||
1475 | Merge: |
|
1486 | Merge: | |
1476 | - one with change to a file (d) |
|
1487 | - one with change to a file (d) | |
1477 | - one overwriting that file with a rename (from h to i, to d) |
|
1488 | - one overwriting that file with a rename (from h to i, to d) | |
1478 |
|
1489 | |||
1479 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
1490 | This case is similar to BF/FB, but an actual merge happens, so both side of the | |
1480 | history are relevant. |
|
1491 | history are relevant. | |
1481 |
|
1492 | |||
1482 |
|
1493 | |||
1483 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
1494 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |
1484 | o 29 mGFm-0 simple merge - the other way |
|
1495 | o 29 mGFm-0 simple merge - the other way | |
1485 | |\ |
|
1496 | |\ | |
1486 | +---o 28 mFGm-0 simple merge - one way |
|
1497 | +---o 28 mFGm-0 simple merge - one way | |
1487 | | |/ |
|
1498 | | |/ | |
1488 | | o 25 g-1: update d |
|
1499 | | o 25 g-1: update d | |
1489 | | | |
|
1500 | | | | |
1490 | o | 22 f-2: rename i -> d |
|
1501 | o | 22 f-2: rename i -> d | |
1491 | | | |
|
1502 | | | | |
1492 | o | 21 f-1: rename h -> i |
|
1503 | o | 21 f-1: rename h -> i | |
1493 | |/ |
|
1504 | |/ | |
1494 | o 2 i-2: c -move-> d |
|
1505 | o 2 i-2: c -move-> d | |
1495 | | |
|
1506 | | | |
1496 | o 1 i-1: a -move-> c |
|
1507 | o 1 i-1: a -move-> c | |
1497 | | |
|
1508 | | | |
1498 | o 0 i-0 initial commit: a b h |
|
1509 | o 0 i-0 initial commit: a b h | |
1499 |
|
1510 | |||
1500 |
|
1511 | |||
1501 | Note: |
|
1512 | Note: | |
1502 | | In this case, the merge get conflicting information since on one side we have |
|
1513 | | In this case, the merge get conflicting information since on one side we have | |
1503 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
1514 | | "a -> c -> d". and one the other one we have "h -> i -> d". | |
1504 | | |
|
1515 | | | |
1505 | | The current code arbitrarily pick one side depending the ordering of the merged hash: |
|
1516 | | The current code arbitrarily pick one side depending the ordering of the merged hash: | |
1506 |
|
1517 | |||
1507 | 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"): |
|
1518 | 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"): | |
1508 |
|
1519 | |||
1509 | Details on this hash ordering pick: |
|
1520 | Details on this hash ordering pick: | |
1510 |
|
1521 | |||
1511 | $ hg manifest --debug 'desc("g-1")' | egrep 'd$' |
|
1522 | $ hg manifest --debug 'desc("g-1")' | egrep 'd$' | |
1512 | 7bded9d9da1f7bf9bf7cbfb24fe1e6ccf68ec440 644 d (no-changeset !) |
|
1523 | 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !) | |
1513 | 68d5bca9df0577b6bc2ea30ca724e13ead60da81 644 d (changeset !) |
|
1524 | 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !) | |
1514 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d |
|
1525 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d | |
1515 | A d |
|
1526 | A d | |
1516 | a (no-changeset no-compatibility !) |
|
1527 | a (no-changeset no-compatibility !) | |
1517 |
|
1528 | |||
1518 | $ hg manifest --debug 'desc("f-2")' | egrep 'd$' |
|
1529 | $ hg manifest --debug 'desc("f-2")' | egrep 'd$' | |
1519 | c72365ee036fca4fb27fd745459bfb6ea1ac6993 644 d (no-changeset !) |
|
1530 | 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !) | |
1520 | b80de5d138758541c5f05265ad144ab9fa86d1db 644 d (changeset !) |
|
1531 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) | |
1521 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d |
|
1532 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d | |
1522 | A d |
|
1533 | A d | |
1523 | h (no-changeset no-compatibility !) |
|
1534 | h (no-changeset no-compatibility !) | |
1524 |
|
1535 | |||
1525 | Copy tracing data on the resulting merge: |
|
1536 | Copy tracing data on the resulting merge: | |
1526 |
|
1537 | |||
1527 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' |
|
1538 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' | |
1528 | A d |
|
1539 | A d | |
1529 | h (no-filelog !) |
|
1540 | h (no-filelog !) | |
1530 | a (filelog !) |
|
1541 | a (filelog !) | |
1531 | R a |
|
1542 | R a | |
1532 | R h |
|
1543 | R h | |
1533 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' |
|
1544 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' | |
1534 | A d |
|
1545 | A d | |
1535 | a (no-changeset !) |
|
1546 | a (no-changeset !) | |
1536 | h (changeset !) |
|
1547 | h (changeset !) | |
1537 | R a |
|
1548 | R a | |
1538 | R h |
|
1549 | R h | |
1539 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' |
|
1550 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' | |
1540 | M d |
|
1551 | M d | |
1541 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' |
|
1552 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' | |
1542 | M d |
|
1553 | M d | |
1543 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' |
|
1554 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' | |
1544 | M d |
|
1555 | M d | |
1545 | i (no-filelog !) |
|
1556 | i (no-filelog !) | |
1546 | R i |
|
1557 | R i | |
1547 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' |
|
1558 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' | |
1548 | M d |
|
1559 | M d | |
1549 | i (no-filelog !) |
|
1560 | i (no-filelog !) | |
1550 | R i |
|
1561 | R i | |
1551 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' |
|
1562 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' | |
1552 | M d (no-changeset !) |
|
1563 | M d (no-changeset !) | |
1553 | h (no-filelog no-changeset !) |
|
1564 | h (no-filelog no-changeset !) | |
1554 | R h |
|
1565 | R h | |
1555 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' |
|
1566 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' | |
1556 | M d (no-changeset !) |
|
1567 | M d (no-changeset !) | |
1557 | h (no-filelog no-changeset !) |
|
1568 | h (no-filelog no-changeset !) | |
1558 | R h |
|
1569 | R h | |
1559 |
|
1570 | |||
1560 | #if no-changeset |
|
1571 | #if no-changeset | |
1561 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
1572 | $ hg log -Gfr 'desc("mFGm-0")' d | |
1562 | o 28 mFGm-0 simple merge - one way |
|
1573 | o 28 mFGm-0 simple merge - one way | |
1563 | |\ |
|
1574 | |\ | |
1564 | | o 25 g-1: update d |
|
1575 | | o 25 g-1: update d | |
1565 | | | |
|
1576 | | | | |
1566 | o | 22 f-2: rename i -> d |
|
1577 | o | 22 f-2: rename i -> d | |
1567 | | | |
|
1578 | | | | |
1568 | o | 21 f-1: rename h -> i |
|
1579 | o | 21 f-1: rename h -> i | |
1569 | |/ |
|
1580 | |/ | |
1570 | o 2 i-2: c -move-> d |
|
1581 | o 2 i-2: c -move-> d | |
1571 | | |
|
1582 | | | |
1572 | o 1 i-1: a -move-> c |
|
1583 | o 1 i-1: a -move-> c | |
1573 | | |
|
1584 | | | |
1574 | o 0 i-0 initial commit: a b h |
|
1585 | o 0 i-0 initial commit: a b h | |
1575 |
|
1586 | |||
1576 | #else |
|
1587 | #else | |
1577 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1588 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1578 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
1589 | $ hg log -Gfr 'desc("mFGm-0")' d | |
1579 | o 25 g-1: update d |
|
1590 | o 25 g-1: update d | |
1580 | | |
|
1591 | | | |
1581 | o 2 i-2: c -move-> d |
|
1592 | o 2 i-2: c -move-> d | |
1582 | | |
|
1593 | | | |
1583 | ~ |
|
1594 | ~ | |
1584 | #endif |
|
1595 | #endif | |
1585 |
|
1596 | |||
1586 | #if no-changeset |
|
1597 | #if no-changeset | |
1587 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
1598 | $ hg log -Gfr 'desc("mGFm-0")' d | |
1588 | o 29 mGFm-0 simple merge - the other way |
|
1599 | o 29 mGFm-0 simple merge - the other way | |
1589 | |\ |
|
1600 | |\ | |
1590 | | o 25 g-1: update d |
|
1601 | | o 25 g-1: update d | |
1591 | | | |
|
1602 | | | | |
1592 | o | 22 f-2: rename i -> d |
|
1603 | o | 22 f-2: rename i -> d | |
1593 | | | |
|
1604 | | | | |
1594 | o | 21 f-1: rename h -> i |
|
1605 | o | 21 f-1: rename h -> i | |
1595 | |/ |
|
1606 | |/ | |
1596 | o 2 i-2: c -move-> d |
|
1607 | o 2 i-2: c -move-> d | |
1597 | | |
|
1608 | | | |
1598 | o 1 i-1: a -move-> c |
|
1609 | o 1 i-1: a -move-> c | |
1599 | | |
|
1610 | | | |
1600 | o 0 i-0 initial commit: a b h |
|
1611 | o 0 i-0 initial commit: a b h | |
1601 |
|
1612 | |||
1602 | #else |
|
1613 | #else | |
1603 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
1614 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
1604 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
1615 | $ hg log -Gfr 'desc("mGFm-0")' d | |
1605 | o 25 g-1: update d |
|
1616 | o 25 g-1: update d | |
1606 | | |
|
1617 | | | |
1607 | o 2 i-2: c -move-> d |
|
1618 | o 2 i-2: c -move-> d | |
1608 | | |
|
1619 | | | |
1609 | ~ |
|
1620 | ~ | |
1610 | #endif |
|
1621 | #endif | |
1611 |
|
1622 | |||
1612 |
|
1623 | |||
1613 | Comparing with merging with a deletion (and keeping the file) |
|
1624 | Comparing with merging with a deletion (and keeping the file) | |
1614 | ------------------------------------------------------------- |
|
1625 | ------------------------------------------------------------- | |
1615 |
|
1626 | |||
1616 | Merge: |
|
1627 | Merge: | |
1617 | - one removing a file (d) |
|
1628 | - one removing a file (d) | |
1618 | - one updating that file |
|
1629 | - one updating that file | |
1619 | - the merge keep the modified version of the file (canceling the delete) |
|
1630 | - the merge keep the modified version of the file (canceling the delete) | |
1620 |
|
1631 | |||
1621 | In this case, the file keep on living after the merge. So we should not drop its |
|
1632 | In this case, the file keep on living after the merge. So we should not drop its | |
1622 | copy tracing chain. |
|
1633 | copy tracing chain. | |
1623 |
|
1634 | |||
1624 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' |
|
1635 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' | |
1625 | o 31 mGCm-0 |
|
1636 | o 31 mGCm-0 | |
1626 | |\ |
|
1637 | |\ | |
1627 | +---o 30 mCGm-0 |
|
1638 | +---o 30 mCGm-0 | |
1628 | | |/ |
|
1639 | | |/ | |
1629 | | o 25 g-1: update d |
|
1640 | | o 25 g-1: update d | |
1630 | | | |
|
1641 | | | | |
1631 | o | 6 c-1 delete d |
|
1642 | o | 6 c-1 delete d | |
1632 | |/ |
|
1643 | |/ | |
1633 | o 2 i-2: c -move-> d |
|
1644 | o 2 i-2: c -move-> d | |
1634 | | |
|
1645 | | | |
1635 | o 1 i-1: a -move-> c |
|
1646 | o 1 i-1: a -move-> c | |
1636 | | |
|
1647 | | | |
1637 | o 0 i-0 initial commit: a b h |
|
1648 | o 0 i-0 initial commit: a b h | |
1638 |
|
1649 | |||
1639 |
|
1650 | |||
1640 | 'a' is the copy source of 'd' |
|
1651 | 'a' is the copy source of 'd' | |
1641 |
|
1652 | |||
1642 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' |
|
1653 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' | |
1643 | A d |
|
1654 | A d | |
1644 | a (no-compatibility no-changeset !) |
|
1655 | a (no-compatibility no-changeset !) | |
1645 | R a |
|
1656 | R a | |
1646 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' |
|
1657 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' | |
1647 | A d |
|
1658 | A d | |
1648 | a (no-compatibility no-changeset !) |
|
1659 | a (no-compatibility no-changeset !) | |
1649 | R a |
|
1660 | R a | |
1650 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' |
|
1661 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' | |
1651 | A d |
|
1662 | A d | |
1652 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' |
|
1663 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' | |
1653 | A d |
|
1664 | A d | |
1654 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' |
|
1665 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' | |
1655 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' |
|
1666 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' | |
1656 |
|
1667 | |||
1657 |
|
1668 | |||
1658 | Comparing with merge restoring an untouched deleted file |
|
1669 | Comparing with merge restoring an untouched deleted file | |
1659 | -------------------------------------------------------- |
|
1670 | -------------------------------------------------------- | |
1660 |
|
1671 | |||
1661 | Merge: |
|
1672 | Merge: | |
1662 | - one removing a file (d) |
|
1673 | - one removing a file (d) | |
1663 | - one leaving the file untouched |
|
1674 | - one leaving the file untouched | |
1664 | - the merge actively restore the file to the same content. |
|
1675 | - the merge actively restore the file to the same content. | |
1665 |
|
1676 | |||
1666 | In this case, the file keep on living after the merge. So we should not drop its |
|
1677 | In this case, the file keep on living after the merge. So we should not drop its | |
1667 | copy tracing chain. |
|
1678 | copy tracing chain. | |
1668 |
|
1679 | |||
1669 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' |
|
1680 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | |
1670 | o 33 mBC-revert-m-0 |
|
1681 | o 33 mBC-revert-m-0 | |
1671 | |\ |
|
1682 | |\ | |
1672 | +---o 32 mCB-revert-m-0 |
|
1683 | +---o 32 mCB-revert-m-0 | |
1673 | | |/ |
|
1684 | | |/ | |
1674 | | o 6 c-1 delete d |
|
1685 | | o 6 c-1 delete d | |
1675 | | | |
|
1686 | | | | |
1676 | o | 5 b-1: b update |
|
1687 | o | 5 b-1: b update | |
1677 | |/ |
|
1688 | |/ | |
1678 | o 2 i-2: c -move-> d |
|
1689 | o 2 i-2: c -move-> d | |
1679 | | |
|
1690 | | | |
1680 | o 1 i-1: a -move-> c |
|
1691 | o 1 i-1: a -move-> c | |
1681 | | |
|
1692 | | | |
1682 | o 0 i-0 initial commit: a b h |
|
1693 | o 0 i-0 initial commit: a b h | |
1683 |
|
1694 | |||
1684 |
|
1695 | |||
1685 | 'a' is the the copy source of 'd' |
|
1696 | 'a' is the the copy source of 'd' | |
1686 |
|
1697 | |||
1687 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' |
|
1698 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | |
1688 | M b |
|
1699 | M b | |
1689 | A d |
|
1700 | A d | |
1690 | a (no-compatibility no-changeset !) |
|
1701 | a (no-compatibility no-changeset !) | |
1691 | R a |
|
1702 | R a | |
1692 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' |
|
1703 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | |
1693 | M b |
|
1704 | M b | |
1694 | A d |
|
1705 | A d | |
1695 | a (no-compatibility no-changeset !) |
|
1706 | a (no-compatibility no-changeset !) | |
1696 | R a |
|
1707 | R a | |
1697 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' |
|
1708 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' | |
1698 | M b |
|
1709 | M b | |
1699 | A d |
|
1710 | A d | |
1700 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' |
|
1711 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' | |
1701 | M b |
|
1712 | M b | |
1702 | A d |
|
1713 | A d | |
1703 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' |
|
1714 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' | |
1704 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' |
|
1715 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' | |
1705 |
|
1716 | |||
1706 |
|
1717 | |||
1707 | Merging a branch where a rename was deleted with a branch where the same file was renamed |
|
1718 | Merging a branch where a rename was deleted with a branch where the same file was renamed | |
1708 | ------------------------------------------------------------------------------------------ |
|
1719 | ------------------------------------------------------------------------------------------ | |
1709 |
|
1720 | |||
1710 | Create a "conflicting" merge where `d` get removed on one branch before its |
|
1721 | Create a "conflicting" merge where `d` get removed on one branch before its | |
1711 | rename information actually conflict with the other branch. |
|
1722 | rename information actually conflict with the other branch. | |
1712 |
|
1723 | |||
1713 | (the copy information from the branch that was not deleted should win). |
|
1724 | (the copy information from the branch that was not deleted should win). | |
1714 |
|
1725 | |||
1715 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' |
|
1726 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' | |
1716 | o 36 mHC-delete-before-conflict-m-0 |
|
1727 | o 36 mHC-delete-before-conflict-m-0 | |
1717 | |\ |
|
1728 | |\ | |
1718 | +---o 35 mCH-delete-before-conflict-m-0 |
|
1729 | +---o 35 mCH-delete-before-conflict-m-0 | |
1719 | | |/ |
|
1730 | | |/ | |
1720 | | o 34 h-1: b -(move)-> d |
|
1731 | | o 34 h-1: b -(move)-> d | |
1721 | | | |
|
1732 | | | | |
1722 | o | 6 c-1 delete d |
|
1733 | o | 6 c-1 delete d | |
1723 | | | |
|
1734 | | | | |
1724 | o | 2 i-2: c -move-> d |
|
1735 | o | 2 i-2: c -move-> d | |
1725 | | | |
|
1736 | | | | |
1726 | o | 1 i-1: a -move-> c |
|
1737 | o | 1 i-1: a -move-> c | |
1727 | |/ |
|
1738 | |/ | |
1728 | o 0 i-0 initial commit: a b h |
|
1739 | o 0 i-0 initial commit: a b h | |
1729 |
|
1740 | |||
1730 |
|
1741 | |||
1731 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
1742 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' | |
1732 | A d |
|
1743 | A d | |
1733 | b (no-compatibility no-changeset !) |
|
1744 | b (no-compatibility no-changeset !) | |
1734 | R a |
|
1745 | R a | |
1735 | R b |
|
1746 | R b | |
1736 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
1747 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' | |
1737 | A d |
|
1748 | A d | |
1738 | b |
|
1749 | b | |
1739 | R a |
|
1750 | R a | |
1740 | R b |
|
1751 | R b | |
1741 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
1752 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' | |
1742 | A d |
|
1753 | A d | |
1743 | b |
|
1754 | b | |
1744 | R b |
|
1755 | R b | |
1745 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
1756 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' | |
1746 | A d |
|
1757 | A d | |
1747 | b |
|
1758 | b | |
1748 | R b |
|
1759 | R b | |
1749 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
1760 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' | |
1750 | R a |
|
1761 | R a | |
1751 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
1762 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' | |
1752 | R a |
|
1763 | R a |
General Comments 0
You need to be logged in to leave comments.
Login now