Show More
@@ -1,541 +1,657 b'' | |||||
1 | ===================================================== |
|
1 | ===================================================== | |
2 | Test Copy tracing for chain of copies involving merge |
|
2 | Test Copy tracing for chain of copies involving merge | |
3 | ===================================================== |
|
3 | ===================================================== | |
4 |
|
4 | |||
5 | This test files covers copies/rename case for a chains of commit where merges |
|
5 | This test files covers copies/rename case for a chains of commit where merges | |
6 | are involved. It cheks we do not have unwanted update of behavior and that the |
|
6 | are involved. It cheks we do not have unwanted update of behavior and that the | |
7 | different options to retrieve copies behave correctly. |
|
7 | different options to retrieve copies behave correctly. | |
8 |
|
8 | |||
9 | Setup |
|
9 | Setup | |
10 | ===== |
|
10 | ===== | |
11 |
|
11 | |||
12 | use git diff to see rename |
|
12 | use git diff to see rename | |
13 |
|
13 | |||
14 | $ cat << EOF >> $HGRCPATH |
|
14 | $ cat << EOF >> $HGRCPATH | |
15 | > [diff] |
|
15 | > [diff] | |
16 | > git=yes |
|
16 | > git=yes | |
17 | > [ui] |
|
17 | > [ui] | |
18 | > logtemplate={rev} {desc}]\n |
|
18 | > logtemplate={rev} {desc}]\n | |
19 | > EOF |
|
19 | > EOF | |
20 |
|
20 | |||
21 | $ hg init repo-chain |
|
21 | $ hg init repo-chain | |
22 | $ cd repo-chain |
|
22 | $ cd repo-chain | |
23 |
|
23 | |||
24 | Add some linear rename initialy |
|
24 | Add some linear rename initialy | |
25 |
|
25 | |||
26 | $ touch a b h |
|
26 | $ touch a b h | |
27 | $ hg ci -Am 'i-0 initial commit: a b h' |
|
27 | $ hg ci -Am 'i-0 initial commit: a b h' | |
28 | adding a |
|
28 | adding a | |
29 | adding b |
|
29 | adding b | |
30 | adding h |
|
30 | adding h | |
31 | $ hg mv a c |
|
31 | $ hg mv a c | |
32 | $ hg ci -Am 'i-1: a -move-> c' |
|
32 | $ hg ci -Am 'i-1: a -move-> c' | |
33 | $ hg mv c d |
|
33 | $ hg mv c d | |
34 | $ hg ci -Am 'i-2: c -move-> d' |
|
34 | $ hg ci -Am 'i-2: c -move-> d' | |
35 | $ hg log -G |
|
35 | $ hg log -G | |
36 | @ 2 i-2: c -move-> d] |
|
36 | @ 2 i-2: c -move-> d] | |
37 | | |
|
37 | | | |
38 | o 1 i-1: a -move-> c] |
|
38 | o 1 i-1: a -move-> c] | |
39 | | |
|
39 | | | |
40 | o 0 i-0 initial commit: a b h] |
|
40 | o 0 i-0 initial commit: a b h] | |
41 |
|
41 | |||
42 |
|
42 | |||
43 | And having another branch with renames on the other side |
|
43 | And having another branch with renames on the other side | |
44 |
|
44 | |||
45 | $ hg mv d e |
|
45 | $ hg mv d e | |
46 | $ hg ci -Am 'a-1: d -move-> e' |
|
46 | $ hg ci -Am 'a-1: d -move-> e' | |
47 | $ hg mv e f |
|
47 | $ hg mv e f | |
48 | $ hg ci -Am 'a-2: e -move-> f' |
|
48 | $ hg ci -Am 'a-2: e -move-> f' | |
49 | $ hg log -G --rev '::.' |
|
49 | $ hg log -G --rev '::.' | |
50 | @ 4 a-2: e -move-> f] |
|
50 | @ 4 a-2: e -move-> f] | |
51 | | |
|
51 | | | |
52 | o 3 a-1: d -move-> e] |
|
52 | o 3 a-1: d -move-> e] | |
53 | | |
|
53 | | | |
54 | o 2 i-2: c -move-> d] |
|
54 | o 2 i-2: c -move-> d] | |
55 | | |
|
55 | | | |
56 | o 1 i-1: a -move-> c] |
|
56 | o 1 i-1: a -move-> c] | |
57 | | |
|
57 | | | |
58 | o 0 i-0 initial commit: a b h] |
|
58 | o 0 i-0 initial commit: a b h] | |
59 |
|
59 | |||
60 |
|
60 | |||
61 | Have a branching with nothing on one side |
|
61 | Have a branching with nothing on one side | |
62 |
|
62 | |||
63 | $ hg up 'desc("i-2")' |
|
63 | $ hg up 'desc("i-2")' | |
64 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
64 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
65 | $ echo foo > b |
|
65 | $ echo foo > b | |
66 | $ hg ci -m 'b-1: b update' |
|
66 | $ hg ci -m 'b-1: b update' | |
67 | created new head |
|
67 | created new head | |
68 | $ hg log -G --rev '::.' |
|
68 | $ hg log -G --rev '::.' | |
69 | @ 5 b-1: b update] |
|
69 | @ 5 b-1: b update] | |
70 | | |
|
70 | | | |
71 | o 2 i-2: c -move-> d] |
|
71 | o 2 i-2: c -move-> d] | |
72 | | |
|
72 | | | |
73 | o 1 i-1: a -move-> c] |
|
73 | o 1 i-1: a -move-> c] | |
74 | | |
|
74 | | | |
75 | o 0 i-0 initial commit: a b h] |
|
75 | o 0 i-0 initial commit: a b h] | |
76 |
|
76 | |||
77 |
|
77 | |||
78 |
|
78 | |||
79 | Merge the two branches we just defined (in both directions) |
|
79 | Merge the two branches we just defined (in both directions) | |
80 | - one with change to an unrelated file |
|
80 | - one with change to an unrelated file | |
81 | - one with renames in them |
|
81 | - one with renames in them | |
82 |
|
82 | |||
83 | $ hg up 'desc("b-1")' |
|
83 | $ hg up 'desc("b-1")' | |
84 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
84 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 | $ hg merge 'desc("a-2")' |
|
85 | $ hg merge 'desc("a-2")' | |
86 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
86 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
87 | (branch merge, don't forget to commit) |
|
87 | (branch merge, don't forget to commit) | |
88 | $ hg ci -m 'mBAm-0 simple merge - one way' |
|
88 | $ hg ci -m 'mBAm-0 simple merge - one way' | |
89 | $ hg up 'desc("a-2")' |
|
89 | $ hg up 'desc("a-2")' | |
90 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 | $ hg merge 'desc("b-1")' |
|
91 | $ hg merge 'desc("b-1")' | |
92 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
92 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
93 | (branch merge, don't forget to commit) |
|
93 | (branch merge, don't forget to commit) | |
94 | $ hg ci -m 'mABm-0 simple merge - the other way' |
|
94 | $ hg ci -m 'mABm-0 simple merge - the other way' | |
95 | created new head |
|
95 | created new head | |
96 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
96 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | |
97 | @ 7 mABm-0 simple merge - the other way] |
|
97 | @ 7 mABm-0 simple merge - the other way] | |
98 | |\ |
|
98 | |\ | |
99 | +---o 6 mBAm-0 simple merge - one way] |
|
99 | +---o 6 mBAm-0 simple merge - one way] | |
100 | | |/ |
|
100 | | |/ | |
101 | | o 5 b-1: b update] |
|
101 | | o 5 b-1: b update] | |
102 | | | |
|
102 | | | | |
103 | o | 4 a-2: e -move-> f] |
|
103 | o | 4 a-2: e -move-> f] | |
104 | | | |
|
104 | | | | |
105 | o | 3 a-1: d -move-> e] |
|
105 | o | 3 a-1: d -move-> e] | |
106 | |/ |
|
106 | |/ | |
107 | o 2 i-2: c -move-> d] |
|
107 | o 2 i-2: c -move-> d] | |
108 | | |
|
108 | | | |
109 | o 1 i-1: a -move-> c] |
|
109 | o 1 i-1: a -move-> c] | |
110 | | |
|
110 | | | |
111 | o 0 i-0 initial commit: a b h] |
|
111 | o 0 i-0 initial commit: a b h] | |
112 |
|
112 | |||
113 |
|
113 | |||
114 | Create a branch that delete a file previous renamed |
|
114 | Create a branch that delete a file previous renamed | |
115 |
|
115 | |||
116 | $ hg up 'desc("i-2")' |
|
116 | $ hg up 'desc("i-2")' | |
117 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
117 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
118 | $ hg rm d |
|
118 | $ hg rm d | |
119 | $ hg ci -m 'c-1 delete d' |
|
119 | $ hg ci -m 'c-1 delete d' | |
120 | created new head |
|
120 | created new head | |
121 | $ hg log -G --rev '::.' |
|
121 | $ hg log -G --rev '::.' | |
122 | @ 8 c-1 delete d] |
|
122 | @ 8 c-1 delete d] | |
123 | | |
|
123 | | | |
124 | o 2 i-2: c -move-> d] |
|
124 | o 2 i-2: c -move-> d] | |
125 | | |
|
125 | | | |
126 | o 1 i-1: a -move-> c] |
|
126 | o 1 i-1: a -move-> c] | |
127 | | |
|
127 | | | |
128 | o 0 i-0 initial commit: a b h] |
|
128 | o 0 i-0 initial commit: a b h] | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | Merge: |
|
131 | Merge: | |
132 | - one with change to an unrelated file |
|
132 | - one with change to an unrelated file | |
133 | - one deleting the change |
|
133 | - one deleting the change | |
134 | and recreate an unrelated file after the merge |
|
134 | and recreate an unrelated file after the merge | |
135 |
|
135 | |||
136 | $ hg up 'desc("b-1")' |
|
136 | $ hg up 'desc("b-1")' | |
137 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
137 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
138 | $ hg merge 'desc("c-1")' |
|
138 | $ hg merge 'desc("c-1")' | |
139 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
139 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
140 | (branch merge, don't forget to commit) |
|
140 | (branch merge, don't forget to commit) | |
141 | $ hg ci -m 'mBCm-0 simple merge - one way' |
|
141 | $ hg ci -m 'mBCm-0 simple merge - one way' | |
142 | $ echo bar > d |
|
142 | $ echo bar > d | |
143 | $ hg add d |
|
143 | $ hg add d | |
144 | $ hg ci -m 'mBCm-1 re-add d' |
|
144 | $ hg ci -m 'mBCm-1 re-add d' | |
145 | $ hg up 'desc("c-1")' |
|
145 | $ hg up 'desc("c-1")' | |
146 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
146 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
147 | $ hg merge 'desc("b-1")' |
|
147 | $ hg merge 'desc("b-1")' | |
148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
148 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
149 | (branch merge, don't forget to commit) |
|
149 | (branch merge, don't forget to commit) | |
150 | $ hg ci -m 'mCBm-0 simple merge - the other way' |
|
150 | $ hg ci -m 'mCBm-0 simple merge - the other way' | |
151 | created new head |
|
151 | created new head | |
152 | $ echo bar > d |
|
152 | $ echo bar > d | |
153 | $ hg add d |
|
153 | $ hg add d | |
154 | $ hg ci -m 'mCBm-1 re-add d' |
|
154 | $ hg ci -m 'mCBm-1 re-add d' | |
155 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
155 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | |
156 | @ 12 mCBm-1 re-add d] |
|
156 | @ 12 mCBm-1 re-add d] | |
157 | | |
|
157 | | | |
158 | o 11 mCBm-0 simple merge - the other way] |
|
158 | o 11 mCBm-0 simple merge - the other way] | |
159 | |\ |
|
159 | |\ | |
160 | | | o 10 mBCm-1 re-add d] |
|
160 | | | o 10 mBCm-1 re-add d] | |
161 | | | | |
|
161 | | | | | |
162 | +---o 9 mBCm-0 simple merge - one way] |
|
162 | +---o 9 mBCm-0 simple merge - one way] | |
163 | | |/ |
|
163 | | |/ | |
164 | | o 8 c-1 delete d] |
|
164 | | o 8 c-1 delete d] | |
165 | | | |
|
165 | | | | |
166 | o | 5 b-1: b update] |
|
166 | o | 5 b-1: b update] | |
167 | |/ |
|
167 | |/ | |
168 | o 2 i-2: c -move-> d] |
|
168 | o 2 i-2: c -move-> d] | |
169 | | |
|
169 | | | |
170 | o 1 i-1: a -move-> c] |
|
170 | o 1 i-1: a -move-> c] | |
171 | | |
|
171 | | | |
172 | o 0 i-0 initial commit: a b h] |
|
172 | o 0 i-0 initial commit: a b h] | |
173 |
|
173 | |||
174 |
|
174 | |||
175 | Create a branch that delete a file previous renamed and recreate it |
|
175 | Create a branch that delete a file previous renamed and recreate it | |
176 |
|
176 | |||
177 | $ hg up 'desc("i-2")' |
|
177 | $ hg up 'desc("i-2")' | |
178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
179 | $ hg rm d |
|
179 | $ hg rm d | |
180 | $ hg ci -m 'd-1 delete d' |
|
180 | $ hg ci -m 'd-1 delete d' | |
181 | created new head |
|
181 | created new head | |
182 | $ echo bar > d |
|
182 | $ echo bar > d | |
183 | $ hg add d |
|
183 | $ hg add d | |
184 | $ hg ci -m 'd-2 re-add d' |
|
184 | $ hg ci -m 'd-2 re-add d' | |
185 | $ hg log -G --rev '::.' |
|
185 | $ hg log -G --rev '::.' | |
186 | @ 14 d-2 re-add d] |
|
186 | @ 14 d-2 re-add d] | |
187 | | |
|
187 | | | |
188 | o 13 d-1 delete d] |
|
188 | o 13 d-1 delete d] | |
189 | | |
|
189 | | | |
190 | o 2 i-2: c -move-> d] |
|
190 | o 2 i-2: c -move-> d] | |
191 | | |
|
191 | | | |
192 | o 1 i-1: a -move-> c] |
|
192 | o 1 i-1: a -move-> c] | |
193 | | |
|
193 | | | |
194 | o 0 i-0 initial commit: a b h] |
|
194 | o 0 i-0 initial commit: a b h] | |
195 |
|
195 | |||
196 |
|
196 | |||
197 | Merge: |
|
197 | Merge: | |
198 | - one with change to an unrelated file |
|
198 | - one with change to an unrelated file | |
199 | - one deleting and recreating the file |
|
199 | - one deleting and recreating the file | |
200 |
|
200 | |||
201 | Note: |
|
201 | Note: | |
202 | | In this case, the merge get conflicting information since on one side we have |
|
202 | | In this case, the merge get conflicting information since on one side we have | |
203 | | a "brand new" d. and one the other one we have "d renamed from c (itself |
|
203 | | a "brand new" d. and one the other one we have "d renamed from c (itself | |
204 | | renamed from c)". |
|
204 | | renamed from c)". | |
205 | | |
|
205 | | | |
206 | | The current code arbitrarily pick one side |
|
206 | | The current code arbitrarily pick one side | |
207 |
|
207 | |||
208 | $ hg up 'desc("b-1")' |
|
208 | $ hg up 'desc("b-1")' | |
209 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
209 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
210 | $ hg merge 'desc("d-2")' |
|
210 | $ hg merge 'desc("d-2")' | |
211 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
211 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
212 | (branch merge, don't forget to commit) |
|
212 | (branch merge, don't forget to commit) | |
213 | $ hg ci -m 'mBDm-0 simple merge - one way' |
|
213 | $ hg ci -m 'mBDm-0 simple merge - one way' | |
214 | $ hg up 'desc("d-2")' |
|
214 | $ hg up 'desc("d-2")' | |
215 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
215 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
216 | $ hg merge 'desc("b-1")' |
|
216 | $ hg merge 'desc("b-1")' | |
217 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
217 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
218 | (branch merge, don't forget to commit) |
|
218 | (branch merge, don't forget to commit) | |
219 | $ hg ci -m 'mDBm-0 simple merge - the other way' |
|
219 | $ hg ci -m 'mDBm-0 simple merge - the other way' | |
220 | created new head |
|
220 | created new head | |
221 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
221 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
222 | @ 16 mDBm-0 simple merge - the other way] |
|
222 | @ 16 mDBm-0 simple merge - the other way] | |
223 | |\ |
|
223 | |\ | |
224 | +---o 15 mBDm-0 simple merge - one way] |
|
224 | +---o 15 mBDm-0 simple merge - one way] | |
225 | | |/ |
|
225 | | |/ | |
226 | | o 14 d-2 re-add d] |
|
226 | | o 14 d-2 re-add d] | |
227 | | | |
|
227 | | | | |
228 | | o 13 d-1 delete d] |
|
228 | | o 13 d-1 delete d] | |
229 | | | |
|
229 | | | | |
230 | o | 5 b-1: b update] |
|
230 | o | 5 b-1: b update] | |
231 | |/ |
|
231 | |/ | |
232 | o 2 i-2: c -move-> d] |
|
232 | o 2 i-2: c -move-> d] | |
233 | | |
|
233 | | | |
234 | o 1 i-1: a -move-> c] |
|
234 | o 1 i-1: a -move-> c] | |
235 | | |
|
235 | | | |
236 | o 0 i-0 initial commit: a b h] |
|
236 | o 0 i-0 initial commit: a b h] | |
237 |
|
237 | |||
238 |
|
238 | |||
239 | Having another branch renaming a different file to the same filename as another |
|
239 | Having another branch renaming a different file to the same filename as another | |
240 |
|
240 | |||
241 | $ hg up 'desc("i-2")' |
|
241 | $ hg up 'desc("i-2")' | |
242 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
242 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
243 | $ hg mv b g |
|
243 | $ hg mv b g | |
244 | $ hg ci -m 'e-1 b -move-> g' |
|
244 | $ hg ci -m 'e-1 b -move-> g' | |
245 | created new head |
|
245 | created new head | |
246 | $ hg mv g f |
|
246 | $ hg mv g f | |
247 | $ hg ci -m 'e-2 g -move-> f' |
|
247 | $ hg ci -m 'e-2 g -move-> f' | |
248 | $ hg log -G --rev '::.' |
|
248 | $ hg log -G --rev '::.' | |
249 | @ 18 e-2 g -move-> f] |
|
249 | @ 18 e-2 g -move-> f] | |
250 | | |
|
250 | | | |
251 | o 17 e-1 b -move-> g] |
|
251 | o 17 e-1 b -move-> g] | |
252 | | |
|
252 | | | |
253 | o 2 i-2: c -move-> d] |
|
253 | o 2 i-2: c -move-> d] | |
254 | | |
|
254 | | | |
255 | o 1 i-1: a -move-> c] |
|
255 | o 1 i-1: a -move-> c] | |
256 | | |
|
256 | | | |
257 | o 0 i-0 initial commit: a b h] |
|
257 | o 0 i-0 initial commit: a b h] | |
258 |
|
258 | |||
259 |
|
259 | |||
260 | Merge: |
|
260 | Merge: | |
261 | - the "e-" branch renaming b to f (through 'g') |
|
261 | - the "e-" branch renaming b to f (through 'g') | |
262 | - the "a-" branch renaming d to f (through e) |
|
262 | - the "a-" branch renaming d to f (through e) | |
263 |
|
263 | |||
264 | $ hg up 'desc("a-2")' |
|
264 | $ hg up 'desc("a-2")' | |
265 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
265 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
266 | $ hg merge 'desc("e-2")' |
|
266 | $ hg merge 'desc("e-2")' | |
267 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
267 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
268 | (branch merge, don't forget to commit) |
|
268 | (branch merge, don't forget to commit) | |
269 | $ hg ci -m 'mAEm-0 simple merge - one way' |
|
269 | $ hg ci -m 'mAEm-0 simple merge - one way' | |
270 | $ hg up 'desc("e-2")' |
|
270 | $ hg up 'desc("e-2")' | |
271 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
271 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
272 | $ hg merge 'desc("a-2")' |
|
272 | $ hg merge 'desc("a-2")' | |
273 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
273 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
274 | (branch merge, don't forget to commit) |
|
274 | (branch merge, don't forget to commit) | |
275 | $ hg ci -m 'mEAm-0 simple merge - the other way' |
|
275 | $ hg ci -m 'mEAm-0 simple merge - the other way' | |
276 | created new head |
|
276 | created new head | |
277 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
277 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
278 | @ 20 mEAm-0 simple merge - the other way] |
|
278 | @ 20 mEAm-0 simple merge - the other way] | |
279 | |\ |
|
279 | |\ | |
280 | +---o 19 mAEm-0 simple merge - one way] |
|
280 | +---o 19 mAEm-0 simple merge - one way] | |
281 | | |/ |
|
281 | | |/ | |
282 | | o 18 e-2 g -move-> f] |
|
282 | | o 18 e-2 g -move-> f] | |
283 | | | |
|
283 | | | | |
284 | | o 17 e-1 b -move-> g] |
|
284 | | o 17 e-1 b -move-> g] | |
285 | | | |
|
285 | | | | |
286 | o | 4 a-2: e -move-> f] |
|
286 | o | 4 a-2: e -move-> f] | |
287 | | | |
|
287 | | | | |
288 | o | 3 a-1: d -move-> e] |
|
288 | o | 3 a-1: d -move-> e] | |
289 | |/ |
|
289 | |/ | |
290 | o 2 i-2: c -move-> d] |
|
290 | o 2 i-2: c -move-> d] | |
291 | | |
|
291 | | | |
292 | o 1 i-1: a -move-> c] |
|
292 | o 1 i-1: a -move-> c] | |
293 | | |
|
293 | | | |
294 | o 0 i-0 initial commit: a b h] |
|
294 | o 0 i-0 initial commit: a b h] | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | Note: |
|
297 | Note: | |
298 | | In this case, one of the merge wrongly record a merge while there is none. |
|
298 | | In this case, one of the merge wrongly record a merge while there is none. | |
299 | | This lead to bad copy tracing information to be dug up. |
|
299 | | This lead to bad copy tracing information to be dug up. | |
300 |
|
300 | |||
301 |
|
301 | |||
|
302 | Merge: | |||
|
303 | - one with change to an unrelated file (b) | |||
|
304 | - one overwriting a file (d) with a rename (from h to i to d) | |||
|
305 | ||||
|
306 | $ hg up 'desc("i-2")' | |||
|
307 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
308 | $ hg mv h i | |||
|
309 | $ hg commit -m "f-1: rename h -> i" | |||
|
310 | created new head | |||
|
311 | $ hg mv --force i d | |||
|
312 | $ hg commit -m "f-2: rename i -> d" | |||
|
313 | $ hg debugindex d | |||
|
314 | rev linkrev nodeid p1 p2 | |||
|
315 | 0 2 01c2f5eabdc4 000000000000 000000000000 | |||
|
316 | 1 10 b004912a8510 000000000000 000000000000 | |||
|
317 | 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 | |||
|
318 | 3 22 c72365ee036f 000000000000 000000000000 | |||
|
319 | $ hg up 'desc("b-1")' | |||
|
320 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
321 | $ hg merge 'desc("f-2")' | |||
|
322 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
323 | (branch merge, don't forget to commit) | |||
|
324 | $ hg ci -m 'mBFm-0 simple merge - one way' | |||
|
325 | $ hg up 'desc("f-2")' | |||
|
326 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
327 | $ hg merge 'desc("b-1")' | |||
|
328 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
329 | (branch merge, don't forget to commit) | |||
|
330 | $ hg ci -m 'mFBm-0 simple merge - the other way' | |||
|
331 | created new head | |||
|
332 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |||
|
333 | @ 24 mFBm-0 simple merge - the other way] | |||
|
334 | |\ | |||
|
335 | +---o 23 mBFm-0 simple merge - one way] | |||
|
336 | | |/ | |||
|
337 | | o 22 f-2: rename i -> d] | |||
|
338 | | | | |||
|
339 | | o 21 f-1: rename h -> i] | |||
|
340 | | | | |||
|
341 | o | 5 b-1: b update] | |||
|
342 | |/ | |||
|
343 | o 2 i-2: c -move-> d] | |||
|
344 | | | |||
|
345 | o 1 i-1: a -move-> c] | |||
|
346 | | | |||
|
347 | o 0 i-0 initial commit: a b h] | |||
|
348 | ||||
|
349 | ||||
|
350 | ||||
302 | Check results |
|
351 | Check results | |
303 |
|
|
352 | ============= | |
304 |
|
353 | |||
305 | merging with unrelated change does not interfer wit the renames |
|
354 | merging with unrelated change does not interfer wit the renames | |
306 | --------------------------------------------------------------- |
|
355 | --------------------------------------------------------------- | |
307 |
|
356 | |||
308 | - rename on one side |
|
357 | - rename on one side | |
309 | - unrelated change on the other side |
|
358 | - unrelated change on the other side | |
310 |
|
359 | |||
311 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' |
|
360 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' | |
312 | A f |
|
361 | A f | |
313 | d |
|
362 | d | |
314 | R d |
|
363 | R d | |
315 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' |
|
364 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' | |
316 | A f |
|
365 | A f | |
317 | d |
|
366 | d | |
318 | R d |
|
367 | R d | |
319 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' |
|
368 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' | |
320 | M b |
|
369 | M b | |
321 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' |
|
370 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' | |
322 | M b |
|
371 | M b | |
323 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' |
|
372 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' | |
324 | M b |
|
373 | M b | |
325 | A f |
|
374 | A f | |
326 | d |
|
375 | d | |
327 | R d |
|
376 | R d | |
328 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' |
|
377 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' | |
329 | M b |
|
378 | M b | |
330 | A f |
|
379 | A f | |
331 | d |
|
380 | d | |
332 | R d |
|
381 | R d | |
333 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' |
|
382 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' | |
334 | M b |
|
383 | M b | |
335 | A f |
|
384 | A f | |
336 | a |
|
385 | a | |
337 | R a |
|
386 | R a | |
338 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' |
|
387 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' | |
339 | M b |
|
388 | M b | |
340 | A f |
|
389 | A f | |
341 | a |
|
390 | a | |
342 | R a |
|
391 | R a | |
343 |
|
392 | |||
344 | merging with the side having a delete |
|
393 | merging with the side having a delete | |
345 | ------------------------------------- |
|
394 | ------------------------------------- | |
346 |
|
395 | |||
347 | case summary: |
|
396 | case summary: | |
348 | - one with change to an unrelated file |
|
397 | - one with change to an unrelated file | |
349 | - one deleting the change |
|
398 | - one deleting the change | |
350 | and recreate an unrelated file after the merge |
|
399 | and recreate an unrelated file after the merge | |
351 |
|
400 | |||
352 | checks: |
|
401 | checks: | |
353 | - comparing from the merge |
|
402 | - comparing from the merge | |
354 |
|
403 | |||
355 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' |
|
404 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' | |
356 | R d |
|
405 | R d | |
357 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' |
|
406 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' | |
358 | R d |
|
407 | R d | |
359 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' |
|
408 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' | |
360 | M b |
|
409 | M b | |
361 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' |
|
410 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' | |
362 | M b |
|
411 | M b | |
363 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' |
|
412 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' | |
364 | M b |
|
413 | M b | |
365 | R d |
|
414 | R d | |
366 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' |
|
415 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' | |
367 | M b |
|
416 | M b | |
368 | R d |
|
417 | R d | |
369 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' |
|
418 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' | |
370 | M b |
|
419 | M b | |
371 | R a |
|
420 | R a | |
372 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' |
|
421 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' | |
373 | M b |
|
422 | M b | |
374 | R a |
|
423 | R a | |
375 |
|
424 | |||
376 | - comparing with the merge children re-adding the file |
|
425 | - comparing with the merge children re-adding the file | |
377 |
|
426 | |||
378 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' |
|
427 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' | |
379 | M d |
|
428 | M d | |
380 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' |
|
429 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' | |
381 | M d |
|
430 | M d | |
382 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' |
|
431 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' | |
383 | M b |
|
432 | M b | |
384 | A d |
|
433 | A d | |
385 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' |
|
434 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' | |
386 | M b |
|
435 | M b | |
387 | A d |
|
436 | A d | |
388 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' |
|
437 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' | |
389 | M b |
|
438 | M b | |
390 | M d |
|
439 | M d | |
391 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' |
|
440 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' | |
392 | M b |
|
441 | M b | |
393 | M d |
|
442 | M d | |
394 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' |
|
443 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' | |
395 | M b |
|
444 | M b | |
396 | A d |
|
445 | A d | |
397 | R a |
|
446 | R a | |
398 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' |
|
447 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' | |
399 | M b |
|
448 | M b | |
400 | A d |
|
449 | A d | |
401 | R a |
|
450 | R a | |
402 |
|
451 | |||
403 | Comparing with a merge re-adding the file afterward |
|
452 | Comparing with a merge re-adding the file afterward | |
404 | --------------------------------------------------- |
|
453 | --------------------------------------------------- | |
405 |
|
454 | |||
406 | Merge: |
|
455 | Merge: | |
407 | - one with change to an unrelated file |
|
456 | - one with change to an unrelated file | |
408 | - one deleting and recreating the change |
|
457 | - one deleting and recreating the change | |
409 |
|
458 | |||
410 | Note: |
|
459 | Note: | |
411 | | In this case, one of the merge wrongly record a merge while there is none. |
|
460 | | In this case, one of the merge wrongly record a merge while there is none. | |
412 | | This lead to bad copy tracing information to be dug up. |
|
461 | | This lead to bad copy tracing information to be dug up. | |
413 |
|
462 | |||
414 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' |
|
463 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' | |
415 | M d |
|
464 | M d | |
416 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' |
|
465 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' | |
417 | M d |
|
466 | M d | |
418 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' |
|
467 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' | |
419 | M b |
|
468 | M b | |
420 | M d |
|
469 | M d | |
421 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' |
|
470 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' | |
422 | M b |
|
471 | M b | |
423 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' |
|
472 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' | |
424 | M b |
|
473 | M b | |
425 | M d |
|
474 | M d | |
426 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' |
|
475 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' | |
427 | M b |
|
476 | M b | |
428 | M d |
|
477 | M d | |
429 |
|
478 | |||
430 | The bugs makes recorded copy is different depending of where we started the merge from since |
|
479 | The bugs makes recorded copy is different depending of where we started the merge from since | |
431 |
|
480 | |||
432 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' |
|
481 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' | |
433 | 0bb5445dc4d02f4e0d86cf16f9f3a411d0f17744 644 d |
|
482 | 0bb5445dc4d02f4e0d86cf16f9f3a411d0f17744 644 d | |
434 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' |
|
483 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' | |
435 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
484 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
436 |
|
485 | |||
437 | The 0bb5445dc4d02f4e0d86cf16f9f3a411d0f17744 entry is wrong, since the file was |
|
486 | The 0bb5445dc4d02f4e0d86cf16f9f3a411d0f17744 entry is wrong, since the file was | |
438 | deleted on one side (then recreate) and untouched on the other side, no "merge" |
|
487 | deleted on one side (then recreate) and untouched on the other side, no "merge" | |
439 | has happened. The resulting `d` file is the untouched version from branch `D`, |
|
488 | has happened. The resulting `d` file is the untouched version from branch `D`, | |
440 | not a merge. |
|
489 | not a merge. | |
441 |
|
490 | |||
442 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' |
|
491 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' | |
443 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
492 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
444 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' |
|
493 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' | |
445 | 01c2f5eabdc4ce2bdee42b5f86311955e6c8f573 644 d |
|
494 | 01c2f5eabdc4ce2bdee42b5f86311955e6c8f573 644 d | |
446 | $ hg debugindex d |
|
495 | $ hg debugindex d | |
447 | rev linkrev nodeid p1 p2 |
|
496 | rev linkrev nodeid p1 p2 | |
448 | 0 2 01c2f5eabdc4 000000000000 000000000000 |
|
497 | 0 2 01c2f5eabdc4 000000000000 000000000000 | |
449 | 1 10 b004912a8510 000000000000 000000000000 |
|
498 | 1 10 b004912a8510 000000000000 000000000000 | |
450 | 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 |
|
499 | 2 15 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 | |
|
500 | 3 22 c72365ee036f 000000000000 000000000000 | |||
|
501 | 4 23 863d9bc49190 01c2f5eabdc4 c72365ee036f | |||
451 |
|
502 | |||
452 | (This `hg log` output if wrong, since no merge actually happened). |
|
503 | (This `hg log` output if wrong, since no merge actually happened). | |
453 |
|
504 | |||
454 | $ hg log -Gfr 'desc("mBDm-0")' d |
|
505 | $ hg log -Gfr 'desc("mBDm-0")' d | |
455 | o 15 mBDm-0 simple merge - one way] |
|
506 | o 15 mBDm-0 simple merge - one way] | |
456 | |\ |
|
507 | |\ | |
457 | o : 14 d-2 re-add d] |
|
508 | o : 14 d-2 re-add d] | |
458 | :/ |
|
509 | :/ | |
459 | o 2 i-2: c -move-> d] |
|
510 | o 2 i-2: c -move-> d] | |
460 | | |
|
511 | | | |
461 | o 1 i-1: a -move-> c] |
|
512 | o 1 i-1: a -move-> c] | |
462 | | |
|
513 | | | |
463 | o 0 i-0 initial commit: a b h] |
|
514 | o 0 i-0 initial commit: a b h] | |
464 |
|
515 | |||
465 |
|
516 | |||
466 | This `hg log` output is correct |
|
517 | This `hg log` output is correct | |
467 |
|
518 | |||
468 | $ hg log -Gfr 'desc("mDBm-0")' d |
|
519 | $ hg log -Gfr 'desc("mDBm-0")' d | |
469 | o 14 d-2 re-add d] |
|
520 | o 14 d-2 re-add d] | |
470 | | |
|
521 | | | |
471 | ~ |
|
522 | ~ | |
472 |
|
523 | |||
473 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' |
|
524 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' | |
474 | M b |
|
525 | M b | |
475 | A d |
|
526 | A d | |
476 | a |
|
527 | a | |
477 | R a |
|
528 | R a | |
478 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' |
|
529 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' | |
479 | M b |
|
530 | M b | |
480 | A d |
|
531 | A d | |
481 | R a |
|
532 | R a | |
482 |
|
533 | |||
483 | Comparing with a merge with colliding rename |
|
534 | Comparing with a merge with colliding rename | |
484 | -------------------------------------------- |
|
535 | -------------------------------------------- | |
485 |
|
536 | |||
486 | - the "e-" branch renaming b to f (through 'g') |
|
537 | - the "e-" branch renaming b to f (through 'g') | |
487 | - the "a-" branch renaming d to f (through e) |
|
538 | - the "a-" branch renaming d to f (through e) | |
488 |
|
539 | |||
489 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
540 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |
490 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f |
|
541 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f | |
491 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
542 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |
492 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f |
|
543 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f | |
493 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
544 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
494 | 0dd616bc7ab1a111921d95d76f69cda5c2ac539c 644 f |
|
545 | 0dd616bc7ab1a111921d95d76f69cda5c2ac539c 644 f | |
495 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
546 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
496 | 6da5a2eecb9c833f830b67a4972366d49a9a142c 644 f |
|
547 | 6da5a2eecb9c833f830b67a4972366d49a9a142c 644 f | |
497 | $ hg debugindex f |
|
548 | $ hg debugindex f | |
498 | rev linkrev nodeid p1 p2 |
|
549 | rev linkrev nodeid p1 p2 | |
499 | 0 4 0dd616bc7ab1 000000000000 000000000000 |
|
550 | 0 4 0dd616bc7ab1 000000000000 000000000000 | |
500 | 1 18 6da5a2eecb9c 000000000000 000000000000 |
|
551 | 1 18 6da5a2eecb9c 000000000000 000000000000 | |
501 | 2 19 eb806e34ef6b 0dd616bc7ab1 6da5a2eecb9c |
|
552 | 2 19 eb806e34ef6b 0dd616bc7ab1 6da5a2eecb9c | |
502 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' |
|
553 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' | |
503 | M f |
|
554 | M f | |
504 | R b |
|
555 | R b | |
505 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' |
|
556 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' | |
506 | M f |
|
557 | M f | |
507 | R b |
|
558 | R b | |
508 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' |
|
559 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' | |
509 | M f |
|
560 | M f | |
510 | R d |
|
561 | R d | |
511 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' |
|
562 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' | |
512 | M f |
|
563 | M f | |
513 | R d |
|
564 | R d | |
514 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
|
565 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' | |
515 | A f |
|
566 | A f | |
516 | d |
|
567 | d | |
517 | R d |
|
568 | R d | |
518 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
|
569 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' | |
519 | A f |
|
570 | A f | |
520 | b |
|
571 | b | |
521 | R b |
|
572 | R b | |
522 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' |
|
573 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' | |
523 | A f |
|
574 | A f | |
524 | d |
|
575 | d | |
525 | R b |
|
576 | R b | |
526 | R d |
|
577 | R d | |
527 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' |
|
578 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' | |
528 | A f |
|
579 | A f | |
529 | d |
|
580 | d | |
530 | R b |
|
581 | R b | |
531 | R d |
|
582 | R d | |
532 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' |
|
583 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' | |
533 | A f |
|
584 | A f | |
534 | a |
|
585 | a | |
535 | R a |
|
586 | R a | |
536 | R b |
|
587 | R b | |
537 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' |
|
588 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' | |
538 | A f |
|
589 | A f | |
539 | a |
|
590 | a | |
540 | R a |
|
591 | R a | |
541 | R b |
|
592 | R b | |
|
593 | ||||
|
594 | Merge: | |||
|
595 | - one with change to an unrelated file (b) | |||
|
596 | - one overwriting a file (d) with a rename (from h to i to d) | |||
|
597 | ||||
|
598 | The overwriting should take over. However, the behavior is currently buggy | |||
|
599 | ||||
|
600 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' | |||
|
601 | M b | |||
|
602 | A d | |||
|
603 | a (true !) | |||
|
604 | h (false !) | |||
|
605 | R a | |||
|
606 | R h | |||
|
607 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' | |||
|
608 | M b | |||
|
609 | A d | |||
|
610 | h | |||
|
611 | R a | |||
|
612 | R h | |||
|
613 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' | |||
|
614 | M d | |||
|
615 | R h | |||
|
616 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' | |||
|
617 | M b | |||
|
618 | M d | |||
|
619 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' | |||
|
620 | M b | |||
|
621 | M d | |||
|
622 | R i | |||
|
623 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' | |||
|
624 | M d | |||
|
625 | R h | |||
|
626 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' | |||
|
627 | M b | |||
|
628 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' | |||
|
629 | M b | |||
|
630 | M d | |||
|
631 | R i | |||
|
632 | ||||
|
633 | The following graphlog is wrong, the "a -> c -> d" chain was overwritten and should not appear. | |||
|
634 | ||||
|
635 | $ hg log -Gfr 'desc("mBFm-0")' d | |||
|
636 | o 23 mBFm-0 simple merge - one way] | |||
|
637 | |\ | |||
|
638 | o : 22 f-2: rename i -> d] | |||
|
639 | | : | |||
|
640 | o : 21 f-1: rename h -> i] | |||
|
641 | :/ | |||
|
642 | o 2 i-2: c -move-> d] | |||
|
643 | | | |||
|
644 | o 1 i-1: a -move-> c] | |||
|
645 | | | |||
|
646 | o 0 i-0 initial commit: a b h] | |||
|
647 | ||||
|
648 | ||||
|
649 | The following output is correct. | |||
|
650 | ||||
|
651 | $ hg log -Gfr 'desc("mFBm-0")' d | |||
|
652 | o 22 f-2: rename i -> d] | |||
|
653 | | | |||
|
654 | o 21 f-1: rename h -> i] | |||
|
655 | : | |||
|
656 | o 0 i-0 initial commit: a b h] | |||
|
657 |
General Comments 0
You need to be logged in to leave comments.
Login now