Show More
@@ -1,515 +1,514 b'' | |||||
1 | # Copyright (C) 2004, 2005 Canonical Ltd |
|
1 | # Copyright (C) 2004, 2005 Canonical Ltd | |
2 | # |
|
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify |
|
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by |
|
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or |
|
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. |
|
6 | # (at your option) any later version. | |
7 | # |
|
7 | # | |
8 | # This program is distributed in the hope that it will be useful, |
|
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. |
|
11 | # GNU General Public License for more details. | |
12 | # |
|
12 | # | |
13 | # You should have received a copy of the GNU General Public License |
|
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, see <http://www.gnu.org/licenses/>. |
|
14 | # along with this program; if not, see <http://www.gnu.org/licenses/>. | |
15 |
|
15 | |||
16 | # mbp: "you know that thing where cvs gives you conflict markers?" |
|
16 | # mbp: "you know that thing where cvs gives you conflict markers?" | |
17 | # s: "i hate that." |
|
17 | # s: "i hate that." | |
18 |
|
18 | |||
19 | from __future__ import absolute_import |
|
19 | from __future__ import absolute_import | |
20 |
|
20 | |||
21 | from .i18n import _ |
|
21 | from .i18n import _ | |
22 | from . import ( |
|
22 | from . import ( | |
23 | error, |
|
23 | error, | |
24 | mdiff, |
|
24 | mdiff, | |
25 | pycompat, |
|
25 | pycompat, | |
26 | ) |
|
26 | ) | |
27 | from .utils import stringutil |
|
27 | from .utils import stringutil | |
28 |
|
28 | |||
29 |
|
29 | |||
30 | def intersect(ra, rb): |
|
30 | def intersect(ra, rb): | |
31 | """Given two ranges return the range where they intersect or None. |
|
31 | """Given two ranges return the range where they intersect or None. | |
32 |
|
32 | |||
33 | >>> intersect((0, 10), (0, 6)) |
|
33 | >>> intersect((0, 10), (0, 6)) | |
34 | (0, 6) |
|
34 | (0, 6) | |
35 | >>> intersect((0, 10), (5, 15)) |
|
35 | >>> intersect((0, 10), (5, 15)) | |
36 | (5, 10) |
|
36 | (5, 10) | |
37 | >>> intersect((0, 10), (10, 15)) |
|
37 | >>> intersect((0, 10), (10, 15)) | |
38 | >>> intersect((0, 9), (10, 15)) |
|
38 | >>> intersect((0, 9), (10, 15)) | |
39 | >>> intersect((0, 9), (7, 15)) |
|
39 | >>> intersect((0, 9), (7, 15)) | |
40 | (7, 9) |
|
40 | (7, 9) | |
41 | """ |
|
41 | """ | |
42 | assert ra[0] <= ra[1] |
|
42 | assert ra[0] <= ra[1] | |
43 | assert rb[0] <= rb[1] |
|
43 | assert rb[0] <= rb[1] | |
44 |
|
44 | |||
45 | sa = max(ra[0], rb[0]) |
|
45 | sa = max(ra[0], rb[0]) | |
46 | sb = min(ra[1], rb[1]) |
|
46 | sb = min(ra[1], rb[1]) | |
47 | if sa < sb: |
|
47 | if sa < sb: | |
48 | return sa, sb |
|
48 | return sa, sb | |
49 | else: |
|
49 | else: | |
50 | return None |
|
50 | return None | |
51 |
|
51 | |||
52 |
|
52 | |||
53 | def compare_range(a, astart, aend, b, bstart, bend): |
|
53 | def compare_range(a, astart, aend, b, bstart, bend): | |
54 | """Compare a[astart:aend] == b[bstart:bend], without slicing.""" |
|
54 | """Compare a[astart:aend] == b[bstart:bend], without slicing.""" | |
55 | if (aend - astart) != (bend - bstart): |
|
55 | if (aend - astart) != (bend - bstart): | |
56 | return False |
|
56 | return False | |
57 | for ia, ib in zip( |
|
57 | for ia, ib in zip( | |
58 | pycompat.xrange(astart, aend), pycompat.xrange(bstart, bend) |
|
58 | pycompat.xrange(astart, aend), pycompat.xrange(bstart, bend) | |
59 | ): |
|
59 | ): | |
60 | if a[ia] != b[ib]: |
|
60 | if a[ia] != b[ib]: | |
61 | return False |
|
61 | return False | |
62 | else: |
|
62 | else: | |
63 | return True |
|
63 | return True | |
64 |
|
64 | |||
65 |
|
65 | |||
66 | class Merge3Text(object): |
|
66 | class Merge3Text(object): | |
67 | """3-way merge of texts. |
|
67 | """3-way merge of texts. | |
68 |
|
68 | |||
69 | Given strings BASE, OTHER, THIS, tries to produce a combined text |
|
69 | Given strings BASE, OTHER, THIS, tries to produce a combined text | |
70 | incorporating the changes from both BASE->OTHER and BASE->THIS.""" |
|
70 | incorporating the changes from both BASE->OTHER and BASE->THIS.""" | |
71 |
|
71 | |||
72 | def __init__(self, basetext, atext, btext, base=None, a=None, b=None): |
|
72 | def __init__(self, basetext, atext, btext, base=None, a=None, b=None): | |
73 | self.basetext = basetext |
|
73 | self.basetext = basetext | |
74 | self.atext = atext |
|
74 | self.atext = atext | |
75 | self.btext = btext |
|
75 | self.btext = btext | |
76 | if base is None: |
|
76 | if base is None: | |
77 | base = mdiff.splitnewlines(basetext) |
|
77 | base = mdiff.splitnewlines(basetext) | |
78 | if a is None: |
|
78 | if a is None: | |
79 | a = mdiff.splitnewlines(atext) |
|
79 | a = mdiff.splitnewlines(atext) | |
80 | if b is None: |
|
80 | if b is None: | |
81 | b = mdiff.splitnewlines(btext) |
|
81 | b = mdiff.splitnewlines(btext) | |
82 | self.base = base |
|
82 | self.base = base | |
83 | self.a = a |
|
83 | self.a = a | |
84 | self.b = b |
|
84 | self.b = b | |
85 |
|
85 | |||
86 | def merge_groups(self): |
|
86 | def merge_groups(self): | |
87 | """Yield sequence of line groups. Each one is a tuple: |
|
87 | """Yield sequence of line groups. Each one is a tuple: | |
88 |
|
88 | |||
89 | 'unchanged', lines |
|
89 | 'unchanged', lines | |
90 | Lines unchanged from base |
|
90 | Lines unchanged from base | |
91 |
|
91 | |||
92 | 'a', lines |
|
92 | 'a', lines | |
93 | Lines taken from a |
|
93 | Lines taken from a | |
94 |
|
94 | |||
95 | 'same', lines |
|
95 | 'same', lines | |
96 | Lines taken from a (and equal to b) |
|
96 | Lines taken from a (and equal to b) | |
97 |
|
97 | |||
98 | 'b', lines |
|
98 | 'b', lines | |
99 | Lines taken from b |
|
99 | Lines taken from b | |
100 |
|
100 | |||
101 | 'conflict', (base_lines, a_lines, b_lines) |
|
101 | 'conflict', (base_lines, a_lines, b_lines) | |
102 | Lines from base were changed to either a or b and conflict. |
|
102 | Lines from base were changed to either a or b and conflict. | |
103 | """ |
|
103 | """ | |
104 | for t in self.merge_regions(): |
|
104 | for t in self.merge_regions(): | |
105 | what = t[0] |
|
105 | what = t[0] | |
106 | if what == b'unchanged': |
|
106 | if what == b'unchanged': | |
107 | yield what, self.base[t[1] : t[2]] |
|
107 | yield what, self.base[t[1] : t[2]] | |
108 | elif what == b'a' or what == b'same': |
|
108 | elif what == b'a' or what == b'same': | |
109 | yield what, self.a[t[1] : t[2]] |
|
109 | yield what, self.a[t[1] : t[2]] | |
110 | elif what == b'b': |
|
110 | elif what == b'b': | |
111 | yield what, self.b[t[1] : t[2]] |
|
111 | yield what, self.b[t[1] : t[2]] | |
112 | elif what == b'conflict': |
|
112 | elif what == b'conflict': | |
113 | yield ( |
|
113 | yield ( | |
114 | what, |
|
114 | what, | |
115 | ( |
|
115 | ( | |
116 | self.base[t[1] : t[2]], |
|
116 | self.base[t[1] : t[2]], | |
117 | self.a[t[3] : t[4]], |
|
117 | self.a[t[3] : t[4]], | |
118 | self.b[t[5] : t[6]], |
|
118 | self.b[t[5] : t[6]], | |
119 | ), |
|
119 | ), | |
120 | ) |
|
120 | ) | |
121 | else: |
|
121 | else: | |
122 | raise ValueError(what) |
|
122 | raise ValueError(what) | |
123 |
|
123 | |||
124 | def merge_regions(self): |
|
124 | def merge_regions(self): | |
125 | """Return sequences of matching and conflicting regions. |
|
125 | """Return sequences of matching and conflicting regions. | |
126 |
|
126 | |||
127 | This returns tuples, where the first value says what kind we |
|
127 | This returns tuples, where the first value says what kind we | |
128 | have: |
|
128 | have: | |
129 |
|
129 | |||
130 | 'unchanged', start, end |
|
130 | 'unchanged', start, end | |
131 | Take a region of base[start:end] |
|
131 | Take a region of base[start:end] | |
132 |
|
132 | |||
133 | 'same', astart, aend |
|
133 | 'same', astart, aend | |
134 | b and a are different from base but give the same result |
|
134 | b and a are different from base but give the same result | |
135 |
|
135 | |||
136 | 'a', start, end |
|
136 | 'a', start, end | |
137 | Non-clashing insertion from a[start:end] |
|
137 | Non-clashing insertion from a[start:end] | |
138 |
|
138 | |||
139 | 'conflict', zstart, zend, astart, aend, bstart, bend |
|
139 | 'conflict', zstart, zend, astart, aend, bstart, bend | |
140 | Conflict between a and b, with z as common ancestor |
|
140 | Conflict between a and b, with z as common ancestor | |
141 |
|
141 | |||
142 | Method is as follows: |
|
142 | Method is as follows: | |
143 |
|
143 | |||
144 | The two sequences align only on regions which match the base |
|
144 | The two sequences align only on regions which match the base | |
145 | and both descendants. These are found by doing a two-way diff |
|
145 | and both descendants. These are found by doing a two-way diff | |
146 | of each one against the base, and then finding the |
|
146 | of each one against the base, and then finding the | |
147 | intersections between those regions. These "sync regions" |
|
147 | intersections between those regions. These "sync regions" | |
148 | are by definition unchanged in both and easily dealt with. |
|
148 | are by definition unchanged in both and easily dealt with. | |
149 |
|
149 | |||
150 | The regions in between can be in any of three cases: |
|
150 | The regions in between can be in any of three cases: | |
151 | conflicted, or changed on only one side. |
|
151 | conflicted, or changed on only one side. | |
152 | """ |
|
152 | """ | |
153 |
|
153 | |||
154 | # section a[0:ia] has been disposed of, etc |
|
154 | # section a[0:ia] has been disposed of, etc | |
155 | iz = ia = ib = 0 |
|
155 | iz = ia = ib = 0 | |
156 |
|
156 | |||
157 | for region in self.find_sync_regions(): |
|
157 | for region in self.find_sync_regions(): | |
158 | zmatch, zend, amatch, aend, bmatch, bend = region |
|
158 | zmatch, zend, amatch, aend, bmatch, bend = region | |
159 | # print 'match base [%d:%d]' % (zmatch, zend) |
|
159 | # print 'match base [%d:%d]' % (zmatch, zend) | |
160 |
|
160 | |||
161 | matchlen = zend - zmatch |
|
161 | matchlen = zend - zmatch | |
162 | assert matchlen >= 0 |
|
162 | assert matchlen >= 0 | |
163 | assert matchlen == (aend - amatch) |
|
163 | assert matchlen == (aend - amatch) | |
164 | assert matchlen == (bend - bmatch) |
|
164 | assert matchlen == (bend - bmatch) | |
165 |
|
165 | |||
166 | len_a = amatch - ia |
|
166 | len_a = amatch - ia | |
167 | len_b = bmatch - ib |
|
167 | len_b = bmatch - ib | |
168 | len_base = zmatch - iz |
|
168 | len_base = zmatch - iz | |
169 | assert len_a >= 0 |
|
169 | assert len_a >= 0 | |
170 | assert len_b >= 0 |
|
170 | assert len_b >= 0 | |
171 | assert len_base >= 0 |
|
171 | assert len_base >= 0 | |
172 |
|
172 | |||
173 | # print 'unmatched a=%d, b=%d' % (len_a, len_b) |
|
173 | # print 'unmatched a=%d, b=%d' % (len_a, len_b) | |
174 |
|
174 | |||
175 | if len_a or len_b: |
|
175 | if len_a or len_b: | |
176 | # try to avoid actually slicing the lists |
|
176 | # try to avoid actually slicing the lists | |
177 | equal_a = compare_range( |
|
177 | equal_a = compare_range( | |
178 | self.a, ia, amatch, self.base, iz, zmatch |
|
178 | self.a, ia, amatch, self.base, iz, zmatch | |
179 | ) |
|
179 | ) | |
180 | equal_b = compare_range( |
|
180 | equal_b = compare_range( | |
181 | self.b, ib, bmatch, self.base, iz, zmatch |
|
181 | self.b, ib, bmatch, self.base, iz, zmatch | |
182 | ) |
|
182 | ) | |
183 | same = compare_range(self.a, ia, amatch, self.b, ib, bmatch) |
|
183 | same = compare_range(self.a, ia, amatch, self.b, ib, bmatch) | |
184 |
|
184 | |||
185 | if same: |
|
185 | if same: | |
186 | yield b'same', ia, amatch |
|
186 | yield b'same', ia, amatch | |
187 | elif equal_a and not equal_b: |
|
187 | elif equal_a and not equal_b: | |
188 | yield b'b', ib, bmatch |
|
188 | yield b'b', ib, bmatch | |
189 | elif equal_b and not equal_a: |
|
189 | elif equal_b and not equal_a: | |
190 | yield b'a', ia, amatch |
|
190 | yield b'a', ia, amatch | |
191 | elif not equal_a and not equal_b: |
|
191 | elif not equal_a and not equal_b: | |
192 | yield b'conflict', iz, zmatch, ia, amatch, ib, bmatch |
|
192 | yield b'conflict', iz, zmatch, ia, amatch, ib, bmatch | |
193 | else: |
|
193 | else: | |
194 | raise AssertionError(b"can't handle a=b=base but unmatched") |
|
194 | raise AssertionError(b"can't handle a=b=base but unmatched") | |
195 |
|
195 | |||
196 | ia = amatch |
|
196 | ia = amatch | |
197 | ib = bmatch |
|
197 | ib = bmatch | |
198 | iz = zmatch |
|
198 | iz = zmatch | |
199 |
|
199 | |||
200 | # if the same part of the base was deleted on both sides |
|
200 | # if the same part of the base was deleted on both sides | |
201 | # that's OK, we can just skip it. |
|
201 | # that's OK, we can just skip it. | |
202 |
|
202 | |||
203 | if matchlen > 0: |
|
203 | if matchlen > 0: | |
204 | assert ia == amatch |
|
204 | assert ia == amatch | |
205 | assert ib == bmatch |
|
205 | assert ib == bmatch | |
206 | assert iz == zmatch |
|
206 | assert iz == zmatch | |
207 |
|
207 | |||
208 | yield b'unchanged', zmatch, zend |
|
208 | yield b'unchanged', zmatch, zend | |
209 | iz = zend |
|
209 | iz = zend | |
210 | ia = aend |
|
210 | ia = aend | |
211 | ib = bend |
|
211 | ib = bend | |
212 |
|
212 | |||
213 | def find_sync_regions(self): |
|
213 | def find_sync_regions(self): | |
214 | """Return a list of sync regions, where both descendants match the base. |
|
214 | """Return a list of sync regions, where both descendants match the base. | |
215 |
|
215 | |||
216 | Generates a list of (base1, base2, a1, a2, b1, b2). There is |
|
216 | Generates a list of (base1, base2, a1, a2, b1, b2). There is | |
217 | always a zero-length sync region at the end of all the files. |
|
217 | always a zero-length sync region at the end of all the files. | |
218 | """ |
|
218 | """ | |
219 |
|
219 | |||
220 | ia = ib = 0 |
|
220 | ia = ib = 0 | |
221 | amatches = mdiff.get_matching_blocks(self.basetext, self.atext) |
|
221 | amatches = mdiff.get_matching_blocks(self.basetext, self.atext) | |
222 | bmatches = mdiff.get_matching_blocks(self.basetext, self.btext) |
|
222 | bmatches = mdiff.get_matching_blocks(self.basetext, self.btext) | |
223 | len_a = len(amatches) |
|
223 | len_a = len(amatches) | |
224 | len_b = len(bmatches) |
|
224 | len_b = len(bmatches) | |
225 |
|
225 | |||
226 | sl = [] |
|
226 | sl = [] | |
227 |
|
227 | |||
228 | while ia < len_a and ib < len_b: |
|
228 | while ia < len_a and ib < len_b: | |
229 | abase, amatch, alen = amatches[ia] |
|
229 | abase, amatch, alen = amatches[ia] | |
230 | bbase, bmatch, blen = bmatches[ib] |
|
230 | bbase, bmatch, blen = bmatches[ib] | |
231 |
|
231 | |||
232 | # there is an unconflicted block at i; how long does it |
|
232 | # there is an unconflicted block at i; how long does it | |
233 | # extend? until whichever one ends earlier. |
|
233 | # extend? until whichever one ends earlier. | |
234 | i = intersect((abase, abase + alen), (bbase, bbase + blen)) |
|
234 | i = intersect((abase, abase + alen), (bbase, bbase + blen)) | |
235 | if i: |
|
235 | if i: | |
236 | intbase = i[0] |
|
236 | intbase = i[0] | |
237 | intend = i[1] |
|
237 | intend = i[1] | |
238 | intlen = intend - intbase |
|
238 | intlen = intend - intbase | |
239 |
|
239 | |||
240 | # found a match of base[i[0], i[1]]; this may be less than |
|
240 | # found a match of base[i[0], i[1]]; this may be less than | |
241 | # the region that matches in either one |
|
241 | # the region that matches in either one | |
242 | assert intlen <= alen |
|
242 | assert intlen <= alen | |
243 | assert intlen <= blen |
|
243 | assert intlen <= blen | |
244 | assert abase <= intbase |
|
244 | assert abase <= intbase | |
245 | assert bbase <= intbase |
|
245 | assert bbase <= intbase | |
246 |
|
246 | |||
247 | asub = amatch + (intbase - abase) |
|
247 | asub = amatch + (intbase - abase) | |
248 | bsub = bmatch + (intbase - bbase) |
|
248 | bsub = bmatch + (intbase - bbase) | |
249 | aend = asub + intlen |
|
249 | aend = asub + intlen | |
250 | bend = bsub + intlen |
|
250 | bend = bsub + intlen | |
251 |
|
251 | |||
252 | assert self.base[intbase:intend] == self.a[asub:aend], ( |
|
252 | assert self.base[intbase:intend] == self.a[asub:aend], ( | |
253 | self.base[intbase:intend], |
|
253 | self.base[intbase:intend], | |
254 | self.a[asub:aend], |
|
254 | self.a[asub:aend], | |
255 | ) |
|
255 | ) | |
256 |
|
256 | |||
257 | assert self.base[intbase:intend] == self.b[bsub:bend] |
|
257 | assert self.base[intbase:intend] == self.b[bsub:bend] | |
258 |
|
258 | |||
259 | sl.append((intbase, intend, asub, aend, bsub, bend)) |
|
259 | sl.append((intbase, intend, asub, aend, bsub, bend)) | |
260 |
|
260 | |||
261 | # advance whichever one ends first in the base text |
|
261 | # advance whichever one ends first in the base text | |
262 | if (abase + alen) < (bbase + blen): |
|
262 | if (abase + alen) < (bbase + blen): | |
263 | ia += 1 |
|
263 | ia += 1 | |
264 | else: |
|
264 | else: | |
265 | ib += 1 |
|
265 | ib += 1 | |
266 |
|
266 | |||
267 | intbase = len(self.base) |
|
267 | intbase = len(self.base) | |
268 | abase = len(self.a) |
|
268 | abase = len(self.a) | |
269 | bbase = len(self.b) |
|
269 | bbase = len(self.b) | |
270 | sl.append((intbase, intbase, abase, abase, bbase, bbase)) |
|
270 | sl.append((intbase, intbase, abase, abase, bbase, bbase)) | |
271 |
|
271 | |||
272 | return sl |
|
272 | return sl | |
273 |
|
273 | |||
274 |
|
274 | |||
275 | def _verifytext(text, path, ui, opts): |
|
275 | def _verifytext(text, path, ui, opts): | |
276 | """verifies that text is non-binary (unless opts[text] is passed, |
|
276 | """verifies that text is non-binary (unless opts[text] is passed, | |
277 | then we just warn)""" |
|
277 | then we just warn)""" | |
278 | if stringutil.binary(text): |
|
278 | if stringutil.binary(text): | |
279 | msg = _(b"%s looks like a binary file.") % path |
|
279 | msg = _(b"%s looks like a binary file.") % path | |
280 | if not opts.get('quiet'): |
|
280 | if not opts.get('quiet'): | |
281 | ui.warn(_(b'warning: %s\n') % msg) |
|
281 | ui.warn(_(b'warning: %s\n') % msg) | |
282 | if not opts.get('text'): |
|
282 | if not opts.get('text'): | |
283 | raise error.Abort(msg) |
|
283 | raise error.Abort(msg) | |
284 | return text |
|
284 | return text | |
285 |
|
285 | |||
286 |
|
286 | |||
287 | def _picklabels(overrides): |
|
287 | def _picklabels(overrides): | |
288 | if len(overrides) > 3: |
|
288 | if len(overrides) > 3: | |
289 | raise error.Abort(_(b"can only specify three labels.")) |
|
289 | raise error.Abort(_(b"can only specify three labels.")) | |
290 | result = [None, None, None] |
|
290 | result = [None, None, None] | |
291 | for i, override in enumerate(overrides): |
|
291 | for i, override in enumerate(overrides): | |
292 | result[i] = override |
|
292 | result[i] = override | |
293 | return result |
|
293 | return result | |
294 |
|
294 | |||
295 |
|
295 | |||
296 | def _detect_newline(m3): |
|
296 | def _detect_newline(m3): | |
297 | if len(m3.a) > 0: |
|
297 | if len(m3.a) > 0: | |
298 | if m3.a[0].endswith(b'\r\n'): |
|
298 | if m3.a[0].endswith(b'\r\n'): | |
299 | return b'\r\n' |
|
299 | return b'\r\n' | |
300 | elif m3.a[0].endswith(b'\r'): |
|
300 | elif m3.a[0].endswith(b'\r'): | |
301 | return b'\r' |
|
301 | return b'\r' | |
302 | return b'\n' |
|
302 | return b'\n' | |
303 |
|
303 | |||
304 |
|
304 | |||
305 | def _minimize(a_lines, b_lines): |
|
305 | def _minimize(a_lines, b_lines): | |
306 | """Trim conflict regions of lines where A and B sides match. |
|
306 | """Trim conflict regions of lines where A and B sides match. | |
307 |
|
307 | |||
308 | Lines where both A and B have made the same changes at the beginning |
|
308 | Lines where both A and B have made the same changes at the beginning | |
309 | or the end of each merge region are eliminated from the conflict |
|
309 | or the end of each merge region are eliminated from the conflict | |
310 | region and are instead considered the same. |
|
310 | region and are instead considered the same. | |
311 | """ |
|
311 | """ | |
312 | alen = len(a_lines) |
|
312 | alen = len(a_lines) | |
313 | blen = len(b_lines) |
|
313 | blen = len(b_lines) | |
314 |
|
314 | |||
315 | # find matches at the front |
|
315 | # find matches at the front | |
316 | ii = 0 |
|
316 | ii = 0 | |
317 | while ii < alen and ii < blen and a_lines[ii] == b_lines[ii]: |
|
317 | while ii < alen and ii < blen and a_lines[ii] == b_lines[ii]: | |
318 | ii += 1 |
|
318 | ii += 1 | |
319 | startmatches = ii |
|
319 | startmatches = ii | |
320 |
|
320 | |||
321 | # find matches at the end |
|
321 | # find matches at the end | |
322 | ii = 0 |
|
322 | ii = 0 | |
323 | while ii < alen and ii < blen and a_lines[-ii - 1] == b_lines[-ii - 1]: |
|
323 | while ii < alen and ii < blen and a_lines[-ii - 1] == b_lines[-ii - 1]: | |
324 | ii += 1 |
|
324 | ii += 1 | |
325 | endmatches = ii |
|
325 | endmatches = ii | |
326 |
|
326 | |||
327 | lines_before = a_lines[:startmatches] |
|
327 | lines_before = a_lines[:startmatches] | |
328 | new_a_lines = a_lines[startmatches : alen - endmatches] |
|
328 | new_a_lines = a_lines[startmatches : alen - endmatches] | |
329 | new_b_lines = b_lines[startmatches : blen - endmatches] |
|
329 | new_b_lines = b_lines[startmatches : blen - endmatches] | |
330 | lines_after = a_lines[alen - endmatches :] |
|
330 | lines_after = a_lines[alen - endmatches :] | |
331 | return lines_before, new_a_lines, new_b_lines, lines_after |
|
331 | return lines_before, new_a_lines, new_b_lines, lines_after | |
332 |
|
332 | |||
333 |
|
333 | |||
334 | def render_minimized( |
|
334 | def render_minimized( | |
335 | m3, |
|
335 | m3, | |
336 | name_a=None, |
|
336 | name_a=None, | |
337 | name_b=None, |
|
337 | name_b=None, | |
338 | start_marker=b'<<<<<<<', |
|
338 | start_marker=b'<<<<<<<', | |
339 | mid_marker=b'=======', |
|
339 | mid_marker=b'=======', | |
340 | end_marker=b'>>>>>>>', |
|
340 | end_marker=b'>>>>>>>', | |
341 | ): |
|
341 | ): | |
342 | """Return merge in cvs-like form.""" |
|
342 | """Return merge in cvs-like form.""" | |
343 | newline = _detect_newline(m3) |
|
343 | newline = _detect_newline(m3) | |
344 | conflicts = False |
|
344 | conflicts = False | |
345 | if name_a: |
|
345 | if name_a: | |
346 | start_marker = start_marker + b' ' + name_a |
|
346 | start_marker = start_marker + b' ' + name_a | |
347 | if name_b: |
|
347 | if name_b: | |
348 | end_marker = end_marker + b' ' + name_b |
|
348 | end_marker = end_marker + b' ' + name_b | |
349 | merge_groups = m3.merge_groups() |
|
349 | merge_groups = m3.merge_groups() | |
350 | lines = [] |
|
350 | lines = [] | |
351 | for what, group_lines in merge_groups: |
|
351 | for what, group_lines in merge_groups: | |
352 | if what == b'conflict': |
|
352 | if what == b'conflict': | |
353 | conflicts = True |
|
353 | conflicts = True | |
354 | base_lines, a_lines, b_lines = group_lines |
|
354 | base_lines, a_lines, b_lines = group_lines | |
355 | minimized = _minimize(a_lines, b_lines) |
|
355 | minimized = _minimize(a_lines, b_lines) | |
356 | lines_before, a_lines, b_lines, lines_after = minimized |
|
356 | lines_before, a_lines, b_lines, lines_after = minimized | |
357 | lines.extend(lines_before) |
|
357 | lines.extend(lines_before) | |
358 | lines.append(start_marker + newline) |
|
358 | lines.append(start_marker + newline) | |
359 | lines.extend(a_lines) |
|
359 | lines.extend(a_lines) | |
360 | lines.append(mid_marker + newline) |
|
360 | lines.append(mid_marker + newline) | |
361 | lines.extend(b_lines) |
|
361 | lines.extend(b_lines) | |
362 | lines.append(end_marker + newline) |
|
362 | lines.append(end_marker + newline) | |
363 | lines.extend(lines_after) |
|
363 | lines.extend(lines_after) | |
364 | else: |
|
364 | else: | |
365 | lines.extend(group_lines) |
|
365 | lines.extend(group_lines) | |
366 | return lines, conflicts |
|
366 | return lines, conflicts | |
367 |
|
367 | |||
368 |
|
368 | |||
369 | def render_merge3(m3, name_a, name_b, name_base): |
|
369 | def render_merge3(m3, name_a, name_b, name_base): | |
370 | """Render conflicts as 3-way conflict markers.""" |
|
370 | """Render conflicts as 3-way conflict markers.""" | |
371 | newline = _detect_newline(m3) |
|
371 | newline = _detect_newline(m3) | |
372 | conflicts = False |
|
372 | conflicts = False | |
373 | lines = [] |
|
373 | lines = [] | |
374 | for what, group_lines in m3.merge_groups(): |
|
374 | for what, group_lines in m3.merge_groups(): | |
375 | if what == b'conflict': |
|
375 | if what == b'conflict': | |
376 | base_lines, a_lines, b_lines = group_lines |
|
376 | base_lines, a_lines, b_lines = group_lines | |
377 | conflicts = True |
|
377 | conflicts = True | |
378 | lines.append(b'<<<<<<< ' + name_a + newline) |
|
378 | lines.append(b'<<<<<<< ' + name_a + newline) | |
379 | lines.extend(a_lines) |
|
379 | lines.extend(a_lines) | |
380 | lines.append(b'||||||| ' + name_base + newline) |
|
380 | lines.append(b'||||||| ' + name_base + newline) | |
381 | lines.extend(base_lines) |
|
381 | lines.extend(base_lines) | |
382 | lines.append(b'=======' + newline) |
|
382 | lines.append(b'=======' + newline) | |
383 | lines.extend(b_lines) |
|
383 | lines.extend(b_lines) | |
384 | lines.append(b'>>>>>>> ' + name_b + newline) |
|
384 | lines.append(b'>>>>>>> ' + name_b + newline) | |
385 | else: |
|
385 | else: | |
386 | lines.extend(group_lines) |
|
386 | lines.extend(group_lines) | |
387 | return lines, conflicts |
|
387 | return lines, conflicts | |
388 |
|
388 | |||
389 |
|
389 | |||
390 | def render_mergediff(m3, name_a, name_b, name_base): |
|
390 | def render_mergediff(m3, name_a, name_b, name_base): | |
391 | """Render conflicts as conflict markers with one snapshot and one diff.""" |
|
391 | """Render conflicts as conflict markers with one snapshot and one diff.""" | |
392 | newline = _detect_newline(m3) |
|
392 | newline = _detect_newline(m3) | |
393 | lines = [] |
|
393 | lines = [] | |
394 | conflicts = False |
|
394 | conflicts = False | |
395 | for what, group_lines in m3.merge_groups(): |
|
395 | for what, group_lines in m3.merge_groups(): | |
396 | if what == b'conflict': |
|
396 | if what == b'conflict': | |
397 | base_lines, a_lines, b_lines = group_lines |
|
397 | base_lines, a_lines, b_lines = group_lines | |
398 | base_text = b''.join(base_lines) |
|
398 | base_text = b''.join(base_lines) | |
399 | b_blocks = list( |
|
399 | b_blocks = list( | |
400 | mdiff.allblocks( |
|
400 | mdiff.allblocks( | |
401 | base_text, |
|
401 | base_text, | |
402 | b''.join(b_lines), |
|
402 | b''.join(b_lines), | |
403 | lines1=base_lines, |
|
403 | lines1=base_lines, | |
404 | lines2=b_lines, |
|
404 | lines2=b_lines, | |
405 | ) |
|
405 | ) | |
406 | ) |
|
406 | ) | |
407 | a_blocks = list( |
|
407 | a_blocks = list( | |
408 | mdiff.allblocks( |
|
408 | mdiff.allblocks( | |
409 | base_text, |
|
409 | base_text, | |
410 | b''.join(a_lines), |
|
410 | b''.join(a_lines), | |
411 | lines1=base_lines, |
|
411 | lines1=base_lines, | |
412 | lines2=b_lines, |
|
412 | lines2=b_lines, | |
413 | ) |
|
413 | ) | |
414 | ) |
|
414 | ) | |
415 |
|
415 | |||
416 | def matching_lines(blocks): |
|
416 | def matching_lines(blocks): | |
417 | return sum( |
|
417 | return sum( | |
418 | block[1] - block[0] |
|
418 | block[1] - block[0] | |
419 | for block, kind in blocks |
|
419 | for block, kind in blocks | |
420 | if kind == b'=' |
|
420 | if kind == b'=' | |
421 | ) |
|
421 | ) | |
422 |
|
422 | |||
423 | def diff_lines(blocks, lines1, lines2): |
|
423 | def diff_lines(blocks, lines1, lines2): | |
424 | for block, kind in blocks: |
|
424 | for block, kind in blocks: | |
425 | if kind == b'=': |
|
425 | if kind == b'=': | |
426 | for line in lines1[block[0] : block[1]]: |
|
426 | for line in lines1[block[0] : block[1]]: | |
427 | yield b' ' + line |
|
427 | yield b' ' + line | |
428 | else: |
|
428 | else: | |
429 | for line in lines1[block[0] : block[1]]: |
|
429 | for line in lines1[block[0] : block[1]]: | |
430 | yield b'-' + line |
|
430 | yield b'-' + line | |
431 | for line in lines2[block[2] : block[3]]: |
|
431 | for line in lines2[block[2] : block[3]]: | |
432 | yield b'+' + line |
|
432 | yield b'+' + line | |
433 |
|
433 | |||
434 | lines.append(b"<<<<<<<" + newline) |
|
434 | lines.append(b"<<<<<<<" + newline) | |
435 | if matching_lines(a_blocks) < matching_lines(b_blocks): |
|
435 | if matching_lines(a_blocks) < matching_lines(b_blocks): | |
436 | lines.append(b"======= " + name_a + newline) |
|
436 | lines.append(b"======= " + name_a + newline) | |
437 | lines.extend(a_lines) |
|
437 | lines.extend(a_lines) | |
438 | lines.append(b"------- " + name_base + newline) |
|
438 | lines.append(b"------- " + name_base + newline) | |
439 | lines.append(b"+++++++ " + name_b + newline) |
|
439 | lines.append(b"+++++++ " + name_b + newline) | |
440 | lines.extend(diff_lines(b_blocks, base_lines, b_lines)) |
|
440 | lines.extend(diff_lines(b_blocks, base_lines, b_lines)) | |
441 | else: |
|
441 | else: | |
442 | lines.append(b"------- " + name_base + newline) |
|
442 | lines.append(b"------- " + name_base + newline) | |
443 | lines.append(b"+++++++ " + name_a + newline) |
|
443 | lines.append(b"+++++++ " + name_a + newline) | |
444 | lines.extend(diff_lines(a_blocks, base_lines, a_lines)) |
|
444 | lines.extend(diff_lines(a_blocks, base_lines, a_lines)) | |
445 | lines.append(b"======= " + name_b + newline) |
|
445 | lines.append(b"======= " + name_b + newline) | |
446 | lines.extend(b_lines) |
|
446 | lines.extend(b_lines) | |
447 | lines.append(b">>>>>>>" + newline) |
|
447 | lines.append(b">>>>>>>" + newline) | |
448 | conflicts = True |
|
448 | conflicts = True | |
449 | else: |
|
449 | else: | |
450 | lines.extend(group_lines) |
|
450 | lines.extend(group_lines) | |
451 | return lines, conflicts |
|
451 | return lines, conflicts | |
452 |
|
452 | |||
453 |
|
453 | |||
454 | def _resolve(m3, sides): |
|
454 | def _resolve(m3, sides): | |
455 | lines = [] |
|
455 | lines = [] | |
456 | for what, group_lines in m3.merge_groups(): |
|
456 | for what, group_lines in m3.merge_groups(): | |
457 | if what == b'conflict': |
|
457 | if what == b'conflict': | |
458 | for side in sides: |
|
458 | for side in sides: | |
459 | lines.extend(group_lines[side]) |
|
459 | lines.extend(group_lines[side]) | |
460 | else: |
|
460 | else: | |
461 | lines.extend(group_lines) |
|
461 | lines.extend(group_lines) | |
462 | return lines |
|
462 | return lines | |
463 |
|
463 | |||
464 |
|
464 | |||
465 | def simplemerge(ui, localctx, basectx, otherctx, **opts): |
|
465 | def simplemerge(ui, localctx, basectx, otherctx, **opts): | |
466 | """Performs the simplemerge algorithm. |
|
466 | """Performs the simplemerge algorithm. | |
467 |
|
467 | |||
468 | The merged result is written into `localctx`. |
|
468 | The merged result is written into `localctx`. | |
469 | """ |
|
469 | """ | |
470 |
|
470 | |||
471 | def readctx(ctx): |
|
471 | def readctx(ctx): | |
472 | # Merges were always run in the working copy before, which means |
|
472 | # Merges were always run in the working copy before, which means | |
473 | # they used decoded data, if the user defined any repository |
|
473 | # they used decoded data, if the user defined any repository | |
474 | # filters. |
|
474 | # filters. | |
475 | # |
|
475 | # | |
476 | # Maintain that behavior today for BC, though perhaps in the future |
|
476 | # Maintain that behavior today for BC, though perhaps in the future | |
477 | # it'd be worth considering whether merging encoded data (what the |
|
477 | # it'd be worth considering whether merging encoded data (what the | |
478 | # repository usually sees) might be more useful. |
|
478 | # repository usually sees) might be more useful. | |
479 | return _verifytext(ctx.decodeddata(), ctx.path(), ui, opts) |
|
479 | return _verifytext(ctx.decodeddata(), ctx.path(), ui, opts) | |
480 |
|
480 | |||
481 | try: |
|
481 | try: | |
482 | localtext = readctx(localctx) |
|
482 | localtext = readctx(localctx) | |
483 | basetext = readctx(basectx) |
|
483 | basetext = readctx(basectx) | |
484 | othertext = readctx(otherctx) |
|
484 | othertext = readctx(otherctx) | |
485 | except error.Abort: |
|
485 | except error.Abort: | |
486 |
return |
|
486 | return True | |
487 |
|
487 | |||
488 | m3 = Merge3Text(basetext, localtext, othertext) |
|
488 | m3 = Merge3Text(basetext, localtext, othertext) | |
489 | conflicts = False |
|
489 | conflicts = False | |
490 | mode = opts.get('mode', b'merge') |
|
490 | mode = opts.get('mode', b'merge') | |
491 | if mode == b'union': |
|
491 | if mode == b'union': | |
492 | lines = _resolve(m3, (1, 2)) |
|
492 | lines = _resolve(m3, (1, 2)) | |
493 | elif mode == b'local': |
|
493 | elif mode == b'local': | |
494 | lines = _resolve(m3, (1,)) |
|
494 | lines = _resolve(m3, (1,)) | |
495 | elif mode == b'other': |
|
495 | elif mode == b'other': | |
496 | lines = _resolve(m3, (2,)) |
|
496 | lines = _resolve(m3, (2,)) | |
497 | else: |
|
497 | else: | |
498 | name_a, name_b, name_base = _picklabels(opts.get('label', [])) |
|
498 | name_a, name_b, name_base = _picklabels(opts.get('label', [])) | |
499 | if mode == b'mergediff': |
|
499 | if mode == b'mergediff': | |
500 | lines, conflicts = render_mergediff(m3, name_a, name_b, name_base) |
|
500 | lines, conflicts = render_mergediff(m3, name_a, name_b, name_base) | |
501 | elif mode == b'merge3': |
|
501 | elif mode == b'merge3': | |
502 | lines, conflicts = render_merge3(m3, name_a, name_b, name_base) |
|
502 | lines, conflicts = render_merge3(m3, name_a, name_b, name_base) | |
503 | else: |
|
503 | else: | |
504 | lines, conflicts = render_minimized(m3, name_a, name_b) |
|
504 | lines, conflicts = render_minimized(m3, name_a, name_b) | |
505 |
|
505 | |||
506 | mergedtext = b''.join(lines) |
|
506 | mergedtext = b''.join(lines) | |
507 | if opts.get('print'): |
|
507 | if opts.get('print'): | |
508 | ui.fout.write(mergedtext) |
|
508 | ui.fout.write(mergedtext) | |
509 | else: |
|
509 | else: | |
510 | # localctx.flags() already has the merged flags (done in |
|
510 | # localctx.flags() already has the merged flags (done in | |
511 | # mergestate.resolve()) |
|
511 | # mergestate.resolve()) | |
512 | localctx.write(mergedtext, localctx.flags()) |
|
512 | localctx.write(mergedtext, localctx.flags()) | |
513 |
|
513 | |||
514 |
|
|
514 | return conflicts | |
515 | return 1 |
|
@@ -1,1202 +1,1202 b'' | |||||
1 | $ cat >> "$HGRCPATH" << EOF |
|
1 | $ cat >> "$HGRCPATH" << EOF | |
2 | > [ui] |
|
2 | > [ui] | |
3 | > merge = :merge3 |
|
3 | > merge = :merge3 | |
4 | > EOF |
|
4 | > EOF | |
5 |
|
5 | |||
6 | init |
|
6 | init | |
7 |
|
7 | |||
8 | $ hg init repo |
|
8 | $ hg init repo | |
9 | $ cd repo |
|
9 | $ cd repo | |
10 |
|
10 | |||
11 | commit |
|
11 | commit | |
12 |
|
12 | |||
13 | $ echo 'a' > a |
|
13 | $ echo 'a' > a | |
14 | $ hg ci -A -m test -u nobody -d '1 0' |
|
14 | $ hg ci -A -m test -u nobody -d '1 0' | |
15 | adding a |
|
15 | adding a | |
16 |
|
16 | |||
17 | annotate -c |
|
17 | annotate -c | |
18 |
|
18 | |||
19 | $ hg annotate -c a |
|
19 | $ hg annotate -c a | |
20 | 8435f90966e4: a |
|
20 | 8435f90966e4: a | |
21 |
|
21 | |||
22 | annotate -cl |
|
22 | annotate -cl | |
23 |
|
23 | |||
24 | $ hg annotate -cl a |
|
24 | $ hg annotate -cl a | |
25 | 8435f90966e4:1: a |
|
25 | 8435f90966e4:1: a | |
26 |
|
26 | |||
27 | annotate -d |
|
27 | annotate -d | |
28 |
|
28 | |||
29 | $ hg annotate -d a |
|
29 | $ hg annotate -d a | |
30 | Thu Jan 01 00:00:01 1970 +0000: a |
|
30 | Thu Jan 01 00:00:01 1970 +0000: a | |
31 |
|
31 | |||
32 | annotate -n |
|
32 | annotate -n | |
33 |
|
33 | |||
34 | $ hg annotate -n a |
|
34 | $ hg annotate -n a | |
35 | 0: a |
|
35 | 0: a | |
36 |
|
36 | |||
37 | annotate -nl |
|
37 | annotate -nl | |
38 |
|
38 | |||
39 | $ hg annotate -nl a |
|
39 | $ hg annotate -nl a | |
40 | 0:1: a |
|
40 | 0:1: a | |
41 |
|
41 | |||
42 | annotate -u |
|
42 | annotate -u | |
43 |
|
43 | |||
44 | $ hg annotate -u a |
|
44 | $ hg annotate -u a | |
45 | nobody: a |
|
45 | nobody: a | |
46 |
|
46 | |||
47 | annotate -cdnu |
|
47 | annotate -cdnu | |
48 |
|
48 | |||
49 | $ hg annotate -cdnu a |
|
49 | $ hg annotate -cdnu a | |
50 | nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000: a |
|
50 | nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000: a | |
51 |
|
51 | |||
52 | annotate -cdnul |
|
52 | annotate -cdnul | |
53 |
|
53 | |||
54 | $ hg annotate -cdnul a |
|
54 | $ hg annotate -cdnul a | |
55 | nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000:1: a |
|
55 | nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000:1: a | |
56 |
|
56 | |||
57 | annotate (JSON) |
|
57 | annotate (JSON) | |
58 |
|
58 | |||
59 | $ hg annotate -Tjson a |
|
59 | $ hg annotate -Tjson a | |
60 | [ |
|
60 | [ | |
61 | { |
|
61 | { | |
62 | "lines": [{"line": "a\n", "rev": 0}], |
|
62 | "lines": [{"line": "a\n", "rev": 0}], | |
63 | "path": "a" |
|
63 | "path": "a" | |
64 | } |
|
64 | } | |
65 | ] |
|
65 | ] | |
66 |
|
66 | |||
67 | $ hg annotate -Tjson -cdfnul a |
|
67 | $ hg annotate -Tjson -cdfnul a | |
68 | [ |
|
68 | [ | |
69 | { |
|
69 | { | |
70 | "lines": [{"date": [1.0, 0], "line": "a\n", "lineno": 1, "node": "8435f90966e442695d2ded29fdade2bac5ad8065", "path": "a", "rev": 0, "user": "nobody"}], |
|
70 | "lines": [{"date": [1.0, 0], "line": "a\n", "lineno": 1, "node": "8435f90966e442695d2ded29fdade2bac5ad8065", "path": "a", "rev": 0, "user": "nobody"}], | |
71 | "path": "a" |
|
71 | "path": "a" | |
72 | } |
|
72 | } | |
73 | ] |
|
73 | ] | |
74 |
|
74 | |||
75 | log-like templating |
|
75 | log-like templating | |
76 |
|
76 | |||
77 | $ hg annotate -T'{lines % "{rev} {node|shortest}: {line}"}' a |
|
77 | $ hg annotate -T'{lines % "{rev} {node|shortest}: {line}"}' a | |
78 | 0 8435: a |
|
78 | 0 8435: a | |
79 |
|
79 | |||
80 | '{lineno}' field should be populated as necessary |
|
80 | '{lineno}' field should be populated as necessary | |
81 |
|
81 | |||
82 | $ hg annotate -T'{lines % "{rev}:{lineno}: {line}"}' a |
|
82 | $ hg annotate -T'{lines % "{rev}:{lineno}: {line}"}' a | |
83 | 0:1: a |
|
83 | 0:1: a | |
84 | $ hg annotate -Ta a \ |
|
84 | $ hg annotate -Ta a \ | |
85 | > --config templates.a='"{lines % "{rev}:{lineno}: {line}"}"' |
|
85 | > --config templates.a='"{lines % "{rev}:{lineno}: {line}"}"' | |
86 | 0:1: a |
|
86 | 0:1: a | |
87 |
|
87 | |||
88 | $ cat <<EOF >>a |
|
88 | $ cat <<EOF >>a | |
89 | > a |
|
89 | > a | |
90 | > a |
|
90 | > a | |
91 | > EOF |
|
91 | > EOF | |
92 | $ hg ci -ma1 -d '1 0' |
|
92 | $ hg ci -ma1 -d '1 0' | |
93 | $ hg cp a b |
|
93 | $ hg cp a b | |
94 | $ hg ci -mb -d '1 0' |
|
94 | $ hg ci -mb -d '1 0' | |
95 | $ cat <<EOF >> b |
|
95 | $ cat <<EOF >> b | |
96 | > b4 |
|
96 | > b4 | |
97 | > b5 |
|
97 | > b5 | |
98 | > b6 |
|
98 | > b6 | |
99 | > EOF |
|
99 | > EOF | |
100 | $ hg ci -mb2 -d '2 0' |
|
100 | $ hg ci -mb2 -d '2 0' | |
101 |
|
101 | |||
102 | default output of '{lines}' should be readable |
|
102 | default output of '{lines}' should be readable | |
103 |
|
103 | |||
104 | $ hg annotate -T'{lines}' a |
|
104 | $ hg annotate -T'{lines}' a | |
105 | 0: a |
|
105 | 0: a | |
106 | 1: a |
|
106 | 1: a | |
107 | 1: a |
|
107 | 1: a | |
108 | $ hg annotate -T'{join(lines, "\n")}' a |
|
108 | $ hg annotate -T'{join(lines, "\n")}' a | |
109 | 0: a |
|
109 | 0: a | |
110 |
|
110 | |||
111 | 1: a |
|
111 | 1: a | |
112 |
|
112 | |||
113 | 1: a |
|
113 | 1: a | |
114 |
|
114 | |||
115 | several filters can be applied to '{lines}' |
|
115 | several filters can be applied to '{lines}' | |
116 |
|
116 | |||
117 | $ hg annotate -T'{lines|json}\n' a |
|
117 | $ hg annotate -T'{lines|json}\n' a | |
118 | [{"line": "a\n", "rev": 0}, {"line": "a\n", "rev": 1}, {"line": "a\n", "rev": 1}] |
|
118 | [{"line": "a\n", "rev": 0}, {"line": "a\n", "rev": 1}, {"line": "a\n", "rev": 1}] | |
119 | $ hg annotate -T'{lines|stringify}' a |
|
119 | $ hg annotate -T'{lines|stringify}' a | |
120 | 0: a |
|
120 | 0: a | |
121 | 1: a |
|
121 | 1: a | |
122 | 1: a |
|
122 | 1: a | |
123 | $ hg annotate -T'{lines|count}\n' a |
|
123 | $ hg annotate -T'{lines|count}\n' a | |
124 | 3 |
|
124 | 3 | |
125 |
|
125 | |||
126 | annotate multiple files (JSON) |
|
126 | annotate multiple files (JSON) | |
127 |
|
127 | |||
128 | $ hg annotate -Tjson a b |
|
128 | $ hg annotate -Tjson a b | |
129 | [ |
|
129 | [ | |
130 | { |
|
130 | { | |
131 | "lines": [{"line": "a\n", "rev": 0}, {"line": "a\n", "rev": 1}, {"line": "a\n", "rev": 1}], |
|
131 | "lines": [{"line": "a\n", "rev": 0}, {"line": "a\n", "rev": 1}, {"line": "a\n", "rev": 1}], | |
132 | "path": "a" |
|
132 | "path": "a" | |
133 | }, |
|
133 | }, | |
134 | { |
|
134 | { | |
135 | "lines": [{"line": "a\n", "rev": 0}, {"line": "a\n", "rev": 1}, {"line": "a\n", "rev": 1}, {"line": "b4\n", "rev": 3}, {"line": "b5\n", "rev": 3}, {"line": "b6\n", "rev": 3}], |
|
135 | "lines": [{"line": "a\n", "rev": 0}, {"line": "a\n", "rev": 1}, {"line": "a\n", "rev": 1}, {"line": "b4\n", "rev": 3}, {"line": "b5\n", "rev": 3}, {"line": "b6\n", "rev": 3}], | |
136 | "path": "b" |
|
136 | "path": "b" | |
137 | } |
|
137 | } | |
138 | ] |
|
138 | ] | |
139 |
|
139 | |||
140 | annotate multiple files (template) |
|
140 | annotate multiple files (template) | |
141 |
|
141 | |||
142 | $ hg annotate -T'== {path} ==\n{lines % "{rev}: {line}"}' a b |
|
142 | $ hg annotate -T'== {path} ==\n{lines % "{rev}: {line}"}' a b | |
143 | == a == |
|
143 | == a == | |
144 | 0: a |
|
144 | 0: a | |
145 | 1: a |
|
145 | 1: a | |
146 | 1: a |
|
146 | 1: a | |
147 | == b == |
|
147 | == b == | |
148 | 0: a |
|
148 | 0: a | |
149 | 1: a |
|
149 | 1: a | |
150 | 1: a |
|
150 | 1: a | |
151 | 3: b4 |
|
151 | 3: b4 | |
152 | 3: b5 |
|
152 | 3: b5 | |
153 | 3: b6 |
|
153 | 3: b6 | |
154 |
|
154 | |||
155 | annotate -n b |
|
155 | annotate -n b | |
156 |
|
156 | |||
157 | $ hg annotate -n b |
|
157 | $ hg annotate -n b | |
158 | 0: a |
|
158 | 0: a | |
159 | 1: a |
|
159 | 1: a | |
160 | 1: a |
|
160 | 1: a | |
161 | 3: b4 |
|
161 | 3: b4 | |
162 | 3: b5 |
|
162 | 3: b5 | |
163 | 3: b6 |
|
163 | 3: b6 | |
164 |
|
164 | |||
165 | annotate --no-follow b |
|
165 | annotate --no-follow b | |
166 |
|
166 | |||
167 | $ hg annotate --no-follow b |
|
167 | $ hg annotate --no-follow b | |
168 | 2: a |
|
168 | 2: a | |
169 | 2: a |
|
169 | 2: a | |
170 | 2: a |
|
170 | 2: a | |
171 | 3: b4 |
|
171 | 3: b4 | |
172 | 3: b5 |
|
172 | 3: b5 | |
173 | 3: b6 |
|
173 | 3: b6 | |
174 |
|
174 | |||
175 | annotate -nl b |
|
175 | annotate -nl b | |
176 |
|
176 | |||
177 | $ hg annotate -nl b |
|
177 | $ hg annotate -nl b | |
178 | 0:1: a |
|
178 | 0:1: a | |
179 | 1:2: a |
|
179 | 1:2: a | |
180 | 1:3: a |
|
180 | 1:3: a | |
181 | 3:4: b4 |
|
181 | 3:4: b4 | |
182 | 3:5: b5 |
|
182 | 3:5: b5 | |
183 | 3:6: b6 |
|
183 | 3:6: b6 | |
184 |
|
184 | |||
185 | annotate -nf b |
|
185 | annotate -nf b | |
186 |
|
186 | |||
187 | $ hg annotate -nf b |
|
187 | $ hg annotate -nf b | |
188 | 0 a: a |
|
188 | 0 a: a | |
189 | 1 a: a |
|
189 | 1 a: a | |
190 | 1 a: a |
|
190 | 1 a: a | |
191 | 3 b: b4 |
|
191 | 3 b: b4 | |
192 | 3 b: b5 |
|
192 | 3 b: b5 | |
193 | 3 b: b6 |
|
193 | 3 b: b6 | |
194 |
|
194 | |||
195 | annotate -nlf b |
|
195 | annotate -nlf b | |
196 |
|
196 | |||
197 | $ hg annotate -nlf b |
|
197 | $ hg annotate -nlf b | |
198 | 0 a:1: a |
|
198 | 0 a:1: a | |
199 | 1 a:2: a |
|
199 | 1 a:2: a | |
200 | 1 a:3: a |
|
200 | 1 a:3: a | |
201 | 3 b:4: b4 |
|
201 | 3 b:4: b4 | |
202 | 3 b:5: b5 |
|
202 | 3 b:5: b5 | |
203 | 3 b:6: b6 |
|
203 | 3 b:6: b6 | |
204 |
|
204 | |||
205 | $ hg up -C 2 |
|
205 | $ hg up -C 2 | |
206 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
206 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
207 | $ cat <<EOF >> b |
|
207 | $ cat <<EOF >> b | |
208 | > b4 |
|
208 | > b4 | |
209 | > c |
|
209 | > c | |
210 | > b5 |
|
210 | > b5 | |
211 | > EOF |
|
211 | > EOF | |
212 | $ hg ci -mb2.1 -d '2 0' |
|
212 | $ hg ci -mb2.1 -d '2 0' | |
213 | created new head |
|
213 | created new head | |
214 | $ hg merge |
|
214 | $ hg merge | |
215 | merging b |
|
215 | merging b | |
216 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
216 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
217 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
217 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
218 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
218 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
219 | [1] |
|
219 | [1] | |
220 | $ cat b |
|
220 | $ cat b | |
221 | a |
|
221 | a | |
222 | a |
|
222 | a | |
223 | a |
|
223 | a | |
224 | <<<<<<< working copy: 5fbdc1152d97 - test: b2.1 |
|
224 | <<<<<<< working copy: 5fbdc1152d97 - test: b2.1 | |
225 | b4 |
|
225 | b4 | |
226 | c |
|
226 | c | |
227 | b5 |
|
227 | b5 | |
228 | ||||||| base |
|
228 | ||||||| base | |
229 | ======= |
|
229 | ======= | |
230 | b4 |
|
230 | b4 | |
231 | b5 |
|
231 | b5 | |
232 | b6 |
|
232 | b6 | |
233 | >>>>>>> merge rev: 37ec9f5c3d1f - test: b2 |
|
233 | >>>>>>> merge rev: 37ec9f5c3d1f - test: b2 | |
234 | $ cat <<EOF > b |
|
234 | $ cat <<EOF > b | |
235 | > a |
|
235 | > a | |
236 | > a |
|
236 | > a | |
237 | > a |
|
237 | > a | |
238 | > b4 |
|
238 | > b4 | |
239 | > c |
|
239 | > c | |
240 | > b5 |
|
240 | > b5 | |
241 | > EOF |
|
241 | > EOF | |
242 | $ hg resolve --mark -q |
|
242 | $ hg resolve --mark -q | |
243 | $ rm b.orig |
|
243 | $ rm b.orig | |
244 | $ hg ci -mmergeb -d '3 0' |
|
244 | $ hg ci -mmergeb -d '3 0' | |
245 |
|
245 | |||
246 | annotate after merge |
|
246 | annotate after merge | |
247 |
|
247 | |||
248 | $ hg annotate -nf b |
|
248 | $ hg annotate -nf b | |
249 | 0 a: a |
|
249 | 0 a: a | |
250 | 1 a: a |
|
250 | 1 a: a | |
251 | 1 a: a |
|
251 | 1 a: a | |
252 | 3 b: b4 |
|
252 | 3 b: b4 | |
253 | 4 b: c |
|
253 | 4 b: c | |
254 | 3 b: b5 |
|
254 | 3 b: b5 | |
255 |
|
255 | |||
256 | annotate after merge with -l |
|
256 | annotate after merge with -l | |
257 |
|
257 | |||
258 | $ hg annotate -nlf b |
|
258 | $ hg annotate -nlf b | |
259 | 0 a:1: a |
|
259 | 0 a:1: a | |
260 | 1 a:2: a |
|
260 | 1 a:2: a | |
261 | 1 a:3: a |
|
261 | 1 a:3: a | |
262 | 3 b:4: b4 |
|
262 | 3 b:4: b4 | |
263 | 4 b:5: c |
|
263 | 4 b:5: c | |
264 | 3 b:5: b5 |
|
264 | 3 b:5: b5 | |
265 |
|
265 | |||
266 | $ hg up -C 1 |
|
266 | $ hg up -C 1 | |
267 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
267 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
268 | $ hg cp a b |
|
268 | $ hg cp a b | |
269 | $ cat <<EOF > b |
|
269 | $ cat <<EOF > b | |
270 | > a |
|
270 | > a | |
271 | > z |
|
271 | > z | |
272 | > a |
|
272 | > a | |
273 | > EOF |
|
273 | > EOF | |
274 | $ hg ci -mc -d '3 0' |
|
274 | $ hg ci -mc -d '3 0' | |
275 | created new head |
|
275 | created new head | |
276 | Work around the pure version not resolving the conflict like native code |
|
276 | Work around the pure version not resolving the conflict like native code | |
277 | #if pure |
|
277 | #if pure | |
278 | $ hg merge |
|
278 | $ hg merge | |
279 | merging b |
|
279 | merging b | |
280 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
280 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
281 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
281 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
282 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
282 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
283 | [1] |
|
283 | [1] | |
284 | $ cat <<EOF > b |
|
284 | $ cat <<EOF > b | |
285 | > a |
|
285 | > a | |
286 | > z |
|
286 | > z | |
287 | > a |
|
287 | > a | |
288 | > b4 |
|
288 | > b4 | |
289 | > c |
|
289 | > c | |
290 | > b5 |
|
290 | > b5 | |
291 | > EOF |
|
291 | > EOF | |
292 | $ hg resolve -m b |
|
292 | $ hg resolve -m b | |
293 | (no more unresolved files) |
|
293 | (no more unresolved files) | |
294 | $ rm b.orig |
|
294 | $ rm b.orig | |
295 | #else |
|
295 | #else | |
296 | $ hg merge |
|
296 | $ hg merge | |
297 | merging b |
|
297 | merging b | |
298 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
298 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
299 | (branch merge, don't forget to commit) |
|
299 | (branch merge, don't forget to commit) | |
300 | #endif |
|
300 | #endif | |
301 | $ echo d >> b |
|
301 | $ echo d >> b | |
302 | $ hg ci -mmerge2 -d '4 0' |
|
302 | $ hg ci -mmerge2 -d '4 0' | |
303 |
|
303 | |||
304 | annotate after rename merge |
|
304 | annotate after rename merge | |
305 |
|
305 | |||
306 | $ hg annotate -nf b |
|
306 | $ hg annotate -nf b | |
307 | 0 a: a |
|
307 | 0 a: a | |
308 | 6 b: z |
|
308 | 6 b: z | |
309 | 1 a: a |
|
309 | 1 a: a | |
310 | 3 b: b4 |
|
310 | 3 b: b4 | |
311 | 4 b: c |
|
311 | 4 b: c | |
312 | 3 b: b5 |
|
312 | 3 b: b5 | |
313 | 7 b: d |
|
313 | 7 b: d | |
314 |
|
314 | |||
315 | annotate after rename merge with -l |
|
315 | annotate after rename merge with -l | |
316 |
|
316 | |||
317 | $ hg annotate -nlf b |
|
317 | $ hg annotate -nlf b | |
318 | 0 a:1: a |
|
318 | 0 a:1: a | |
319 | 6 b:2: z |
|
319 | 6 b:2: z | |
320 | 1 a:3: a |
|
320 | 1 a:3: a | |
321 | 3 b:4: b4 |
|
321 | 3 b:4: b4 | |
322 | 4 b:5: c |
|
322 | 4 b:5: c | |
323 | 3 b:5: b5 |
|
323 | 3 b:5: b5 | |
324 | 7 b:7: d |
|
324 | 7 b:7: d | |
325 |
|
325 | |||
326 | --skip nothing (should be the same as no --skip at all) |
|
326 | --skip nothing (should be the same as no --skip at all) | |
327 |
|
327 | |||
328 | $ hg annotate -nlf b --skip '1::0' |
|
328 | $ hg annotate -nlf b --skip '1::0' | |
329 | 0 a:1: a |
|
329 | 0 a:1: a | |
330 | 6 b:2: z |
|
330 | 6 b:2: z | |
331 | 1 a:3: a |
|
331 | 1 a:3: a | |
332 | 3 b:4: b4 |
|
332 | 3 b:4: b4 | |
333 | 4 b:5: c |
|
333 | 4 b:5: c | |
334 | 3 b:5: b5 |
|
334 | 3 b:5: b5 | |
335 | 7 b:7: d |
|
335 | 7 b:7: d | |
336 |
|
336 | |||
337 | --skip a modified line. Note a slight behavior difference in pure - this is |
|
337 | --skip a modified line. Note a slight behavior difference in pure - this is | |
338 | because the pure code comes up with slightly different deltas internally. |
|
338 | because the pure code comes up with slightly different deltas internally. | |
339 |
|
339 | |||
340 | $ hg annotate -nlf b --skip 6 |
|
340 | $ hg annotate -nlf b --skip 6 | |
341 | 0 a:1: a |
|
341 | 0 a:1: a | |
342 | 1 a:2* z (no-pure !) |
|
342 | 1 a:2* z (no-pure !) | |
343 | 0 a:1* z (pure !) |
|
343 | 0 a:1* z (pure !) | |
344 | 1 a:3: a |
|
344 | 1 a:3: a | |
345 | 3 b:4: b4 |
|
345 | 3 b:4: b4 | |
346 | 4 b:5: c |
|
346 | 4 b:5: c | |
347 | 3 b:5: b5 |
|
347 | 3 b:5: b5 | |
348 | 7 b:7: d |
|
348 | 7 b:7: d | |
349 |
|
349 | |||
350 | --skip added lines (and test multiple skip) |
|
350 | --skip added lines (and test multiple skip) | |
351 |
|
351 | |||
352 | $ hg annotate -nlf b --skip 3 |
|
352 | $ hg annotate -nlf b --skip 3 | |
353 | 0 a:1: a |
|
353 | 0 a:1: a | |
354 | 6 b:2: z |
|
354 | 6 b:2: z | |
355 | 1 a:3: a |
|
355 | 1 a:3: a | |
356 | 1 a:3* b4 |
|
356 | 1 a:3* b4 | |
357 | 4 b:5: c |
|
357 | 4 b:5: c | |
358 | 1 a:3* b5 |
|
358 | 1 a:3* b5 | |
359 | 7 b:7: d |
|
359 | 7 b:7: d | |
360 |
|
360 | |||
361 | $ hg annotate -nlf b --skip 4 |
|
361 | $ hg annotate -nlf b --skip 4 | |
362 | 0 a:1: a |
|
362 | 0 a:1: a | |
363 | 6 b:2: z |
|
363 | 6 b:2: z | |
364 | 1 a:3: a |
|
364 | 1 a:3: a | |
365 | 3 b:4: b4 |
|
365 | 3 b:4: b4 | |
366 | 1 a:3* c |
|
366 | 1 a:3* c | |
367 | 3 b:5: b5 |
|
367 | 3 b:5: b5 | |
368 | 7 b:7: d |
|
368 | 7 b:7: d | |
369 |
|
369 | |||
370 | $ hg annotate -nlf b --skip 3 --skip 4 |
|
370 | $ hg annotate -nlf b --skip 3 --skip 4 | |
371 | 0 a:1: a |
|
371 | 0 a:1: a | |
372 | 6 b:2: z |
|
372 | 6 b:2: z | |
373 | 1 a:3: a |
|
373 | 1 a:3: a | |
374 | 1 a:3* b4 |
|
374 | 1 a:3* b4 | |
375 | 1 a:3* c |
|
375 | 1 a:3* c | |
376 | 1 a:3* b5 |
|
376 | 1 a:3* b5 | |
377 | 7 b:7: d |
|
377 | 7 b:7: d | |
378 |
|
378 | |||
379 | $ hg annotate -nlf b --skip 'merge()' |
|
379 | $ hg annotate -nlf b --skip 'merge()' | |
380 | 0 a:1: a |
|
380 | 0 a:1: a | |
381 | 6 b:2: z |
|
381 | 6 b:2: z | |
382 | 1 a:3: a |
|
382 | 1 a:3: a | |
383 | 3 b:4: b4 |
|
383 | 3 b:4: b4 | |
384 | 4 b:5: c |
|
384 | 4 b:5: c | |
385 | 3 b:5: b5 |
|
385 | 3 b:5: b5 | |
386 | 3 b:5* d |
|
386 | 3 b:5* d | |
387 |
|
387 | |||
388 | --skip everything -- use the revision the file was introduced in |
|
388 | --skip everything -- use the revision the file was introduced in | |
389 |
|
389 | |||
390 | $ hg annotate -nlf b --skip 'all()' |
|
390 | $ hg annotate -nlf b --skip 'all()' | |
391 | 0 a:1: a |
|
391 | 0 a:1: a | |
392 | 0 a:1* z |
|
392 | 0 a:1* z | |
393 | 0 a:1* a |
|
393 | 0 a:1* a | |
394 | 0 a:1* b4 |
|
394 | 0 a:1* b4 | |
395 | 0 a:1* c |
|
395 | 0 a:1* c | |
396 | 0 a:1* b5 |
|
396 | 0 a:1* b5 | |
397 | 0 a:1* d |
|
397 | 0 a:1* d | |
398 |
|
398 | |||
399 | Issue2807: alignment of line numbers with -l |
|
399 | Issue2807: alignment of line numbers with -l | |
400 |
|
400 | |||
401 | $ echo more >> b |
|
401 | $ echo more >> b | |
402 | $ hg ci -mmore -d '5 0' |
|
402 | $ hg ci -mmore -d '5 0' | |
403 | $ echo more >> b |
|
403 | $ echo more >> b | |
404 | $ hg ci -mmore -d '6 0' |
|
404 | $ hg ci -mmore -d '6 0' | |
405 | $ echo more >> b |
|
405 | $ echo more >> b | |
406 | $ hg ci -mmore -d '7 0' |
|
406 | $ hg ci -mmore -d '7 0' | |
407 | $ hg annotate -nlf b |
|
407 | $ hg annotate -nlf b | |
408 | 0 a: 1: a |
|
408 | 0 a: 1: a | |
409 | 6 b: 2: z |
|
409 | 6 b: 2: z | |
410 | 1 a: 3: a |
|
410 | 1 a: 3: a | |
411 | 3 b: 4: b4 |
|
411 | 3 b: 4: b4 | |
412 | 4 b: 5: c |
|
412 | 4 b: 5: c | |
413 | 3 b: 5: b5 |
|
413 | 3 b: 5: b5 | |
414 | 7 b: 7: d |
|
414 | 7 b: 7: d | |
415 | 8 b: 8: more |
|
415 | 8 b: 8: more | |
416 | 9 b: 9: more |
|
416 | 9 b: 9: more | |
417 | 10 b:10: more |
|
417 | 10 b:10: more | |
418 |
|
418 | |||
419 | linkrev vs rev |
|
419 | linkrev vs rev | |
420 |
|
420 | |||
421 | $ hg annotate -r tip -n a |
|
421 | $ hg annotate -r tip -n a | |
422 | 0: a |
|
422 | 0: a | |
423 | 1: a |
|
423 | 1: a | |
424 | 1: a |
|
424 | 1: a | |
425 |
|
425 | |||
426 | linkrev vs rev with -l |
|
426 | linkrev vs rev with -l | |
427 |
|
427 | |||
428 | $ hg annotate -r tip -nl a |
|
428 | $ hg annotate -r tip -nl a | |
429 | 0:1: a |
|
429 | 0:1: a | |
430 | 1:2: a |
|
430 | 1:2: a | |
431 | 1:3: a |
|
431 | 1:3: a | |
432 |
|
432 | |||
433 | Issue589: "undelete" sequence leads to crash |
|
433 | Issue589: "undelete" sequence leads to crash | |
434 |
|
434 | |||
435 | annotate was crashing when trying to --follow something |
|
435 | annotate was crashing when trying to --follow something | |
436 |
|
436 | |||
437 | like A -> B -> A |
|
437 | like A -> B -> A | |
438 |
|
438 | |||
439 | generate ABA rename configuration |
|
439 | generate ABA rename configuration | |
440 |
|
440 | |||
441 | $ echo foo > foo |
|
441 | $ echo foo > foo | |
442 | $ hg add foo |
|
442 | $ hg add foo | |
443 | $ hg ci -m addfoo |
|
443 | $ hg ci -m addfoo | |
444 | $ hg rename foo bar |
|
444 | $ hg rename foo bar | |
445 | $ hg ci -m renamefoo |
|
445 | $ hg ci -m renamefoo | |
446 | $ hg rename bar foo |
|
446 | $ hg rename bar foo | |
447 | $ hg ci -m renamebar |
|
447 | $ hg ci -m renamebar | |
448 |
|
448 | |||
449 | annotate after ABA with follow |
|
449 | annotate after ABA with follow | |
450 |
|
450 | |||
451 | $ hg annotate --follow foo |
|
451 | $ hg annotate --follow foo | |
452 | foo: foo |
|
452 | foo: foo | |
453 |
|
453 | |||
454 | missing file |
|
454 | missing file | |
455 |
|
455 | |||
456 | $ hg ann nosuchfile |
|
456 | $ hg ann nosuchfile | |
457 | abort: nosuchfile: no such file in rev e9e6b4fa872f |
|
457 | abort: nosuchfile: no such file in rev e9e6b4fa872f | |
458 | [10] |
|
458 | [10] | |
459 |
|
459 | |||
460 | annotate file without '\n' on last line |
|
460 | annotate file without '\n' on last line | |
461 |
|
461 | |||
462 | $ printf "" > c |
|
462 | $ printf "" > c | |
463 | $ hg ci -A -m test -u nobody -d '1 0' |
|
463 | $ hg ci -A -m test -u nobody -d '1 0' | |
464 | adding c |
|
464 | adding c | |
465 | $ hg annotate c |
|
465 | $ hg annotate c | |
466 | $ printf "a\nb" > c |
|
466 | $ printf "a\nb" > c | |
467 | $ hg ci -m test |
|
467 | $ hg ci -m test | |
468 | $ hg annotate c |
|
468 | $ hg annotate c | |
469 | [0-9]+: a (re) |
|
469 | [0-9]+: a (re) | |
470 | [0-9]+: b (re) |
|
470 | [0-9]+: b (re) | |
471 |
|
471 | |||
472 | Issue3841: check annotation of the file of which filelog includes |
|
472 | Issue3841: check annotation of the file of which filelog includes | |
473 | merging between the revision and its ancestor |
|
473 | merging between the revision and its ancestor | |
474 |
|
474 | |||
475 | to reproduce the situation with recent Mercurial, this script uses (1) |
|
475 | to reproduce the situation with recent Mercurial, this script uses (1) | |
476 | "hg debugsetparents" to merge without ancestor check by "hg merge", |
|
476 | "hg debugsetparents" to merge without ancestor check by "hg merge", | |
477 | and (2) the extension to allow filelog merging between the revision |
|
477 | and (2) the extension to allow filelog merging between the revision | |
478 | and its ancestor by overriding "repo._filecommit". |
|
478 | and its ancestor by overriding "repo._filecommit". | |
479 |
|
479 | |||
480 | $ cat > ../legacyrepo.py <<EOF |
|
480 | $ cat > ../legacyrepo.py <<EOF | |
481 | > from __future__ import absolute_import |
|
481 | > from __future__ import absolute_import | |
482 | > from mercurial import commit, error, extensions |
|
482 | > from mercurial import commit, error, extensions | |
483 | > def _filecommit(orig, repo, fctx, manifest1, manifest2, |
|
483 | > def _filecommit(orig, repo, fctx, manifest1, manifest2, | |
484 | > linkrev, tr, includecopymeta, ms): |
|
484 | > linkrev, tr, includecopymeta, ms): | |
485 | > fname = fctx.path() |
|
485 | > fname = fctx.path() | |
486 | > text = fctx.data() |
|
486 | > text = fctx.data() | |
487 | > flog = repo.file(fname) |
|
487 | > flog = repo.file(fname) | |
488 | > fparent1 = manifest1.get(fname, repo.nullid) |
|
488 | > fparent1 = manifest1.get(fname, repo.nullid) | |
489 | > fparent2 = manifest2.get(fname, repo.nullid) |
|
489 | > fparent2 = manifest2.get(fname, repo.nullid) | |
490 | > meta = {} |
|
490 | > meta = {} | |
491 | > copy = fctx.copysource() |
|
491 | > copy = fctx.copysource() | |
492 | > if copy and copy != fname: |
|
492 | > if copy and copy != fname: | |
493 | > raise error.Abort('copying is not supported') |
|
493 | > raise error.Abort('copying is not supported') | |
494 | > if fparent2 != repo.nullid: |
|
494 | > if fparent2 != repo.nullid: | |
495 | > return flog.add(text, meta, tr, linkrev, |
|
495 | > return flog.add(text, meta, tr, linkrev, | |
496 | > fparent1, fparent2), 'modified' |
|
496 | > fparent1, fparent2), 'modified' | |
497 | > raise error.Abort('only merging is supported') |
|
497 | > raise error.Abort('only merging is supported') | |
498 | > def uisetup(ui): |
|
498 | > def uisetup(ui): | |
499 | > extensions.wrapfunction(commit, '_filecommit', _filecommit) |
|
499 | > extensions.wrapfunction(commit, '_filecommit', _filecommit) | |
500 | > EOF |
|
500 | > EOF | |
501 |
|
501 | |||
502 | $ cat > baz <<EOF |
|
502 | $ cat > baz <<EOF | |
503 | > 1 |
|
503 | > 1 | |
504 | > 2 |
|
504 | > 2 | |
505 | > 3 |
|
505 | > 3 | |
506 | > 4 |
|
506 | > 4 | |
507 | > 5 |
|
507 | > 5 | |
508 | > EOF |
|
508 | > EOF | |
509 | $ hg add baz |
|
509 | $ hg add baz | |
510 | $ hg commit -m "baz:0" |
|
510 | $ hg commit -m "baz:0" | |
511 |
|
511 | |||
512 | $ cat > baz <<EOF |
|
512 | $ cat > baz <<EOF | |
513 | > 1 baz:1 |
|
513 | > 1 baz:1 | |
514 | > 2 |
|
514 | > 2 | |
515 | > 3 |
|
515 | > 3 | |
516 | > 4 |
|
516 | > 4 | |
517 | > 5 |
|
517 | > 5 | |
518 | > EOF |
|
518 | > EOF | |
519 | $ hg commit -m "baz:1" |
|
519 | $ hg commit -m "baz:1" | |
520 |
|
520 | |||
521 | $ cat > baz <<EOF |
|
521 | $ cat > baz <<EOF | |
522 | > 1 baz:1 |
|
522 | > 1 baz:1 | |
523 | > 2 baz:2 |
|
523 | > 2 baz:2 | |
524 | > 3 |
|
524 | > 3 | |
525 | > 4 |
|
525 | > 4 | |
526 | > 5 |
|
526 | > 5 | |
527 | > EOF |
|
527 | > EOF | |
528 | $ hg debugsetparents 17 17 |
|
528 | $ hg debugsetparents 17 17 | |
529 | $ hg --config extensions.legacyrepo=../legacyrepo.py commit -m "baz:2" |
|
529 | $ hg --config extensions.legacyrepo=../legacyrepo.py commit -m "baz:2" | |
530 | $ hg debugindexdot baz |
|
530 | $ hg debugindexdot baz | |
531 | digraph G { |
|
531 | digraph G { | |
532 | -1 -> 0 |
|
532 | -1 -> 0 | |
533 | 0 -> 1 |
|
533 | 0 -> 1 | |
534 | 1 -> 2 |
|
534 | 1 -> 2 | |
535 | 1 -> 2 |
|
535 | 1 -> 2 | |
536 | } |
|
536 | } | |
537 | $ hg annotate baz |
|
537 | $ hg annotate baz | |
538 | 17: 1 baz:1 |
|
538 | 17: 1 baz:1 | |
539 | 18: 2 baz:2 |
|
539 | 18: 2 baz:2 | |
540 | 16: 3 |
|
540 | 16: 3 | |
541 | 16: 4 |
|
541 | 16: 4 | |
542 | 16: 5 |
|
542 | 16: 5 | |
543 |
|
543 | |||
544 | $ cat > baz <<EOF |
|
544 | $ cat > baz <<EOF | |
545 | > 1 baz:1 |
|
545 | > 1 baz:1 | |
546 | > 2 baz:2 |
|
546 | > 2 baz:2 | |
547 | > 3 baz:3 |
|
547 | > 3 baz:3 | |
548 | > 4 |
|
548 | > 4 | |
549 | > 5 |
|
549 | > 5 | |
550 | > EOF |
|
550 | > EOF | |
551 | $ hg commit -m "baz:3" |
|
551 | $ hg commit -m "baz:3" | |
552 |
|
552 | |||
553 | $ cat > baz <<EOF |
|
553 | $ cat > baz <<EOF | |
554 | > 1 baz:1 |
|
554 | > 1 baz:1 | |
555 | > 2 baz:2 |
|
555 | > 2 baz:2 | |
556 | > 3 baz:3 |
|
556 | > 3 baz:3 | |
557 | > 4 baz:4 |
|
557 | > 4 baz:4 | |
558 | > 5 |
|
558 | > 5 | |
559 | > EOF |
|
559 | > EOF | |
560 | $ hg debugsetparents 19 18 |
|
560 | $ hg debugsetparents 19 18 | |
561 | $ hg --config extensions.legacyrepo=../legacyrepo.py commit -m "baz:4" |
|
561 | $ hg --config extensions.legacyrepo=../legacyrepo.py commit -m "baz:4" | |
562 | $ hg debugindexdot baz |
|
562 | $ hg debugindexdot baz | |
563 | digraph G { |
|
563 | digraph G { | |
564 | -1 -> 0 |
|
564 | -1 -> 0 | |
565 | 0 -> 1 |
|
565 | 0 -> 1 | |
566 | 1 -> 2 |
|
566 | 1 -> 2 | |
567 | 1 -> 2 |
|
567 | 1 -> 2 | |
568 | 2 -> 3 |
|
568 | 2 -> 3 | |
569 | 3 -> 4 |
|
569 | 3 -> 4 | |
570 | 2 -> 4 |
|
570 | 2 -> 4 | |
571 | } |
|
571 | } | |
572 | $ hg annotate baz |
|
572 | $ hg annotate baz | |
573 | 17: 1 baz:1 |
|
573 | 17: 1 baz:1 | |
574 | 18: 2 baz:2 |
|
574 | 18: 2 baz:2 | |
575 | 19: 3 baz:3 |
|
575 | 19: 3 baz:3 | |
576 | 20: 4 baz:4 |
|
576 | 20: 4 baz:4 | |
577 | 16: 5 |
|
577 | 16: 5 | |
578 |
|
578 | |||
579 | annotate clean file |
|
579 | annotate clean file | |
580 |
|
580 | |||
581 | $ hg annotate -ncr "wdir()" foo |
|
581 | $ hg annotate -ncr "wdir()" foo | |
582 | 11 472b18db256d : foo |
|
582 | 11 472b18db256d : foo | |
583 |
|
583 | |||
584 | annotate modified file |
|
584 | annotate modified file | |
585 |
|
585 | |||
586 | $ echo foofoo >> foo |
|
586 | $ echo foofoo >> foo | |
587 | $ hg annotate -r "wdir()" foo |
|
587 | $ hg annotate -r "wdir()" foo | |
588 | 11 : foo |
|
588 | 11 : foo | |
589 | 20+: foofoo |
|
589 | 20+: foofoo | |
590 |
|
590 | |||
591 | $ hg annotate -cr "wdir()" foo |
|
591 | $ hg annotate -cr "wdir()" foo | |
592 | 472b18db256d : foo |
|
592 | 472b18db256d : foo | |
593 | b6bedd5477e7+: foofoo |
|
593 | b6bedd5477e7+: foofoo | |
594 |
|
594 | |||
595 | $ hg annotate -ncr "wdir()" foo |
|
595 | $ hg annotate -ncr "wdir()" foo | |
596 | 11 472b18db256d : foo |
|
596 | 11 472b18db256d : foo | |
597 | 20 b6bedd5477e7+: foofoo |
|
597 | 20 b6bedd5477e7+: foofoo | |
598 |
|
598 | |||
599 | $ hg annotate --debug -ncr "wdir()" foo |
|
599 | $ hg annotate --debug -ncr "wdir()" foo | |
600 | 11 472b18db256d1e8282064eab4bfdaf48cbfe83cd : foo |
|
600 | 11 472b18db256d1e8282064eab4bfdaf48cbfe83cd : foo | |
601 | 20 b6bedd5477e797f25e568a6402d4697f3f895a72+: foofoo |
|
601 | 20 b6bedd5477e797f25e568a6402d4697f3f895a72+: foofoo | |
602 |
|
602 | |||
603 | $ hg annotate -udr "wdir()" foo |
|
603 | $ hg annotate -udr "wdir()" foo | |
604 | test Thu Jan 01 00:00:00 1970 +0000: foo |
|
604 | test Thu Jan 01 00:00:00 1970 +0000: foo | |
605 | test [A-Za-z0-9:+ ]+: foofoo (re) |
|
605 | test [A-Za-z0-9:+ ]+: foofoo (re) | |
606 |
|
606 | |||
607 | $ hg annotate -ncr "wdir()" -Tjson foo |
|
607 | $ hg annotate -ncr "wdir()" -Tjson foo | |
608 | [ |
|
608 | [ | |
609 | { |
|
609 | { | |
610 | "lines": [{"line": "foo\n", "node": "472b18db256d1e8282064eab4bfdaf48cbfe83cd", "rev": 11}, {"line": "foofoo\n", "node": "ffffffffffffffffffffffffffffffffffffffff", "rev": 2147483647}], |
|
610 | "lines": [{"line": "foo\n", "node": "472b18db256d1e8282064eab4bfdaf48cbfe83cd", "rev": 11}, {"line": "foofoo\n", "node": "ffffffffffffffffffffffffffffffffffffffff", "rev": 2147483647}], | |
611 | "path": "foo" |
|
611 | "path": "foo" | |
612 | } |
|
612 | } | |
613 | ] |
|
613 | ] | |
614 |
|
614 | |||
615 | annotate added file |
|
615 | annotate added file | |
616 |
|
616 | |||
617 | $ echo bar > bar |
|
617 | $ echo bar > bar | |
618 | $ hg add bar |
|
618 | $ hg add bar | |
619 | $ hg annotate -ncr "wdir()" bar |
|
619 | $ hg annotate -ncr "wdir()" bar | |
620 | 20 b6bedd5477e7+: bar |
|
620 | 20 b6bedd5477e7+: bar | |
621 |
|
621 | |||
622 | annotate renamed file |
|
622 | annotate renamed file | |
623 |
|
623 | |||
624 | $ hg rename foo renamefoo2 |
|
624 | $ hg rename foo renamefoo2 | |
625 | $ hg annotate -ncr "wdir()" renamefoo2 |
|
625 | $ hg annotate -ncr "wdir()" renamefoo2 | |
626 | 11 472b18db256d : foo |
|
626 | 11 472b18db256d : foo | |
627 | 20 b6bedd5477e7+: foofoo |
|
627 | 20 b6bedd5477e7+: foofoo | |
628 |
|
628 | |||
629 | annotate missing file |
|
629 | annotate missing file | |
630 |
|
630 | |||
631 | $ rm baz |
|
631 | $ rm baz | |
632 |
|
632 | |||
633 | $ hg annotate -ncr "wdir()" baz |
|
633 | $ hg annotate -ncr "wdir()" baz | |
634 | abort: $TESTTMP\repo/baz: $ENOENT$ (windows !) |
|
634 | abort: $TESTTMP\repo/baz: $ENOENT$ (windows !) | |
635 | abort: $ENOENT$: '$TESTTMP/repo/baz' (no-windows !) |
|
635 | abort: $ENOENT$: '$TESTTMP/repo/baz' (no-windows !) | |
636 | [255] |
|
636 | [255] | |
637 |
|
637 | |||
638 | annotate removed file |
|
638 | annotate removed file | |
639 |
|
639 | |||
640 | $ hg rm baz |
|
640 | $ hg rm baz | |
641 |
|
641 | |||
642 | $ hg annotate -ncr "wdir()" baz |
|
642 | $ hg annotate -ncr "wdir()" baz | |
643 | abort: $TESTTMP\repo/baz: $ENOENT$ (windows !) |
|
643 | abort: $TESTTMP\repo/baz: $ENOENT$ (windows !) | |
644 | abort: $ENOENT$: '$TESTTMP/repo/baz' (no-windows !) |
|
644 | abort: $ENOENT$: '$TESTTMP/repo/baz' (no-windows !) | |
645 | [255] |
|
645 | [255] | |
646 |
|
646 | |||
647 | $ hg revert --all --no-backup --quiet |
|
647 | $ hg revert --all --no-backup --quiet | |
648 | $ hg id -n |
|
648 | $ hg id -n | |
649 | 20 |
|
649 | 20 | |
650 |
|
650 | |||
651 | Test followlines() revset; we usually check both followlines(pat, range) and |
|
651 | Test followlines() revset; we usually check both followlines(pat, range) and | |
652 | followlines(pat, range, descend=True) to make sure both give the same result |
|
652 | followlines(pat, range, descend=True) to make sure both give the same result | |
653 | when they should. |
|
653 | when they should. | |
654 |
|
654 | |||
655 | $ echo a >> foo |
|
655 | $ echo a >> foo | |
656 | $ hg ci -m 'foo: add a' |
|
656 | $ hg ci -m 'foo: add a' | |
657 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5)' |
|
657 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5)' | |
658 | 16: baz:0 |
|
658 | 16: baz:0 | |
659 | 19: baz:3 |
|
659 | 19: baz:3 | |
660 | 20: baz:4 |
|
660 | 20: baz:4 | |
661 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=20)' |
|
661 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=20)' | |
662 | 16: baz:0 |
|
662 | 16: baz:0 | |
663 | 19: baz:3 |
|
663 | 19: baz:3 | |
664 | 20: baz:4 |
|
664 | 20: baz:4 | |
665 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19)' |
|
665 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19)' | |
666 | 16: baz:0 |
|
666 | 16: baz:0 | |
667 | 19: baz:3 |
|
667 | 19: baz:3 | |
668 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19, descend=True)' |
|
668 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19, descend=True)' | |
669 | 19: baz:3 |
|
669 | 19: baz:3 | |
670 | 20: baz:4 |
|
670 | 20: baz:4 | |
671 | $ printf "0\n0\n" | cat - baz > baz1 |
|
671 | $ printf "0\n0\n" | cat - baz > baz1 | |
672 | $ mv baz1 baz |
|
672 | $ mv baz1 baz | |
673 | $ hg ci -m 'added two lines with 0' |
|
673 | $ hg ci -m 'added two lines with 0' | |
674 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)' |
|
674 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)' | |
675 | 16: baz:0 |
|
675 | 16: baz:0 | |
676 | 19: baz:3 |
|
676 | 19: baz:3 | |
677 | 20: baz:4 |
|
677 | 20: baz:4 | |
678 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, descend=true, startrev=19)' |
|
678 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, descend=true, startrev=19)' | |
679 | 19: baz:3 |
|
679 | 19: baz:3 | |
680 | 20: baz:4 |
|
680 | 20: baz:4 | |
681 | $ echo 6 >> baz |
|
681 | $ echo 6 >> baz | |
682 | $ hg ci -m 'added line 8' |
|
682 | $ hg ci -m 'added line 8' | |
683 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)' |
|
683 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)' | |
684 | 16: baz:0 |
|
684 | 16: baz:0 | |
685 | 19: baz:3 |
|
685 | 19: baz:3 | |
686 | 20: baz:4 |
|
686 | 20: baz:4 | |
687 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19, descend=1)' |
|
687 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=19, descend=1)' | |
688 | 19: baz:3 |
|
688 | 19: baz:3 | |
689 | 20: baz:4 |
|
689 | 20: baz:4 | |
690 | $ sed 's/3/3+/' baz > baz.new |
|
690 | $ sed 's/3/3+/' baz > baz.new | |
691 | $ mv baz.new baz |
|
691 | $ mv baz.new baz | |
692 | $ hg ci -m 'baz:3->3+' |
|
692 | $ hg ci -m 'baz:3->3+' | |
693 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, descend=0)' |
|
693 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, descend=0)' | |
694 | 16: baz:0 |
|
694 | 16: baz:0 | |
695 | 19: baz:3 |
|
695 | 19: baz:3 | |
696 | 20: baz:4 |
|
696 | 20: baz:4 | |
697 | 24: baz:3->3+ |
|
697 | 24: baz:3->3+ | |
698 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=17, descend=True)' |
|
698 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=17, descend=True)' | |
699 | 19: baz:3 |
|
699 | 19: baz:3 | |
700 | 20: baz:4 |
|
700 | 20: baz:4 | |
701 | 24: baz:3->3+ |
|
701 | 24: baz:3->3+ | |
702 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 1:2, descend=false)' |
|
702 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 1:2, descend=false)' | |
703 | 22: added two lines with 0 |
|
703 | 22: added two lines with 0 | |
704 |
|
704 | |||
705 | file patterns are okay |
|
705 | file patterns are okay | |
706 | $ hg log -T '{rev}: {desc}\n' -r 'followlines("path:baz", 1:2)' |
|
706 | $ hg log -T '{rev}: {desc}\n' -r 'followlines("path:baz", 1:2)' | |
707 | 22: added two lines with 0 |
|
707 | 22: added two lines with 0 | |
708 |
|
708 | |||
709 | renames are followed |
|
709 | renames are followed | |
710 | $ hg mv baz qux |
|
710 | $ hg mv baz qux | |
711 | $ sed 's/4/4+/' qux > qux.new |
|
711 | $ sed 's/4/4+/' qux > qux.new | |
712 | $ mv qux.new qux |
|
712 | $ mv qux.new qux | |
713 | $ hg ci -m 'qux:4->4+' |
|
713 | $ hg ci -m 'qux:4->4+' | |
714 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)' |
|
714 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)' | |
715 | 16: baz:0 |
|
715 | 16: baz:0 | |
716 | 19: baz:3 |
|
716 | 19: baz:3 | |
717 | 20: baz:4 |
|
717 | 20: baz:4 | |
718 | 24: baz:3->3+ |
|
718 | 24: baz:3->3+ | |
719 | 25: qux:4->4+ |
|
719 | 25: qux:4->4+ | |
720 |
|
720 | |||
721 | but are missed when following children |
|
721 | but are missed when following children | |
722 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, startrev=22, descend=True)' |
|
722 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, startrev=22, descend=True)' | |
723 | 24: baz:3->3+ |
|
723 | 24: baz:3->3+ | |
724 |
|
724 | |||
725 | merge |
|
725 | merge | |
726 | $ hg up 24 --quiet |
|
726 | $ hg up 24 --quiet | |
727 | $ echo 7 >> baz |
|
727 | $ echo 7 >> baz | |
728 | $ hg ci -m 'one more line, out of line range' |
|
728 | $ hg ci -m 'one more line, out of line range' | |
729 | created new head |
|
729 | created new head | |
730 | $ sed 's/3+/3-/' baz > baz.new |
|
730 | $ sed 's/3+/3-/' baz > baz.new | |
731 | $ mv baz.new baz |
|
731 | $ mv baz.new baz | |
732 | $ hg ci -m 'baz:3+->3-' |
|
732 | $ hg ci -m 'baz:3+->3-' | |
733 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)' |
|
733 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7)' | |
734 | 16: baz:0 |
|
734 | 16: baz:0 | |
735 | 19: baz:3 |
|
735 | 19: baz:3 | |
736 | 20: baz:4 |
|
736 | 20: baz:4 | |
737 | 24: baz:3->3+ |
|
737 | 24: baz:3->3+ | |
738 | 27: baz:3+->3- |
|
738 | 27: baz:3+->3- | |
739 | $ hg merge 25 |
|
739 | $ hg merge 25 | |
740 | merging baz and qux to qux |
|
740 | merging baz and qux to qux | |
741 | warning: conflicts while merging qux! (edit, then use 'hg resolve --mark') |
|
741 | warning: conflicts while merging qux! (edit, then use 'hg resolve --mark') | |
742 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
742 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
743 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
743 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
744 | [1] |
|
744 | [1] | |
745 | $ cat qux |
|
745 | $ cat qux | |
746 | 0 |
|
746 | 0 | |
747 | 0 |
|
747 | 0 | |
748 | 1 baz:1 |
|
748 | 1 baz:1 | |
749 | 2 baz:2 |
|
749 | 2 baz:2 | |
750 | <<<<<<< working copy: 863de62655ef - test: baz:3+->3- |
|
750 | <<<<<<< working copy: 863de62655ef - test: baz:3+->3- | |
751 | 3- baz:3 |
|
751 | 3- baz:3 | |
752 | 4 baz:4 |
|
752 | 4 baz:4 | |
753 | ||||||| base |
|
753 | ||||||| base | |
754 | 3+ baz:3 |
|
754 | 3+ baz:3 | |
755 | 4 baz:4 |
|
755 | 4 baz:4 | |
756 | ======= |
|
756 | ======= | |
757 | 3+ baz:3 |
|
757 | 3+ baz:3 | |
758 | 4+ baz:4 |
|
758 | 4+ baz:4 | |
759 | >>>>>>> merge rev: cb8df70ae185 - test: qux:4->4+ |
|
759 | >>>>>>> merge rev: cb8df70ae185 - test: qux:4->4+ | |
760 | 5 |
|
760 | 5 | |
761 | 6 |
|
761 | 6 | |
762 | 7 |
|
762 | 7 | |
763 | $ cat > qux <<EOF |
|
763 | $ cat > qux <<EOF | |
764 | > 0 |
|
764 | > 0 | |
765 | > 0 |
|
765 | > 0 | |
766 | > 1 baz:1 |
|
766 | > 1 baz:1 | |
767 | > 2 baz:2 |
|
767 | > 2 baz:2 | |
768 | > 3- baz:3 |
|
768 | > 3- baz:3 | |
769 | > 4 baz:4 |
|
769 | > 4 baz:4 | |
770 | > 5 |
|
770 | > 5 | |
771 | > 6 |
|
771 | > 6 | |
772 | > 7 |
|
772 | > 7 | |
773 | > EOF |
|
773 | > EOF | |
774 | $ hg resolve --mark -q |
|
774 | $ hg resolve --mark -q | |
775 | $ rm qux.orig |
|
775 | $ rm qux.orig | |
776 | $ hg ci -m merge |
|
776 | $ hg ci -m merge | |
777 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)' |
|
777 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)' | |
778 | 16: baz:0 |
|
778 | 16: baz:0 | |
779 | 19: baz:3 |
|
779 | 19: baz:3 | |
780 | 20: baz:4 |
|
780 | 20: baz:4 | |
781 | 24: baz:3->3+ |
|
781 | 24: baz:3->3+ | |
782 | 25: qux:4->4+ |
|
782 | 25: qux:4->4+ | |
783 | 27: baz:3+->3- |
|
783 | 27: baz:3+->3- | |
784 | 28: merge |
|
784 | 28: merge | |
785 | $ hg up 25 --quiet |
|
785 | $ hg up 25 --quiet | |
786 | $ hg merge 27 |
|
786 | $ hg merge 27 | |
787 | merging qux and baz to qux |
|
787 | merging qux and baz to qux | |
788 | warning: conflicts while merging qux! (edit, then use 'hg resolve --mark') |
|
788 | warning: conflicts while merging qux! (edit, then use 'hg resolve --mark') | |
789 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
789 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
790 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
790 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
791 | [1] |
|
791 | [1] | |
792 | $ cat qux |
|
792 | $ cat qux | |
793 | 0 |
|
793 | 0 | |
794 | 0 |
|
794 | 0 | |
795 | 1 baz:1 |
|
795 | 1 baz:1 | |
796 | 2 baz:2 |
|
796 | 2 baz:2 | |
797 | <<<<<<< working copy: cb8df70ae185 - test: qux:4->4+ |
|
797 | <<<<<<< working copy: cb8df70ae185 - test: qux:4->4+ | |
798 | 3+ baz:3 |
|
798 | 3+ baz:3 | |
799 | 4+ baz:4 |
|
799 | 4+ baz:4 | |
800 | ||||||| base |
|
800 | ||||||| base | |
801 | 3+ baz:3 |
|
801 | 3+ baz:3 | |
802 | 4 baz:4 |
|
802 | 4 baz:4 | |
803 | ======= |
|
803 | ======= | |
804 | 3- baz:3 |
|
804 | 3- baz:3 | |
805 | 4 baz:4 |
|
805 | 4 baz:4 | |
806 | >>>>>>> merge rev: 863de62655ef - test: baz:3+->3- |
|
806 | >>>>>>> merge rev: 863de62655ef - test: baz:3+->3- | |
807 | 5 |
|
807 | 5 | |
808 | 6 |
|
808 | 6 | |
809 | 7 |
|
809 | 7 | |
810 | $ cat > qux <<EOF |
|
810 | $ cat > qux <<EOF | |
811 | > 0 |
|
811 | > 0 | |
812 | > 0 |
|
812 | > 0 | |
813 | > 1 baz:1 |
|
813 | > 1 baz:1 | |
814 | > 2 baz:2 |
|
814 | > 2 baz:2 | |
815 | > 3+ baz:3 |
|
815 | > 3+ baz:3 | |
816 | > 4+ baz:4 |
|
816 | > 4+ baz:4 | |
817 | > 5 |
|
817 | > 5 | |
818 | > 6 |
|
818 | > 6 | |
819 | > EOF |
|
819 | > EOF | |
820 | $ hg resolve --mark -q |
|
820 | $ hg resolve --mark -q | |
821 | $ rm qux.orig |
|
821 | $ rm qux.orig | |
822 | $ hg ci -m 'merge from other side' |
|
822 | $ hg ci -m 'merge from other side' | |
823 | created new head |
|
823 | created new head | |
824 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)' |
|
824 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(qux, 5:7)' | |
825 | 16: baz:0 |
|
825 | 16: baz:0 | |
826 | 19: baz:3 |
|
826 | 19: baz:3 | |
827 | 20: baz:4 |
|
827 | 20: baz:4 | |
828 | 24: baz:3->3+ |
|
828 | 24: baz:3->3+ | |
829 | 25: qux:4->4+ |
|
829 | 25: qux:4->4+ | |
830 | 27: baz:3+->3- |
|
830 | 27: baz:3+->3- | |
831 | 29: merge from other side |
|
831 | 29: merge from other side | |
832 | $ hg up 24 --quiet |
|
832 | $ hg up 24 --quiet | |
833 |
|
833 | |||
834 | we are missing the branch with rename when following children |
|
834 | we are missing the branch with rename when following children | |
835 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, startrev=26, descend=True)' |
|
835 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 5:7, startrev=26, descend=True)' | |
836 | 27: baz:3+->3- |
|
836 | 27: baz:3+->3- | |
837 |
|
837 | |||
838 | we follow all branches in descending direction |
|
838 | we follow all branches in descending direction | |
839 | $ hg up 23 --quiet |
|
839 | $ hg up 23 --quiet | |
840 | $ sed 's/3/+3/' baz > baz.new |
|
840 | $ sed 's/3/+3/' baz > baz.new | |
841 | $ mv baz.new baz |
|
841 | $ mv baz.new baz | |
842 | $ hg ci -m 'baz:3->+3' |
|
842 | $ hg ci -m 'baz:3->+3' | |
843 | created new head |
|
843 | created new head | |
844 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 2:5, startrev=16, descend=True)' --graph |
|
844 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 2:5, startrev=16, descend=True)' --graph | |
845 | @ 30: baz:3->+3 |
|
845 | @ 30: baz:3->+3 | |
846 | : |
|
846 | : | |
847 | : o 27: baz:3+->3- |
|
847 | : o 27: baz:3+->3- | |
848 | : : |
|
848 | : : | |
849 | : o 24: baz:3->3+ |
|
849 | : o 24: baz:3->3+ | |
850 | :/ |
|
850 | :/ | |
851 | o 20: baz:4 |
|
851 | o 20: baz:4 | |
852 | |\ |
|
852 | |\ | |
853 | | o 19: baz:3 |
|
853 | | o 19: baz:3 | |
854 | |/ |
|
854 | |/ | |
855 | o 18: baz:2 |
|
855 | o 18: baz:2 | |
856 | : |
|
856 | : | |
857 | o 16: baz:0 |
|
857 | o 16: baz:0 | |
858 | | |
|
858 | | | |
859 | ~ |
|
859 | ~ | |
860 |
|
860 | |||
861 | Issue5595: on a merge changeset with different line ranges depending on |
|
861 | Issue5595: on a merge changeset with different line ranges depending on | |
862 | parent, be conservative and use the surrounding interval to avoid loosing |
|
862 | parent, be conservative and use the surrounding interval to avoid loosing | |
863 | track of possible further descendants in specified range. |
|
863 | track of possible further descendants in specified range. | |
864 |
|
864 | |||
865 | $ hg up 23 --quiet |
|
865 | $ hg up 23 --quiet | |
866 | $ hg cat baz -r 24 |
|
866 | $ hg cat baz -r 24 | |
867 | 0 |
|
867 | 0 | |
868 | 0 |
|
868 | 0 | |
869 | 1 baz:1 |
|
869 | 1 baz:1 | |
870 | 2 baz:2 |
|
870 | 2 baz:2 | |
871 | 3+ baz:3 |
|
871 | 3+ baz:3 | |
872 | 4 baz:4 |
|
872 | 4 baz:4 | |
873 | 5 |
|
873 | 5 | |
874 | 6 |
|
874 | 6 | |
875 | $ cat > baz << EOF |
|
875 | $ cat > baz << EOF | |
876 | > 0 |
|
876 | > 0 | |
877 | > 0 |
|
877 | > 0 | |
878 | > a |
|
878 | > a | |
879 | > b |
|
879 | > b | |
880 | > 3+ baz:3 |
|
880 | > 3+ baz:3 | |
881 | > 4 baz:4 |
|
881 | > 4 baz:4 | |
882 | > y |
|
882 | > y | |
883 | > z |
|
883 | > z | |
884 | > EOF |
|
884 | > EOF | |
885 | $ hg ci -m 'baz: mostly rewrite with some content from 24' |
|
885 | $ hg ci -m 'baz: mostly rewrite with some content from 24' | |
886 | created new head |
|
886 | created new head | |
887 | $ hg merge --tool :merge-other 24 |
|
887 | $ hg merge --tool :merge-other 24 | |
888 | merging baz |
|
888 | merging baz | |
889 |
|
|
889 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
890 | (branch merge, don't forget to commit) |
|
890 | (branch merge, don't forget to commit) | |
891 | $ hg ci -m 'merge forgetting about baz rewrite' |
|
891 | $ hg ci -m 'merge forgetting about baz rewrite' | |
892 | $ cat > baz << EOF |
|
892 | $ cat > baz << EOF | |
893 | > 0 |
|
893 | > 0 | |
894 | > 0 |
|
894 | > 0 | |
895 | > 1 baz:1 |
|
895 | > 1 baz:1 | |
896 | > 2+ baz:2 |
|
896 | > 2+ baz:2 | |
897 | > 3+ baz:3 |
|
897 | > 3+ baz:3 | |
898 | > 4 baz:4 |
|
898 | > 4 baz:4 | |
899 | > 5 |
|
899 | > 5 | |
900 | > 6 |
|
900 | > 6 | |
901 | > EOF |
|
901 | > EOF | |
902 | $ hg ci -m 'baz: narrow change (2->2+)' |
|
902 | $ hg ci -m 'baz: narrow change (2->2+)' | |
903 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:4, startrev=20, descend=True)' --graph |
|
903 | $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:4, startrev=20, descend=True)' --graph | |
904 | @ 33: baz: narrow change (2->2+) |
|
904 | @ 33: baz: narrow change (2->2+) | |
905 | | |
|
905 | | | |
906 | o 32: merge forgetting about baz rewrite |
|
906 | o 32: merge forgetting about baz rewrite | |
907 | |\ |
|
907 | |\ | |
908 | | o 31: baz: mostly rewrite with some content from 24 |
|
908 | | o 31: baz: mostly rewrite with some content from 24 | |
909 | | : |
|
909 | | : | |
910 | | : o 30: baz:3->+3 |
|
910 | | : o 30: baz:3->+3 | |
911 | | :/ |
|
911 | | :/ | |
912 | +---o 27: baz:3+->3- |
|
912 | +---o 27: baz:3+->3- | |
913 | | : |
|
913 | | : | |
914 | o : 24: baz:3->3+ |
|
914 | o : 24: baz:3->3+ | |
915 | :/ |
|
915 | :/ | |
916 | o 20: baz:4 |
|
916 | o 20: baz:4 | |
917 | |\ |
|
917 | |\ | |
918 | ~ ~ |
|
918 | ~ ~ | |
919 |
|
919 | |||
920 | An integer as a line range, which is parsed as '1:1' |
|
920 | An integer as a line range, which is parsed as '1:1' | |
921 |
|
921 | |||
922 | $ hg log -r 'followlines(baz, 1)' |
|
922 | $ hg log -r 'followlines(baz, 1)' | |
923 | changeset: 22:2174d0bf352a |
|
923 | changeset: 22:2174d0bf352a | |
924 | user: test |
|
924 | user: test | |
925 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
925 | date: Thu Jan 01 00:00:00 1970 +0000 | |
926 | summary: added two lines with 0 |
|
926 | summary: added two lines with 0 | |
927 |
|
927 | |||
928 |
|
928 | |||
929 | check error cases |
|
929 | check error cases | |
930 | $ hg up 24 --quiet |
|
930 | $ hg up 24 --quiet | |
931 | $ hg log -r 'followlines()' |
|
931 | $ hg log -r 'followlines()' | |
932 | hg: parse error: followlines takes at least 1 positional arguments |
|
932 | hg: parse error: followlines takes at least 1 positional arguments | |
933 | [10] |
|
933 | [10] | |
934 | $ hg log -r 'followlines(baz)' |
|
934 | $ hg log -r 'followlines(baz)' | |
935 | hg: parse error: followlines requires a line range |
|
935 | hg: parse error: followlines requires a line range | |
936 | [10] |
|
936 | [10] | |
937 | $ hg log -r 'followlines(baz, x)' |
|
937 | $ hg log -r 'followlines(baz, x)' | |
938 | hg: parse error: followlines expects a line number or a range |
|
938 | hg: parse error: followlines expects a line number or a range | |
939 | [10] |
|
939 | [10] | |
940 | $ hg log -r 'followlines(baz, 1:2, startrev=desc("b"))' |
|
940 | $ hg log -r 'followlines(baz, 1:2, startrev=desc("b"))' | |
941 | hg: parse error: followlines expects exactly one revision |
|
941 | hg: parse error: followlines expects exactly one revision | |
942 | [10] |
|
942 | [10] | |
943 | $ hg log -r 'followlines("glob:*", 1:2)' |
|
943 | $ hg log -r 'followlines("glob:*", 1:2)' | |
944 | hg: parse error: followlines expects exactly one file |
|
944 | hg: parse error: followlines expects exactly one file | |
945 | [10] |
|
945 | [10] | |
946 | $ hg log -r 'followlines(baz, 1:)' |
|
946 | $ hg log -r 'followlines(baz, 1:)' | |
947 | hg: parse error: line range bounds must be integers |
|
947 | hg: parse error: line range bounds must be integers | |
948 | [10] |
|
948 | [10] | |
949 | $ hg log -r 'followlines(baz, :1)' |
|
949 | $ hg log -r 'followlines(baz, :1)' | |
950 | hg: parse error: line range bounds must be integers |
|
950 | hg: parse error: line range bounds must be integers | |
951 | [10] |
|
951 | [10] | |
952 | $ hg log -r 'followlines(baz, x:4)' |
|
952 | $ hg log -r 'followlines(baz, x:4)' | |
953 | hg: parse error: line range bounds must be integers |
|
953 | hg: parse error: line range bounds must be integers | |
954 | [10] |
|
954 | [10] | |
955 | $ hg log -r 'followlines(baz, 5:4)' |
|
955 | $ hg log -r 'followlines(baz, 5:4)' | |
956 | hg: parse error: line range must be positive |
|
956 | hg: parse error: line range must be positive | |
957 | [10] |
|
957 | [10] | |
958 | $ hg log -r 'followlines(baz, 0:4)' |
|
958 | $ hg log -r 'followlines(baz, 0:4)' | |
959 | hg: parse error: fromline must be strictly positive |
|
959 | hg: parse error: fromline must be strictly positive | |
960 | [10] |
|
960 | [10] | |
961 | $ hg log -r 'followlines(baz, 2:40)' |
|
961 | $ hg log -r 'followlines(baz, 2:40)' | |
962 | abort: line range exceeds file size |
|
962 | abort: line range exceeds file size | |
963 | [10] |
|
963 | [10] | |
964 | $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=[1])' |
|
964 | $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=[1])' | |
965 | hg: parse error at 43: not a prefix: [ |
|
965 | hg: parse error at 43: not a prefix: [ | |
966 | (followlines(baz, 2:4, startrev=20, descend=[1]) |
|
966 | (followlines(baz, 2:4, startrev=20, descend=[1]) | |
967 | ^ here) |
|
967 | ^ here) | |
968 | [10] |
|
968 | [10] | |
969 | $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=a)' |
|
969 | $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=a)' | |
970 | hg: parse error: descend argument must be a boolean |
|
970 | hg: parse error: descend argument must be a boolean | |
971 | [10] |
|
971 | [10] | |
972 |
|
972 | |||
973 | Test empty annotate output |
|
973 | Test empty annotate output | |
974 |
|
974 | |||
975 | $ printf '\0' > binary |
|
975 | $ printf '\0' > binary | |
976 | $ touch empty |
|
976 | $ touch empty | |
977 | $ hg ci -qAm 'add binary and empty files' |
|
977 | $ hg ci -qAm 'add binary and empty files' | |
978 |
|
978 | |||
979 | $ hg annotate binary empty |
|
979 | $ hg annotate binary empty | |
980 | binary: binary file |
|
980 | binary: binary file | |
981 |
|
981 | |||
982 | $ hg annotate -Tjson binary empty |
|
982 | $ hg annotate -Tjson binary empty | |
983 | [ |
|
983 | [ | |
984 | { |
|
984 | { | |
985 | "path": "binary" |
|
985 | "path": "binary" | |
986 | }, |
|
986 | }, | |
987 | { |
|
987 | { | |
988 | "lines": [], |
|
988 | "lines": [], | |
989 | "path": "empty" |
|
989 | "path": "empty" | |
990 | } |
|
990 | } | |
991 | ] |
|
991 | ] | |
992 |
|
992 | |||
993 | Test annotate with whitespace options |
|
993 | Test annotate with whitespace options | |
994 |
|
994 | |||
995 | $ cd .. |
|
995 | $ cd .. | |
996 | $ hg init repo-ws |
|
996 | $ hg init repo-ws | |
997 | $ cd repo-ws |
|
997 | $ cd repo-ws | |
998 | $ cat > a <<EOF |
|
998 | $ cat > a <<EOF | |
999 | > aa |
|
999 | > aa | |
1000 | > |
|
1000 | > | |
1001 | > b b |
|
1001 | > b b | |
1002 | > EOF |
|
1002 | > EOF | |
1003 | $ hg ci -Am "adda" |
|
1003 | $ hg ci -Am "adda" | |
1004 | adding a |
|
1004 | adding a | |
1005 | $ sed 's/EOL$//g' > a <<EOF |
|
1005 | $ sed 's/EOL$//g' > a <<EOF | |
1006 | > a a |
|
1006 | > a a | |
1007 | > |
|
1007 | > | |
1008 | > EOL |
|
1008 | > EOL | |
1009 | > b b |
|
1009 | > b b | |
1010 | > EOF |
|
1010 | > EOF | |
1011 | $ hg ci -m "changea" |
|
1011 | $ hg ci -m "changea" | |
1012 |
|
1012 | |||
1013 | Annotate with no option |
|
1013 | Annotate with no option | |
1014 |
|
1014 | |||
1015 | $ hg annotate a |
|
1015 | $ hg annotate a | |
1016 | 1: a a |
|
1016 | 1: a a | |
1017 | 0: |
|
1017 | 0: | |
1018 | 1: |
|
1018 | 1: | |
1019 | 1: b b |
|
1019 | 1: b b | |
1020 |
|
1020 | |||
1021 | Annotate with --ignore-space-change |
|
1021 | Annotate with --ignore-space-change | |
1022 |
|
1022 | |||
1023 | $ hg annotate --ignore-space-change a |
|
1023 | $ hg annotate --ignore-space-change a | |
1024 | 1: a a |
|
1024 | 1: a a | |
1025 | 1: |
|
1025 | 1: | |
1026 | 0: |
|
1026 | 0: | |
1027 | 0: b b |
|
1027 | 0: b b | |
1028 |
|
1028 | |||
1029 | Annotate with --ignore-all-space |
|
1029 | Annotate with --ignore-all-space | |
1030 |
|
1030 | |||
1031 | $ hg annotate --ignore-all-space a |
|
1031 | $ hg annotate --ignore-all-space a | |
1032 | 0: a a |
|
1032 | 0: a a | |
1033 | 0: |
|
1033 | 0: | |
1034 | 1: |
|
1034 | 1: | |
1035 | 0: b b |
|
1035 | 0: b b | |
1036 |
|
1036 | |||
1037 | Annotate with --ignore-blank-lines (similar to no options case) |
|
1037 | Annotate with --ignore-blank-lines (similar to no options case) | |
1038 |
|
1038 | |||
1039 | $ hg annotate --ignore-blank-lines a |
|
1039 | $ hg annotate --ignore-blank-lines a | |
1040 | 1: a a |
|
1040 | 1: a a | |
1041 | 0: |
|
1041 | 0: | |
1042 | 1: |
|
1042 | 1: | |
1043 | 1: b b |
|
1043 | 1: b b | |
1044 |
|
1044 | |||
1045 | $ cd .. |
|
1045 | $ cd .. | |
1046 |
|
1046 | |||
1047 | Annotate with orphaned CR (issue5798) |
|
1047 | Annotate with orphaned CR (issue5798) | |
1048 | ------------------------------------- |
|
1048 | ------------------------------------- | |
1049 |
|
1049 | |||
1050 | $ hg init repo-cr |
|
1050 | $ hg init repo-cr | |
1051 | $ cd repo-cr |
|
1051 | $ cd repo-cr | |
1052 |
|
1052 | |||
1053 | $ cat <<'EOF' >> "$TESTTMP/substcr.py" |
|
1053 | $ cat <<'EOF' >> "$TESTTMP/substcr.py" | |
1054 | > import sys |
|
1054 | > import sys | |
1055 | > from mercurial.utils import procutil |
|
1055 | > from mercurial.utils import procutil | |
1056 | > procutil.setbinary(sys.stdin) |
|
1056 | > procutil.setbinary(sys.stdin) | |
1057 | > procutil.setbinary(sys.stdout) |
|
1057 | > procutil.setbinary(sys.stdout) | |
1058 | > stdin = getattr(sys.stdin, 'buffer', sys.stdin) |
|
1058 | > stdin = getattr(sys.stdin, 'buffer', sys.stdin) | |
1059 | > stdout = getattr(sys.stdout, 'buffer', sys.stdout) |
|
1059 | > stdout = getattr(sys.stdout, 'buffer', sys.stdout) | |
1060 | > stdout.write(stdin.read().replace(b'\r', b'[CR]')) |
|
1060 | > stdout.write(stdin.read().replace(b'\r', b'[CR]')) | |
1061 | > EOF |
|
1061 | > EOF | |
1062 |
|
1062 | |||
1063 | >>> with open('a', 'wb') as f: |
|
1063 | >>> with open('a', 'wb') as f: | |
1064 | ... f.write(b'0a\r0b\r\n0c\r0d\r\n0e\n0f\n0g') and None |
|
1064 | ... f.write(b'0a\r0b\r\n0c\r0d\r\n0e\n0f\n0g') and None | |
1065 | $ hg ci -qAm0 |
|
1065 | $ hg ci -qAm0 | |
1066 | >>> with open('a', 'wb') as f: |
|
1066 | >>> with open('a', 'wb') as f: | |
1067 | ... f.write(b'0a\r0b\r\n1c\r1d\r\n0e\n1f\n0g') and None |
|
1067 | ... f.write(b'0a\r0b\r\n1c\r1d\r\n0e\n1f\n0g') and None | |
1068 | $ hg ci -m1 |
|
1068 | $ hg ci -m1 | |
1069 |
|
1069 | |||
1070 | $ hg annotate -r0 a | "$PYTHON" "$TESTTMP/substcr.py" |
|
1070 | $ hg annotate -r0 a | "$PYTHON" "$TESTTMP/substcr.py" | |
1071 | 0: 0a[CR]0b[CR] |
|
1071 | 0: 0a[CR]0b[CR] | |
1072 | 0: 0c[CR]0d[CR] |
|
1072 | 0: 0c[CR]0d[CR] | |
1073 | 0: 0e |
|
1073 | 0: 0e | |
1074 | 0: 0f |
|
1074 | 0: 0f | |
1075 | 0: 0g |
|
1075 | 0: 0g | |
1076 | $ hg annotate -r1 a | "$PYTHON" "$TESTTMP/substcr.py" |
|
1076 | $ hg annotate -r1 a | "$PYTHON" "$TESTTMP/substcr.py" | |
1077 | 0: 0a[CR]0b[CR] |
|
1077 | 0: 0a[CR]0b[CR] | |
1078 | 1: 1c[CR]1d[CR] |
|
1078 | 1: 1c[CR]1d[CR] | |
1079 | 0: 0e |
|
1079 | 0: 0e | |
1080 | 1: 1f |
|
1080 | 1: 1f | |
1081 | 0: 0g |
|
1081 | 0: 0g | |
1082 |
|
1082 | |||
1083 | $ cd .. |
|
1083 | $ cd .. | |
1084 |
|
1084 | |||
1085 | Annotate with linkrev pointing to another branch |
|
1085 | Annotate with linkrev pointing to another branch | |
1086 | ------------------------------------------------ |
|
1086 | ------------------------------------------------ | |
1087 |
|
1087 | |||
1088 | create history with a filerev whose linkrev points to another branch |
|
1088 | create history with a filerev whose linkrev points to another branch | |
1089 |
|
1089 | |||
1090 | $ hg init branchedlinkrev |
|
1090 | $ hg init branchedlinkrev | |
1091 | $ cd branchedlinkrev |
|
1091 | $ cd branchedlinkrev | |
1092 | $ echo A > a |
|
1092 | $ echo A > a | |
1093 | $ hg commit -Am 'contentA' |
|
1093 | $ hg commit -Am 'contentA' | |
1094 | adding a |
|
1094 | adding a | |
1095 | $ echo B >> a |
|
1095 | $ echo B >> a | |
1096 | $ hg commit -m 'contentB' |
|
1096 | $ hg commit -m 'contentB' | |
1097 | $ hg up --rev 'desc(contentA)' |
|
1097 | $ hg up --rev 'desc(contentA)' | |
1098 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1098 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1099 | $ echo unrelated > unrelated |
|
1099 | $ echo unrelated > unrelated | |
1100 | $ hg commit -Am 'unrelated' |
|
1100 | $ hg commit -Am 'unrelated' | |
1101 | adding unrelated |
|
1101 | adding unrelated | |
1102 | created new head |
|
1102 | created new head | |
1103 | $ hg graft -r 'desc(contentB)' |
|
1103 | $ hg graft -r 'desc(contentB)' | |
1104 | grafting 1:fd27c222e3e6 "contentB" |
|
1104 | grafting 1:fd27c222e3e6 "contentB" | |
1105 | $ echo C >> a |
|
1105 | $ echo C >> a | |
1106 | $ hg commit -m 'contentC' |
|
1106 | $ hg commit -m 'contentC' | |
1107 | $ echo W >> a |
|
1107 | $ echo W >> a | |
1108 | $ hg log -G |
|
1108 | $ hg log -G | |
1109 | @ changeset: 4:072f1e8df249 |
|
1109 | @ changeset: 4:072f1e8df249 | |
1110 | | tag: tip |
|
1110 | | tag: tip | |
1111 | | user: test |
|
1111 | | user: test | |
1112 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1112 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1113 | | summary: contentC |
|
1113 | | summary: contentC | |
1114 | | |
|
1114 | | | |
1115 | o changeset: 3:ff38df03cc4b |
|
1115 | o changeset: 3:ff38df03cc4b | |
1116 | | user: test |
|
1116 | | user: test | |
1117 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1117 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1118 | | summary: contentB |
|
1118 | | summary: contentB | |
1119 | | |
|
1119 | | | |
1120 | o changeset: 2:62aaf3f6fc06 |
|
1120 | o changeset: 2:62aaf3f6fc06 | |
1121 | | parent: 0:f0932f74827e |
|
1121 | | parent: 0:f0932f74827e | |
1122 | | user: test |
|
1122 | | user: test | |
1123 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1123 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1124 | | summary: unrelated |
|
1124 | | summary: unrelated | |
1125 | | |
|
1125 | | | |
1126 | | o changeset: 1:fd27c222e3e6 |
|
1126 | | o changeset: 1:fd27c222e3e6 | |
1127 | |/ user: test |
|
1127 | |/ user: test | |
1128 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1128 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1129 | | summary: contentB |
|
1129 | | summary: contentB | |
1130 | | |
|
1130 | | | |
1131 | o changeset: 0:f0932f74827e |
|
1131 | o changeset: 0:f0932f74827e | |
1132 | user: test |
|
1132 | user: test | |
1133 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1133 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1134 | summary: contentA |
|
1134 | summary: contentA | |
1135 |
|
1135 | |||
1136 |
|
1136 | |||
1137 | Annotate should list ancestor of starting revision only |
|
1137 | Annotate should list ancestor of starting revision only | |
1138 |
|
1138 | |||
1139 | $ hg annotate a |
|
1139 | $ hg annotate a | |
1140 | 0: A |
|
1140 | 0: A | |
1141 | 3: B |
|
1141 | 3: B | |
1142 | 4: C |
|
1142 | 4: C | |
1143 |
|
1143 | |||
1144 | $ hg annotate a -r 'wdir()' |
|
1144 | $ hg annotate a -r 'wdir()' | |
1145 | 0 : A |
|
1145 | 0 : A | |
1146 | 3 : B |
|
1146 | 3 : B | |
1147 | 4 : C |
|
1147 | 4 : C | |
1148 | 4+: W |
|
1148 | 4+: W | |
1149 |
|
1149 | |||
1150 | Even when the starting revision is the linkrev-shadowed one: |
|
1150 | Even when the starting revision is the linkrev-shadowed one: | |
1151 |
|
1151 | |||
1152 | $ hg annotate a -r 3 |
|
1152 | $ hg annotate a -r 3 | |
1153 | 0: A |
|
1153 | 0: A | |
1154 | 3: B |
|
1154 | 3: B | |
1155 |
|
1155 | |||
1156 | $ cd .. |
|
1156 | $ cd .. | |
1157 |
|
1157 | |||
1158 | Issue5360: Deleted chunk in p1 of a merge changeset |
|
1158 | Issue5360: Deleted chunk in p1 of a merge changeset | |
1159 |
|
1159 | |||
1160 | $ hg init repo-5360 |
|
1160 | $ hg init repo-5360 | |
1161 | $ cd repo-5360 |
|
1161 | $ cd repo-5360 | |
1162 | $ echo 1 > a |
|
1162 | $ echo 1 > a | |
1163 | $ hg commit -A a -m 1 |
|
1163 | $ hg commit -A a -m 1 | |
1164 | $ echo 2 >> a |
|
1164 | $ echo 2 >> a | |
1165 | $ hg commit -m 2 |
|
1165 | $ hg commit -m 2 | |
1166 | $ echo a > a |
|
1166 | $ echo a > a | |
1167 | $ hg commit -m a |
|
1167 | $ hg commit -m a | |
1168 | $ hg update '.^' -q |
|
1168 | $ hg update '.^' -q | |
1169 | $ echo 3 >> a |
|
1169 | $ echo 3 >> a | |
1170 | $ hg commit -m 3 -q |
|
1170 | $ hg commit -m 3 -q | |
1171 | $ hg merge 2 -q |
|
1171 | $ hg merge 2 -q | |
1172 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
1172 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
1173 | [1] |
|
1173 | [1] | |
1174 | $ cat a |
|
1174 | $ cat a | |
1175 | <<<<<<< working copy: 0a068f0261cf - test: 3 |
|
1175 | <<<<<<< working copy: 0a068f0261cf - test: 3 | |
1176 | 1 |
|
1176 | 1 | |
1177 | 2 |
|
1177 | 2 | |
1178 | 3 |
|
1178 | 3 | |
1179 | ||||||| base |
|
1179 | ||||||| base | |
1180 | 1 |
|
1180 | 1 | |
1181 | 2 |
|
1181 | 2 | |
1182 | ======= |
|
1182 | ======= | |
1183 | a |
|
1183 | a | |
1184 | >>>>>>> merge rev: 9409851bc20a - test: a |
|
1184 | >>>>>>> merge rev: 9409851bc20a - test: a | |
1185 | $ cat > a << EOF |
|
1185 | $ cat > a << EOF | |
1186 | > b |
|
1186 | > b | |
1187 | > 1 |
|
1187 | > 1 | |
1188 | > 2 |
|
1188 | > 2 | |
1189 | > 3 |
|
1189 | > 3 | |
1190 | > a |
|
1190 | > a | |
1191 | > EOF |
|
1191 | > EOF | |
1192 | $ hg resolve --mark -q |
|
1192 | $ hg resolve --mark -q | |
1193 | $ rm a.orig |
|
1193 | $ rm a.orig | |
1194 | $ hg commit -m m |
|
1194 | $ hg commit -m m | |
1195 | $ hg annotate a |
|
1195 | $ hg annotate a | |
1196 | 4: b |
|
1196 | 4: b | |
1197 | 0: 1 |
|
1197 | 0: 1 | |
1198 | 1: 2 |
|
1198 | 1: 2 | |
1199 | 3: 3 |
|
1199 | 3: 3 | |
1200 | 2: a |
|
1200 | 2: a | |
1201 |
|
1201 | |||
1202 | $ cd .. |
|
1202 | $ cd .. |
@@ -1,422 +1,422 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ cat << EOF > a |
|
2 | $ cat << EOF > a | |
3 | > Small Mathematical Series. |
|
3 | > Small Mathematical Series. | |
4 | > One |
|
4 | > One | |
5 | > Two |
|
5 | > Two | |
6 | > Three |
|
6 | > Three | |
7 | > Four |
|
7 | > Four | |
8 | > Five |
|
8 | > Five | |
9 | > Hop we are done. |
|
9 | > Hop we are done. | |
10 | > EOF |
|
10 | > EOF | |
11 | $ hg add a |
|
11 | $ hg add a | |
12 | $ hg commit -m ancestor |
|
12 | $ hg commit -m ancestor | |
13 | $ cat << EOF > a |
|
13 | $ cat << EOF > a | |
14 | > Small Mathematical Series. |
|
14 | > Small Mathematical Series. | |
15 | > 1 |
|
15 | > 1 | |
16 | > 2 |
|
16 | > 2 | |
17 | > 3 |
|
17 | > 3 | |
18 | > 4 |
|
18 | > 4 | |
19 | > 5 |
|
19 | > 5 | |
20 | > Hop we are done. |
|
20 | > Hop we are done. | |
21 | > EOF |
|
21 | > EOF | |
22 | $ hg commit -m branch1 |
|
22 | $ hg commit -m branch1 | |
23 | $ hg co 0 |
|
23 | $ hg co 0 | |
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
25 | $ cat << EOF > a |
|
25 | $ cat << EOF > a | |
26 | > Small Mathematical Series. |
|
26 | > Small Mathematical Series. | |
27 | > 1 |
|
27 | > 1 | |
28 | > 2 |
|
28 | > 2 | |
29 | > 3 |
|
29 | > 3 | |
30 | > 6 |
|
30 | > 6 | |
31 | > 8 |
|
31 | > 8 | |
32 | > Hop we are done. |
|
32 | > Hop we are done. | |
33 | > EOF |
|
33 | > EOF | |
34 | $ hg commit -m branch2 |
|
34 | $ hg commit -m branch2 | |
35 | created new head |
|
35 | created new head | |
36 |
|
36 | |||
37 | $ hg merge 1 |
|
37 | $ hg merge 1 | |
38 | merging a |
|
38 | merging a | |
39 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
39 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
40 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
40 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
41 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
41 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
42 | [1] |
|
42 | [1] | |
43 |
|
43 | |||
44 | $ hg id |
|
44 | $ hg id | |
45 | 618808747361+c0c68e4fe667+ tip |
|
45 | 618808747361+c0c68e4fe667+ tip | |
46 |
|
46 | |||
47 | $ echo "[commands]" >> $HGRCPATH |
|
47 | $ echo "[commands]" >> $HGRCPATH | |
48 | $ echo "status.verbose=true" >> $HGRCPATH |
|
48 | $ echo "status.verbose=true" >> $HGRCPATH | |
49 | $ hg status |
|
49 | $ hg status | |
50 | M a |
|
50 | M a | |
51 | ? a.orig |
|
51 | ? a.orig | |
52 | # The repository is in an unfinished *merge* state. |
|
52 | # The repository is in an unfinished *merge* state. | |
53 |
|
53 | |||
54 | # Unresolved merge conflicts: |
|
54 | # Unresolved merge conflicts: | |
55 | # |
|
55 | # | |
56 | # a |
|
56 | # a | |
57 | # |
|
57 | # | |
58 | # To mark files as resolved: hg resolve --mark FILE |
|
58 | # To mark files as resolved: hg resolve --mark FILE | |
59 |
|
59 | |||
60 | # To continue: hg commit |
|
60 | # To continue: hg commit | |
61 | # To abort: hg merge --abort |
|
61 | # To abort: hg merge --abort | |
62 |
|
62 | |||
63 | $ hg status -Tjson |
|
63 | $ hg status -Tjson | |
64 | [ |
|
64 | [ | |
65 | { |
|
65 | { | |
66 | "itemtype": "file", |
|
66 | "itemtype": "file", | |
67 | "path": "a", |
|
67 | "path": "a", | |
68 | "status": "M", |
|
68 | "status": "M", | |
69 | "unresolved": true |
|
69 | "unresolved": true | |
70 | }, |
|
70 | }, | |
71 | { |
|
71 | { | |
72 | "itemtype": "file", |
|
72 | "itemtype": "file", | |
73 | "path": "a.orig", |
|
73 | "path": "a.orig", | |
74 | "status": "?" |
|
74 | "status": "?" | |
75 | }, |
|
75 | }, | |
76 | { |
|
76 | { | |
77 | "itemtype": "morestatus", |
|
77 | "itemtype": "morestatus", | |
78 | "unfinished": "merge", |
|
78 | "unfinished": "merge", | |
79 | "unfinishedmsg": "To continue: hg commit\nTo abort: hg merge --abort" |
|
79 | "unfinishedmsg": "To continue: hg commit\nTo abort: hg merge --abort" | |
80 | } |
|
80 | } | |
81 | ] |
|
81 | ] | |
82 |
|
82 | |||
83 | $ hg status -0 |
|
83 | $ hg status -0 | |
84 | M a\x00? a.orig\x00 (no-eol) (esc) |
|
84 | M a\x00? a.orig\x00 (no-eol) (esc) | |
85 | $ cat a |
|
85 | $ cat a | |
86 | Small Mathematical Series. |
|
86 | Small Mathematical Series. | |
87 | 1 |
|
87 | 1 | |
88 | 2 |
|
88 | 2 | |
89 | 3 |
|
89 | 3 | |
90 | <<<<<<< working copy: 618808747361 - test: branch2 |
|
90 | <<<<<<< working copy: 618808747361 - test: branch2 | |
91 | 6 |
|
91 | 6 | |
92 | 8 |
|
92 | 8 | |
93 | ======= |
|
93 | ======= | |
94 | 4 |
|
94 | 4 | |
95 | 5 |
|
95 | 5 | |
96 | >>>>>>> merge rev: c0c68e4fe667 - test: branch1 |
|
96 | >>>>>>> merge rev: c0c68e4fe667 - test: branch1 | |
97 | Hop we are done. |
|
97 | Hop we are done. | |
98 |
|
98 | |||
99 | $ hg status --config commands.status.verbose=0 |
|
99 | $ hg status --config commands.status.verbose=0 | |
100 | M a |
|
100 | M a | |
101 | ? a.orig |
|
101 | ? a.orig | |
102 |
|
102 | |||
103 | Verify custom conflict markers |
|
103 | Verify custom conflict markers | |
104 |
|
104 | |||
105 | $ hg up -q --clean . |
|
105 | $ hg up -q --clean . | |
106 | $ cat <<EOF >> .hg/hgrc |
|
106 | $ cat <<EOF >> .hg/hgrc | |
107 | > [command-templates] |
|
107 | > [command-templates] | |
108 | > mergemarker = '{author} {rev}' |
|
108 | > mergemarker = '{author} {rev}' | |
109 | > EOF |
|
109 | > EOF | |
110 |
|
110 | |||
111 | $ hg merge 1 |
|
111 | $ hg merge 1 | |
112 | merging a |
|
112 | merging a | |
113 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
113 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
114 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
114 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
115 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
115 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
116 | [1] |
|
116 | [1] | |
117 |
|
117 | |||
118 | $ cat a |
|
118 | $ cat a | |
119 | Small Mathematical Series. |
|
119 | Small Mathematical Series. | |
120 | 1 |
|
120 | 1 | |
121 | 2 |
|
121 | 2 | |
122 | 3 |
|
122 | 3 | |
123 | <<<<<<< working copy: test 2 |
|
123 | <<<<<<< working copy: test 2 | |
124 | 6 |
|
124 | 6 | |
125 | 8 |
|
125 | 8 | |
126 | ======= |
|
126 | ======= | |
127 | 4 |
|
127 | 4 | |
128 | 5 |
|
128 | 5 | |
129 | >>>>>>> merge rev: test 1 |
|
129 | >>>>>>> merge rev: test 1 | |
130 | Hop we are done. |
|
130 | Hop we are done. | |
131 |
|
131 | |||
132 | Verify custom conflict markers with legacy config name |
|
132 | Verify custom conflict markers with legacy config name | |
133 |
|
133 | |||
134 | $ hg up -q --clean . |
|
134 | $ hg up -q --clean . | |
135 | $ cat <<EOF >> .hg/hgrc |
|
135 | $ cat <<EOF >> .hg/hgrc | |
136 | > [ui] |
|
136 | > [ui] | |
137 | > mergemarkertemplate = '{author} {rev}' |
|
137 | > mergemarkertemplate = '{author} {rev}' | |
138 | > EOF |
|
138 | > EOF | |
139 |
|
139 | |||
140 | $ hg merge 1 |
|
140 | $ hg merge 1 | |
141 | merging a |
|
141 | merging a | |
142 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
142 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
143 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
143 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
144 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
144 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
145 | [1] |
|
145 | [1] | |
146 |
|
146 | |||
147 | $ cat a |
|
147 | $ cat a | |
148 | Small Mathematical Series. |
|
148 | Small Mathematical Series. | |
149 | 1 |
|
149 | 1 | |
150 | 2 |
|
150 | 2 | |
151 | 3 |
|
151 | 3 | |
152 | <<<<<<< working copy: test 2 |
|
152 | <<<<<<< working copy: test 2 | |
153 | 6 |
|
153 | 6 | |
154 | 8 |
|
154 | 8 | |
155 | ======= |
|
155 | ======= | |
156 | 4 |
|
156 | 4 | |
157 | 5 |
|
157 | 5 | |
158 | >>>>>>> merge rev: test 1 |
|
158 | >>>>>>> merge rev: test 1 | |
159 | Hop we are done. |
|
159 | Hop we are done. | |
160 |
|
160 | |||
161 | Verify line splitting of custom conflict marker which causes multiple lines |
|
161 | Verify line splitting of custom conflict marker which causes multiple lines | |
162 |
|
162 | |||
163 | $ hg up -q --clean . |
|
163 | $ hg up -q --clean . | |
164 | $ cat >> .hg/hgrc <<EOF |
|
164 | $ cat >> .hg/hgrc <<EOF | |
165 | > [command-templates] |
|
165 | > [command-templates] | |
166 | > mergemarker={author} {rev}\nfoo\nbar\nbaz |
|
166 | > mergemarker={author} {rev}\nfoo\nbar\nbaz | |
167 | > EOF |
|
167 | > EOF | |
168 |
|
168 | |||
169 | $ hg -q merge 1 |
|
169 | $ hg -q merge 1 | |
170 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
170 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
171 | [1] |
|
171 | [1] | |
172 |
|
172 | |||
173 | $ cat a |
|
173 | $ cat a | |
174 | Small Mathematical Series. |
|
174 | Small Mathematical Series. | |
175 | 1 |
|
175 | 1 | |
176 | 2 |
|
176 | 2 | |
177 | 3 |
|
177 | 3 | |
178 | <<<<<<< working copy: test 2 |
|
178 | <<<<<<< working copy: test 2 | |
179 | 6 |
|
179 | 6 | |
180 | 8 |
|
180 | 8 | |
181 | ======= |
|
181 | ======= | |
182 | 4 |
|
182 | 4 | |
183 | 5 |
|
183 | 5 | |
184 | >>>>>>> merge rev: test 1 |
|
184 | >>>>>>> merge rev: test 1 | |
185 | Hop we are done. |
|
185 | Hop we are done. | |
186 |
|
186 | |||
187 | Verify line trimming of custom conflict marker using multi-byte characters |
|
187 | Verify line trimming of custom conflict marker using multi-byte characters | |
188 |
|
188 | |||
189 | $ hg up -q --clean . |
|
189 | $ hg up -q --clean . | |
190 | $ "$PYTHON" <<EOF |
|
190 | $ "$PYTHON" <<EOF | |
191 | > fp = open('logfile', 'wb') |
|
191 | > fp = open('logfile', 'wb') | |
192 | > fp.write(b'12345678901234567890123456789012345678901234567890' + |
|
192 | > fp.write(b'12345678901234567890123456789012345678901234567890' + | |
193 | > b'1234567890') # there are 5 more columns for 80 columns |
|
193 | > b'1234567890') # there are 5 more columns for 80 columns | |
194 | > |
|
194 | > | |
195 | > # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes |
|
195 | > # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes | |
196 | > fp.write(u'\u3042\u3044\u3046\u3048'.encode('utf-8')) |
|
196 | > fp.write(u'\u3042\u3044\u3046\u3048'.encode('utf-8')) | |
197 | > |
|
197 | > | |
198 | > fp.close() |
|
198 | > fp.close() | |
199 | > EOF |
|
199 | > EOF | |
200 | $ hg add logfile |
|
200 | $ hg add logfile | |
201 | $ hg --encoding utf-8 commit --logfile logfile |
|
201 | $ hg --encoding utf-8 commit --logfile logfile | |
202 |
|
202 | |||
203 | $ cat >> .hg/hgrc <<EOF |
|
203 | $ cat >> .hg/hgrc <<EOF | |
204 | > [command-templates] |
|
204 | > [command-templates] | |
205 | > mergemarker={desc|firstline} |
|
205 | > mergemarker={desc|firstline} | |
206 | > EOF |
|
206 | > EOF | |
207 |
|
207 | |||
208 | $ hg -q --encoding utf-8 merge 1 |
|
208 | $ hg -q --encoding utf-8 merge 1 | |
209 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
209 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
210 | [1] |
|
210 | [1] | |
211 |
|
211 | |||
212 | $ cat a |
|
212 | $ cat a | |
213 | Small Mathematical Series. |
|
213 | Small Mathematical Series. | |
214 | 1 |
|
214 | 1 | |
215 | 2 |
|
215 | 2 | |
216 | 3 |
|
216 | 3 | |
217 | <<<<<<< working copy: 1234567890123456789012345678901234567890123456789012345... |
|
217 | <<<<<<< working copy: 1234567890123456789012345678901234567890123456789012345... | |
218 | 6 |
|
218 | 6 | |
219 | 8 |
|
219 | 8 | |
220 | ======= |
|
220 | ======= | |
221 | 4 |
|
221 | 4 | |
222 | 5 |
|
222 | 5 | |
223 | >>>>>>> merge rev: branch1 |
|
223 | >>>>>>> merge rev: branch1 | |
224 | Hop we are done. |
|
224 | Hop we are done. | |
225 |
|
225 | |||
226 | Verify basic conflict markers |
|
226 | Verify basic conflict markers | |
227 |
|
227 | |||
228 | $ hg up -q --clean 2 |
|
228 | $ hg up -q --clean 2 | |
229 | $ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc |
|
229 | $ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc | |
230 |
|
230 | |||
231 | $ hg merge 1 |
|
231 | $ hg merge 1 | |
232 | merging a |
|
232 | merging a | |
233 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
233 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
234 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
234 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
235 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
235 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
236 | [1] |
|
236 | [1] | |
237 |
|
237 | |||
238 | $ cat a |
|
238 | $ cat a | |
239 | Small Mathematical Series. |
|
239 | Small Mathematical Series. | |
240 | 1 |
|
240 | 1 | |
241 | 2 |
|
241 | 2 | |
242 | 3 |
|
242 | 3 | |
243 | <<<<<<< working copy |
|
243 | <<<<<<< working copy | |
244 | 6 |
|
244 | 6 | |
245 | 8 |
|
245 | 8 | |
246 | ======= |
|
246 | ======= | |
247 | 4 |
|
247 | 4 | |
248 | 5 |
|
248 | 5 | |
249 | >>>>>>> merge rev |
|
249 | >>>>>>> merge rev | |
250 | Hop we are done. |
|
250 | Hop we are done. | |
251 |
|
251 | |||
252 | internal:merge3 |
|
252 | internal:merge3 | |
253 |
|
253 | |||
254 | $ hg up -q --clean . |
|
254 | $ hg up -q --clean . | |
255 |
|
255 | |||
256 | $ hg merge 1 --tool internal:merge3 |
|
256 | $ hg merge 1 --tool internal:merge3 | |
257 | merging a |
|
257 | merging a | |
258 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
258 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
259 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
259 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
260 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
260 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
261 | [1] |
|
261 | [1] | |
262 | $ cat a |
|
262 | $ cat a | |
263 | Small Mathematical Series. |
|
263 | Small Mathematical Series. | |
264 | <<<<<<< working copy |
|
264 | <<<<<<< working copy | |
265 | 1 |
|
265 | 1 | |
266 | 2 |
|
266 | 2 | |
267 | 3 |
|
267 | 3 | |
268 | 6 |
|
268 | 6 | |
269 | 8 |
|
269 | 8 | |
270 | ||||||| base |
|
270 | ||||||| base | |
271 | One |
|
271 | One | |
272 | Two |
|
272 | Two | |
273 | Three |
|
273 | Three | |
274 | Four |
|
274 | Four | |
275 | Five |
|
275 | Five | |
276 | ======= |
|
276 | ======= | |
277 | 1 |
|
277 | 1 | |
278 | 2 |
|
278 | 2 | |
279 | 3 |
|
279 | 3 | |
280 | 4 |
|
280 | 4 | |
281 | 5 |
|
281 | 5 | |
282 | >>>>>>> merge rev |
|
282 | >>>>>>> merge rev | |
283 | Hop we are done. |
|
283 | Hop we are done. | |
284 |
|
284 | |||
285 | internal:mergediff |
|
285 | internal:mergediff | |
286 |
|
286 | |||
287 | $ hg co -C 1 |
|
287 | $ hg co -C 1 | |
288 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
288 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
289 | $ cat << EOF > a |
|
289 | $ cat << EOF > a | |
290 | > Small Mathematical Series. |
|
290 | > Small Mathematical Series. | |
291 | > 1 |
|
291 | > 1 | |
292 | > 2 |
|
292 | > 2 | |
293 | > 3 |
|
293 | > 3 | |
294 | > 4 |
|
294 | > 4 | |
295 | > 4.5 |
|
295 | > 4.5 | |
296 | > 5 |
|
296 | > 5 | |
297 | > Hop we are done. |
|
297 | > Hop we are done. | |
298 | > EOF |
|
298 | > EOF | |
299 | $ hg co -m 2 -t internal:mergediff |
|
299 | $ hg co -m 2 -t internal:mergediff | |
300 | merging a |
|
300 | merging a | |
301 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
301 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
302 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
302 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
303 | use 'hg resolve' to retry unresolved file merges |
|
303 | use 'hg resolve' to retry unresolved file merges | |
304 | [1] |
|
304 | [1] | |
305 | $ cat a |
|
305 | $ cat a | |
306 | Small Mathematical Series. |
|
306 | Small Mathematical Series. | |
307 | 1 |
|
307 | 1 | |
308 | 2 |
|
308 | 2 | |
309 | 3 |
|
309 | 3 | |
310 | <<<<<<< |
|
310 | <<<<<<< | |
311 | ------- base |
|
311 | ------- base | |
312 | +++++++ working copy |
|
312 | +++++++ working copy | |
313 | 4 |
|
313 | 4 | |
314 | +4.5 |
|
314 | +4.5 | |
315 | 5 |
|
315 | 5 | |
316 | ======= destination |
|
316 | ======= destination | |
317 | 6 |
|
317 | 6 | |
318 | 8 |
|
318 | 8 | |
319 | >>>>>>> |
|
319 | >>>>>>> | |
320 | Hop we are done. |
|
320 | Hop we are done. | |
321 | Test the same thing as above but modify a bit more so we instead get the working |
|
321 | Test the same thing as above but modify a bit more so we instead get the working | |
322 | copy in full and the diff from base to destination. |
|
322 | copy in full and the diff from base to destination. | |
323 | $ hg co -C 1 |
|
323 | $ hg co -C 1 | |
324 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
324 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
325 | $ cat << EOF > a |
|
325 | $ cat << EOF > a | |
326 | > Small Mathematical Series. |
|
326 | > Small Mathematical Series. | |
327 | > 1 |
|
327 | > 1 | |
328 | > 2 |
|
328 | > 2 | |
329 | > 3.5 |
|
329 | > 3.5 | |
330 | > 4.5 |
|
330 | > 4.5 | |
331 | > 5.5 |
|
331 | > 5.5 | |
332 | > Hop we are done. |
|
332 | > Hop we are done. | |
333 | > EOF |
|
333 | > EOF | |
334 | $ hg co -m 2 -t internal:mergediff |
|
334 | $ hg co -m 2 -t internal:mergediff | |
335 | merging a |
|
335 | merging a | |
336 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
336 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
337 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
337 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
338 | use 'hg resolve' to retry unresolved file merges |
|
338 | use 'hg resolve' to retry unresolved file merges | |
339 | [1] |
|
339 | [1] | |
340 | $ cat a |
|
340 | $ cat a | |
341 | Small Mathematical Series. |
|
341 | Small Mathematical Series. | |
342 | 1 |
|
342 | 1 | |
343 | 2 |
|
343 | 2 | |
344 | <<<<<<< |
|
344 | <<<<<<< | |
345 | ======= working copy |
|
345 | ======= working copy | |
346 | 3.5 |
|
346 | 3.5 | |
347 | 4.5 |
|
347 | 4.5 | |
348 | 5.5 |
|
348 | 5.5 | |
349 | ------- base |
|
349 | ------- base | |
350 | +++++++ destination |
|
350 | +++++++ destination | |
351 | 3 |
|
351 | 3 | |
352 | -4 |
|
352 | -4 | |
353 | -5 |
|
353 | -5 | |
354 | +6 |
|
354 | +6 | |
355 | +8 |
|
355 | +8 | |
356 | >>>>>>> |
|
356 | >>>>>>> | |
357 | Hop we are done. |
|
357 | Hop we are done. | |
358 |
|
358 | |||
359 | Add some unconflicting changes on each head, to make sure we really |
|
359 | Add some unconflicting changes on each head, to make sure we really | |
360 | are merging, unlike :local and :other |
|
360 | are merging, unlike :local and :other | |
361 |
|
361 | |||
362 | $ hg up -C |
|
362 | $ hg up -C | |
363 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
363 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
364 | updated to "e0693e20f496: 123456789012345678901234567890123456789012345678901234567890????" |
|
364 | updated to "e0693e20f496: 123456789012345678901234567890123456789012345678901234567890????" | |
365 | 1 other heads for branch "default" |
|
365 | 1 other heads for branch "default" | |
366 | $ printf "\n\nEnd of file\n" >> a |
|
366 | $ printf "\n\nEnd of file\n" >> a | |
367 | $ hg ci -m "Add some stuff at the end" |
|
367 | $ hg ci -m "Add some stuff at the end" | |
368 | $ hg up -r 1 |
|
368 | $ hg up -r 1 | |
369 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
369 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
370 | $ printf "Start of file\n\n\n" > tmp |
|
370 | $ printf "Start of file\n\n\n" > tmp | |
371 | $ cat a >> tmp |
|
371 | $ cat a >> tmp | |
372 | $ mv tmp a |
|
372 | $ mv tmp a | |
373 | $ hg ci -m "Add some stuff at the beginning" |
|
373 | $ hg ci -m "Add some stuff at the beginning" | |
374 |
|
374 | |||
375 | Now test :merge-other and :merge-local |
|
375 | Now test :merge-other and :merge-local | |
376 |
|
376 | |||
377 | $ hg merge |
|
377 | $ hg merge | |
378 | merging a |
|
378 | merging a | |
379 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
379 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
380 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
380 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
381 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
381 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
382 | [1] |
|
382 | [1] | |
383 | $ hg resolve --tool :merge-other a |
|
383 | $ hg resolve --tool :merge-other a | |
384 | merging a |
|
384 | merging a | |
385 | (no more unresolved files) |
|
385 | (no more unresolved files) | |
386 | $ cat a |
|
386 | $ cat a | |
387 | Start of file |
|
387 | Start of file | |
388 |
|
388 | |||
389 |
|
389 | |||
390 | Small Mathematical Series. |
|
390 | Small Mathematical Series. | |
391 | 1 |
|
391 | 1 | |
392 | 2 |
|
392 | 2 | |
393 | 3 |
|
393 | 3 | |
394 | 6 |
|
394 | 6 | |
395 | 8 |
|
395 | 8 | |
396 | Hop we are done. |
|
396 | Hop we are done. | |
397 |
|
397 | |||
398 |
|
398 | |||
399 | End of file |
|
399 | End of file | |
400 |
|
400 | |||
401 | $ hg up -C |
|
401 | $ hg up -C | |
402 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
402 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
403 | updated to "18b51d585961: Add some stuff at the beginning" |
|
403 | updated to "18b51d585961: Add some stuff at the beginning" | |
404 | 1 other heads for branch "default" |
|
404 | 1 other heads for branch "default" | |
405 | $ hg merge --tool :merge-local |
|
405 | $ hg merge --tool :merge-local | |
406 | merging a |
|
406 | merging a | |
407 |
|
|
407 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
408 | (branch merge, don't forget to commit) |
|
408 | (branch merge, don't forget to commit) | |
409 | $ cat a |
|
409 | $ cat a | |
410 | Start of file |
|
410 | Start of file | |
411 |
|
411 | |||
412 |
|
412 | |||
413 | Small Mathematical Series. |
|
413 | Small Mathematical Series. | |
414 | 1 |
|
414 | 1 | |
415 | 2 |
|
415 | 2 | |
416 | 3 |
|
416 | 3 | |
417 | 4 |
|
417 | 4 | |
418 | 5 |
|
418 | 5 | |
419 | Hop we are done. |
|
419 | Hop we are done. | |
420 |
|
420 | |||
421 |
|
421 | |||
422 | End of file |
|
422 | End of file |
@@ -1,3850 +1,3850 b'' | |||||
1 | #testcases filelog compatibility changeset sidedata upgraded upgraded-parallel pull push pull-upgrade push-upgrade |
|
1 | #testcases filelog compatibility changeset sidedata upgraded upgraded-parallel pull push pull-upgrade push-upgrade | |
2 |
|
2 | |||
3 | ===================================================== |
|
3 | ===================================================== | |
4 | Test Copy tracing for chain of copies involving merge |
|
4 | Test Copy tracing for chain of copies involving merge | |
5 | ===================================================== |
|
5 | ===================================================== | |
6 |
|
6 | |||
7 | This test files covers copies/rename case for a chains of commit where merges |
|
7 | This test files covers copies/rename case for a chains of commit where merges | |
8 | are involved. It cheks we do not have unwanted update of behavior and that the |
|
8 | are involved. It cheks we do not have unwanted update of behavior and that the | |
9 | different options to retrieve copies behave correctly. |
|
9 | different options to retrieve copies behave correctly. | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | Setup |
|
12 | Setup | |
13 | ===== |
|
13 | ===== | |
14 |
|
14 | |||
15 | use git diff to see rename |
|
15 | use git diff to see rename | |
16 |
|
16 | |||
17 | $ cat << EOF >> ./no-linkrev |
|
17 | $ cat << EOF >> ./no-linkrev | |
18 | > #!$PYTHON |
|
18 | > #!$PYTHON | |
19 | > # filter out linkrev part of the debugindex command |
|
19 | > # filter out linkrev part of the debugindex command | |
20 | > import sys |
|
20 | > import sys | |
21 | > for line in sys.stdin: |
|
21 | > for line in sys.stdin: | |
22 | > if " linkrev " in line: |
|
22 | > if " linkrev " in line: | |
23 | > print(line.rstrip()) |
|
23 | > print(line.rstrip()) | |
24 | > else: |
|
24 | > else: | |
25 | > l = "%s *%s" % (line[:6], line[14:].rstrip()) |
|
25 | > l = "%s *%s" % (line[:6], line[14:].rstrip()) | |
26 | > print(l) |
|
26 | > print(l) | |
27 | > EOF |
|
27 | > EOF | |
28 |
|
28 | |||
29 | $ cat << EOF >> $HGRCPATH |
|
29 | $ cat << EOF >> $HGRCPATH | |
30 | > [diff] |
|
30 | > [diff] | |
31 | > git=yes |
|
31 | > git=yes | |
32 | > [command-templates] |
|
32 | > [command-templates] | |
33 | > log={desc}\n |
|
33 | > log={desc}\n | |
34 | > EOF |
|
34 | > EOF | |
35 |
|
35 | |||
36 | #if compatibility |
|
36 | #if compatibility | |
37 | $ cat >> $HGRCPATH << EOF |
|
37 | $ cat >> $HGRCPATH << EOF | |
38 | > [experimental] |
|
38 | > [experimental] | |
39 | > copies.read-from = compatibility |
|
39 | > copies.read-from = compatibility | |
40 | > EOF |
|
40 | > EOF | |
41 | #endif |
|
41 | #endif | |
42 |
|
42 | |||
43 | #if changeset |
|
43 | #if changeset | |
44 | $ cat >> $HGRCPATH << EOF |
|
44 | $ cat >> $HGRCPATH << EOF | |
45 | > [experimental] |
|
45 | > [experimental] | |
46 | > copies.read-from = changeset-only |
|
46 | > copies.read-from = changeset-only | |
47 | > copies.write-to = changeset-only |
|
47 | > copies.write-to = changeset-only | |
48 | > EOF |
|
48 | > EOF | |
49 | #endif |
|
49 | #endif | |
50 |
|
50 | |||
51 | #if sidedata |
|
51 | #if sidedata | |
52 | $ cat >> $HGRCPATH << EOF |
|
52 | $ cat >> $HGRCPATH << EOF | |
53 | > [format] |
|
53 | > [format] | |
54 | > exp-use-copies-side-data-changeset = yes |
|
54 | > exp-use-copies-side-data-changeset = yes | |
55 | > EOF |
|
55 | > EOF | |
56 | #endif |
|
56 | #endif | |
57 |
|
57 | |||
58 | #if pull |
|
58 | #if pull | |
59 | $ cat >> $HGRCPATH << EOF |
|
59 | $ cat >> $HGRCPATH << EOF | |
60 | > [format] |
|
60 | > [format] | |
61 | > exp-use-copies-side-data-changeset = yes |
|
61 | > exp-use-copies-side-data-changeset = yes | |
62 | > EOF |
|
62 | > EOF | |
63 | #endif |
|
63 | #endif | |
64 |
|
64 | |||
65 | #if push |
|
65 | #if push | |
66 | $ cat >> $HGRCPATH << EOF |
|
66 | $ cat >> $HGRCPATH << EOF | |
67 | > [format] |
|
67 | > [format] | |
68 | > exp-use-copies-side-data-changeset = yes |
|
68 | > exp-use-copies-side-data-changeset = yes | |
69 | > EOF |
|
69 | > EOF | |
70 | #endif |
|
70 | #endif | |
71 |
|
71 | |||
72 | #if pull-upgrade |
|
72 | #if pull-upgrade | |
73 | $ cat >> $HGRCPATH << EOF |
|
73 | $ cat >> $HGRCPATH << EOF | |
74 | > [format] |
|
74 | > [format] | |
75 | > exp-use-copies-side-data-changeset = no |
|
75 | > exp-use-copies-side-data-changeset = no | |
76 | > [experimental] |
|
76 | > [experimental] | |
77 | > changegroup4 = yes |
|
77 | > changegroup4 = yes | |
78 | > EOF |
|
78 | > EOF | |
79 | #endif |
|
79 | #endif | |
80 |
|
80 | |||
81 | #if push-upgrade |
|
81 | #if push-upgrade | |
82 | $ cat >> $HGRCPATH << EOF |
|
82 | $ cat >> $HGRCPATH << EOF | |
83 | > [format] |
|
83 | > [format] | |
84 | > exp-use-copies-side-data-changeset = no |
|
84 | > exp-use-copies-side-data-changeset = no | |
85 | > [experimental] |
|
85 | > [experimental] | |
86 | > changegroup4 = yes |
|
86 | > changegroup4 = yes | |
87 | > EOF |
|
87 | > EOF | |
88 | #endif |
|
88 | #endif | |
89 |
|
89 | |||
90 | $ cat > same-content.txt << EOF |
|
90 | $ cat > same-content.txt << EOF | |
91 | > Here is some content that will be the same accros multiple file. |
|
91 | > Here is some content that will be the same accros multiple file. | |
92 | > |
|
92 | > | |
93 | > This is done on purpose so that we end up in some merge situation, were the |
|
93 | > This is done on purpose so that we end up in some merge situation, were the | |
94 | > resulting content is the same as in the parent(s), but a new filenodes still |
|
94 | > resulting content is the same as in the parent(s), but a new filenodes still | |
95 | > need to be created to record some file history information (especially |
|
95 | > need to be created to record some file history information (especially | |
96 | > about copies). |
|
96 | > about copies). | |
97 | > EOF |
|
97 | > EOF | |
98 |
|
98 | |||
99 | $ hg init repo-chain |
|
99 | $ hg init repo-chain | |
100 | $ cd repo-chain |
|
100 | $ cd repo-chain | |
101 |
|
101 | |||
102 | Add some linear rename initialy |
|
102 | Add some linear rename initialy | |
103 |
|
103 | |||
104 | $ cp ../same-content.txt a |
|
104 | $ cp ../same-content.txt a | |
105 | $ cp ../same-content.txt b |
|
105 | $ cp ../same-content.txt b | |
106 | $ cp ../same-content.txt h |
|
106 | $ cp ../same-content.txt h | |
107 | $ echo "original content for P" > p |
|
107 | $ echo "original content for P" > p | |
108 | $ echo "original content for Q" > q |
|
108 | $ echo "original content for Q" > q | |
109 | $ echo "original content for R" > r |
|
109 | $ echo "original content for R" > r | |
110 | $ hg ci -Am 'i-0 initial commit: a b h p q r' |
|
110 | $ hg ci -Am 'i-0 initial commit: a b h p q r' | |
111 | adding a |
|
111 | adding a | |
112 | adding b |
|
112 | adding b | |
113 | adding h |
|
113 | adding h | |
114 | adding p |
|
114 | adding p | |
115 | adding q |
|
115 | adding q | |
116 | adding r |
|
116 | adding r | |
117 | $ hg mv a c |
|
117 | $ hg mv a c | |
118 | $ hg mv p s |
|
118 | $ hg mv p s | |
119 | $ hg ci -Am 'i-1: a -move-> c, p -move-> s' |
|
119 | $ hg ci -Am 'i-1: a -move-> c, p -move-> s' | |
120 | $ hg mv c d |
|
120 | $ hg mv c d | |
121 | $ hg mv s t |
|
121 | $ hg mv s t | |
122 | $ hg ci -Am 'i-2: c -move-> d, s -move-> t' |
|
122 | $ hg ci -Am 'i-2: c -move-> d, s -move-> t' | |
123 | $ hg log -G |
|
123 | $ hg log -G | |
124 | @ i-2: c -move-> d, s -move-> t |
|
124 | @ i-2: c -move-> d, s -move-> t | |
125 | | |
|
125 | | | |
126 | o i-1: a -move-> c, p -move-> s |
|
126 | o i-1: a -move-> c, p -move-> s | |
127 | | |
|
127 | | | |
128 | o i-0 initial commit: a b h p q r |
|
128 | o i-0 initial commit: a b h p q r | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | And having another branch with renames on the other side |
|
131 | And having another branch with renames on the other side | |
132 |
|
132 | |||
133 | $ hg mv d e |
|
133 | $ hg mv d e | |
134 | $ hg ci -Am 'a-1: d -move-> e' |
|
134 | $ hg ci -Am 'a-1: d -move-> e' | |
135 | $ hg mv e f |
|
135 | $ hg mv e f | |
136 | $ hg ci -Am 'a-2: e -move-> f' |
|
136 | $ hg ci -Am 'a-2: e -move-> f' | |
137 | $ hg log -G --rev '::.' |
|
137 | $ hg log -G --rev '::.' | |
138 | @ a-2: e -move-> f |
|
138 | @ a-2: e -move-> f | |
139 | | |
|
139 | | | |
140 | o a-1: d -move-> e |
|
140 | o a-1: d -move-> e | |
141 | | |
|
141 | | | |
142 | o i-2: c -move-> d, s -move-> t |
|
142 | o i-2: c -move-> d, s -move-> t | |
143 | | |
|
143 | | | |
144 | o i-1: a -move-> c, p -move-> s |
|
144 | o i-1: a -move-> c, p -move-> s | |
145 | | |
|
145 | | | |
146 | o i-0 initial commit: a b h p q r |
|
146 | o i-0 initial commit: a b h p q r | |
147 |
|
147 | |||
148 |
|
148 | |||
149 | Have a branching with nothing on one side |
|
149 | Have a branching with nothing on one side | |
150 |
|
150 | |||
151 | $ hg up 'desc("i-2")' |
|
151 | $ hg up 'desc("i-2")' | |
152 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
152 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
153 | $ echo foo > b |
|
153 | $ echo foo > b | |
154 | $ hg ci -m 'b-1: b update' |
|
154 | $ hg ci -m 'b-1: b update' | |
155 | created new head |
|
155 | created new head | |
156 | $ hg log -G --rev '::.' |
|
156 | $ hg log -G --rev '::.' | |
157 | @ b-1: b update |
|
157 | @ b-1: b update | |
158 | | |
|
158 | | | |
159 | o i-2: c -move-> d, s -move-> t |
|
159 | o i-2: c -move-> d, s -move-> t | |
160 | | |
|
160 | | | |
161 | o i-1: a -move-> c, p -move-> s |
|
161 | o i-1: a -move-> c, p -move-> s | |
162 | | |
|
162 | | | |
163 | o i-0 initial commit: a b h p q r |
|
163 | o i-0 initial commit: a b h p q r | |
164 |
|
164 | |||
165 |
|
165 | |||
166 | Create a branch that delete a file previous renamed |
|
166 | Create a branch that delete a file previous renamed | |
167 |
|
167 | |||
168 | $ hg up 'desc("i-2")' |
|
168 | $ hg up 'desc("i-2")' | |
169 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
169 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
170 | $ hg rm d |
|
170 | $ hg rm d | |
171 | $ hg ci -m 'c-1 delete d' |
|
171 | $ hg ci -m 'c-1 delete d' | |
172 | created new head |
|
172 | created new head | |
173 | $ hg log -G --rev '::.' |
|
173 | $ hg log -G --rev '::.' | |
174 | @ c-1 delete d |
|
174 | @ c-1 delete d | |
175 | | |
|
175 | | | |
176 | o i-2: c -move-> d, s -move-> t |
|
176 | o i-2: c -move-> d, s -move-> t | |
177 | | |
|
177 | | | |
178 | o i-1: a -move-> c, p -move-> s |
|
178 | o i-1: a -move-> c, p -move-> s | |
179 | | |
|
179 | | | |
180 | o i-0 initial commit: a b h p q r |
|
180 | o i-0 initial commit: a b h p q r | |
181 |
|
181 | |||
182 |
|
182 | |||
183 | Create a branch that delete a file previous renamed and recreate it |
|
183 | Create a branch that delete a file previous renamed and recreate it | |
184 |
|
184 | |||
185 | $ hg up 'desc("i-2")' |
|
185 | $ hg up 'desc("i-2")' | |
186 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
186 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
187 | $ hg rm d |
|
187 | $ hg rm d | |
188 | $ hg ci -m 'd-1 delete d' |
|
188 | $ hg ci -m 'd-1 delete d' | |
189 | created new head |
|
189 | created new head | |
190 | $ echo bar > d |
|
190 | $ echo bar > d | |
191 | $ hg add d |
|
191 | $ hg add d | |
192 | $ hg ci -m 'd-2 re-add d' |
|
192 | $ hg ci -m 'd-2 re-add d' | |
193 | $ hg log -G --rev '::.' |
|
193 | $ hg log -G --rev '::.' | |
194 | @ d-2 re-add d |
|
194 | @ d-2 re-add d | |
195 | | |
|
195 | | | |
196 | o d-1 delete d |
|
196 | o d-1 delete d | |
197 | | |
|
197 | | | |
198 | o i-2: c -move-> d, s -move-> t |
|
198 | o i-2: c -move-> d, s -move-> t | |
199 | | |
|
199 | | | |
200 | o i-1: a -move-> c, p -move-> s |
|
200 | o i-1: a -move-> c, p -move-> s | |
201 | | |
|
201 | | | |
202 | o i-0 initial commit: a b h p q r |
|
202 | o i-0 initial commit: a b h p q r | |
203 |
|
203 | |||
204 |
|
204 | |||
205 | Having another branch renaming a different file to the same filename as another |
|
205 | Having another branch renaming a different file to the same filename as another | |
206 |
|
206 | |||
207 | $ hg up 'desc("i-2")' |
|
207 | $ hg up 'desc("i-2")' | |
208 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
208 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
209 | $ hg mv b g |
|
209 | $ hg mv b g | |
210 | $ hg ci -m 'e-1 b -move-> g' |
|
210 | $ hg ci -m 'e-1 b -move-> g' | |
211 | created new head |
|
211 | created new head | |
212 | $ hg mv g f |
|
212 | $ hg mv g f | |
213 | $ hg ci -m 'e-2 g -move-> f' |
|
213 | $ hg ci -m 'e-2 g -move-> f' | |
214 | $ hg log -G --rev '::.' |
|
214 | $ hg log -G --rev '::.' | |
215 | @ e-2 g -move-> f |
|
215 | @ e-2 g -move-> f | |
216 | | |
|
216 | | | |
217 | o e-1 b -move-> g |
|
217 | o e-1 b -move-> g | |
218 | | |
|
218 | | | |
219 | o i-2: c -move-> d, s -move-> t |
|
219 | o i-2: c -move-> d, s -move-> t | |
220 | | |
|
220 | | | |
221 | o i-1: a -move-> c, p -move-> s |
|
221 | o i-1: a -move-> c, p -move-> s | |
222 | | |
|
222 | | | |
223 | o i-0 initial commit: a b h p q r |
|
223 | o i-0 initial commit: a b h p q r | |
224 |
|
224 | |||
225 | $ hg up -q null |
|
225 | $ hg up -q null | |
226 |
|
226 | |||
227 | Having a branch similar to the 'a' one, but moving the 'p' file around. |
|
227 | Having a branch similar to the 'a' one, but moving the 'p' file around. | |
228 |
|
228 | |||
229 | $ hg up 'desc("i-2")' |
|
229 | $ hg up 'desc("i-2")' | |
230 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
230 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
231 | $ hg mv t u |
|
231 | $ hg mv t u | |
232 | $ hg ci -Am 'p-1: t -move-> u' |
|
232 | $ hg ci -Am 'p-1: t -move-> u' | |
233 | created new head |
|
233 | created new head | |
234 | $ hg mv u v |
|
234 | $ hg mv u v | |
235 | $ hg ci -Am 'p-2: u -move-> v' |
|
235 | $ hg ci -Am 'p-2: u -move-> v' | |
236 | $ hg log -G --rev '::.' |
|
236 | $ hg log -G --rev '::.' | |
237 | @ p-2: u -move-> v |
|
237 | @ p-2: u -move-> v | |
238 | | |
|
238 | | | |
239 | o p-1: t -move-> u |
|
239 | o p-1: t -move-> u | |
240 | | |
|
240 | | | |
241 | o i-2: c -move-> d, s -move-> t |
|
241 | o i-2: c -move-> d, s -move-> t | |
242 | | |
|
242 | | | |
243 | o i-1: a -move-> c, p -move-> s |
|
243 | o i-1: a -move-> c, p -move-> s | |
244 | | |
|
244 | | | |
245 | o i-0 initial commit: a b h p q r |
|
245 | o i-0 initial commit: a b h p q r | |
246 |
|
246 | |||
247 | $ hg up -q null |
|
247 | $ hg up -q null | |
248 |
|
248 | |||
249 | Having another branch renaming a different file to the same filename as another |
|
249 | Having another branch renaming a different file to the same filename as another | |
250 |
|
250 | |||
251 | $ hg up 'desc("i-2")' |
|
251 | $ hg up 'desc("i-2")' | |
252 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
252 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
253 | $ hg mv r w |
|
253 | $ hg mv r w | |
254 | $ hg ci -m 'q-1 r -move-> w' |
|
254 | $ hg ci -m 'q-1 r -move-> w' | |
255 | created new head |
|
255 | created new head | |
256 | $ hg mv w v |
|
256 | $ hg mv w v | |
257 | $ hg ci -m 'q-2 w -move-> v' |
|
257 | $ hg ci -m 'q-2 w -move-> v' | |
258 | $ hg log -G --rev '::.' |
|
258 | $ hg log -G --rev '::.' | |
259 | @ q-2 w -move-> v |
|
259 | @ q-2 w -move-> v | |
260 | | |
|
260 | | | |
261 | o q-1 r -move-> w |
|
261 | o q-1 r -move-> w | |
262 | | |
|
262 | | | |
263 | o i-2: c -move-> d, s -move-> t |
|
263 | o i-2: c -move-> d, s -move-> t | |
264 | | |
|
264 | | | |
265 | o i-1: a -move-> c, p -move-> s |
|
265 | o i-1: a -move-> c, p -move-> s | |
266 | | |
|
266 | | | |
267 | o i-0 initial commit: a b h p q r |
|
267 | o i-0 initial commit: a b h p q r | |
268 |
|
268 | |||
269 | $ hg up -q null |
|
269 | $ hg up -q null | |
270 |
|
270 | |||
271 | Setup all merge |
|
271 | Setup all merge | |
272 | =============== |
|
272 | =============== | |
273 |
|
273 | |||
274 | This is done beforehand to validate that the upgrade process creates valid copy |
|
274 | This is done beforehand to validate that the upgrade process creates valid copy | |
275 | information. |
|
275 | information. | |
276 |
|
276 | |||
277 | merging with unrelated change does not interfere with the renames |
|
277 | merging with unrelated change does not interfere with the renames | |
278 | --------------------------------------------------------------- |
|
278 | --------------------------------------------------------------- | |
279 |
|
279 | |||
280 | - rename on one side |
|
280 | - rename on one side | |
281 | - unrelated change on the other side |
|
281 | - unrelated change on the other side | |
282 |
|
282 | |||
283 | $ case_desc="simple merge - A side: multiple renames, B side: unrelated update" |
|
283 | $ case_desc="simple merge - A side: multiple renames, B side: unrelated update" | |
284 |
|
284 | |||
285 | $ hg up 'desc("b-1")' |
|
285 | $ hg up 'desc("b-1")' | |
286 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
286 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
287 | $ hg merge 'desc("a-2")' |
|
287 | $ hg merge 'desc("a-2")' | |
288 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
288 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
289 | (branch merge, don't forget to commit) |
|
289 | (branch merge, don't forget to commit) | |
290 | $ hg ci -m "mBAm-0 $case_desc - one way" |
|
290 | $ hg ci -m "mBAm-0 $case_desc - one way" | |
291 | $ hg up 'desc("a-2")' |
|
291 | $ hg up 'desc("a-2")' | |
292 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
292 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
293 | $ hg merge 'desc("b-1")' |
|
293 | $ hg merge 'desc("b-1")' | |
294 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
294 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
295 | (branch merge, don't forget to commit) |
|
295 | (branch merge, don't forget to commit) | |
296 | $ hg ci -m "mABm-0 $case_desc - the other way" |
|
296 | $ hg ci -m "mABm-0 $case_desc - the other way" | |
297 | created new head |
|
297 | created new head | |
298 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
298 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | |
299 | @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
299 | @ mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | |
300 | |\ |
|
300 | |\ | |
301 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
301 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | |
302 | | |/ |
|
302 | | |/ | |
303 | | o b-1: b update |
|
303 | | o b-1: b update | |
304 | | | |
|
304 | | | | |
305 | o | a-2: e -move-> f |
|
305 | o | a-2: e -move-> f | |
306 | | | |
|
306 | | | | |
307 | o | a-1: d -move-> e |
|
307 | o | a-1: d -move-> e | |
308 | |/ |
|
308 | |/ | |
309 | o i-2: c -move-> d, s -move-> t |
|
309 | o i-2: c -move-> d, s -move-> t | |
310 | | |
|
310 | | | |
311 | o i-1: a -move-> c, p -move-> s |
|
311 | o i-1: a -move-> c, p -move-> s | |
312 | | |
|
312 | | | |
313 | o i-0 initial commit: a b h p q r |
|
313 | o i-0 initial commit: a b h p q r | |
314 |
|
314 | |||
315 |
|
315 | |||
316 |
|
316 | |||
317 | merging with the side having a delete |
|
317 | merging with the side having a delete | |
318 | ------------------------------------- |
|
318 | ------------------------------------- | |
319 |
|
319 | |||
320 | case summary: |
|
320 | case summary: | |
321 | - one with change to an unrelated file |
|
321 | - one with change to an unrelated file | |
322 | - one deleting the change |
|
322 | - one deleting the change | |
323 | and recreate an unrelated file after the merge |
|
323 | and recreate an unrelated file after the merge | |
324 |
|
324 | |||
325 | $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update" |
|
325 | $ case_desc="simple merge - C side: delete a file with copies history , B side: unrelated update" | |
326 |
|
326 | |||
327 | $ hg up 'desc("b-1")' |
|
327 | $ hg up 'desc("b-1")' | |
328 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
328 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
329 | $ hg merge 'desc("c-1")' |
|
329 | $ hg merge 'desc("c-1")' | |
330 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
330 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
331 | (branch merge, don't forget to commit) |
|
331 | (branch merge, don't forget to commit) | |
332 | $ hg ci -m "mBCm-0 $case_desc - one way" |
|
332 | $ hg ci -m "mBCm-0 $case_desc - one way" | |
333 | $ echo bar > d |
|
333 | $ echo bar > d | |
334 | $ hg add d |
|
334 | $ hg add d | |
335 | $ hg ci -m 'mBCm-1 re-add d' |
|
335 | $ hg ci -m 'mBCm-1 re-add d' | |
336 | $ hg up 'desc("c-1")' |
|
336 | $ hg up 'desc("c-1")' | |
337 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
337 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
338 | $ hg merge 'desc("b-1")' |
|
338 | $ hg merge 'desc("b-1")' | |
339 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
339 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
340 | (branch merge, don't forget to commit) |
|
340 | (branch merge, don't forget to commit) | |
341 | $ hg ci -m "mCBm-0 $case_desc - the other way" |
|
341 | $ hg ci -m "mCBm-0 $case_desc - the other way" | |
342 | created new head |
|
342 | created new head | |
343 | $ echo bar > d |
|
343 | $ echo bar > d | |
344 | $ hg add d |
|
344 | $ hg add d | |
345 | $ hg ci -m 'mCBm-1 re-add d' |
|
345 | $ hg ci -m 'mCBm-1 re-add d' | |
346 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
346 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | |
347 | @ mCBm-1 re-add d |
|
347 | @ mCBm-1 re-add d | |
348 | | |
|
348 | | | |
349 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
349 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | |
350 | |\ |
|
350 | |\ | |
351 | | | o mBCm-1 re-add d |
|
351 | | | o mBCm-1 re-add d | |
352 | | | | |
|
352 | | | | | |
353 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
353 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | |
354 | | |/ |
|
354 | | |/ | |
355 | | o c-1 delete d |
|
355 | | o c-1 delete d | |
356 | | | |
|
356 | | | | |
357 | o | b-1: b update |
|
357 | o | b-1: b update | |
358 | |/ |
|
358 | |/ | |
359 | o i-2: c -move-> d, s -move-> t |
|
359 | o i-2: c -move-> d, s -move-> t | |
360 | | |
|
360 | | | |
361 | o i-1: a -move-> c, p -move-> s |
|
361 | o i-1: a -move-> c, p -move-> s | |
362 | | |
|
362 | | | |
363 | o i-0 initial commit: a b h p q r |
|
363 | o i-0 initial commit: a b h p q r | |
364 |
|
364 | |||
365 |
|
365 | |||
366 | Comparing with a merge re-adding the file afterward |
|
366 | Comparing with a merge re-adding the file afterward | |
367 | --------------------------------------------------- |
|
367 | --------------------------------------------------- | |
368 |
|
368 | |||
369 | Merge: |
|
369 | Merge: | |
370 | - one with change to an unrelated file |
|
370 | - one with change to an unrelated file | |
371 | - one deleting and recreating the change |
|
371 | - one deleting and recreating the change | |
372 |
|
372 | |||
373 | $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)" |
|
373 | $ case_desc="simple merge - B side: unrelated update, D side: delete and recreate a file (with different content)" | |
374 |
|
374 | |||
375 | $ hg up 'desc("b-1")' |
|
375 | $ hg up 'desc("b-1")' | |
376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
376 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
377 | $ hg merge 'desc("d-2")' |
|
377 | $ hg merge 'desc("d-2")' | |
378 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
378 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
379 | (branch merge, don't forget to commit) |
|
379 | (branch merge, don't forget to commit) | |
380 | $ hg ci -m "mBDm-0 $case_desc - one way" |
|
380 | $ hg ci -m "mBDm-0 $case_desc - one way" | |
381 | $ hg up 'desc("d-2")' |
|
381 | $ hg up 'desc("d-2")' | |
382 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
382 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
383 | $ hg merge 'desc("b-1")' |
|
383 | $ hg merge 'desc("b-1")' | |
384 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
384 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
385 | (branch merge, don't forget to commit) |
|
385 | (branch merge, don't forget to commit) | |
386 | $ hg ci -m "mDBm-0 $case_desc - the other way" |
|
386 | $ hg ci -m "mDBm-0 $case_desc - the other way" | |
387 | created new head |
|
387 | created new head | |
388 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
388 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
389 | @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
389 | @ mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | |
390 | |\ |
|
390 | |\ | |
391 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
391 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | |
392 | | |/ |
|
392 | | |/ | |
393 | | o d-2 re-add d |
|
393 | | o d-2 re-add d | |
394 | | | |
|
394 | | | | |
395 | | o d-1 delete d |
|
395 | | o d-1 delete d | |
396 | | | |
|
396 | | | | |
397 | o | b-1: b update |
|
397 | o | b-1: b update | |
398 | |/ |
|
398 | |/ | |
399 | o i-2: c -move-> d, s -move-> t |
|
399 | o i-2: c -move-> d, s -move-> t | |
400 | | |
|
400 | | | |
401 | o i-1: a -move-> c, p -move-> s |
|
401 | o i-1: a -move-> c, p -move-> s | |
402 | | |
|
402 | | | |
403 | o i-0 initial commit: a b h p q r |
|
403 | o i-0 initial commit: a b h p q r | |
404 |
|
404 | |||
405 |
|
405 | |||
406 |
|
406 | |||
407 | Comparing with a merge with colliding rename |
|
407 | Comparing with a merge with colliding rename | |
408 | -------------------------------------------- |
|
408 | -------------------------------------------- | |
409 |
|
409 | |||
410 | Subcase: new copy information on both side |
|
410 | Subcase: new copy information on both side | |
411 | `````````````````````````````````````````` |
|
411 | `````````````````````````````````````````` | |
412 |
|
412 | |||
413 | - the "e-" branch renaming b to f (through 'g') |
|
413 | - the "e-" branch renaming b to f (through 'g') | |
414 | - the "a-" branch renaming d to f (through e) |
|
414 | - the "a-" branch renaming d to f (through e) | |
415 |
|
415 | |||
416 | $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)" |
|
416 | $ case_desc="merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f)" | |
417 |
|
417 | |||
418 | $ hg up 'desc("a-2")' |
|
418 | $ hg up 'desc("a-2")' | |
419 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
419 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
420 | $ hg merge 'desc("e-2")' |
|
420 | $ hg merge 'desc("e-2")' | |
421 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
421 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
422 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
422 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
423 | (branch merge, don't forget to commit) |
|
423 | (branch merge, don't forget to commit) | |
424 | $ hg ci -m "mAEm-0 $case_desc - one way" |
|
424 | $ hg ci -m "mAEm-0 $case_desc - one way" | |
425 | $ hg up 'desc("e-2")' |
|
425 | $ hg up 'desc("e-2")' | |
426 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
426 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
427 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
427 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
428 | $ hg merge 'desc("a-2")' |
|
428 | $ hg merge 'desc("a-2")' | |
429 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
429 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
430 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
430 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
431 | (branch merge, don't forget to commit) |
|
431 | (branch merge, don't forget to commit) | |
432 | $ hg ci -m "mEAm-0 $case_desc - the other way" |
|
432 | $ hg ci -m "mEAm-0 $case_desc - the other way" | |
433 | created new head |
|
433 | created new head | |
434 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
434 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
435 | @ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
435 | @ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way | |
436 | |\ |
|
436 | |\ | |
437 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
437 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way | |
438 | | |/ |
|
438 | | |/ | |
439 | | o e-2 g -move-> f |
|
439 | | o e-2 g -move-> f | |
440 | | | |
|
440 | | | | |
441 | | o e-1 b -move-> g |
|
441 | | o e-1 b -move-> g | |
442 | | | |
|
442 | | | | |
443 | o | a-2: e -move-> f |
|
443 | o | a-2: e -move-> f | |
444 | | | |
|
444 | | | | |
445 | o | a-1: d -move-> e |
|
445 | o | a-1: d -move-> e | |
446 | |/ |
|
446 | |/ | |
447 | o i-2: c -move-> d, s -move-> t |
|
447 | o i-2: c -move-> d, s -move-> t | |
448 | | |
|
448 | | | |
449 | o i-1: a -move-> c, p -move-> s |
|
449 | o i-1: a -move-> c, p -move-> s | |
450 | | |
|
450 | | | |
451 | o i-0 initial commit: a b h p q r |
|
451 | o i-0 initial commit: a b h p q r | |
452 |
|
452 | |||
453 |
|
453 | |||
454 | Subcase: new copy information on both side with an actual merge happening |
|
454 | Subcase: new copy information on both side with an actual merge happening | |
455 | ````````````````````````````````````````````````````````````````````````` |
|
455 | ````````````````````````````````````````````````````````````````````````` | |
456 |
|
456 | |||
457 | - the "p-" branch renaming 't' to 'v' (through 'u') |
|
457 | - the "p-" branch renaming 't' to 'v' (through 'u') | |
458 | - the "q-" branch renaming 'r' to 'v' (through 'w') |
|
458 | - the "q-" branch renaming 'r' to 'v' (through 'w') | |
459 |
|
459 | |||
460 | $ case_desc="merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content)" |
|
460 | $ case_desc="merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content)" | |
461 |
|
461 | |||
462 | $ hg up 'desc("p-2")' |
|
462 | $ hg up 'desc("p-2")' | |
463 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
463 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
464 | $ hg merge 'desc("q-2")' --tool ':union' |
|
464 | $ hg merge 'desc("q-2")' --tool ':union' | |
465 | merging v |
|
465 | merging v | |
466 |
|
|
466 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
467 | (branch merge, don't forget to commit) |
|
467 | (branch merge, don't forget to commit) | |
468 | $ hg ci -m "mPQm-0 $case_desc - one way" |
|
468 | $ hg ci -m "mPQm-0 $case_desc - one way" | |
469 | $ hg up 'desc("q-2")' |
|
469 | $ hg up 'desc("q-2")' | |
470 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
470 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
471 | $ hg merge 'desc("p-2")' --tool ':union' |
|
471 | $ hg merge 'desc("p-2")' --tool ':union' | |
472 | merging v |
|
472 | merging v | |
473 |
|
|
473 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
474 | (branch merge, don't forget to commit) |
|
474 | (branch merge, don't forget to commit) | |
475 | $ hg ci -m "mQPm-0 $case_desc - the other way" |
|
475 | $ hg ci -m "mQPm-0 $case_desc - the other way" | |
476 | created new head |
|
476 | created new head | |
477 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
477 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
478 | o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
478 | o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way | |
479 | |\ |
|
479 | |\ | |
480 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
480 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way | |
481 | | |/ |
|
481 | | |/ | |
482 | | o e-2 g -move-> f |
|
482 | | o e-2 g -move-> f | |
483 | | | |
|
483 | | | | |
484 | | o e-1 b -move-> g |
|
484 | | o e-1 b -move-> g | |
485 | | | |
|
485 | | | | |
486 | o | a-2: e -move-> f |
|
486 | o | a-2: e -move-> f | |
487 | | | |
|
487 | | | | |
488 | o | a-1: d -move-> e |
|
488 | o | a-1: d -move-> e | |
489 | |/ |
|
489 | |/ | |
490 | o i-2: c -move-> d, s -move-> t |
|
490 | o i-2: c -move-> d, s -move-> t | |
491 | | |
|
491 | | | |
492 | o i-1: a -move-> c, p -move-> s |
|
492 | o i-1: a -move-> c, p -move-> s | |
493 | | |
|
493 | | | |
494 | o i-0 initial commit: a b h p q r |
|
494 | o i-0 initial commit: a b h p q r | |
495 |
|
495 | |||
496 |
|
496 | |||
497 | Subcase: existing copy information overwritten on one branch |
|
497 | Subcase: existing copy information overwritten on one branch | |
498 | ```````````````````````````````````````````````````````````` |
|
498 | ```````````````````````````````````````````````````````````` | |
499 |
|
499 | |||
500 | Merge: |
|
500 | Merge: | |
501 | - one with change to an unrelated file (b) |
|
501 | - one with change to an unrelated file (b) | |
502 | - one overwriting a file (d) with a rename (from h to i to d) |
|
502 | - one overwriting a file (d) with a rename (from h to i to d) | |
503 |
|
503 | |||
504 | $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" |
|
504 | $ case_desc="simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" | |
505 |
|
505 | |||
506 | $ hg up 'desc("i-2")' |
|
506 | $ hg up 'desc("i-2")' | |
507 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
507 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
508 | $ hg mv h i |
|
508 | $ hg mv h i | |
509 | $ hg commit -m "f-1: rename h -> i" |
|
509 | $ hg commit -m "f-1: rename h -> i" | |
510 | created new head |
|
510 | created new head | |
511 | $ hg mv --force i d |
|
511 | $ hg mv --force i d | |
512 | $ hg commit -m "f-2: rename i -> d" |
|
512 | $ hg commit -m "f-2: rename i -> d" | |
513 | $ hg debugindex d | "$PYTHON" ../no-linkrev |
|
513 | $ hg debugindex d | "$PYTHON" ../no-linkrev | |
514 | rev linkrev nodeid p1 p2 |
|
514 | rev linkrev nodeid p1 p2 | |
515 | 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) |
|
515 | 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) | |
516 | 0 * ae258f702dfe 000000000000 000000000000 (changeset !) |
|
516 | 0 * ae258f702dfe 000000000000 000000000000 (changeset !) | |
517 | 1 * b004912a8510 000000000000 000000000000 |
|
517 | 1 * b004912a8510 000000000000 000000000000 | |
518 | 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) |
|
518 | 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) | |
519 | $ hg up 'desc("b-1")' |
|
519 | $ hg up 'desc("b-1")' | |
520 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
520 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
521 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
521 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
522 | $ hg merge 'desc("f-2")' |
|
522 | $ hg merge 'desc("f-2")' | |
523 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
523 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
524 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
524 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
525 | (branch merge, don't forget to commit) |
|
525 | (branch merge, don't forget to commit) | |
526 | $ hg ci -m "mBFm-0 $case_desc - one way" |
|
526 | $ hg ci -m "mBFm-0 $case_desc - one way" | |
527 | $ hg up 'desc("f-2")' |
|
527 | $ hg up 'desc("f-2")' | |
528 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
528 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
529 | $ hg merge 'desc("b-1")' |
|
529 | $ hg merge 'desc("b-1")' | |
530 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
530 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
531 | (branch merge, don't forget to commit) |
|
531 | (branch merge, don't forget to commit) | |
532 | $ hg ci -m "mFBm-0 $case_desc - the other way" |
|
532 | $ hg ci -m "mFBm-0 $case_desc - the other way" | |
533 | created new head |
|
533 | created new head | |
534 | $ hg up null --quiet |
|
534 | $ hg up null --quiet | |
535 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
535 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |
536 | o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
536 | o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
537 | |\ |
|
537 | |\ | |
538 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
538 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
539 | | |/ |
|
539 | | |/ | |
540 | | o f-2: rename i -> d |
|
540 | | o f-2: rename i -> d | |
541 | | | |
|
541 | | | | |
542 | | o f-1: rename h -> i |
|
542 | | o f-1: rename h -> i | |
543 | | | |
|
543 | | | | |
544 | o | b-1: b update |
|
544 | o | b-1: b update | |
545 | |/ |
|
545 | |/ | |
546 | o i-2: c -move-> d, s -move-> t |
|
546 | o i-2: c -move-> d, s -move-> t | |
547 | | |
|
547 | | | |
548 | o i-1: a -move-> c, p -move-> s |
|
548 | o i-1: a -move-> c, p -move-> s | |
549 | | |
|
549 | | | |
550 | o i-0 initial commit: a b h p q r |
|
550 | o i-0 initial commit: a b h p q r | |
551 |
|
551 | |||
552 |
|
552 | |||
553 | Subcase: existing copy information overwritten on one branch, with different content) |
|
553 | Subcase: existing copy information overwritten on one branch, with different content) | |
554 | ````````````````````````````````````````````````````````````````````````````````````` |
|
554 | ````````````````````````````````````````````````````````````````````````````````````` | |
555 |
|
555 | |||
556 | Merge: |
|
556 | Merge: | |
557 | - one with change to an unrelated file (b) |
|
557 | - one with change to an unrelated file (b) | |
558 | - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch |
|
558 | - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch | |
559 |
|
559 | |||
560 | $ case_desc="simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content" |
|
560 | $ case_desc="simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content" | |
561 |
|
561 | |||
562 | $ hg up 'desc("i-2")' |
|
562 | $ hg up 'desc("i-2")' | |
563 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
563 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
564 | $ hg mv r x |
|
564 | $ hg mv r x | |
565 | $ hg commit -m "r-1: rename r -> x" |
|
565 | $ hg commit -m "r-1: rename r -> x" | |
566 | created new head |
|
566 | created new head | |
567 | $ hg mv --force x t |
|
567 | $ hg mv --force x t | |
568 | $ hg commit -m "r-2: rename t -> x" |
|
568 | $ hg commit -m "r-2: rename t -> x" | |
569 | $ hg debugindex t | "$PYTHON" ../no-linkrev |
|
569 | $ hg debugindex t | "$PYTHON" ../no-linkrev | |
570 | rev linkrev nodeid p1 p2 |
|
570 | rev linkrev nodeid p1 p2 | |
571 | 0 * d74efbf65309 000000000000 000000000000 (no-changeset !) |
|
571 | 0 * d74efbf65309 000000000000 000000000000 (no-changeset !) | |
572 | 1 * 02a930b9d7ad 000000000000 000000000000 (no-changeset !) |
|
572 | 1 * 02a930b9d7ad 000000000000 000000000000 (no-changeset !) | |
573 | 0 * 5aed6a8dbff0 000000000000 000000000000 (changeset !) |
|
573 | 0 * 5aed6a8dbff0 000000000000 000000000000 (changeset !) | |
574 | 1 * a38b2fa17021 000000000000 000000000000 (changeset !) |
|
574 | 1 * a38b2fa17021 000000000000 000000000000 (changeset !) | |
575 | $ hg up 'desc("b-1")' |
|
575 | $ hg up 'desc("b-1")' | |
576 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
576 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
577 | $ hg merge 'desc("r-2")' |
|
577 | $ hg merge 'desc("r-2")' | |
578 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
578 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
579 | (branch merge, don't forget to commit) |
|
579 | (branch merge, don't forget to commit) | |
580 | $ hg ci -m "mBRm-0 $case_desc - one way" |
|
580 | $ hg ci -m "mBRm-0 $case_desc - one way" | |
581 | $ hg up 'desc("r-2")' |
|
581 | $ hg up 'desc("r-2")' | |
582 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
582 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
583 | $ hg merge 'desc("b-1")' |
|
583 | $ hg merge 'desc("b-1")' | |
584 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
584 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
585 | (branch merge, don't forget to commit) |
|
585 | (branch merge, don't forget to commit) | |
586 | $ hg ci -m "mRBm-0 $case_desc - the other way" |
|
586 | $ hg ci -m "mRBm-0 $case_desc - the other way" | |
587 | created new head |
|
587 | created new head | |
588 | $ hg up null --quiet |
|
588 | $ hg up null --quiet | |
589 | $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))' |
|
589 | $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))' | |
590 | o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way |
|
590 | o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way | |
591 | |\ |
|
591 | |\ | |
592 | +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way |
|
592 | +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way | |
593 | | |/ |
|
593 | | |/ | |
594 | | o r-2: rename t -> x |
|
594 | | o r-2: rename t -> x | |
595 | | | |
|
595 | | | | |
596 | | o r-1: rename r -> x |
|
596 | | o r-1: rename r -> x | |
597 | | | |
|
597 | | | | |
598 | o | b-1: b update |
|
598 | o | b-1: b update | |
599 | |/ |
|
599 | |/ | |
600 | o i-2: c -move-> d, s -move-> t |
|
600 | o i-2: c -move-> d, s -move-> t | |
601 | | |
|
601 | | | |
602 | o i-1: a -move-> c, p -move-> s |
|
602 | o i-1: a -move-> c, p -move-> s | |
603 | | |
|
603 | | | |
604 | o i-0 initial commit: a b h p q r |
|
604 | o i-0 initial commit: a b h p q r | |
605 |
|
605 | |||
606 |
|
606 | |||
607 |
|
607 | |||
608 | Subcase: reset of the copy history on one side |
|
608 | Subcase: reset of the copy history on one side | |
609 | `````````````````````````````````````````````` |
|
609 | `````````````````````````````````````````````` | |
610 |
|
610 | |||
611 | Merge: |
|
611 | Merge: | |
612 | - one with change to a file |
|
612 | - one with change to a file | |
613 | - one deleting and recreating the file |
|
613 | - one deleting and recreating the file | |
614 |
|
614 | |||
615 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should |
|
615 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should | |
616 | consider history and rename on both branch of the merge. |
|
616 | consider history and rename on both branch of the merge. | |
617 |
|
617 | |||
618 | $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content" |
|
618 | $ case_desc="actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content" | |
619 |
|
619 | |||
620 | $ hg up 'desc("i-2")' |
|
620 | $ hg up 'desc("i-2")' | |
621 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
621 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
622 | $ echo "some update" >> d |
|
622 | $ echo "some update" >> d | |
623 | $ hg commit -m "g-1: update d" |
|
623 | $ hg commit -m "g-1: update d" | |
624 | created new head |
|
624 | created new head | |
625 | $ hg up 'desc("d-2")' |
|
625 | $ hg up 'desc("d-2")' | |
626 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
626 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
627 | $ hg merge 'desc("g-1")' --tool :union |
|
627 | $ hg merge 'desc("g-1")' --tool :union | |
628 | merging d |
|
628 | merging d | |
629 |
|
|
629 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
630 | (branch merge, don't forget to commit) |
|
630 | (branch merge, don't forget to commit) | |
631 | $ hg ci -m "mDGm-0 $case_desc - one way" |
|
631 | $ hg ci -m "mDGm-0 $case_desc - one way" | |
632 | $ hg up 'desc("g-1")' |
|
632 | $ hg up 'desc("g-1")' | |
633 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
633 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
634 | $ hg merge 'desc("d-2")' --tool :union |
|
634 | $ hg merge 'desc("d-2")' --tool :union | |
635 | merging d |
|
635 | merging d | |
636 |
|
|
636 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
637 | (branch merge, don't forget to commit) |
|
637 | (branch merge, don't forget to commit) | |
638 | $ hg ci -m "mGDm-0 $case_desc - the other way" |
|
638 | $ hg ci -m "mGDm-0 $case_desc - the other way" | |
639 | created new head |
|
639 | created new head | |
640 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
640 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |
641 | @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
641 | @ mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way | |
642 | |\ |
|
642 | |\ | |
643 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
643 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
644 | | |/ |
|
644 | | |/ | |
645 | | o g-1: update d |
|
645 | | o g-1: update d | |
646 | | | |
|
646 | | | | |
647 | o | d-2 re-add d |
|
647 | o | d-2 re-add d | |
648 | | | |
|
648 | | | | |
649 | o | d-1 delete d |
|
649 | o | d-1 delete d | |
650 | |/ |
|
650 | |/ | |
651 | o i-2: c -move-> d, s -move-> t |
|
651 | o i-2: c -move-> d, s -move-> t | |
652 | | |
|
652 | | | |
653 | o i-1: a -move-> c, p -move-> s |
|
653 | o i-1: a -move-> c, p -move-> s | |
654 | | |
|
654 | | | |
655 | o i-0 initial commit: a b h p q r |
|
655 | o i-0 initial commit: a b h p q r | |
656 |
|
656 | |||
657 |
|
657 | |||
658 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch |
|
658 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch | |
659 | ```````````````````````````````````````````````````````````````````````````````````````````` |
|
659 | ```````````````````````````````````````````````````````````````````````````````````````````` | |
660 |
|
660 | |||
661 | Merge: |
|
661 | Merge: | |
662 | - one with change to a file (d) |
|
662 | - one with change to a file (d) | |
663 | - one overwriting that file with a rename (from h to i, to d) |
|
663 | - one overwriting that file with a rename (from h to i, to d) | |
664 |
|
664 | |||
665 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
665 | This case is similar to BF/FB, but an actual merge happens, so both side of the | |
666 | history are relevant. |
|
666 | history are relevant. | |
667 |
|
667 | |||
668 | Note: |
|
668 | Note: | |
669 | | In this case, the merge get conflicting information since on one side we have |
|
669 | | In this case, the merge get conflicting information since on one side we have | |
670 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
670 | | "a -> c -> d". and one the other one we have "h -> i -> d". | |
671 | | |
|
671 | | | |
672 | | The current code arbitrarily pick one side |
|
672 | | The current code arbitrarily pick one side | |
673 |
|
673 | |||
674 | $ case_desc="merge - G side: content change, F side: copy overwrite, no content change" |
|
674 | $ case_desc="merge - G side: content change, F side: copy overwrite, no content change" | |
675 |
|
675 | |||
676 | $ hg up 'desc("f-2")' |
|
676 | $ hg up 'desc("f-2")' | |
677 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
677 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
678 | $ hg merge 'desc("g-1")' --tool :union |
|
678 | $ hg merge 'desc("g-1")' --tool :union | |
679 | merging d (no-changeset !) |
|
679 | merging d (no-changeset !) | |
680 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
680 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
681 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
681 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
682 | (branch merge, don't forget to commit) |
|
682 | (branch merge, don't forget to commit) | |
683 | $ hg ci -m "mFGm-0 $case_desc - one way" |
|
683 | $ hg ci -m "mFGm-0 $case_desc - one way" | |
684 | created new head |
|
684 | created new head | |
685 | $ hg up 'desc("g-1")' |
|
685 | $ hg up 'desc("g-1")' | |
686 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
686 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
687 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
687 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
688 | $ hg merge 'desc("f-2")' --tool :union |
|
688 | $ hg merge 'desc("f-2")' --tool :union | |
689 | merging d (no-changeset !) |
|
689 | merging d (no-changeset !) | |
690 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
690 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
691 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
691 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
692 | (branch merge, don't forget to commit) |
|
692 | (branch merge, don't forget to commit) | |
693 | $ hg ci -m "mGFm-0 $case_desc - the other way" |
|
693 | $ hg ci -m "mGFm-0 $case_desc - the other way" | |
694 | created new head |
|
694 | created new head | |
695 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
695 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |
696 | @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
696 | @ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
697 | |\ |
|
697 | |\ | |
698 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
698 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
699 | | |/ |
|
699 | | |/ | |
700 | | o g-1: update d |
|
700 | | o g-1: update d | |
701 | | | |
|
701 | | | | |
702 | o | f-2: rename i -> d |
|
702 | o | f-2: rename i -> d | |
703 | | | |
|
703 | | | | |
704 | o | f-1: rename h -> i |
|
704 | o | f-1: rename h -> i | |
705 | |/ |
|
705 | |/ | |
706 | o i-2: c -move-> d, s -move-> t |
|
706 | o i-2: c -move-> d, s -move-> t | |
707 | | |
|
707 | | | |
708 | o i-1: a -move-> c, p -move-> s |
|
708 | o i-1: a -move-> c, p -move-> s | |
709 | | |
|
709 | | | |
710 | o i-0 initial commit: a b h p q r |
|
710 | o i-0 initial commit: a b h p q r | |
711 |
|
711 | |||
712 |
|
712 | |||
713 |
|
713 | |||
714 | Comparing with merging with a deletion (and keeping the file) |
|
714 | Comparing with merging with a deletion (and keeping the file) | |
715 | ------------------------------------------------------------- |
|
715 | ------------------------------------------------------------- | |
716 |
|
716 | |||
717 | Merge: |
|
717 | Merge: | |
718 | - one removing a file (d) |
|
718 | - one removing a file (d) | |
719 | - one updating that file |
|
719 | - one updating that file | |
720 | - the merge keep the modified version of the file (canceling the delete) |
|
720 | - the merge keep the modified version of the file (canceling the delete) | |
721 |
|
721 | |||
722 | In this case, the file keep on living after the merge. So we should not drop its |
|
722 | In this case, the file keep on living after the merge. So we should not drop its | |
723 | copy tracing chain. |
|
723 | copy tracing chain. | |
724 |
|
724 | |||
725 | $ case_desc="merge updated/deleted - revive the file (updated content)" |
|
725 | $ case_desc="merge updated/deleted - revive the file (updated content)" | |
726 |
|
726 | |||
727 | $ hg up 'desc("c-1")' |
|
727 | $ hg up 'desc("c-1")' | |
728 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
728 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
729 | $ hg merge 'desc("g-1")' |
|
729 | $ hg merge 'desc("g-1")' | |
730 | file 'd' was deleted in local [working copy] but was modified in other [merge rev]. |
|
730 | file 'd' was deleted in local [working copy] but was modified in other [merge rev]. | |
731 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
|
731 | You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. | |
732 | What do you want to do? u |
|
732 | What do you want to do? u | |
733 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
733 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
734 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
734 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
735 | [1] |
|
735 | [1] | |
736 | $ hg resolve -t :other d |
|
736 | $ hg resolve -t :other d | |
737 | (no more unresolved files) |
|
737 | (no more unresolved files) | |
738 | $ hg ci -m "mCGm-0 $case_desc - one way" |
|
738 | $ hg ci -m "mCGm-0 $case_desc - one way" | |
739 | created new head |
|
739 | created new head | |
740 |
|
740 | |||
741 | $ hg up 'desc("g-1")' |
|
741 | $ hg up 'desc("g-1")' | |
742 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
742 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
743 | $ hg merge 'desc("c-1")' |
|
743 | $ hg merge 'desc("c-1")' | |
744 | file 'd' was deleted in other [merge rev] but was modified in local [working copy]. |
|
744 | file 'd' was deleted in other [merge rev] but was modified in local [working copy]. | |
745 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
|
745 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. | |
746 | What do you want to do? u |
|
746 | What do you want to do? u | |
747 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
747 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
748 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
748 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
749 | [1] |
|
749 | [1] | |
750 | $ hg resolve -t :local d |
|
750 | $ hg resolve -t :local d | |
751 | (no more unresolved files) |
|
751 | (no more unresolved files) | |
752 | $ hg ci -m "mGCm-0 $case_desc - the other way" |
|
752 | $ hg ci -m "mGCm-0 $case_desc - the other way" | |
753 | created new head |
|
753 | created new head | |
754 |
|
754 | |||
755 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' |
|
755 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' | |
756 | @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
756 | @ mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | |
757 | |\ |
|
757 | |\ | |
758 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
758 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way | |
759 | | |/ |
|
759 | | |/ | |
760 | | o g-1: update d |
|
760 | | o g-1: update d | |
761 | | | |
|
761 | | | | |
762 | o | c-1 delete d |
|
762 | o | c-1 delete d | |
763 | |/ |
|
763 | |/ | |
764 | o i-2: c -move-> d, s -move-> t |
|
764 | o i-2: c -move-> d, s -move-> t | |
765 | | |
|
765 | | | |
766 | o i-1: a -move-> c, p -move-> s |
|
766 | o i-1: a -move-> c, p -move-> s | |
767 | | |
|
767 | | | |
768 | o i-0 initial commit: a b h p q r |
|
768 | o i-0 initial commit: a b h p q r | |
769 |
|
769 | |||
770 |
|
770 | |||
771 |
|
771 | |||
772 |
|
772 | |||
773 | Comparing with merge restoring an untouched deleted file |
|
773 | Comparing with merge restoring an untouched deleted file | |
774 | -------------------------------------------------------- |
|
774 | -------------------------------------------------------- | |
775 |
|
775 | |||
776 | Merge: |
|
776 | Merge: | |
777 | - one removing a file (d) |
|
777 | - one removing a file (d) | |
778 | - one leaving the file untouched |
|
778 | - one leaving the file untouched | |
779 | - the merge actively restore the file to the same content. |
|
779 | - the merge actively restore the file to the same content. | |
780 |
|
780 | |||
781 | In this case, the file keep on living after the merge. So we should not drop its |
|
781 | In this case, the file keep on living after the merge. So we should not drop its | |
782 | copy tracing chain. |
|
782 | copy tracing chain. | |
783 |
|
783 | |||
784 | $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" |
|
784 | $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" | |
785 |
|
785 | |||
786 | $ hg up 'desc("c-1")' |
|
786 | $ hg up 'desc("c-1")' | |
787 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
787 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
788 | $ hg merge 'desc("b-1")' |
|
788 | $ hg merge 'desc("b-1")' | |
789 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
789 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
790 | (branch merge, don't forget to commit) |
|
790 | (branch merge, don't forget to commit) | |
791 | $ hg revert --rev 'desc("b-1")' d |
|
791 | $ hg revert --rev 'desc("b-1")' d | |
792 | $ hg ci -m "mCB-revert-m-0 $case_desc - one way" |
|
792 | $ hg ci -m "mCB-revert-m-0 $case_desc - one way" | |
793 | created new head |
|
793 | created new head | |
794 |
|
794 | |||
795 | $ hg up 'desc("b-1")' |
|
795 | $ hg up 'desc("b-1")' | |
796 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
796 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
797 | $ hg merge 'desc("c-1")' |
|
797 | $ hg merge 'desc("c-1")' | |
798 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
798 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
799 | (branch merge, don't forget to commit) |
|
799 | (branch merge, don't forget to commit) | |
800 | $ hg revert --rev 'desc("b-1")' d |
|
800 | $ hg revert --rev 'desc("b-1")' d | |
801 | $ hg ci -m "mBC-revert-m-0 $case_desc - the other way" |
|
801 | $ hg ci -m "mBC-revert-m-0 $case_desc - the other way" | |
802 | created new head |
|
802 | created new head | |
803 |
|
803 | |||
804 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' |
|
804 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | |
805 | @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
805 | @ mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
806 | |\ |
|
806 | |\ | |
807 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
807 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
808 | | |/ |
|
808 | | |/ | |
809 | | o c-1 delete d |
|
809 | | o c-1 delete d | |
810 | | | |
|
810 | | | | |
811 | o | b-1: b update |
|
811 | o | b-1: b update | |
812 | |/ |
|
812 | |/ | |
813 | o i-2: c -move-> d, s -move-> t |
|
813 | o i-2: c -move-> d, s -move-> t | |
814 | | |
|
814 | | | |
815 | o i-1: a -move-> c, p -move-> s |
|
815 | o i-1: a -move-> c, p -move-> s | |
816 | | |
|
816 | | | |
817 | o i-0 initial commit: a b h p q r |
|
817 | o i-0 initial commit: a b h p q r | |
818 |
|
818 | |||
819 |
|
819 | |||
820 |
|
820 | |||
821 | $ hg up null --quiet |
|
821 | $ hg up null --quiet | |
822 |
|
822 | |||
823 | Merging a branch where a rename was deleted with a branch where the same file was renamed |
|
823 | Merging a branch where a rename was deleted with a branch where the same file was renamed | |
824 | ------------------------------------------------------------------------------------------ |
|
824 | ------------------------------------------------------------------------------------------ | |
825 |
|
825 | |||
826 | Create a "conflicting" merge where `d` get removed on one branch before its |
|
826 | Create a "conflicting" merge where `d` get removed on one branch before its | |
827 | rename information actually conflict with the other branch. |
|
827 | rename information actually conflict with the other branch. | |
828 |
|
828 | |||
829 | (the copy information from the branch that was not deleted should win). |
|
829 | (the copy information from the branch that was not deleted should win). | |
830 |
|
830 | |||
831 | $ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)" |
|
831 | $ case_desc="simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch)" | |
832 |
|
832 | |||
833 | $ hg up 'desc("i-0")' |
|
833 | $ hg up 'desc("i-0")' | |
834 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
834 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
835 | $ hg mv b d |
|
835 | $ hg mv b d | |
836 | $ hg ci -m "h-1: b -(move)-> d" |
|
836 | $ hg ci -m "h-1: b -(move)-> d" | |
837 | created new head |
|
837 | created new head | |
838 |
|
838 | |||
839 | $ hg up 'desc("c-1")' |
|
839 | $ hg up 'desc("c-1")' | |
840 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
840 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
841 | $ hg merge 'desc("h-1")' |
|
841 | $ hg merge 'desc("h-1")' | |
842 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
842 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
843 | (branch merge, don't forget to commit) |
|
843 | (branch merge, don't forget to commit) | |
844 | $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way" |
|
844 | $ hg ci -m "mCH-delete-before-conflict-m-0 $case_desc - one way" | |
845 |
|
845 | |||
846 | $ hg up 'desc("h-1")' |
|
846 | $ hg up 'desc("h-1")' | |
847 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
847 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
848 | $ hg merge 'desc("c-1")' |
|
848 | $ hg merge 'desc("c-1")' | |
849 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
849 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
850 | (branch merge, don't forget to commit) |
|
850 | (branch merge, don't forget to commit) | |
851 | $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way" |
|
851 | $ hg ci -m "mHC-delete-before-conflict-m-0 $case_desc - the other way" | |
852 | created new head |
|
852 | created new head | |
853 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' |
|
853 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' | |
854 | @ mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way |
|
854 | @ mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way | |
855 | |\ |
|
855 | |\ | |
856 | +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way |
|
856 | +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way | |
857 | | |/ |
|
857 | | |/ | |
858 | | o h-1: b -(move)-> d |
|
858 | | o h-1: b -(move)-> d | |
859 | | | |
|
859 | | | | |
860 | o | c-1 delete d |
|
860 | o | c-1 delete d | |
861 | | | |
|
861 | | | | |
862 | o | i-2: c -move-> d, s -move-> t |
|
862 | o | i-2: c -move-> d, s -move-> t | |
863 | | | |
|
863 | | | | |
864 | o | i-1: a -move-> c, p -move-> s |
|
864 | o | i-1: a -move-> c, p -move-> s | |
865 | |/ |
|
865 | |/ | |
866 | o i-0 initial commit: a b h p q r |
|
866 | o i-0 initial commit: a b h p q r | |
867 |
|
867 | |||
868 |
|
868 | |||
869 | Variant of previous with extra changes introduced by the merge |
|
869 | Variant of previous with extra changes introduced by the merge | |
870 | -------------------------------------------------------------- |
|
870 | -------------------------------------------------------------- | |
871 |
|
871 | |||
872 | Multiple cases above explicitely test cases where content are the same on both side during merge. In this section we will introduce variants for theses cases where new change are introduced to these file content during the merges. |
|
872 | Multiple cases above explicitely test cases where content are the same on both side during merge. In this section we will introduce variants for theses cases where new change are introduced to these file content during the merges. | |
873 |
|
873 | |||
874 |
|
874 | |||
875 | Subcase: merge has same initial content on both side, but merge introduced a change |
|
875 | Subcase: merge has same initial content on both side, but merge introduced a change | |
876 | ``````````````````````````````````````````````````````````````````````````````````` |
|
876 | ``````````````````````````````````````````````````````````````````````````````````` | |
877 |
|
877 | |||
878 | Same as `mAEm` and `mEAm` but with extra change to the file before commiting |
|
878 | Same as `mAEm` and `mEAm` but with extra change to the file before commiting | |
879 |
|
879 | |||
880 | - the "e-" branch renaming b to f (through 'g') |
|
880 | - the "e-" branch renaming b to f (through 'g') | |
881 | - the "a-" branch renaming d to f (through e) |
|
881 | - the "a-" branch renaming d to f (through e) | |
882 |
|
882 | |||
883 | $ case_desc="merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent)" |
|
883 | $ case_desc="merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent)" | |
884 |
|
884 | |||
885 | $ hg up 'desc("a-2")' |
|
885 | $ hg up 'desc("a-2")' | |
886 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
886 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
887 | $ hg merge 'desc("e-2")' |
|
887 | $ hg merge 'desc("e-2")' | |
888 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
888 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
889 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
889 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
890 | (branch merge, don't forget to commit) |
|
890 | (branch merge, don't forget to commit) | |
891 | $ echo "content change for mAE-change-m" > f |
|
891 | $ echo "content change for mAE-change-m" > f | |
892 | $ hg ci -m "mAE-change-m-0 $case_desc - one way" |
|
892 | $ hg ci -m "mAE-change-m-0 $case_desc - one way" | |
893 | created new head |
|
893 | created new head | |
894 | $ hg up 'desc("e-2")' |
|
894 | $ hg up 'desc("e-2")' | |
895 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
895 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
896 | $ hg merge 'desc("a-2")' |
|
896 | $ hg merge 'desc("a-2")' | |
897 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
897 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
898 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
898 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
899 | (branch merge, don't forget to commit) |
|
899 | (branch merge, don't forget to commit) | |
900 | $ echo "content change for mEA-change-m" > f |
|
900 | $ echo "content change for mEA-change-m" > f | |
901 | $ hg ci -m "mEA-change-m-0 $case_desc - the other way" |
|
901 | $ hg ci -m "mEA-change-m-0 $case_desc - the other way" | |
902 | created new head |
|
902 | created new head | |
903 | $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))' |
|
903 | $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))' | |
904 | @ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
904 | @ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way | |
905 | |\ |
|
905 | |\ | |
906 | +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way |
|
906 | +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way | |
907 | | |/ |
|
907 | | |/ | |
908 | | o e-2 g -move-> f |
|
908 | | o e-2 g -move-> f | |
909 | | | |
|
909 | | | | |
910 | | o e-1 b -move-> g |
|
910 | | o e-1 b -move-> g | |
911 | | | |
|
911 | | | | |
912 | o | a-2: e -move-> f |
|
912 | o | a-2: e -move-> f | |
913 | | | |
|
913 | | | | |
914 | o | a-1: d -move-> e |
|
914 | o | a-1: d -move-> e | |
915 | |/ |
|
915 | |/ | |
916 | o i-2: c -move-> d, s -move-> t |
|
916 | o i-2: c -move-> d, s -move-> t | |
917 | | |
|
917 | | | |
918 | o i-1: a -move-> c, p -move-> s |
|
918 | o i-1: a -move-> c, p -move-> s | |
919 | | |
|
919 | | | |
920 | o i-0 initial commit: a b h p q r |
|
920 | o i-0 initial commit: a b h p q r | |
921 |
|
921 | |||
922 |
|
922 | |||
923 | Subcase: merge overwrite common copy information, but with extra change during the merge |
|
923 | Subcase: merge overwrite common copy information, but with extra change during the merge | |
924 | ```````````````````````````````````````````````````````````````````````````````````````` |
|
924 | ```````````````````````````````````````````````````````````````````````````````````````` | |
925 |
|
925 | |||
926 | Merge: |
|
926 | Merge: | |
927 | - one with change to an unrelated file (b) |
|
927 | - one with change to an unrelated file (b) | |
928 | - one overwriting a file (d) with a rename (from h to i to d) |
|
928 | - one overwriting a file (d) with a rename (from h to i to d) | |
929 | - the merge update f content |
|
929 | - the merge update f content | |
930 |
|
930 | |||
931 | $ case_desc="merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" |
|
931 | $ case_desc="merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d)" | |
932 |
|
932 | |||
933 | $ hg up 'desc("f-2")' |
|
933 | $ hg up 'desc("f-2")' | |
934 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
934 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
935 | #if no-changeset |
|
935 | #if no-changeset | |
936 | $ hg debugindex d | "$PYTHON" ../no-linkrev |
|
936 | $ hg debugindex d | "$PYTHON" ../no-linkrev | |
937 | rev linkrev nodeid p1 p2 |
|
937 | rev linkrev nodeid p1 p2 | |
938 | 0 * d8252ab2e760 000000000000 000000000000 |
|
938 | 0 * d8252ab2e760 000000000000 000000000000 | |
939 | 1 * b004912a8510 000000000000 000000000000 |
|
939 | 1 * b004912a8510 000000000000 000000000000 | |
940 | 2 * 7b79e2fe0c89 000000000000 000000000000 |
|
940 | 2 * 7b79e2fe0c89 000000000000 000000000000 | |
941 | 3 * 17ec97e60577 d8252ab2e760 000000000000 |
|
941 | 3 * 17ec97e60577 d8252ab2e760 000000000000 | |
942 | 4 * 06dabf50734c b004912a8510 17ec97e60577 |
|
942 | 4 * 06dabf50734c b004912a8510 17ec97e60577 | |
943 | 5 * 19c0e3924691 17ec97e60577 b004912a8510 |
|
943 | 5 * 19c0e3924691 17ec97e60577 b004912a8510 | |
944 | 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 |
|
944 | 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 | |
945 | 7 * d55cb4e9ef57 000000000000 000000000000 |
|
945 | 7 * d55cb4e9ef57 000000000000 000000000000 | |
946 | #else |
|
946 | #else | |
947 | $ hg debugindex d | "$PYTHON" ../no-linkrev |
|
947 | $ hg debugindex d | "$PYTHON" ../no-linkrev | |
948 | rev linkrev nodeid p1 p2 |
|
948 | rev linkrev nodeid p1 p2 | |
949 | 0 * ae258f702dfe 000000000000 000000000000 |
|
949 | 0 * ae258f702dfe 000000000000 000000000000 | |
950 | 1 * b004912a8510 000000000000 000000000000 |
|
950 | 1 * b004912a8510 000000000000 000000000000 | |
951 | 2 * 5cce88bf349f ae258f702dfe 000000000000 |
|
951 | 2 * 5cce88bf349f ae258f702dfe 000000000000 | |
952 | 3 * cc269dd788c8 b004912a8510 5cce88bf349f |
|
952 | 3 * cc269dd788c8 b004912a8510 5cce88bf349f | |
953 | 4 * 51c91a115080 5cce88bf349f b004912a8510 |
|
953 | 4 * 51c91a115080 5cce88bf349f b004912a8510 | |
954 | #endif |
|
954 | #endif | |
955 | $ hg up 'desc("b-1")' |
|
955 | $ hg up 'desc("b-1")' | |
956 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
956 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
957 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
957 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
958 | $ hg merge 'desc("f-2")' |
|
958 | $ hg merge 'desc("f-2")' | |
959 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
959 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
960 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
960 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
961 | (branch merge, don't forget to commit) |
|
961 | (branch merge, don't forget to commit) | |
962 | $ echo "extra-change to (formelly h) during the merge" > d |
|
962 | $ echo "extra-change to (formelly h) during the merge" > d | |
963 | $ hg ci -m "mBF-change-m-0 $case_desc - one way" |
|
963 | $ hg ci -m "mBF-change-m-0 $case_desc - one way" | |
964 | created new head |
|
964 | created new head | |
965 | $ hg manifest --rev . --debug | grep " d" |
|
965 | $ hg manifest --rev . --debug | grep " d" | |
966 | 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !) |
|
966 | 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !) | |
967 | cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) |
|
967 | cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) | |
968 |
|
968 | |||
969 | $ hg up 'desc("f-2")' |
|
969 | $ hg up 'desc("f-2")' | |
970 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
970 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
971 | $ hg merge 'desc("b-1")' |
|
971 | $ hg merge 'desc("b-1")' | |
972 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
972 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
973 | (branch merge, don't forget to commit) |
|
973 | (branch merge, don't forget to commit) | |
974 | $ echo "extra-change to (formelly h) during the merge" > d |
|
974 | $ echo "extra-change to (formelly h) during the merge" > d | |
975 | $ hg ci -m "mFB-change-m-0 $case_desc - the other way" |
|
975 | $ hg ci -m "mFB-change-m-0 $case_desc - the other way" | |
976 | created new head |
|
976 | created new head | |
977 | $ hg manifest --rev . --debug | grep " d" |
|
977 | $ hg manifest --rev . --debug | grep " d" | |
978 | 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !) |
|
978 | 1c334238bd42ec85c6a0d83fd1b2a898a6a3215d 644 d (no-changeset !) | |
979 | cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) |
|
979 | cea2d99c0fde64672ef61953786fdff34f16e230 644 d (changeset !) | |
980 | #if no-changeset |
|
980 | #if no-changeset | |
981 | $ hg debugindex d | "$PYTHON" ../no-linkrev |
|
981 | $ hg debugindex d | "$PYTHON" ../no-linkrev | |
982 | rev linkrev nodeid p1 p2 |
|
982 | rev linkrev nodeid p1 p2 | |
983 | 0 * d8252ab2e760 000000000000 000000000000 |
|
983 | 0 * d8252ab2e760 000000000000 000000000000 | |
984 | 1 * b004912a8510 000000000000 000000000000 |
|
984 | 1 * b004912a8510 000000000000 000000000000 | |
985 | 2 * 7b79e2fe0c89 000000000000 000000000000 |
|
985 | 2 * 7b79e2fe0c89 000000000000 000000000000 | |
986 | 3 * 17ec97e60577 d8252ab2e760 000000000000 |
|
986 | 3 * 17ec97e60577 d8252ab2e760 000000000000 | |
987 | 4 * 06dabf50734c b004912a8510 17ec97e60577 |
|
987 | 4 * 06dabf50734c b004912a8510 17ec97e60577 | |
988 | 5 * 19c0e3924691 17ec97e60577 b004912a8510 |
|
988 | 5 * 19c0e3924691 17ec97e60577 b004912a8510 | |
989 | 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 |
|
989 | 6 * 89c873a01d97 7b79e2fe0c89 17ec97e60577 | |
990 | 7 * d55cb4e9ef57 000000000000 000000000000 |
|
990 | 7 * d55cb4e9ef57 000000000000 000000000000 | |
991 | 8 * 1c334238bd42 7b79e2fe0c89 000000000000 |
|
991 | 8 * 1c334238bd42 7b79e2fe0c89 000000000000 | |
992 | #else |
|
992 | #else | |
993 | $ hg debugindex d | "$PYTHON" ../no-linkrev |
|
993 | $ hg debugindex d | "$PYTHON" ../no-linkrev | |
994 | rev linkrev nodeid p1 p2 |
|
994 | rev linkrev nodeid p1 p2 | |
995 | 0 * ae258f702dfe 000000000000 000000000000 |
|
995 | 0 * ae258f702dfe 000000000000 000000000000 | |
996 | 1 * b004912a8510 000000000000 000000000000 |
|
996 | 1 * b004912a8510 000000000000 000000000000 | |
997 | 2 * 5cce88bf349f ae258f702dfe 000000000000 |
|
997 | 2 * 5cce88bf349f ae258f702dfe 000000000000 | |
998 | 3 * cc269dd788c8 b004912a8510 5cce88bf349f |
|
998 | 3 * cc269dd788c8 b004912a8510 5cce88bf349f | |
999 | 4 * 51c91a115080 5cce88bf349f b004912a8510 |
|
999 | 4 * 51c91a115080 5cce88bf349f b004912a8510 | |
1000 | 5 * cea2d99c0fde ae258f702dfe 000000000000 |
|
1000 | 5 * cea2d99c0fde ae258f702dfe 000000000000 | |
1001 | #endif |
|
1001 | #endif | |
1002 | $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))' |
|
1002 | $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))' | |
1003 | @ mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
1003 | @ mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
1004 | |\ |
|
1004 | |\ | |
1005 | +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1005 | +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
1006 | | |/ |
|
1006 | | |/ | |
1007 | | o f-2: rename i -> d |
|
1007 | | o f-2: rename i -> d | |
1008 | | | |
|
1008 | | | | |
1009 | | o f-1: rename h -> i |
|
1009 | | o f-1: rename h -> i | |
1010 | | | |
|
1010 | | | | |
1011 | o | b-1: b update |
|
1011 | o | b-1: b update | |
1012 | |/ |
|
1012 | |/ | |
1013 | o i-2: c -move-> d, s -move-> t |
|
1013 | o i-2: c -move-> d, s -move-> t | |
1014 | | |
|
1014 | | | |
1015 | o i-1: a -move-> c, p -move-> s |
|
1015 | o i-1: a -move-> c, p -move-> s | |
1016 | | |
|
1016 | | | |
1017 | o i-0 initial commit: a b h p q r |
|
1017 | o i-0 initial commit: a b h p q r | |
1018 |
|
1018 | |||
1019 |
|
1019 | |||
1020 | Subcase: restoring and untouched deleted file, while touching it |
|
1020 | Subcase: restoring and untouched deleted file, while touching it | |
1021 | ```````````````````````````````````````````````````````````````` |
|
1021 | ```````````````````````````````````````````````````````````````` | |
1022 |
|
1022 | |||
1023 | Merge: |
|
1023 | Merge: | |
1024 | - one removing a file (d) |
|
1024 | - one removing a file (d) | |
1025 | - one leaving the file untouched |
|
1025 | - one leaving the file untouched | |
1026 | - the merge actively restore the file to the same content. |
|
1026 | - the merge actively restore the file to the same content. | |
1027 |
|
1027 | |||
1028 | In this case, the file keep on living after the merge. So we should not drop its |
|
1028 | In this case, the file keep on living after the merge. So we should not drop its | |
1029 | copy tracing chain. |
|
1029 | copy tracing chain. | |
1030 |
|
1030 | |||
1031 | $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" |
|
1031 | $ case_desc="merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge)" | |
1032 |
|
1032 | |||
1033 | $ hg up 'desc("c-1")' |
|
1033 | $ hg up 'desc("c-1")' | |
1034 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1034 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1035 | $ hg merge 'desc("b-1")' |
|
1035 | $ hg merge 'desc("b-1")' | |
1036 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1036 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1037 | (branch merge, don't forget to commit) |
|
1037 | (branch merge, don't forget to commit) | |
1038 | $ hg revert --rev 'desc("b-1")' d |
|
1038 | $ hg revert --rev 'desc("b-1")' d | |
1039 | $ echo "new content for d after the revert" > d |
|
1039 | $ echo "new content for d after the revert" > d | |
1040 | $ hg ci -m "mCB-change-m-0 $case_desc - one way" |
|
1040 | $ hg ci -m "mCB-change-m-0 $case_desc - one way" | |
1041 | created new head |
|
1041 | created new head | |
1042 | $ hg manifest --rev . --debug | grep " d" |
|
1042 | $ hg manifest --rev . --debug | grep " d" | |
1043 | e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !) |
|
1043 | e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !) | |
1044 | 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !) |
|
1044 | 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !) | |
1045 |
|
1045 | |||
1046 | $ hg up 'desc("b-1")' |
|
1046 | $ hg up 'desc("b-1")' | |
1047 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1047 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1048 | $ hg merge 'desc("c-1")' |
|
1048 | $ hg merge 'desc("c-1")' | |
1049 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1049 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1050 | (branch merge, don't forget to commit) |
|
1050 | (branch merge, don't forget to commit) | |
1051 | $ hg revert --rev 'desc("b-1")' d |
|
1051 | $ hg revert --rev 'desc("b-1")' d | |
1052 | $ echo "new content for d after the revert" > d |
|
1052 | $ echo "new content for d after the revert" > d | |
1053 | $ hg ci -m "mBC-change-m-0 $case_desc - the other way" |
|
1053 | $ hg ci -m "mBC-change-m-0 $case_desc - the other way" | |
1054 | created new head |
|
1054 | created new head | |
1055 | $ hg manifest --rev . --debug | grep " d" |
|
1055 | $ hg manifest --rev . --debug | grep " d" | |
1056 | e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !) |
|
1056 | e333780c17752a3b0dd15e3ad48aa4e5c745f621 644 d (no-changeset !) | |
1057 | 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !) |
|
1057 | 4b540a18ad699234b2b2aa18cb69555ac9c4b1df 644 d (changeset !) | |
1058 |
|
1058 | |||
1059 |
|
1059 | |||
1060 | $ hg up null --quiet |
|
1060 | $ hg up null --quiet | |
1061 | $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))' |
|
1061 | $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))' | |
1062 | o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
1062 | o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
1063 | |\ |
|
1063 | |\ | |
1064 | +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1064 | +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
1065 | | |/ |
|
1065 | | |/ | |
1066 | | o c-1 delete d |
|
1066 | | o c-1 delete d | |
1067 | | | |
|
1067 | | | | |
1068 | o | b-1: b update |
|
1068 | o | b-1: b update | |
1069 | |/ |
|
1069 | |/ | |
1070 | o i-2: c -move-> d, s -move-> t |
|
1070 | o i-2: c -move-> d, s -move-> t | |
1071 | | |
|
1071 | | | |
1072 | o i-1: a -move-> c, p -move-> s |
|
1072 | o i-1: a -move-> c, p -move-> s | |
1073 | | |
|
1073 | | | |
1074 | o i-0 initial commit: a b h p q r |
|
1074 | o i-0 initial commit: a b h p q r | |
1075 |
|
1075 | |||
1076 |
|
1076 | |||
1077 | Decision from previous merge are properly chained with later merge |
|
1077 | Decision from previous merge are properly chained with later merge | |
1078 | ------------------------------------------------------------------ |
|
1078 | ------------------------------------------------------------------ | |
1079 |
|
1079 | |||
1080 | Subcase: chaining conflicting rename resolution |
|
1080 | Subcase: chaining conflicting rename resolution | |
1081 | ``````````````````````````````````````````````` |
|
1081 | ``````````````````````````````````````````````` | |
1082 |
|
1082 | |||
1083 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We |
|
1083 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We | |
1084 | add more change on the respective branch and merge again. These second merge |
|
1084 | add more change on the respective branch and merge again. These second merge | |
1085 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
1085 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" | |
1086 | about that file should stay unchanged. |
|
1086 | about that file should stay unchanged. | |
1087 |
|
1087 | |||
1088 | We also touch J during some of the merge to check for unrelated change to new file during merge. |
|
1088 | We also touch J during some of the merge to check for unrelated change to new file during merge. | |
1089 |
|
1089 | |||
1090 | $ case_desc="chained merges (conflict -> simple) - same content everywhere" |
|
1090 | $ case_desc="chained merges (conflict -> simple) - same content everywhere" | |
1091 |
|
1091 | |||
1092 | (extra unrelated changes) |
|
1092 | (extra unrelated changes) | |
1093 |
|
1093 | |||
1094 | $ hg up 'desc("a-2")' |
|
1094 | $ hg up 'desc("a-2")' | |
1095 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1095 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1096 | $ echo j > unrelated-j |
|
1096 | $ echo j > unrelated-j | |
1097 | $ hg add unrelated-j |
|
1097 | $ hg add unrelated-j | |
1098 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' |
|
1098 | $ hg ci -m 'j-1: unrelated changes (based on the "a" series of changes)' | |
1099 | created new head |
|
1099 | created new head | |
1100 |
|
1100 | |||
1101 | $ hg up 'desc("e-2")' |
|
1101 | $ hg up 'desc("e-2")' | |
1102 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
1102 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |
1103 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
1103 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |
1104 | $ echo k > unrelated-k |
|
1104 | $ echo k > unrelated-k | |
1105 | $ hg add unrelated-k |
|
1105 | $ hg add unrelated-k | |
1106 | $ hg ci -m 'k-1: unrelated changes (based on "e" changes)' |
|
1106 | $ hg ci -m 'k-1: unrelated changes (based on "e" changes)' | |
1107 | created new head |
|
1107 | created new head | |
1108 |
|
1108 | |||
1109 | (merge variant 1) |
|
1109 | (merge variant 1) | |
1110 |
|
1110 | |||
1111 | $ hg up 'desc("mAEm")' |
|
1111 | $ hg up 'desc("mAEm")' | |
1112 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
1112 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |
1113 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
1113 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |
1114 | $ hg merge 'desc("k-1")' |
|
1114 | $ hg merge 'desc("k-1")' | |
1115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1116 | (branch merge, don't forget to commit) |
|
1116 | (branch merge, don't forget to commit) | |
1117 | $ hg ci -m "mAE,Km: $case_desc" |
|
1117 | $ hg ci -m "mAE,Km: $case_desc" | |
1118 |
|
1118 | |||
1119 | (merge variant 2) |
|
1119 | (merge variant 2) | |
1120 |
|
1120 | |||
1121 | $ hg up 'desc("k-1")' |
|
1121 | $ hg up 'desc("k-1")' | |
1122 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
1122 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
1123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
1123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
1124 |
|
1124 | |||
1125 | $ hg merge 'desc("mAEm")' |
|
1125 | $ hg merge 'desc("mAEm")' | |
1126 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
1126 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
1127 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
1127 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
1128 | (branch merge, don't forget to commit) |
|
1128 | (branch merge, don't forget to commit) | |
1129 | $ hg ci -m "mK,AEm: $case_desc" |
|
1129 | $ hg ci -m "mK,AEm: $case_desc" | |
1130 | created new head |
|
1130 | created new head | |
1131 |
|
1131 | |||
1132 | (merge variant 3) |
|
1132 | (merge variant 3) | |
1133 |
|
1133 | |||
1134 | $ hg up 'desc("mEAm")' |
|
1134 | $ hg up 'desc("mEAm")' | |
1135 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1135 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1136 | $ hg merge 'desc("j-1")' |
|
1136 | $ hg merge 'desc("j-1")' | |
1137 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1137 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1138 | (branch merge, don't forget to commit) |
|
1138 | (branch merge, don't forget to commit) | |
1139 | $ echo jj > unrelated-j |
|
1139 | $ echo jj > unrelated-j | |
1140 | $ hg ci -m "mEA,Jm: $case_desc" |
|
1140 | $ hg ci -m "mEA,Jm: $case_desc" | |
1141 |
|
1141 | |||
1142 | (merge variant 4) |
|
1142 | (merge variant 4) | |
1143 |
|
1143 | |||
1144 | $ hg up 'desc("j-1")' |
|
1144 | $ hg up 'desc("j-1")' | |
1145 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
1145 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
1146 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
1146 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
1147 | $ hg merge 'desc("mEAm")' |
|
1147 | $ hg merge 'desc("mEAm")' | |
1148 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
1148 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
1149 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
1149 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
1150 | (branch merge, don't forget to commit) |
|
1150 | (branch merge, don't forget to commit) | |
1151 | $ echo jj > unrelated-j |
|
1151 | $ echo jj > unrelated-j | |
1152 | $ hg ci -m "mJ,EAm: $case_desc" |
|
1152 | $ hg ci -m "mJ,EAm: $case_desc" | |
1153 | created new head |
|
1153 | created new head | |
1154 |
|
1154 | |||
1155 |
|
1155 | |||
1156 | $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))' |
|
1156 | $ hg log -G --rev '::(desc("mAE,Km") + desc("mK,AEm") + desc("mEA,Jm") + desc("mJ,EAm"))' | |
1157 | @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere |
|
1157 | @ mJ,EAm: chained merges (conflict -> simple) - same content everywhere | |
1158 | |\ |
|
1158 | |\ | |
1159 | +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere |
|
1159 | +---o mEA,Jm: chained merges (conflict -> simple) - same content everywhere | |
1160 | | |/ |
|
1160 | | |/ | |
1161 | | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere |
|
1161 | | | o mK,AEm: chained merges (conflict -> simple) - same content everywhere | |
1162 | | | |\ |
|
1162 | | | |\ | |
1163 | | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere |
|
1163 | | | +---o mAE,Km: chained merges (conflict -> simple) - same content everywhere | |
1164 | | | | |/ |
|
1164 | | | | |/ | |
1165 | | | | o k-1: unrelated changes (based on "e" changes) |
|
1165 | | | | o k-1: unrelated changes (based on "e" changes) | |
1166 | | | | | |
|
1166 | | | | | | |
1167 | | o | | j-1: unrelated changes (based on the "a" series of changes) |
|
1167 | | o | | j-1: unrelated changes (based on the "a" series of changes) | |
1168 | | | | | |
|
1168 | | | | | | |
1169 | o-----+ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
1169 | o-----+ mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way | |
1170 | |/ / / |
|
1170 | |/ / / | |
1171 | | o / mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
1171 | | o / mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way | |
1172 | |/|/ |
|
1172 | |/|/ | |
1173 | | o e-2 g -move-> f |
|
1173 | | o e-2 g -move-> f | |
1174 | | | |
|
1174 | | | | |
1175 | | o e-1 b -move-> g |
|
1175 | | o e-1 b -move-> g | |
1176 | | | |
|
1176 | | | | |
1177 | o | a-2: e -move-> f |
|
1177 | o | a-2: e -move-> f | |
1178 | | | |
|
1178 | | | | |
1179 | o | a-1: d -move-> e |
|
1179 | o | a-1: d -move-> e | |
1180 | |/ |
|
1180 | |/ | |
1181 | o i-2: c -move-> d, s -move-> t |
|
1181 | o i-2: c -move-> d, s -move-> t | |
1182 | | |
|
1182 | | | |
1183 | o i-1: a -move-> c, p -move-> s |
|
1183 | o i-1: a -move-> c, p -move-> s | |
1184 | | |
|
1184 | | | |
1185 | o i-0 initial commit: a b h p q r |
|
1185 | o i-0 initial commit: a b h p q r | |
1186 |
|
1186 | |||
1187 |
|
1187 | |||
1188 | Subcase: chaining conflicting rename resolution, with actual merging happening |
|
1188 | Subcase: chaining conflicting rename resolution, with actual merging happening | |
1189 | `````````````````````````````````````````````````````````````````````````````` |
|
1189 | `````````````````````````````````````````````````````````````````````````````` | |
1190 |
|
1190 | |||
1191 | The "mPQm" and "mQPm" case create a rename tracking conflict on file 't'. We |
|
1191 | The "mPQm" and "mQPm" case create a rename tracking conflict on file 't'. We | |
1192 | add more change on the respective branch and merge again. These second merge |
|
1192 | add more change on the respective branch and merge again. These second merge | |
1193 | does not involve the file 't' and the arbitration done within "mPQm" and "mQP" |
|
1193 | does not involve the file 't' and the arbitration done within "mPQm" and "mQP" | |
1194 | about that file should stay unchanged. |
|
1194 | about that file should stay unchanged. | |
1195 |
|
1195 | |||
1196 | $ case_desc="chained merges (conflict -> simple) - different content" |
|
1196 | $ case_desc="chained merges (conflict -> simple) - different content" | |
1197 |
|
1197 | |||
1198 | (extra unrelated changes) |
|
1198 | (extra unrelated changes) | |
1199 |
|
1199 | |||
1200 | $ hg up 'desc("p-2")' |
|
1200 | $ hg up 'desc("p-2")' | |
1201 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1201 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
1202 | $ echo s > unrelated-s |
|
1202 | $ echo s > unrelated-s | |
1203 | $ hg add unrelated-s |
|
1203 | $ hg add unrelated-s | |
1204 | $ hg ci -m 's-1: unrelated changes (based on the "p" series of changes)' |
|
1204 | $ hg ci -m 's-1: unrelated changes (based on the "p" series of changes)' | |
1205 | created new head |
|
1205 | created new head | |
1206 |
|
1206 | |||
1207 | $ hg up 'desc("q-2")' |
|
1207 | $ hg up 'desc("q-2")' | |
1208 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1208 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1209 | $ echo t > unrelated-t |
|
1209 | $ echo t > unrelated-t | |
1210 | $ hg add unrelated-t |
|
1210 | $ hg add unrelated-t | |
1211 | $ hg ci -m 't-1: unrelated changes (based on "q" changes)' |
|
1211 | $ hg ci -m 't-1: unrelated changes (based on "q" changes)' | |
1212 | created new head |
|
1212 | created new head | |
1213 |
|
1213 | |||
1214 | (merge variant 1) |
|
1214 | (merge variant 1) | |
1215 |
|
1215 | |||
1216 | $ hg up 'desc("mPQm")' |
|
1216 | $ hg up 'desc("mPQm")' | |
1217 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1217 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1218 | $ hg merge 'desc("t-1")' |
|
1218 | $ hg merge 'desc("t-1")' | |
1219 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1219 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1220 | (branch merge, don't forget to commit) |
|
1220 | (branch merge, don't forget to commit) | |
1221 | $ hg ci -m "mPQ,Tm: $case_desc" |
|
1221 | $ hg ci -m "mPQ,Tm: $case_desc" | |
1222 |
|
1222 | |||
1223 | (merge variant 2) |
|
1223 | (merge variant 2) | |
1224 |
|
1224 | |||
1225 | $ hg up 'desc("t-1")' |
|
1225 | $ hg up 'desc("t-1")' | |
1226 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1226 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1227 |
|
1227 | |||
1228 | $ hg merge 'desc("mPQm")' |
|
1228 | $ hg merge 'desc("mPQm")' | |
1229 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1229 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1230 | (branch merge, don't forget to commit) |
|
1230 | (branch merge, don't forget to commit) | |
1231 | $ hg ci -m "mT,PQm: $case_desc" |
|
1231 | $ hg ci -m "mT,PQm: $case_desc" | |
1232 | created new head |
|
1232 | created new head | |
1233 |
|
1233 | |||
1234 | (merge variant 3) |
|
1234 | (merge variant 3) | |
1235 |
|
1235 | |||
1236 | $ hg up 'desc("mQPm")' |
|
1236 | $ hg up 'desc("mQPm")' | |
1237 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1237 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1238 | $ hg merge 'desc("s-1")' |
|
1238 | $ hg merge 'desc("s-1")' | |
1239 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1239 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1240 | (branch merge, don't forget to commit) |
|
1240 | (branch merge, don't forget to commit) | |
1241 | $ hg ci -m "mQP,Sm: $case_desc" |
|
1241 | $ hg ci -m "mQP,Sm: $case_desc" | |
1242 |
|
1242 | |||
1243 | (merge variant 4) |
|
1243 | (merge variant 4) | |
1244 |
|
1244 | |||
1245 | $ hg up 'desc("s-1")' |
|
1245 | $ hg up 'desc("s-1")' | |
1246 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1246 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1247 | $ hg merge 'desc("mQPm")' |
|
1247 | $ hg merge 'desc("mQPm")' | |
1248 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1248 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1249 | (branch merge, don't forget to commit) |
|
1249 | (branch merge, don't forget to commit) | |
1250 | $ hg ci -m "mS,QPm: $case_desc" |
|
1250 | $ hg ci -m "mS,QPm: $case_desc" | |
1251 | created new head |
|
1251 | created new head | |
1252 | $ hg up null --quiet |
|
1252 | $ hg up null --quiet | |
1253 |
|
1253 | |||
1254 |
|
1254 | |||
1255 | $ hg log -G --rev '::(desc("mPQ,Tm") + desc("mT,PQm") + desc("mQP,Sm") + desc("mS,QPm"))' |
|
1255 | $ hg log -G --rev '::(desc("mPQ,Tm") + desc("mT,PQm") + desc("mQP,Sm") + desc("mS,QPm"))' | |
1256 | o mS,QPm: chained merges (conflict -> simple) - different content |
|
1256 | o mS,QPm: chained merges (conflict -> simple) - different content | |
1257 | |\ |
|
1257 | |\ | |
1258 | +---o mQP,Sm: chained merges (conflict -> simple) - different content |
|
1258 | +---o mQP,Sm: chained merges (conflict -> simple) - different content | |
1259 | | |/ |
|
1259 | | |/ | |
1260 | | | o mT,PQm: chained merges (conflict -> simple) - different content |
|
1260 | | | o mT,PQm: chained merges (conflict -> simple) - different content | |
1261 | | | |\ |
|
1261 | | | |\ | |
1262 | | | +---o mPQ,Tm: chained merges (conflict -> simple) - different content |
|
1262 | | | +---o mPQ,Tm: chained merges (conflict -> simple) - different content | |
1263 | | | | |/ |
|
1263 | | | | |/ | |
1264 | | | | o t-1: unrelated changes (based on "q" changes) |
|
1264 | | | | o t-1: unrelated changes (based on "q" changes) | |
1265 | | | | | |
|
1265 | | | | | | |
1266 | | o | | s-1: unrelated changes (based on the "p" series of changes) |
|
1266 | | o | | s-1: unrelated changes (based on the "p" series of changes) | |
1267 | | | | | |
|
1267 | | | | | | |
1268 | o-----+ mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way |
|
1268 | o-----+ mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way | |
1269 | |/ / / |
|
1269 | |/ / / | |
1270 | | o / mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way |
|
1270 | | o / mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way | |
1271 | |/|/ |
|
1271 | |/|/ | |
1272 | | o q-2 w -move-> v |
|
1272 | | o q-2 w -move-> v | |
1273 | | | |
|
1273 | | | | |
1274 | | o q-1 r -move-> w |
|
1274 | | o q-1 r -move-> w | |
1275 | | | |
|
1275 | | | | |
1276 | o | p-2: u -move-> v |
|
1276 | o | p-2: u -move-> v | |
1277 | | | |
|
1277 | | | | |
1278 | o | p-1: t -move-> u |
|
1278 | o | p-1: t -move-> u | |
1279 | |/ |
|
1279 | |/ | |
1280 | o i-2: c -move-> d, s -move-> t |
|
1280 | o i-2: c -move-> d, s -move-> t | |
1281 | | |
|
1281 | | | |
1282 | o i-1: a -move-> c, p -move-> s |
|
1282 | o i-1: a -move-> c, p -move-> s | |
1283 | | |
|
1283 | | | |
1284 | o i-0 initial commit: a b h p q r |
|
1284 | o i-0 initial commit: a b h p q r | |
1285 |
|
1285 | |||
1286 |
|
1286 | |||
1287 | Subcase: chaining salvage information during a merge |
|
1287 | Subcase: chaining salvage information during a merge | |
1288 | ```````````````````````````````````````````````````` |
|
1288 | ```````````````````````````````````````````````````` | |
1289 |
|
1289 | |||
1290 | We add more change on the branch were the file was deleted. merging again |
|
1290 | We add more change on the branch were the file was deleted. merging again | |
1291 | should preserve the fact eh file was salvaged. |
|
1291 | should preserve the fact eh file was salvaged. | |
1292 |
|
1292 | |||
1293 | $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)" |
|
1293 | $ case_desc="chained merges (salvaged -> simple) - same content (when the file exists)" | |
1294 |
|
1294 | |||
1295 | (creating the change) |
|
1295 | (creating the change) | |
1296 |
|
1296 | |||
1297 | $ hg up 'desc("c-1")' |
|
1297 | $ hg up 'desc("c-1")' | |
1298 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1298 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1299 | $ echo l > unrelated-l |
|
1299 | $ echo l > unrelated-l | |
1300 | $ hg add unrelated-l |
|
1300 | $ hg add unrelated-l | |
1301 | $ hg ci -m 'l-1: unrelated changes (based on "c" changes)' |
|
1301 | $ hg ci -m 'l-1: unrelated changes (based on "c" changes)' | |
1302 | created new head |
|
1302 | created new head | |
1303 |
|
1303 | |||
1304 | (Merge variant 1) |
|
1304 | (Merge variant 1) | |
1305 |
|
1305 | |||
1306 | $ hg up 'desc("mBC-revert-m")' |
|
1306 | $ hg up 'desc("mBC-revert-m")' | |
1307 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1307 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1308 | $ hg merge 'desc("l-1")' |
|
1308 | $ hg merge 'desc("l-1")' | |
1309 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1309 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1310 | (branch merge, don't forget to commit) |
|
1310 | (branch merge, don't forget to commit) | |
1311 | $ hg ci -m "mBC+revert,Lm: $case_desc" |
|
1311 | $ hg ci -m "mBC+revert,Lm: $case_desc" | |
1312 |
|
1312 | |||
1313 | (Merge variant 2) |
|
1313 | (Merge variant 2) | |
1314 |
|
1314 | |||
1315 | $ hg up 'desc("mCB-revert-m")' |
|
1315 | $ hg up 'desc("mCB-revert-m")' | |
1316 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1316 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1317 | $ hg merge 'desc("l-1")' |
|
1317 | $ hg merge 'desc("l-1")' | |
1318 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1318 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1319 | (branch merge, don't forget to commit) |
|
1319 | (branch merge, don't forget to commit) | |
1320 | $ hg ci -m "mCB+revert,Lm: $case_desc" |
|
1320 | $ hg ci -m "mCB+revert,Lm: $case_desc" | |
1321 |
|
1321 | |||
1322 | (Merge variant 3) |
|
1322 | (Merge variant 3) | |
1323 |
|
1323 | |||
1324 | $ hg up 'desc("l-1")' |
|
1324 | $ hg up 'desc("l-1")' | |
1325 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1325 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1326 |
|
1326 | |||
1327 | $ hg merge 'desc("mBC-revert-m")' |
|
1327 | $ hg merge 'desc("mBC-revert-m")' | |
1328 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1328 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1329 | (branch merge, don't forget to commit) |
|
1329 | (branch merge, don't forget to commit) | |
1330 | $ hg ci -m "mL,BC+revertm: $case_desc" |
|
1330 | $ hg ci -m "mL,BC+revertm: $case_desc" | |
1331 | created new head |
|
1331 | created new head | |
1332 |
|
1332 | |||
1333 | (Merge variant 4) |
|
1333 | (Merge variant 4) | |
1334 |
|
1334 | |||
1335 | $ hg up 'desc("l-1")' |
|
1335 | $ hg up 'desc("l-1")' | |
1336 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1336 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1337 |
|
1337 | |||
1338 | $ hg merge 'desc("mCB-revert-m")' |
|
1338 | $ hg merge 'desc("mCB-revert-m")' | |
1339 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1339 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1340 | (branch merge, don't forget to commit) |
|
1340 | (branch merge, don't forget to commit) | |
1341 | $ hg ci -m "mL,CB+revertm: $case_desc" |
|
1341 | $ hg ci -m "mL,CB+revertm: $case_desc" | |
1342 | created new head |
|
1342 | created new head | |
1343 |
|
1343 | |||
1344 | $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))' |
|
1344 | $ hg log -G --rev '::(desc("mBC+revert,Lm") + desc("mCB+revert,Lm") + desc("mL,BC+revertm") + desc("mL,CB+revertm"))' | |
1345 | @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1345 | @ mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1346 | |\ |
|
1346 | |\ | |
1347 | | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1347 | | | o mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1348 | | |/| |
|
1348 | | |/| | |
1349 | +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1349 | +-+---o mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1350 | | | | |
|
1350 | | | | | |
1351 | | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1351 | | +---o mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1352 | | | |/ |
|
1352 | | | |/ | |
1353 | | o | l-1: unrelated changes (based on "c" changes) |
|
1353 | | o | l-1: unrelated changes (based on "c" changes) | |
1354 | | | | |
|
1354 | | | | | |
1355 | | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
1355 | | | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
1356 | | |/| |
|
1356 | | |/| | |
1357 | o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1357 | o---+ mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
1358 | |/ / |
|
1358 | |/ / | |
1359 | o | c-1 delete d |
|
1359 | o | c-1 delete d | |
1360 | | | |
|
1360 | | | | |
1361 | | o b-1: b update |
|
1361 | | o b-1: b update | |
1362 | |/ |
|
1362 | |/ | |
1363 | o i-2: c -move-> d, s -move-> t |
|
1363 | o i-2: c -move-> d, s -move-> t | |
1364 | | |
|
1364 | | | |
1365 | o i-1: a -move-> c, p -move-> s |
|
1365 | o i-1: a -move-> c, p -move-> s | |
1366 | | |
|
1366 | | | |
1367 | o i-0 initial commit: a b h p q r |
|
1367 | o i-0 initial commit: a b h p q r | |
1368 |
|
1368 | |||
1369 |
|
1369 | |||
1370 |
|
1370 | |||
1371 | Subcase: chaining "merged" information during a merge |
|
1371 | Subcase: chaining "merged" information during a merge | |
1372 | `````````````````````````````````````````````````````` |
|
1372 | `````````````````````````````````````````````````````` | |
1373 |
|
1373 | |||
1374 | When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges. |
|
1374 | When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges. | |
1375 |
|
1375 | |||
1376 | $ case_desc="chained merges (copy-overwrite -> simple) - same content" |
|
1376 | $ case_desc="chained merges (copy-overwrite -> simple) - same content" | |
1377 |
|
1377 | |||
1378 | (extra unrelated changes) |
|
1378 | (extra unrelated changes) | |
1379 |
|
1379 | |||
1380 | $ hg up 'desc("f-2")' |
|
1380 | $ hg up 'desc("f-2")' | |
1381 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
1381 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |
1382 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
1382 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |
1383 | $ echo n > unrelated-n |
|
1383 | $ echo n > unrelated-n | |
1384 | $ hg add unrelated-n |
|
1384 | $ hg add unrelated-n | |
1385 | $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)' |
|
1385 | $ hg ci -m 'n-1: unrelated changes (based on the "f" series of changes)' | |
1386 | created new head |
|
1386 | created new head | |
1387 |
|
1387 | |||
1388 | $ hg up 'desc("g-1")' |
|
1388 | $ hg up 'desc("g-1")' | |
1389 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1389 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1390 | $ echo o > unrelated-o |
|
1390 | $ echo o > unrelated-o | |
1391 | $ hg add unrelated-o |
|
1391 | $ hg add unrelated-o | |
1392 | $ hg ci -m 'o-1: unrelated changes (based on "g" changes)' |
|
1392 | $ hg ci -m 'o-1: unrelated changes (based on "g" changes)' | |
1393 | created new head |
|
1393 | created new head | |
1394 |
|
1394 | |||
1395 | (merge variant 1) |
|
1395 | (merge variant 1) | |
1396 |
|
1396 | |||
1397 | $ hg up 'desc("mFGm")' |
|
1397 | $ hg up 'desc("mFGm")' | |
1398 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) |
|
1398 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved (no-changeset !) | |
1399 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) |
|
1399 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved (changeset !) | |
1400 | $ hg merge 'desc("o-1")' |
|
1400 | $ hg merge 'desc("o-1")' | |
1401 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1401 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1402 | (branch merge, don't forget to commit) |
|
1402 | (branch merge, don't forget to commit) | |
1403 | $ hg ci -m "mFG,Om: $case_desc" |
|
1403 | $ hg ci -m "mFG,Om: $case_desc" | |
1404 |
|
1404 | |||
1405 | (merge variant 2) |
|
1405 | (merge variant 2) | |
1406 |
|
1406 | |||
1407 | $ hg up 'desc("o-1")' |
|
1407 | $ hg up 'desc("o-1")' | |
1408 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) |
|
1408 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) | |
1409 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) |
|
1409 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) | |
1410 | $ hg merge 'desc("FGm")' |
|
1410 | $ hg merge 'desc("FGm")' | |
1411 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) |
|
1411 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved (no-changeset !) | |
1412 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) |
|
1412 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved (changeset !) | |
1413 | (branch merge, don't forget to commit) |
|
1413 | (branch merge, don't forget to commit) | |
1414 | $ hg ci -m "mO,FGm: $case_desc" |
|
1414 | $ hg ci -m "mO,FGm: $case_desc" | |
1415 | created new head |
|
1415 | created new head | |
1416 |
|
1416 | |||
1417 | (merge variant 3) |
|
1417 | (merge variant 3) | |
1418 |
|
1418 | |||
1419 | $ hg up 'desc("mGFm")' |
|
1419 | $ hg up 'desc("mGFm")' | |
1420 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1420 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1421 | $ hg merge 'desc("n-1")' |
|
1421 | $ hg merge 'desc("n-1")' | |
1422 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1422 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1423 | (branch merge, don't forget to commit) |
|
1423 | (branch merge, don't forget to commit) | |
1424 | $ hg ci -m "mGF,Nm: $case_desc" |
|
1424 | $ hg ci -m "mGF,Nm: $case_desc" | |
1425 |
|
1425 | |||
1426 | (merge variant 4) |
|
1426 | (merge variant 4) | |
1427 |
|
1427 | |||
1428 | $ hg up 'desc("n-1")' |
|
1428 | $ hg up 'desc("n-1")' | |
1429 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1429 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1430 | $ hg merge 'desc("mGFm")' |
|
1430 | $ hg merge 'desc("mGFm")' | |
1431 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1431 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1432 | (branch merge, don't forget to commit) |
|
1432 | (branch merge, don't forget to commit) | |
1433 | $ hg ci -m "mN,GFm: $case_desc" |
|
1433 | $ hg ci -m "mN,GFm: $case_desc" | |
1434 | created new head |
|
1434 | created new head | |
1435 |
|
1435 | |||
1436 | $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))' |
|
1436 | $ hg log -G --rev '::(desc("mFG,Om") + desc("mO,FGm") + desc("mGF,Nm") + desc("mN,GFm"))' | |
1437 | @ mN,GFm: chained merges (copy-overwrite -> simple) - same content |
|
1437 | @ mN,GFm: chained merges (copy-overwrite -> simple) - same content | |
1438 | |\ |
|
1438 | |\ | |
1439 | +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content |
|
1439 | +---o mGF,Nm: chained merges (copy-overwrite -> simple) - same content | |
1440 | | |/ |
|
1440 | | |/ | |
1441 | | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content |
|
1441 | | | o mO,FGm: chained merges (copy-overwrite -> simple) - same content | |
1442 | | | |\ |
|
1442 | | | |\ | |
1443 | | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content |
|
1443 | | | +---o mFG,Om: chained merges (copy-overwrite -> simple) - same content | |
1444 | | | | |/ |
|
1444 | | | | |/ | |
1445 | | | | o o-1: unrelated changes (based on "g" changes) |
|
1445 | | | | o o-1: unrelated changes (based on "g" changes) | |
1446 | | | | | |
|
1446 | | | | | | |
1447 | | o | | n-1: unrelated changes (based on the "f" series of changes) |
|
1447 | | o | | n-1: unrelated changes (based on the "f" series of changes) | |
1448 | | | | | |
|
1448 | | | | | | |
1449 | o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
1449 | o-----+ mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
1450 | |/ / / |
|
1450 | |/ / / | |
1451 | | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
1451 | | o / mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
1452 | |/|/ |
|
1452 | |/|/ | |
1453 | | o g-1: update d |
|
1453 | | o g-1: update d | |
1454 | | | |
|
1454 | | | | |
1455 | o | f-2: rename i -> d |
|
1455 | o | f-2: rename i -> d | |
1456 | | | |
|
1456 | | | | |
1457 | o | f-1: rename h -> i |
|
1457 | o | f-1: rename h -> i | |
1458 | |/ |
|
1458 | |/ | |
1459 | o i-2: c -move-> d, s -move-> t |
|
1459 | o i-2: c -move-> d, s -move-> t | |
1460 | | |
|
1460 | | | |
1461 | o i-1: a -move-> c, p -move-> s |
|
1461 | o i-1: a -move-> c, p -move-> s | |
1462 | | |
|
1462 | | | |
1463 | o i-0 initial commit: a b h p q r |
|
1463 | o i-0 initial commit: a b h p q r | |
1464 |
|
1464 | |||
1465 |
|
1465 | |||
1466 | Subcase: chaining conflicting rename resolution, with extra change during the merge |
|
1466 | Subcase: chaining conflicting rename resolution, with extra change during the merge | |
1467 | ``````````````````````````````````````````````````````````````````````````````````` |
|
1467 | ``````````````````````````````````````````````````````````````````````````````````` | |
1468 |
|
1468 | |||
1469 | The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We |
|
1469 | The "mEA-change-m-0" and "mAE-change-m-0" case create a rename tracking conflict on file 'f'. We | |
1470 | add more change on the respective branch and merge again. These second merge |
|
1470 | add more change on the respective branch and merge again. These second merge | |
1471 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
1471 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" | |
1472 | about that file should stay unchanged. |
|
1472 | about that file should stay unchanged. | |
1473 |
|
1473 | |||
1474 | $ case_desc="chained merges (conflict+change -> simple) - same content on both branch in the initial merge" |
|
1474 | $ case_desc="chained merges (conflict+change -> simple) - same content on both branch in the initial merge" | |
1475 |
|
1475 | |||
1476 |
|
1476 | |||
1477 | (merge variant 1) |
|
1477 | (merge variant 1) | |
1478 |
|
1478 | |||
1479 | $ hg up 'desc("mAE-change-m")' |
|
1479 | $ hg up 'desc("mAE-change-m")' | |
1480 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1480 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
1481 | $ hg merge 'desc("k-1")' |
|
1481 | $ hg merge 'desc("k-1")' | |
1482 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1482 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1483 | (branch merge, don't forget to commit) |
|
1483 | (branch merge, don't forget to commit) | |
1484 | $ hg ci -m "mAE-change,Km: $case_desc" |
|
1484 | $ hg ci -m "mAE-change,Km: $case_desc" | |
1485 |
|
1485 | |||
1486 | (merge variant 2) |
|
1486 | (merge variant 2) | |
1487 |
|
1487 | |||
1488 | $ hg up 'desc("k-1")' |
|
1488 | $ hg up 'desc("k-1")' | |
1489 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1489 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1490 |
|
1490 | |||
1491 | $ hg merge 'desc("mAE-change-m")' |
|
1491 | $ hg merge 'desc("mAE-change-m")' | |
1492 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1492 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1493 | (branch merge, don't forget to commit) |
|
1493 | (branch merge, don't forget to commit) | |
1494 | $ hg ci -m "mK,AE-change-m: $case_desc" |
|
1494 | $ hg ci -m "mK,AE-change-m: $case_desc" | |
1495 | created new head |
|
1495 | created new head | |
1496 |
|
1496 | |||
1497 | (merge variant 3) |
|
1497 | (merge variant 3) | |
1498 |
|
1498 | |||
1499 | $ hg up 'desc("mEA-change-m")' |
|
1499 | $ hg up 'desc("mEA-change-m")' | |
1500 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1500 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1501 | $ hg merge 'desc("j-1")' |
|
1501 | $ hg merge 'desc("j-1")' | |
1502 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1502 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1503 | (branch merge, don't forget to commit) |
|
1503 | (branch merge, don't forget to commit) | |
1504 | $ hg ci -m "mEA-change,Jm: $case_desc" |
|
1504 | $ hg ci -m "mEA-change,Jm: $case_desc" | |
1505 |
|
1505 | |||
1506 | (merge variant 4) |
|
1506 | (merge variant 4) | |
1507 |
|
1507 | |||
1508 | $ hg up 'desc("j-1")' |
|
1508 | $ hg up 'desc("j-1")' | |
1509 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1509 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1510 | $ hg merge 'desc("mEA-change-m")' |
|
1510 | $ hg merge 'desc("mEA-change-m")' | |
1511 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1511 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1512 | (branch merge, don't forget to commit) |
|
1512 | (branch merge, don't forget to commit) | |
1513 | $ hg ci -m "mJ,EA-change-m: $case_desc" |
|
1513 | $ hg ci -m "mJ,EA-change-m: $case_desc" | |
1514 | created new head |
|
1514 | created new head | |
1515 |
|
1515 | |||
1516 |
|
1516 | |||
1517 | $ hg log -G --rev '::(desc("mAE-change,Km") + desc("mK,AE-change-m") + desc("mEA-change,Jm") + desc("mJ,EA-change-m"))' |
|
1517 | $ hg log -G --rev '::(desc("mAE-change,Km") + desc("mK,AE-change-m") + desc("mEA-change,Jm") + desc("mJ,EA-change-m"))' | |
1518 | @ mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1518 | @ mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1519 | |\ |
|
1519 | |\ | |
1520 | +---o mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1520 | +---o mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1521 | | |/ |
|
1521 | | |/ | |
1522 | | | o mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1522 | | | o mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1523 | | | |\ |
|
1523 | | | |\ | |
1524 | | | +---o mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1524 | | | +---o mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1525 | | | | |/ |
|
1525 | | | | |/ | |
1526 | | | | o k-1: unrelated changes (based on "e" changes) |
|
1526 | | | | o k-1: unrelated changes (based on "e" changes) | |
1527 | | | | | |
|
1527 | | | | | | |
1528 | | o | | j-1: unrelated changes (based on the "a" series of changes) |
|
1528 | | o | | j-1: unrelated changes (based on the "a" series of changes) | |
1529 | | | | | |
|
1529 | | | | | | |
1530 | o-----+ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
1530 | o-----+ mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way | |
1531 | |/ / / |
|
1531 | |/ / / | |
1532 | | o / mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way |
|
1532 | | o / mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way | |
1533 | |/|/ |
|
1533 | |/|/ | |
1534 | | o e-2 g -move-> f |
|
1534 | | o e-2 g -move-> f | |
1535 | | | |
|
1535 | | | | |
1536 | | o e-1 b -move-> g |
|
1536 | | o e-1 b -move-> g | |
1537 | | | |
|
1537 | | | | |
1538 | o | a-2: e -move-> f |
|
1538 | o | a-2: e -move-> f | |
1539 | | | |
|
1539 | | | | |
1540 | o | a-1: d -move-> e |
|
1540 | o | a-1: d -move-> e | |
1541 | |/ |
|
1541 | |/ | |
1542 | o i-2: c -move-> d, s -move-> t |
|
1542 | o i-2: c -move-> d, s -move-> t | |
1543 | | |
|
1543 | | | |
1544 | o i-1: a -move-> c, p -move-> s |
|
1544 | o i-1: a -move-> c, p -move-> s | |
1545 | | |
|
1545 | | | |
1546 | o i-0 initial commit: a b h p q r |
|
1546 | o i-0 initial commit: a b h p q r | |
1547 |
|
1547 | |||
1548 |
|
1548 | |||
1549 | Summary of all created cases |
|
1549 | Summary of all created cases | |
1550 | ---------------------------- |
|
1550 | ---------------------------- | |
1551 |
|
1551 | |||
1552 | $ hg up --quiet null |
|
1552 | $ hg up --quiet null | |
1553 |
|
1553 | |||
1554 | (This exists to help keeping a compact list of the various cases we have built) |
|
1554 | (This exists to help keeping a compact list of the various cases we have built) | |
1555 |
|
1555 | |||
1556 | $ hg log -T '{desc|firstline}\n'| sort |
|
1556 | $ hg log -T '{desc|firstline}\n'| sort | |
1557 | a-1: d -move-> e |
|
1557 | a-1: d -move-> e | |
1558 | a-2: e -move-> f |
|
1558 | a-2: e -move-> f | |
1559 | b-1: b update |
|
1559 | b-1: b update | |
1560 | c-1 delete d |
|
1560 | c-1 delete d | |
1561 | d-1 delete d |
|
1561 | d-1 delete d | |
1562 | d-2 re-add d |
|
1562 | d-2 re-add d | |
1563 | e-1 b -move-> g |
|
1563 | e-1 b -move-> g | |
1564 | e-2 g -move-> f |
|
1564 | e-2 g -move-> f | |
1565 | f-1: rename h -> i |
|
1565 | f-1: rename h -> i | |
1566 | f-2: rename i -> d |
|
1566 | f-2: rename i -> d | |
1567 | g-1: update d |
|
1567 | g-1: update d | |
1568 | h-1: b -(move)-> d |
|
1568 | h-1: b -(move)-> d | |
1569 | i-0 initial commit: a b h p q r |
|
1569 | i-0 initial commit: a b h p q r | |
1570 | i-1: a -move-> c, p -move-> s |
|
1570 | i-1: a -move-> c, p -move-> s | |
1571 | i-2: c -move-> d, s -move-> t |
|
1571 | i-2: c -move-> d, s -move-> t | |
1572 | j-1: unrelated changes (based on the "a" series of changes) |
|
1572 | j-1: unrelated changes (based on the "a" series of changes) | |
1573 | k-1: unrelated changes (based on "e" changes) |
|
1573 | k-1: unrelated changes (based on "e" changes) | |
1574 | l-1: unrelated changes (based on "c" changes) |
|
1574 | l-1: unrelated changes (based on "c" changes) | |
1575 | mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
1575 | mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | |
1576 | mAE,Km: chained merges (conflict -> simple) - same content everywhere |
|
1576 | mAE,Km: chained merges (conflict -> simple) - same content everywhere | |
1577 | mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1577 | mAE-change,Km: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1578 | mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way |
|
1578 | mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way | |
1579 | mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
1579 | mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way | |
1580 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
1580 | mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | |
1581 | mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1581 | mBC+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1582 | mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
1582 | mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
1583 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
1583 | mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
1584 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
1584 | mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | |
1585 | mBCm-1 re-add d |
|
1585 | mBCm-1 re-add d | |
1586 | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
1586 | mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | |
1587 | mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1587 | mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
1588 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
1588 | mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
1589 | mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way |
|
1589 | mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way | |
1590 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1590 | mCB+revert,Lm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1591 | mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1591 | mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
1592 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
1592 | mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
1593 | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
1593 | mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | |
1594 | mCBm-1 re-add d |
|
1594 | mCBm-1 re-add d | |
1595 | mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
1595 | mCGm-0 merge updated/deleted - revive the file (updated content) - one way | |
1596 | mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way |
|
1596 | mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way | |
1597 | mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
1597 | mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | |
1598 | mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
1598 | mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
1599 | mEA,Jm: chained merges (conflict -> simple) - same content everywhere |
|
1599 | mEA,Jm: chained merges (conflict -> simple) - same content everywhere | |
1600 | mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1600 | mEA-change,Jm: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1601 | mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
1601 | mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way | |
1602 | mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
1602 | mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way | |
1603 | mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
1603 | mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
1604 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
1604 | mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
1605 | mFG,Om: chained merges (copy-overwrite -> simple) - same content |
|
1605 | mFG,Om: chained merges (copy-overwrite -> simple) - same content | |
1606 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
1606 | mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
1607 | mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
1607 | mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | |
1608 | mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
1608 | mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way | |
1609 | mGF,Nm: chained merges (copy-overwrite -> simple) - same content |
|
1609 | mGF,Nm: chained merges (copy-overwrite -> simple) - same content | |
1610 | mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
1610 | mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
1611 | mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way |
|
1611 | mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way | |
1612 | mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1612 | mJ,EA-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1613 | mJ,EAm: chained merges (conflict -> simple) - same content everywhere |
|
1613 | mJ,EAm: chained merges (conflict -> simple) - same content everywhere | |
1614 | mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge |
|
1614 | mK,AE-change-m: chained merges (conflict+change -> simple) - same content on both branch in the initial merge | |
1615 | mK,AEm: chained merges (conflict -> simple) - same content everywhere |
|
1615 | mK,AEm: chained merges (conflict -> simple) - same content everywhere | |
1616 | mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1616 | mL,BC+revertm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1617 | mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) |
|
1617 | mL,CB+revertm: chained merges (salvaged -> simple) - same content (when the file exists) | |
1618 | mN,GFm: chained merges (copy-overwrite -> simple) - same content |
|
1618 | mN,GFm: chained merges (copy-overwrite -> simple) - same content | |
1619 | mO,FGm: chained merges (copy-overwrite -> simple) - same content |
|
1619 | mO,FGm: chained merges (copy-overwrite -> simple) - same content | |
1620 | mPQ,Tm: chained merges (conflict -> simple) - different content |
|
1620 | mPQ,Tm: chained merges (conflict -> simple) - different content | |
1621 | mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way |
|
1621 | mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way | |
1622 | mQP,Sm: chained merges (conflict -> simple) - different content |
|
1622 | mQP,Sm: chained merges (conflict -> simple) - different content | |
1623 | mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way |
|
1623 | mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way | |
1624 | mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way |
|
1624 | mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way | |
1625 | mS,QPm: chained merges (conflict -> simple) - different content |
|
1625 | mS,QPm: chained merges (conflict -> simple) - different content | |
1626 | mT,PQm: chained merges (conflict -> simple) - different content |
|
1626 | mT,PQm: chained merges (conflict -> simple) - different content | |
1627 | n-1: unrelated changes (based on the "f" series of changes) |
|
1627 | n-1: unrelated changes (based on the "f" series of changes) | |
1628 | o-1: unrelated changes (based on "g" changes) |
|
1628 | o-1: unrelated changes (based on "g" changes) | |
1629 | p-1: t -move-> u |
|
1629 | p-1: t -move-> u | |
1630 | p-2: u -move-> v |
|
1630 | p-2: u -move-> v | |
1631 | q-1 r -move-> w |
|
1631 | q-1 r -move-> w | |
1632 | q-2 w -move-> v |
|
1632 | q-2 w -move-> v | |
1633 | r-1: rename r -> x |
|
1633 | r-1: rename r -> x | |
1634 | r-2: rename t -> x |
|
1634 | r-2: rename t -> x | |
1635 | s-1: unrelated changes (based on the "p" series of changes) |
|
1635 | s-1: unrelated changes (based on the "p" series of changes) | |
1636 | t-1: unrelated changes (based on "q" changes) |
|
1636 | t-1: unrelated changes (based on "q" changes) | |
1637 |
|
1637 | |||
1638 |
|
1638 | |||
1639 | Test that sidedata computations during upgrades are correct |
|
1639 | Test that sidedata computations during upgrades are correct | |
1640 | =========================================================== |
|
1640 | =========================================================== | |
1641 |
|
1641 | |||
1642 | We upgrade a repository that is not using sidedata (the filelog case) and |
|
1642 | We upgrade a repository that is not using sidedata (the filelog case) and | |
1643 | check that the same side data have been generated as if they were computed at |
|
1643 | check that the same side data have been generated as if they were computed at | |
1644 | commit time. |
|
1644 | commit time. | |
1645 |
|
1645 | |||
1646 |
|
1646 | |||
1647 | #if upgraded |
|
1647 | #if upgraded | |
1648 | $ cat >> $HGRCPATH << EOF |
|
1648 | $ cat >> $HGRCPATH << EOF | |
1649 | > [format] |
|
1649 | > [format] | |
1650 | > exp-use-copies-side-data-changeset = yes |
|
1650 | > exp-use-copies-side-data-changeset = yes | |
1651 | > EOF |
|
1651 | > EOF | |
1652 | $ hg debugformat -v | egrep 'changelog-v2|revlog-v2|copies-sdc' |
|
1652 | $ hg debugformat -v | egrep 'changelog-v2|revlog-v2|copies-sdc' | |
1653 | copies-sdc: no yes no |
|
1653 | copies-sdc: no yes no | |
1654 | revlog-v2: no no no |
|
1654 | revlog-v2: no no no | |
1655 | changelog-v2: no yes no |
|
1655 | changelog-v2: no yes no | |
1656 | $ hg debugupgraderepo --run --quiet |
|
1656 | $ hg debugupgraderepo --run --quiet | |
1657 | upgrade will perform the following actions: |
|
1657 | upgrade will perform the following actions: | |
1658 |
|
1658 | |||
1659 | requirements |
|
1659 | requirements | |
1660 | preserved: * (glob) |
|
1660 | preserved: * (glob) | |
1661 | added: exp-changelog-v2, exp-copies-sidedata-changeset |
|
1661 | added: exp-changelog-v2, exp-copies-sidedata-changeset | |
1662 |
|
1662 | |||
1663 | processed revlogs: |
|
1663 | processed revlogs: | |
1664 | - all-filelogs |
|
1664 | - all-filelogs | |
1665 | - changelog |
|
1665 | - changelog | |
1666 | - manifest |
|
1666 | - manifest | |
1667 |
|
1667 | |||
1668 | #endif |
|
1668 | #endif | |
1669 |
|
1669 | |||
1670 | #if upgraded-parallel |
|
1670 | #if upgraded-parallel | |
1671 | $ cat >> $HGRCPATH << EOF |
|
1671 | $ cat >> $HGRCPATH << EOF | |
1672 | > [format] |
|
1672 | > [format] | |
1673 | > exp-use-copies-side-data-changeset = yes |
|
1673 | > exp-use-copies-side-data-changeset = yes | |
1674 | > [experimental] |
|
1674 | > [experimental] | |
1675 | > worker.repository-upgrade=yes |
|
1675 | > worker.repository-upgrade=yes | |
1676 | > [worker] |
|
1676 | > [worker] | |
1677 | > enabled=yes |
|
1677 | > enabled=yes | |
1678 | > numcpus=8 |
|
1678 | > numcpus=8 | |
1679 | > EOF |
|
1679 | > EOF | |
1680 | $ hg debugformat -v | egrep 'changelog-v2|revlog-v2|copies-sdc' |
|
1680 | $ hg debugformat -v | egrep 'changelog-v2|revlog-v2|copies-sdc' | |
1681 | copies-sdc: no yes no |
|
1681 | copies-sdc: no yes no | |
1682 | revlog-v2: no no no |
|
1682 | revlog-v2: no no no | |
1683 | changelog-v2: no yes no |
|
1683 | changelog-v2: no yes no | |
1684 | $ hg debugupgraderepo --run --quiet |
|
1684 | $ hg debugupgraderepo --run --quiet | |
1685 | upgrade will perform the following actions: |
|
1685 | upgrade will perform the following actions: | |
1686 |
|
1686 | |||
1687 | requirements |
|
1687 | requirements | |
1688 | preserved: * (glob) |
|
1688 | preserved: * (glob) | |
1689 | added: exp-changelog-v2, exp-copies-sidedata-changeset |
|
1689 | added: exp-changelog-v2, exp-copies-sidedata-changeset | |
1690 |
|
1690 | |||
1691 | processed revlogs: |
|
1691 | processed revlogs: | |
1692 | - all-filelogs |
|
1692 | - all-filelogs | |
1693 | - changelog |
|
1693 | - changelog | |
1694 | - manifest |
|
1694 | - manifest | |
1695 |
|
1695 | |||
1696 | #endif |
|
1696 | #endif | |
1697 |
|
1697 | |||
1698 | #if pull |
|
1698 | #if pull | |
1699 | $ cd .. |
|
1699 | $ cd .. | |
1700 | $ mv repo-chain repo-source |
|
1700 | $ mv repo-chain repo-source | |
1701 | $ hg init repo-chain |
|
1701 | $ hg init repo-chain | |
1702 | $ cd repo-chain |
|
1702 | $ cd repo-chain | |
1703 | $ hg pull ../repo-source |
|
1703 | $ hg pull ../repo-source | |
1704 | pulling from ../repo-source |
|
1704 | pulling from ../repo-source | |
1705 | requesting all changes |
|
1705 | requesting all changes | |
1706 | adding changesets |
|
1706 | adding changesets | |
1707 | adding manifests |
|
1707 | adding manifests | |
1708 | adding file changes |
|
1708 | adding file changes | |
1709 | added 80 changesets with 44 changes to 25 files (+39 heads) |
|
1709 | added 80 changesets with 44 changes to 25 files (+39 heads) | |
1710 | new changesets a3a31bbefea6:908ce9259ffa |
|
1710 | new changesets a3a31bbefea6:908ce9259ffa | |
1711 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1711 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1712 | #endif |
|
1712 | #endif | |
1713 |
|
1713 | |||
1714 | #if pull-upgrade |
|
1714 | #if pull-upgrade | |
1715 | $ cat >> $HGRCPATH << EOF |
|
1715 | $ cat >> $HGRCPATH << EOF | |
1716 | > [format] |
|
1716 | > [format] | |
1717 | > exp-use-copies-side-data-changeset = yes |
|
1717 | > exp-use-copies-side-data-changeset = yes | |
1718 | > [experimental] |
|
1718 | > [experimental] | |
1719 | > changegroup4 = yes |
|
1719 | > changegroup4 = yes | |
1720 | > EOF |
|
1720 | > EOF | |
1721 | $ cd .. |
|
1721 | $ cd .. | |
1722 | $ mv repo-chain repo-source |
|
1722 | $ mv repo-chain repo-source | |
1723 | $ hg init repo-chain |
|
1723 | $ hg init repo-chain | |
1724 | $ cd repo-chain |
|
1724 | $ cd repo-chain | |
1725 | $ hg pull ../repo-source |
|
1725 | $ hg pull ../repo-source | |
1726 | pulling from ../repo-source |
|
1726 | pulling from ../repo-source | |
1727 | requesting all changes |
|
1727 | requesting all changes | |
1728 | adding changesets |
|
1728 | adding changesets | |
1729 | adding manifests |
|
1729 | adding manifests | |
1730 | adding file changes |
|
1730 | adding file changes | |
1731 | added 80 changesets with 44 changes to 25 files (+39 heads) |
|
1731 | added 80 changesets with 44 changes to 25 files (+39 heads) | |
1732 | new changesets a3a31bbefea6:908ce9259ffa |
|
1732 | new changesets a3a31bbefea6:908ce9259ffa | |
1733 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1733 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1734 | #endif |
|
1734 | #endif | |
1735 |
|
1735 | |||
1736 | #if push |
|
1736 | #if push | |
1737 | $ cd .. |
|
1737 | $ cd .. | |
1738 | $ mv repo-chain repo-source |
|
1738 | $ mv repo-chain repo-source | |
1739 | $ hg init repo-chain |
|
1739 | $ hg init repo-chain | |
1740 | $ cd repo-source |
|
1740 | $ cd repo-source | |
1741 | $ hg push ../repo-chain |
|
1741 | $ hg push ../repo-chain | |
1742 | pushing to ../repo-chain |
|
1742 | pushing to ../repo-chain | |
1743 | searching for changes |
|
1743 | searching for changes | |
1744 | adding changesets |
|
1744 | adding changesets | |
1745 | adding manifests |
|
1745 | adding manifests | |
1746 | adding file changes |
|
1746 | adding file changes | |
1747 | added 80 changesets with 44 changes to 25 files (+39 heads) |
|
1747 | added 80 changesets with 44 changes to 25 files (+39 heads) | |
1748 | $ cd ../repo-chain |
|
1748 | $ cd ../repo-chain | |
1749 | #endif |
|
1749 | #endif | |
1750 |
|
1750 | |||
1751 | #if push-upgrade |
|
1751 | #if push-upgrade | |
1752 | $ cat >> $HGRCPATH << EOF |
|
1752 | $ cat >> $HGRCPATH << EOF | |
1753 | > [format] |
|
1753 | > [format] | |
1754 | > exp-use-copies-side-data-changeset = yes |
|
1754 | > exp-use-copies-side-data-changeset = yes | |
1755 | > [experimental] |
|
1755 | > [experimental] | |
1756 | > changegroup4 = yes |
|
1756 | > changegroup4 = yes | |
1757 | > EOF |
|
1757 | > EOF | |
1758 | $ cd .. |
|
1758 | $ cd .. | |
1759 | $ mv repo-chain repo-source |
|
1759 | $ mv repo-chain repo-source | |
1760 | $ hg init repo-chain |
|
1760 | $ hg init repo-chain | |
1761 | $ cd repo-source |
|
1761 | $ cd repo-source | |
1762 | $ hg push ../repo-chain |
|
1762 | $ hg push ../repo-chain | |
1763 | pushing to ../repo-chain |
|
1763 | pushing to ../repo-chain | |
1764 | searching for changes |
|
1764 | searching for changes | |
1765 | adding changesets |
|
1765 | adding changesets | |
1766 | adding manifests |
|
1766 | adding manifests | |
1767 | adding file changes |
|
1767 | adding file changes | |
1768 | added 80 changesets with 44 changes to 25 files (+39 heads) |
|
1768 | added 80 changesets with 44 changes to 25 files (+39 heads) | |
1769 | $ cd ../repo-chain |
|
1769 | $ cd ../repo-chain | |
1770 | #endif |
|
1770 | #endif | |
1771 |
|
1771 | |||
1772 | #if no-compatibility no-filelog no-changeset |
|
1772 | #if no-compatibility no-filelog no-changeset | |
1773 |
|
1773 | |||
1774 | $ hg debugchangedfiles --compute 0 |
|
1774 | $ hg debugchangedfiles --compute 0 | |
1775 | added : a, ; |
|
1775 | added : a, ; | |
1776 | added : b, ; |
|
1776 | added : b, ; | |
1777 | added : h, ; |
|
1777 | added : h, ; | |
1778 | added : p, ; |
|
1778 | added : p, ; | |
1779 | added : q, ; |
|
1779 | added : q, ; | |
1780 | added : r, ; |
|
1780 | added : r, ; | |
1781 |
|
1781 | |||
1782 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do |
|
1782 | $ for rev in `hg log --rev 'all()' -T '{rev}\n'`; do | |
1783 | > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'` |
|
1783 | > case_id=`hg log -r $rev -T '{word(0, desc, ":")}\n'` | |
1784 | > echo "##### revision \"$case_id\" #####" |
|
1784 | > echo "##### revision \"$case_id\" #####" | |
1785 | > hg debugsidedata -c -v -- $rev |
|
1785 | > hg debugsidedata -c -v -- $rev | |
1786 | > hg debugchangedfiles $rev |
|
1786 | > hg debugchangedfiles $rev | |
1787 | > done |
|
1787 | > done | |
1788 | ##### revision "i-0 initial commit" ##### |
|
1788 | ##### revision "i-0 initial commit" ##### | |
1789 | 1 sidedata entries |
|
1789 | 1 sidedata entries | |
1790 | entry-0014 size 64 |
|
1790 | entry-0014 size 64 | |
1791 | '\x00\x00\x00\x06\x04\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x00abhpqr' |
|
1791 | '\x00\x00\x00\x06\x04\x00\x00\x00\x01\x00\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x00abhpqr' | |
1792 | added : a, ; |
|
1792 | added : a, ; | |
1793 | added : b, ; |
|
1793 | added : b, ; | |
1794 | added : h, ; |
|
1794 | added : h, ; | |
1795 | added : p, ; |
|
1795 | added : p, ; | |
1796 | added : q, ; |
|
1796 | added : q, ; | |
1797 | added : r, ; |
|
1797 | added : r, ; | |
1798 | ##### revision "i-1" ##### |
|
1798 | ##### revision "i-1" ##### | |
1799 | 1 sidedata entries |
|
1799 | 1 sidedata entries | |
1800 | entry-0014 size 44 |
|
1800 | entry-0014 size 44 | |
1801 | '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02acps' |
|
1801 | '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02acps' | |
1802 | removed : a, ; |
|
1802 | removed : a, ; | |
1803 | added p1: c, a; |
|
1803 | added p1: c, a; | |
1804 | removed : p, ; |
|
1804 | removed : p, ; | |
1805 | added p1: s, p; |
|
1805 | added p1: s, p; | |
1806 | ##### revision "i-2" ##### |
|
1806 | ##### revision "i-2" ##### | |
1807 | 1 sidedata entries |
|
1807 | 1 sidedata entries | |
1808 | entry-0014 size 44 |
|
1808 | entry-0014 size 44 | |
1809 | '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02cdst' |
|
1809 | '\x00\x00\x00\x04\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x0c\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x02cdst' | |
1810 | removed : c, ; |
|
1810 | removed : c, ; | |
1811 | added p1: d, c; |
|
1811 | added p1: d, c; | |
1812 | removed : s, ; |
|
1812 | removed : s, ; | |
1813 | added p1: t, s; |
|
1813 | added p1: t, s; | |
1814 | ##### revision "a-1" ##### |
|
1814 | ##### revision "a-1" ##### | |
1815 | 1 sidedata entries |
|
1815 | 1 sidedata entries | |
1816 | entry-0014 size 24 |
|
1816 | entry-0014 size 24 | |
1817 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' |
|
1817 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00de' | |
1818 | removed : d, ; |
|
1818 | removed : d, ; | |
1819 | added p1: e, d; |
|
1819 | added p1: e, d; | |
1820 | ##### revision "a-2" ##### |
|
1820 | ##### revision "a-2" ##### | |
1821 | 1 sidedata entries |
|
1821 | 1 sidedata entries | |
1822 | entry-0014 size 24 |
|
1822 | entry-0014 size 24 | |
1823 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef' |
|
1823 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ef' | |
1824 | removed : e, ; |
|
1824 | removed : e, ; | |
1825 | added p1: f, e; |
|
1825 | added p1: f, e; | |
1826 | ##### revision "b-1" ##### |
|
1826 | ##### revision "b-1" ##### | |
1827 | 1 sidedata entries |
|
1827 | 1 sidedata entries | |
1828 | entry-0014 size 14 |
|
1828 | entry-0014 size 14 | |
1829 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b' |
|
1829 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00b' | |
1830 | touched : b, ; |
|
1830 | touched : b, ; | |
1831 | ##### revision "c-1 delete d" ##### |
|
1831 | ##### revision "c-1 delete d" ##### | |
1832 | 1 sidedata entries |
|
1832 | 1 sidedata entries | |
1833 | entry-0014 size 14 |
|
1833 | entry-0014 size 14 | |
1834 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1834 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1835 | removed : d, ; |
|
1835 | removed : d, ; | |
1836 | ##### revision "d-1 delete d" ##### |
|
1836 | ##### revision "d-1 delete d" ##### | |
1837 | 1 sidedata entries |
|
1837 | 1 sidedata entries | |
1838 | entry-0014 size 14 |
|
1838 | entry-0014 size 14 | |
1839 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1839 | '\x00\x00\x00\x01\x0c\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1840 | removed : d, ; |
|
1840 | removed : d, ; | |
1841 | ##### revision "d-2 re-add d" ##### |
|
1841 | ##### revision "d-2 re-add d" ##### | |
1842 | 1 sidedata entries |
|
1842 | 1 sidedata entries | |
1843 | entry-0014 size 14 |
|
1843 | entry-0014 size 14 | |
1844 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1844 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1845 | added : d, ; |
|
1845 | added : d, ; | |
1846 | ##### revision "e-1 b -move-> g" ##### |
|
1846 | ##### revision "e-1 b -move-> g" ##### | |
1847 | 1 sidedata entries |
|
1847 | 1 sidedata entries | |
1848 | entry-0014 size 24 |
|
1848 | entry-0014 size 24 | |
1849 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg' |
|
1849 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bg' | |
1850 | removed : b, ; |
|
1850 | removed : b, ; | |
1851 | added p1: g, b; |
|
1851 | added p1: g, b; | |
1852 | ##### revision "e-2 g -move-> f" ##### |
|
1852 | ##### revision "e-2 g -move-> f" ##### | |
1853 | 1 sidedata entries |
|
1853 | 1 sidedata entries | |
1854 | entry-0014 size 24 |
|
1854 | entry-0014 size 24 | |
1855 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg' |
|
1855 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00fg' | |
1856 | added p1: f, g; |
|
1856 | added p1: f, g; | |
1857 | removed : g, ; |
|
1857 | removed : g, ; | |
1858 | ##### revision "p-1" ##### |
|
1858 | ##### revision "p-1" ##### | |
1859 | 1 sidedata entries |
|
1859 | 1 sidedata entries | |
1860 | entry-0014 size 24 |
|
1860 | entry-0014 size 24 | |
1861 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00tu' |
|
1861 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00tu' | |
1862 | removed : t, ; |
|
1862 | removed : t, ; | |
1863 | added p1: u, t; |
|
1863 | added p1: u, t; | |
1864 | ##### revision "p-2" ##### |
|
1864 | ##### revision "p-2" ##### | |
1865 | 1 sidedata entries |
|
1865 | 1 sidedata entries | |
1866 | entry-0014 size 24 |
|
1866 | entry-0014 size 24 | |
1867 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00uv' |
|
1867 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00uv' | |
1868 | removed : u, ; |
|
1868 | removed : u, ; | |
1869 | added p1: v, u; |
|
1869 | added p1: v, u; | |
1870 | ##### revision "q-1 r -move-> w" ##### |
|
1870 | ##### revision "q-1 r -move-> w" ##### | |
1871 | 1 sidedata entries |
|
1871 | 1 sidedata entries | |
1872 | entry-0014 size 24 |
|
1872 | entry-0014 size 24 | |
1873 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rw' |
|
1873 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rw' | |
1874 | removed : r, ; |
|
1874 | removed : r, ; | |
1875 | added p1: w, r; |
|
1875 | added p1: w, r; | |
1876 | ##### revision "q-2 w -move-> v" ##### |
|
1876 | ##### revision "q-2 w -move-> v" ##### | |
1877 | 1 sidedata entries |
|
1877 | 1 sidedata entries | |
1878 | entry-0014 size 24 |
|
1878 | entry-0014 size 24 | |
1879 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00vw' |
|
1879 | '\x00\x00\x00\x02\x06\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00vw' | |
1880 | added p1: v, w; |
|
1880 | added p1: v, w; | |
1881 | removed : w, ; |
|
1881 | removed : w, ; | |
1882 | ##### revision "mBAm-0 simple merge - A side" ##### |
|
1882 | ##### revision "mBAm-0 simple merge - A side" ##### | |
1883 | 1 sidedata entries |
|
1883 | 1 sidedata entries | |
1884 | entry-0014 size 4 |
|
1884 | entry-0014 size 4 | |
1885 | '\x00\x00\x00\x00' |
|
1885 | '\x00\x00\x00\x00' | |
1886 | ##### revision "mABm-0 simple merge - A side" ##### |
|
1886 | ##### revision "mABm-0 simple merge - A side" ##### | |
1887 | 1 sidedata entries |
|
1887 | 1 sidedata entries | |
1888 | entry-0014 size 4 |
|
1888 | entry-0014 size 4 | |
1889 | '\x00\x00\x00\x00' |
|
1889 | '\x00\x00\x00\x00' | |
1890 | ##### revision "mBCm-0 simple merge - C side" ##### |
|
1890 | ##### revision "mBCm-0 simple merge - C side" ##### | |
1891 | 1 sidedata entries |
|
1891 | 1 sidedata entries | |
1892 | entry-0014 size 4 |
|
1892 | entry-0014 size 4 | |
1893 | '\x00\x00\x00\x00' |
|
1893 | '\x00\x00\x00\x00' | |
1894 | ##### revision "mBCm-1 re-add d" ##### |
|
1894 | ##### revision "mBCm-1 re-add d" ##### | |
1895 | 1 sidedata entries |
|
1895 | 1 sidedata entries | |
1896 | entry-0014 size 14 |
|
1896 | entry-0014 size 14 | |
1897 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1897 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1898 | added : d, ; |
|
1898 | added : d, ; | |
1899 | ##### revision "mCBm-0 simple merge - C side" ##### |
|
1899 | ##### revision "mCBm-0 simple merge - C side" ##### | |
1900 | 1 sidedata entries |
|
1900 | 1 sidedata entries | |
1901 | entry-0014 size 4 |
|
1901 | entry-0014 size 4 | |
1902 | '\x00\x00\x00\x00' |
|
1902 | '\x00\x00\x00\x00' | |
1903 | ##### revision "mCBm-1 re-add d" ##### |
|
1903 | ##### revision "mCBm-1 re-add d" ##### | |
1904 | 1 sidedata entries |
|
1904 | 1 sidedata entries | |
1905 | entry-0014 size 14 |
|
1905 | entry-0014 size 14 | |
1906 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1906 | '\x00\x00\x00\x01\x04\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1907 | added : d, ; |
|
1907 | added : d, ; | |
1908 | ##### revision "mBDm-0 simple merge - B side" ##### |
|
1908 | ##### revision "mBDm-0 simple merge - B side" ##### | |
1909 | 1 sidedata entries |
|
1909 | 1 sidedata entries | |
1910 | entry-0014 size 4 |
|
1910 | entry-0014 size 4 | |
1911 | '\x00\x00\x00\x00' |
|
1911 | '\x00\x00\x00\x00' | |
1912 | ##### revision "mDBm-0 simple merge - B side" ##### |
|
1912 | ##### revision "mDBm-0 simple merge - B side" ##### | |
1913 | 1 sidedata entries |
|
1913 | 1 sidedata entries | |
1914 | entry-0014 size 4 |
|
1914 | entry-0014 size 4 | |
1915 | '\x00\x00\x00\x00' |
|
1915 | '\x00\x00\x00\x00' | |
1916 | ##### revision "mAEm-0 merge with copies info on both side - A side" ##### |
|
1916 | ##### revision "mAEm-0 merge with copies info on both side - A side" ##### | |
1917 | 1 sidedata entries |
|
1917 | 1 sidedata entries | |
1918 | entry-0014 size 14 |
|
1918 | entry-0014 size 14 | |
1919 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1919 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
1920 | merged : f, ; |
|
1920 | merged : f, ; | |
1921 | ##### revision "mEAm-0 merge with copies info on both side - A side" ##### |
|
1921 | ##### revision "mEAm-0 merge with copies info on both side - A side" ##### | |
1922 | 1 sidedata entries |
|
1922 | 1 sidedata entries | |
1923 | entry-0014 size 14 |
|
1923 | entry-0014 size 14 | |
1924 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
1924 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
1925 | merged : f, ; |
|
1925 | merged : f, ; | |
1926 | ##### revision "mPQm-0 merge with copies info on both side - P side" ##### |
|
1926 | ##### revision "mPQm-0 merge with copies info on both side - P side" ##### | |
1927 | 1 sidedata entries |
|
1927 | 1 sidedata entries | |
1928 | entry-0014 size 14 |
|
1928 | entry-0014 size 14 | |
1929 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v' |
|
1929 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v' | |
1930 | merged : v, ; |
|
1930 | merged : v, ; | |
1931 | ##### revision "mQPm-0 merge with copies info on both side - P side" ##### |
|
1931 | ##### revision "mQPm-0 merge with copies info on both side - P side" ##### | |
1932 | 1 sidedata entries |
|
1932 | 1 sidedata entries | |
1933 | entry-0014 size 14 |
|
1933 | entry-0014 size 14 | |
1934 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v' |
|
1934 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00v' | |
1935 | merged : v, ; |
|
1935 | merged : v, ; | |
1936 | ##### revision "f-1" ##### |
|
1936 | ##### revision "f-1" ##### | |
1937 | 1 sidedata entries |
|
1937 | 1 sidedata entries | |
1938 | entry-0014 size 24 |
|
1938 | entry-0014 size 24 | |
1939 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi' |
|
1939 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00hi' | |
1940 | removed : h, ; |
|
1940 | removed : h, ; | |
1941 | added p1: i, h; |
|
1941 | added p1: i, h; | |
1942 | ##### revision "f-2" ##### |
|
1942 | ##### revision "f-2" ##### | |
1943 | 1 sidedata entries |
|
1943 | 1 sidedata entries | |
1944 | entry-0014 size 24 |
|
1944 | entry-0014 size 24 | |
1945 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di' |
|
1945 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00di' | |
1946 | touched p1: d, i; |
|
1946 | touched p1: d, i; | |
1947 | removed : i, ; |
|
1947 | removed : i, ; | |
1948 | ##### revision "mBFm-0 simple merge - B side" ##### |
|
1948 | ##### revision "mBFm-0 simple merge - B side" ##### | |
1949 | 1 sidedata entries |
|
1949 | 1 sidedata entries | |
1950 | entry-0014 size 4 |
|
1950 | entry-0014 size 4 | |
1951 | '\x00\x00\x00\x00' |
|
1951 | '\x00\x00\x00\x00' | |
1952 | ##### revision "mFBm-0 simple merge - B side" ##### |
|
1952 | ##### revision "mFBm-0 simple merge - B side" ##### | |
1953 | 1 sidedata entries |
|
1953 | 1 sidedata entries | |
1954 | entry-0014 size 4 |
|
1954 | entry-0014 size 4 | |
1955 | '\x00\x00\x00\x00' |
|
1955 | '\x00\x00\x00\x00' | |
1956 | ##### revision "r-1" ##### |
|
1956 | ##### revision "r-1" ##### | |
1957 | 1 sidedata entries |
|
1957 | 1 sidedata entries | |
1958 | entry-0014 size 24 |
|
1958 | entry-0014 size 24 | |
1959 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rx' |
|
1959 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00rx' | |
1960 | removed : r, ; |
|
1960 | removed : r, ; | |
1961 | added p1: x, r; |
|
1961 | added p1: x, r; | |
1962 | ##### revision "r-2" ##### |
|
1962 | ##### revision "r-2" ##### | |
1963 | 1 sidedata entries |
|
1963 | 1 sidedata entries | |
1964 | entry-0014 size 24 |
|
1964 | entry-0014 size 24 | |
1965 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00tx' |
|
1965 | '\x00\x00\x00\x02\x16\x00\x00\x00\x01\x00\x00\x00\x01\x0c\x00\x00\x00\x02\x00\x00\x00\x00tx' | |
1966 | touched p1: t, x; |
|
1966 | touched p1: t, x; | |
1967 | removed : x, ; |
|
1967 | removed : x, ; | |
1968 | ##### revision "mBRm-0 simple merge - B side" ##### |
|
1968 | ##### revision "mBRm-0 simple merge - B side" ##### | |
1969 | 1 sidedata entries |
|
1969 | 1 sidedata entries | |
1970 | entry-0014 size 4 |
|
1970 | entry-0014 size 4 | |
1971 | '\x00\x00\x00\x00' |
|
1971 | '\x00\x00\x00\x00' | |
1972 | ##### revision "mRBm-0 simple merge - B side" ##### |
|
1972 | ##### revision "mRBm-0 simple merge - B side" ##### | |
1973 | 1 sidedata entries |
|
1973 | 1 sidedata entries | |
1974 | entry-0014 size 4 |
|
1974 | entry-0014 size 4 | |
1975 | '\x00\x00\x00\x00' |
|
1975 | '\x00\x00\x00\x00' | |
1976 | ##### revision "g-1" ##### |
|
1976 | ##### revision "g-1" ##### | |
1977 | 1 sidedata entries |
|
1977 | 1 sidedata entries | |
1978 | entry-0014 size 14 |
|
1978 | entry-0014 size 14 | |
1979 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1979 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1980 | touched : d, ; |
|
1980 | touched : d, ; | |
1981 | ##### revision "mDGm-0 actual content merge, copies on one side - D side" ##### |
|
1981 | ##### revision "mDGm-0 actual content merge, copies on one side - D side" ##### | |
1982 | 1 sidedata entries |
|
1982 | 1 sidedata entries | |
1983 | entry-0014 size 14 |
|
1983 | entry-0014 size 14 | |
1984 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1984 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1985 | merged : d, ; |
|
1985 | merged : d, ; | |
1986 | ##### revision "mGDm-0 actual content merge, copies on one side - D side" ##### |
|
1986 | ##### revision "mGDm-0 actual content merge, copies on one side - D side" ##### | |
1987 | 1 sidedata entries |
|
1987 | 1 sidedata entries | |
1988 | entry-0014 size 14 |
|
1988 | entry-0014 size 14 | |
1989 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1989 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1990 | merged : d, ; |
|
1990 | merged : d, ; | |
1991 | ##### revision "mFGm-0 merge - G side" ##### |
|
1991 | ##### revision "mFGm-0 merge - G side" ##### | |
1992 | 1 sidedata entries |
|
1992 | 1 sidedata entries | |
1993 | entry-0014 size 14 |
|
1993 | entry-0014 size 14 | |
1994 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1994 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
1995 | merged : d, ; |
|
1995 | merged : d, ; | |
1996 | ##### revision "mGFm-0 merge - G side" ##### |
|
1996 | ##### revision "mGFm-0 merge - G side" ##### | |
1997 | 1 sidedata entries |
|
1997 | 1 sidedata entries | |
1998 | entry-0014 size 14 |
|
1998 | entry-0014 size 14 | |
1999 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
1999 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2000 | merged : d, ; |
|
2000 | merged : d, ; | |
2001 | ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" ##### |
|
2001 | ##### revision "mCGm-0 merge updated/deleted - revive the file (updated content) - one way" ##### | |
2002 | 1 sidedata entries |
|
2002 | 1 sidedata entries | |
2003 | entry-0014 size 14 |
|
2003 | entry-0014 size 14 | |
2004 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
2004 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2005 | salvaged : d, ; |
|
2005 | salvaged : d, ; | |
2006 | ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" ##### |
|
2006 | ##### revision "mGCm-0 merge updated/deleted - revive the file (updated content) - the other way" ##### | |
2007 | 1 sidedata entries |
|
2007 | 1 sidedata entries | |
2008 | entry-0014 size 14 |
|
2008 | entry-0014 size 14 | |
2009 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
2009 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2010 | salvaged : d, ; |
|
2010 | salvaged : d, ; | |
2011 | ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" ##### |
|
2011 | ##### revision "mCB-revert-m-0 merge explicitely revive deleted file - B side" ##### | |
2012 | 1 sidedata entries |
|
2012 | 1 sidedata entries | |
2013 | entry-0014 size 14 |
|
2013 | entry-0014 size 14 | |
2014 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
2014 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2015 | salvaged : d, ; |
|
2015 | salvaged : d, ; | |
2016 | ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" ##### |
|
2016 | ##### revision "mBC-revert-m-0 merge explicitely revive deleted file - B side" ##### | |
2017 | 1 sidedata entries |
|
2017 | 1 sidedata entries | |
2018 | entry-0014 size 14 |
|
2018 | entry-0014 size 14 | |
2019 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
2019 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2020 | salvaged : d, ; |
|
2020 | salvaged : d, ; | |
2021 | ##### revision "h-1" ##### |
|
2021 | ##### revision "h-1" ##### | |
2022 | 1 sidedata entries |
|
2022 | 1 sidedata entries | |
2023 | entry-0014 size 24 |
|
2023 | entry-0014 size 24 | |
2024 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd' |
|
2024 | '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00bd' | |
2025 | removed : b, ; |
|
2025 | removed : b, ; | |
2026 | added p1: d, b; |
|
2026 | added p1: d, b; | |
2027 | ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" ##### |
|
2027 | ##### revision "mCH-delete-before-conflict-m-0 simple merge - C side" ##### | |
2028 | 1 sidedata entries |
|
2028 | 1 sidedata entries | |
2029 | entry-0014 size 4 |
|
2029 | entry-0014 size 4 | |
2030 | '\x00\x00\x00\x00' |
|
2030 | '\x00\x00\x00\x00' | |
2031 | ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" ##### |
|
2031 | ##### revision "mHC-delete-before-conflict-m-0 simple merge - C side" ##### | |
2032 | 1 sidedata entries |
|
2032 | 1 sidedata entries | |
2033 | entry-0014 size 4 |
|
2033 | entry-0014 size 4 | |
2034 | '\x00\x00\x00\x00' |
|
2034 | '\x00\x00\x00\x00' | |
2035 | ##### revision "mAE-change-m-0 merge with file update and copies info on both side - A side" ##### |
|
2035 | ##### revision "mAE-change-m-0 merge with file update and copies info on both side - A side" ##### | |
2036 | 1 sidedata entries |
|
2036 | 1 sidedata entries | |
2037 | entry-0014 size 14 |
|
2037 | entry-0014 size 14 | |
2038 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
2038 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
2039 | merged : f, ; |
|
2039 | merged : f, ; | |
2040 | ##### revision "mEA-change-m-0 merge with file update and copies info on both side - A side" ##### |
|
2040 | ##### revision "mEA-change-m-0 merge with file update and copies info on both side - A side" ##### | |
2041 | 1 sidedata entries |
|
2041 | 1 sidedata entries | |
2042 | entry-0014 size 14 |
|
2042 | entry-0014 size 14 | |
2043 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' |
|
2043 | '\x00\x00\x00\x01\x08\x00\x00\x00\x01\x00\x00\x00\x00f' | |
2044 | merged : f, ; |
|
2044 | merged : f, ; | |
2045 | ##### revision "mBF-change-m-0 merge with extra change - B side" ##### |
|
2045 | ##### revision "mBF-change-m-0 merge with extra change - B side" ##### | |
2046 | 1 sidedata entries |
|
2046 | 1 sidedata entries | |
2047 | entry-0014 size 14 |
|
2047 | entry-0014 size 14 | |
2048 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
2048 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2049 | touched : d, ; |
|
2049 | touched : d, ; | |
2050 | ##### revision "mFB-change-m-0 merge with extra change - B side" ##### |
|
2050 | ##### revision "mFB-change-m-0 merge with extra change - B side" ##### | |
2051 | 1 sidedata entries |
|
2051 | 1 sidedata entries | |
2052 | entry-0014 size 14 |
|
2052 | entry-0014 size 14 | |
2053 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
2053 | '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2054 | touched : d, ; |
|
2054 | touched : d, ; | |
2055 | ##### revision "mCB-change-m-0 merge explicitely revive deleted file - B side" ##### |
|
2055 | ##### revision "mCB-change-m-0 merge explicitely revive deleted file - B side" ##### | |
2056 | 1 sidedata entries |
|
2056 | 1 sidedata entries | |
2057 | entry-0014 size 14 |
|
2057 | entry-0014 size 14 | |
2058 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
2058 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2059 | salvaged : d, ; |
|
2059 | salvaged : d, ; | |
2060 | ##### revision "mBC-change-m-0 merge explicitely revive deleted file - B side" ##### |
|
2060 | ##### revision "mBC-change-m-0 merge explicitely revive deleted file - B side" ##### | |
2061 | 1 sidedata entries |
|
2061 | 1 sidedata entries | |
2062 | entry-0014 size 14 |
|
2062 | entry-0014 size 14 | |
2063 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' |
|
2063 | '\x00\x00\x00\x01\x10\x00\x00\x00\x01\x00\x00\x00\x00d' | |
2064 | salvaged : d, ; |
|
2064 | salvaged : d, ; | |
2065 | ##### revision "j-1" ##### |
|
2065 | ##### revision "j-1" ##### | |
2066 | 1 sidedata entries |
|
2066 | 1 sidedata entries | |
2067 | entry-0014 size 24 |
|
2067 | entry-0014 size 24 | |
2068 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' |
|
2068 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' | |
2069 | added : unrelated-j, ; |
|
2069 | added : unrelated-j, ; | |
2070 | ##### revision "k-1" ##### |
|
2070 | ##### revision "k-1" ##### | |
2071 | 1 sidedata entries |
|
2071 | 1 sidedata entries | |
2072 | entry-0014 size 24 |
|
2072 | entry-0014 size 24 | |
2073 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k' |
|
2073 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-k' | |
2074 | added : unrelated-k, ; |
|
2074 | added : unrelated-k, ; | |
2075 | ##### revision "mAE,Km" ##### |
|
2075 | ##### revision "mAE,Km" ##### | |
2076 | 1 sidedata entries |
|
2076 | 1 sidedata entries | |
2077 | entry-0014 size 4 |
|
2077 | entry-0014 size 4 | |
2078 | '\x00\x00\x00\x00' |
|
2078 | '\x00\x00\x00\x00' | |
2079 | ##### revision "mK,AEm" ##### |
|
2079 | ##### revision "mK,AEm" ##### | |
2080 | 1 sidedata entries |
|
2080 | 1 sidedata entries | |
2081 | entry-0014 size 4 |
|
2081 | entry-0014 size 4 | |
2082 | '\x00\x00\x00\x00' |
|
2082 | '\x00\x00\x00\x00' | |
2083 | ##### revision "mEA,Jm" ##### |
|
2083 | ##### revision "mEA,Jm" ##### | |
2084 | 1 sidedata entries |
|
2084 | 1 sidedata entries | |
2085 | entry-0014 size 24 |
|
2085 | entry-0014 size 24 | |
2086 | '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' |
|
2086 | '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' | |
2087 | touched : unrelated-j, ; |
|
2087 | touched : unrelated-j, ; | |
2088 | ##### revision "mJ,EAm" ##### |
|
2088 | ##### revision "mJ,EAm" ##### | |
2089 | 1 sidedata entries |
|
2089 | 1 sidedata entries | |
2090 | entry-0014 size 24 |
|
2090 | entry-0014 size 24 | |
2091 | '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' |
|
2091 | '\x00\x00\x00\x01\x14\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-j' | |
2092 | touched : unrelated-j, ; |
|
2092 | touched : unrelated-j, ; | |
2093 | ##### revision "s-1" ##### |
|
2093 | ##### revision "s-1" ##### | |
2094 | 1 sidedata entries |
|
2094 | 1 sidedata entries | |
2095 | entry-0014 size 24 |
|
2095 | entry-0014 size 24 | |
2096 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-s' |
|
2096 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-s' | |
2097 | added : unrelated-s, ; |
|
2097 | added : unrelated-s, ; | |
2098 | ##### revision "t-1" ##### |
|
2098 | ##### revision "t-1" ##### | |
2099 | 1 sidedata entries |
|
2099 | 1 sidedata entries | |
2100 | entry-0014 size 24 |
|
2100 | entry-0014 size 24 | |
2101 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-t' |
|
2101 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-t' | |
2102 | added : unrelated-t, ; |
|
2102 | added : unrelated-t, ; | |
2103 | ##### revision "mPQ,Tm" ##### |
|
2103 | ##### revision "mPQ,Tm" ##### | |
2104 | 1 sidedata entries |
|
2104 | 1 sidedata entries | |
2105 | entry-0014 size 4 |
|
2105 | entry-0014 size 4 | |
2106 | '\x00\x00\x00\x00' |
|
2106 | '\x00\x00\x00\x00' | |
2107 | ##### revision "mT,PQm" ##### |
|
2107 | ##### revision "mT,PQm" ##### | |
2108 | 1 sidedata entries |
|
2108 | 1 sidedata entries | |
2109 | entry-0014 size 4 |
|
2109 | entry-0014 size 4 | |
2110 | '\x00\x00\x00\x00' |
|
2110 | '\x00\x00\x00\x00' | |
2111 | ##### revision "mQP,Sm" ##### |
|
2111 | ##### revision "mQP,Sm" ##### | |
2112 | 1 sidedata entries |
|
2112 | 1 sidedata entries | |
2113 | entry-0014 size 4 |
|
2113 | entry-0014 size 4 | |
2114 | '\x00\x00\x00\x00' |
|
2114 | '\x00\x00\x00\x00' | |
2115 | ##### revision "mS,QPm" ##### |
|
2115 | ##### revision "mS,QPm" ##### | |
2116 | 1 sidedata entries |
|
2116 | 1 sidedata entries | |
2117 | entry-0014 size 4 |
|
2117 | entry-0014 size 4 | |
2118 | '\x00\x00\x00\x00' |
|
2118 | '\x00\x00\x00\x00' | |
2119 | ##### revision "l-1" ##### |
|
2119 | ##### revision "l-1" ##### | |
2120 | 1 sidedata entries |
|
2120 | 1 sidedata entries | |
2121 | entry-0014 size 24 |
|
2121 | entry-0014 size 24 | |
2122 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l' |
|
2122 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-l' | |
2123 | added : unrelated-l, ; |
|
2123 | added : unrelated-l, ; | |
2124 | ##### revision "mBC+revert,Lm" ##### |
|
2124 | ##### revision "mBC+revert,Lm" ##### | |
2125 | 1 sidedata entries |
|
2125 | 1 sidedata entries | |
2126 | entry-0014 size 4 |
|
2126 | entry-0014 size 4 | |
2127 | '\x00\x00\x00\x00' |
|
2127 | '\x00\x00\x00\x00' | |
2128 | ##### revision "mCB+revert,Lm" ##### |
|
2128 | ##### revision "mCB+revert,Lm" ##### | |
2129 | 1 sidedata entries |
|
2129 | 1 sidedata entries | |
2130 | entry-0014 size 4 |
|
2130 | entry-0014 size 4 | |
2131 | '\x00\x00\x00\x00' |
|
2131 | '\x00\x00\x00\x00' | |
2132 | ##### revision "mL,BC+revertm" ##### |
|
2132 | ##### revision "mL,BC+revertm" ##### | |
2133 | 1 sidedata entries |
|
2133 | 1 sidedata entries | |
2134 | entry-0014 size 4 |
|
2134 | entry-0014 size 4 | |
2135 | '\x00\x00\x00\x00' |
|
2135 | '\x00\x00\x00\x00' | |
2136 | ##### revision "mL,CB+revertm" ##### |
|
2136 | ##### revision "mL,CB+revertm" ##### | |
2137 | 1 sidedata entries |
|
2137 | 1 sidedata entries | |
2138 | entry-0014 size 4 |
|
2138 | entry-0014 size 4 | |
2139 | '\x00\x00\x00\x00' |
|
2139 | '\x00\x00\x00\x00' | |
2140 | ##### revision "n-1" ##### |
|
2140 | ##### revision "n-1" ##### | |
2141 | 1 sidedata entries |
|
2141 | 1 sidedata entries | |
2142 | entry-0014 size 24 |
|
2142 | entry-0014 size 24 | |
2143 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n' |
|
2143 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-n' | |
2144 | added : unrelated-n, ; |
|
2144 | added : unrelated-n, ; | |
2145 | ##### revision "o-1" ##### |
|
2145 | ##### revision "o-1" ##### | |
2146 | 1 sidedata entries |
|
2146 | 1 sidedata entries | |
2147 | entry-0014 size 24 |
|
2147 | entry-0014 size 24 | |
2148 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o' |
|
2148 | '\x00\x00\x00\x01\x04\x00\x00\x00\x0b\x00\x00\x00\x00unrelated-o' | |
2149 | added : unrelated-o, ; |
|
2149 | added : unrelated-o, ; | |
2150 | ##### revision "mFG,Om" ##### |
|
2150 | ##### revision "mFG,Om" ##### | |
2151 | 1 sidedata entries |
|
2151 | 1 sidedata entries | |
2152 | entry-0014 size 4 |
|
2152 | entry-0014 size 4 | |
2153 | '\x00\x00\x00\x00' |
|
2153 | '\x00\x00\x00\x00' | |
2154 | ##### revision "mO,FGm" ##### |
|
2154 | ##### revision "mO,FGm" ##### | |
2155 | 1 sidedata entries |
|
2155 | 1 sidedata entries | |
2156 | entry-0014 size 4 |
|
2156 | entry-0014 size 4 | |
2157 | '\x00\x00\x00\x00' |
|
2157 | '\x00\x00\x00\x00' | |
2158 | ##### revision "mGF,Nm" ##### |
|
2158 | ##### revision "mGF,Nm" ##### | |
2159 | 1 sidedata entries |
|
2159 | 1 sidedata entries | |
2160 | entry-0014 size 4 |
|
2160 | entry-0014 size 4 | |
2161 | '\x00\x00\x00\x00' |
|
2161 | '\x00\x00\x00\x00' | |
2162 | ##### revision "mN,GFm" ##### |
|
2162 | ##### revision "mN,GFm" ##### | |
2163 | 1 sidedata entries |
|
2163 | 1 sidedata entries | |
2164 | entry-0014 size 4 |
|
2164 | entry-0014 size 4 | |
2165 | '\x00\x00\x00\x00' |
|
2165 | '\x00\x00\x00\x00' | |
2166 | ##### revision "mAE-change,Km" ##### |
|
2166 | ##### revision "mAE-change,Km" ##### | |
2167 | 1 sidedata entries |
|
2167 | 1 sidedata entries | |
2168 | entry-0014 size 4 |
|
2168 | entry-0014 size 4 | |
2169 | '\x00\x00\x00\x00' |
|
2169 | '\x00\x00\x00\x00' | |
2170 | ##### revision "mK,AE-change-m" ##### |
|
2170 | ##### revision "mK,AE-change-m" ##### | |
2171 | 1 sidedata entries |
|
2171 | 1 sidedata entries | |
2172 | entry-0014 size 4 |
|
2172 | entry-0014 size 4 | |
2173 | '\x00\x00\x00\x00' |
|
2173 | '\x00\x00\x00\x00' | |
2174 | ##### revision "mEA-change,Jm" ##### |
|
2174 | ##### revision "mEA-change,Jm" ##### | |
2175 | 1 sidedata entries |
|
2175 | 1 sidedata entries | |
2176 | entry-0014 size 4 |
|
2176 | entry-0014 size 4 | |
2177 | '\x00\x00\x00\x00' |
|
2177 | '\x00\x00\x00\x00' | |
2178 | ##### revision "mJ,EA-change-m" ##### |
|
2178 | ##### revision "mJ,EA-change-m" ##### | |
2179 | 1 sidedata entries |
|
2179 | 1 sidedata entries | |
2180 | entry-0014 size 4 |
|
2180 | entry-0014 size 4 | |
2181 | '\x00\x00\x00\x00' |
|
2181 | '\x00\x00\x00\x00' | |
2182 |
|
2182 | |||
2183 | #endif |
|
2183 | #endif | |
2184 |
|
2184 | |||
2185 |
|
2185 | |||
2186 | Test copy information chaining |
|
2186 | Test copy information chaining | |
2187 | ============================== |
|
2187 | ============================== | |
2188 |
|
2188 | |||
2189 | Check that matching only affect the destination and not intermediate path |
|
2189 | Check that matching only affect the destination and not intermediate path | |
2190 | ------------------------------------------------------------------------- |
|
2190 | ------------------------------------------------------------------------- | |
2191 |
|
2191 | |||
2192 | The two status call should give the same value for f |
|
2192 | The two status call should give the same value for f | |
2193 |
|
2193 | |||
2194 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' |
|
2194 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' | |
2195 | A f |
|
2195 | A f | |
2196 | a |
|
2196 | a | |
2197 | A t |
|
2197 | A t | |
2198 | p |
|
2198 | p | |
2199 | R a |
|
2199 | R a | |
2200 | R p |
|
2200 | R p | |
2201 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f |
|
2201 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("a-2")' f | |
2202 | A f |
|
2202 | A f | |
2203 | a (no-changeset no-compatibility !) |
|
2203 | a (no-changeset no-compatibility !) | |
2204 |
|
2204 | |||
2205 | merging with unrelated change does not interfere with the renames |
|
2205 | merging with unrelated change does not interfere with the renames | |
2206 | --------------------------------------------------------------- |
|
2206 | --------------------------------------------------------------- | |
2207 |
|
2207 | |||
2208 | - rename on one side |
|
2208 | - rename on one side | |
2209 | - unrelated change on the other side |
|
2209 | - unrelated change on the other side | |
2210 |
|
2210 | |||
2211 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' |
|
2211 | $ hg log -G --rev '::(desc("mABm")+desc("mBAm"))' | |
2212 | o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way |
|
2212 | o mABm-0 simple merge - A side: multiple renames, B side: unrelated update - the other way | |
2213 | |\ |
|
2213 | |\ | |
2214 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way |
|
2214 | +---o mBAm-0 simple merge - A side: multiple renames, B side: unrelated update - one way | |
2215 | | |/ |
|
2215 | | |/ | |
2216 | | o b-1: b update |
|
2216 | | o b-1: b update | |
2217 | | | |
|
2217 | | | | |
2218 | o | a-2: e -move-> f |
|
2218 | o | a-2: e -move-> f | |
2219 | | | |
|
2219 | | | | |
2220 | o | a-1: d -move-> e |
|
2220 | o | a-1: d -move-> e | |
2221 | |/ |
|
2221 | |/ | |
2222 | o i-2: c -move-> d, s -move-> t |
|
2222 | o i-2: c -move-> d, s -move-> t | |
2223 | | |
|
2223 | | | |
2224 | o i-1: a -move-> c, p -move-> s |
|
2224 | o i-1: a -move-> c, p -move-> s | |
2225 | | |
|
2225 | | | |
2226 | o i-0 initial commit: a b h p q r |
|
2226 | o i-0 initial commit: a b h p q r | |
2227 |
|
2227 | |||
2228 |
|
2228 | |||
2229 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' |
|
2229 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' | |
2230 | A f |
|
2230 | A f | |
2231 | d |
|
2231 | d | |
2232 | R d |
|
2232 | R d | |
2233 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' |
|
2233 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' | |
2234 | A f |
|
2234 | A f | |
2235 | d |
|
2235 | d | |
2236 | R d |
|
2236 | R d | |
2237 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' |
|
2237 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' | |
2238 | M b |
|
2238 | M b | |
2239 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' |
|
2239 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' | |
2240 | M b |
|
2240 | M b | |
2241 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' |
|
2241 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' | |
2242 | M b |
|
2242 | M b | |
2243 | A f |
|
2243 | A f | |
2244 | d |
|
2244 | d | |
2245 | R d |
|
2245 | R d | |
2246 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' |
|
2246 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' | |
2247 | M b |
|
2247 | M b | |
2248 | A f |
|
2248 | A f | |
2249 | d |
|
2249 | d | |
2250 | R d |
|
2250 | R d | |
2251 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' |
|
2251 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' | |
2252 | M b |
|
2252 | M b | |
2253 | A f |
|
2253 | A f | |
2254 | a |
|
2254 | a | |
2255 | A t |
|
2255 | A t | |
2256 | p |
|
2256 | p | |
2257 | R a |
|
2257 | R a | |
2258 | R p |
|
2258 | R p | |
2259 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' |
|
2259 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' | |
2260 | M b |
|
2260 | M b | |
2261 | A f |
|
2261 | A f | |
2262 | a |
|
2262 | a | |
2263 | A t |
|
2263 | A t | |
2264 | p |
|
2264 | p | |
2265 | R a |
|
2265 | R a | |
2266 | R p |
|
2266 | R p | |
2267 |
|
2267 | |||
2268 | merging with the side having a delete |
|
2268 | merging with the side having a delete | |
2269 | ------------------------------------- |
|
2269 | ------------------------------------- | |
2270 |
|
2270 | |||
2271 | case summary: |
|
2271 | case summary: | |
2272 | - one with change to an unrelated file |
|
2272 | - one with change to an unrelated file | |
2273 | - one deleting the change |
|
2273 | - one deleting the change | |
2274 | and recreate an unrelated file after the merge |
|
2274 | and recreate an unrelated file after the merge | |
2275 |
|
2275 | |||
2276 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' |
|
2276 | $ hg log -G --rev '::(desc("mCBm")+desc("mBCm"))' | |
2277 | o mCBm-1 re-add d |
|
2277 | o mCBm-1 re-add d | |
2278 | | |
|
2278 | | | |
2279 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way |
|
2279 | o mCBm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - the other way | |
2280 | |\ |
|
2280 | |\ | |
2281 | | | o mBCm-1 re-add d |
|
2281 | | | o mBCm-1 re-add d | |
2282 | | | | |
|
2282 | | | | | |
2283 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way |
|
2283 | +---o mBCm-0 simple merge - C side: delete a file with copies history , B side: unrelated update - one way | |
2284 | | |/ |
|
2284 | | |/ | |
2285 | | o c-1 delete d |
|
2285 | | o c-1 delete d | |
2286 | | | |
|
2286 | | | | |
2287 | o | b-1: b update |
|
2287 | o | b-1: b update | |
2288 | |/ |
|
2288 | |/ | |
2289 | o i-2: c -move-> d, s -move-> t |
|
2289 | o i-2: c -move-> d, s -move-> t | |
2290 | | |
|
2290 | | | |
2291 | o i-1: a -move-> c, p -move-> s |
|
2291 | o i-1: a -move-> c, p -move-> s | |
2292 | | |
|
2292 | | | |
2293 | o i-0 initial commit: a b h p q r |
|
2293 | o i-0 initial commit: a b h p q r | |
2294 |
|
2294 | |||
2295 | - comparing from the merge |
|
2295 | - comparing from the merge | |
2296 |
|
2296 | |||
2297 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' |
|
2297 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' | |
2298 | R d |
|
2298 | R d | |
2299 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' |
|
2299 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-0")' | |
2300 | R d |
|
2300 | R d | |
2301 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' |
|
2301 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-0")' | |
2302 | M b |
|
2302 | M b | |
2303 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' |
|
2303 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-0")' | |
2304 | M b |
|
2304 | M b | |
2305 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' |
|
2305 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-0")' | |
2306 | M b |
|
2306 | M b | |
2307 | R d |
|
2307 | R d | |
2308 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' |
|
2308 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-0")' | |
2309 | M b |
|
2309 | M b | |
2310 | R d |
|
2310 | R d | |
2311 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' |
|
2311 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-0")' | |
2312 | M b |
|
2312 | M b | |
2313 | A t |
|
2313 | A t | |
2314 | p |
|
2314 | p | |
2315 | R a |
|
2315 | R a | |
2316 | R p |
|
2316 | R p | |
2317 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' |
|
2317 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-0")' | |
2318 | M b |
|
2318 | M b | |
2319 | A t |
|
2319 | A t | |
2320 | p |
|
2320 | p | |
2321 | R a |
|
2321 | R a | |
2322 | R p |
|
2322 | R p | |
2323 |
|
2323 | |||
2324 | - comparing with the merge children re-adding the file |
|
2324 | - comparing with the merge children re-adding the file | |
2325 |
|
2325 | |||
2326 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' |
|
2326 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-1")' | |
2327 | M d |
|
2327 | M d | |
2328 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' |
|
2328 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCBm-1")' | |
2329 | M d |
|
2329 | M d | |
2330 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' |
|
2330 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBCm-1")' | |
2331 | M b |
|
2331 | M b | |
2332 | A d |
|
2332 | A d | |
2333 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' |
|
2333 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCBm-1")' | |
2334 | M b |
|
2334 | M b | |
2335 | A d |
|
2335 | A d | |
2336 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' |
|
2336 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBCm-1")' | |
2337 | M b |
|
2337 | M b | |
2338 | M d |
|
2338 | M d | |
2339 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' |
|
2339 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mCBm-1")' | |
2340 | M b |
|
2340 | M b | |
2341 | M d |
|
2341 | M d | |
2342 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' |
|
2342 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBCm-1")' | |
2343 | M b |
|
2343 | M b | |
2344 | A d |
|
2344 | A d | |
2345 | A t |
|
2345 | A t | |
2346 | p |
|
2346 | p | |
2347 | R a |
|
2347 | R a | |
2348 | R p |
|
2348 | R p | |
2349 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' |
|
2349 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCBm-1")' | |
2350 | M b |
|
2350 | M b | |
2351 | A d |
|
2351 | A d | |
2352 | A t |
|
2352 | A t | |
2353 | p |
|
2353 | p | |
2354 | R a |
|
2354 | R a | |
2355 | R p |
|
2355 | R p | |
2356 |
|
2356 | |||
2357 | Comparing with a merge re-adding the file afterward |
|
2357 | Comparing with a merge re-adding the file afterward | |
2358 | --------------------------------------------------- |
|
2358 | --------------------------------------------------- | |
2359 |
|
2359 | |||
2360 | Merge: |
|
2360 | Merge: | |
2361 | - one with change to an unrelated file |
|
2361 | - one with change to an unrelated file | |
2362 | - one deleting and recreating the change |
|
2362 | - one deleting and recreating the change | |
2363 |
|
2363 | |||
2364 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' |
|
2364 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
2365 | o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way |
|
2365 | o mDBm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - the other way | |
2366 | |\ |
|
2366 | |\ | |
2367 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way |
|
2367 | +---o mBDm-0 simple merge - B side: unrelated update, D side: delete and recreate a file (with different content) - one way | |
2368 | | |/ |
|
2368 | | |/ | |
2369 | | o d-2 re-add d |
|
2369 | | o d-2 re-add d | |
2370 | | | |
|
2370 | | | | |
2371 | | o d-1 delete d |
|
2371 | | o d-1 delete d | |
2372 | | | |
|
2372 | | | | |
2373 | o | b-1: b update |
|
2373 | o | b-1: b update | |
2374 | |/ |
|
2374 | |/ | |
2375 | o i-2: c -move-> d, s -move-> t |
|
2375 | o i-2: c -move-> d, s -move-> t | |
2376 | | |
|
2376 | | | |
2377 | o i-1: a -move-> c, p -move-> s |
|
2377 | o i-1: a -move-> c, p -move-> s | |
2378 | | |
|
2378 | | | |
2379 | o i-0 initial commit: a b h p q r |
|
2379 | o i-0 initial commit: a b h p q r | |
2380 |
|
2380 | |||
2381 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' |
|
2381 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' | |
2382 | M d |
|
2382 | M d | |
2383 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' |
|
2383 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' | |
2384 | M d |
|
2384 | M d | |
2385 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' |
|
2385 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mBDm-0")' | |
2386 | M b |
|
2386 | M b | |
2387 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' |
|
2387 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDBm-0")' | |
2388 | M b |
|
2388 | M b | |
2389 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' |
|
2389 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBDm-0")' | |
2390 | M b |
|
2390 | M b | |
2391 | M d |
|
2391 | M d | |
2392 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' |
|
2392 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mDBm-0")' | |
2393 | M b |
|
2393 | M b | |
2394 | M d |
|
2394 | M d | |
2395 |
|
2395 | |||
2396 | The bugs makes recorded copy is different depending of where we started the merge from since |
|
2396 | The bugs makes recorded copy is different depending of where we started the merge from since | |
2397 |
|
2397 | |||
2398 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' |
|
2398 | $ hg manifest --debug --rev 'desc("mBDm-0")' | grep '644 d' | |
2399 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
2399 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
2400 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' |
|
2400 | $ hg manifest --debug --rev 'desc("mDBm-0")' | grep '644 d' | |
2401 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
2401 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
2402 |
|
2402 | |||
2403 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' |
|
2403 | $ hg manifest --debug --rev 'desc("d-2")' | grep '644 d' | |
2404 | b004912a8510032a0350a74daa2803dadfb00e12 644 d |
|
2404 | b004912a8510032a0350a74daa2803dadfb00e12 644 d | |
2405 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' |
|
2405 | $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' | |
2406 | d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !) |
|
2406 | d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !) | |
2407 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) |
|
2407 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) | |
2408 | $ hg debugindex d | head -n 4 | "$PYTHON" ../no-linkrev |
|
2408 | $ hg debugindex d | head -n 4 | "$PYTHON" ../no-linkrev | |
2409 | rev linkrev nodeid p1 p2 |
|
2409 | rev linkrev nodeid p1 p2 | |
2410 | 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) |
|
2410 | 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) | |
2411 | 0 * ae258f702dfe 000000000000 000000000000 (changeset !) |
|
2411 | 0 * ae258f702dfe 000000000000 000000000000 (changeset !) | |
2412 | 1 * b004912a8510 000000000000 000000000000 |
|
2412 | 1 * b004912a8510 000000000000 000000000000 | |
2413 | 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) |
|
2413 | 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) | |
2414 | 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !) |
|
2414 | 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !) | |
2415 |
|
2415 | |||
2416 | Log output should not include a merge commit as it did not happen |
|
2416 | Log output should not include a merge commit as it did not happen | |
2417 |
|
2417 | |||
2418 | $ hg log -Gfr 'desc("mBDm-0")' d |
|
2418 | $ hg log -Gfr 'desc("mBDm-0")' d | |
2419 | o d-2 re-add d |
|
2419 | o d-2 re-add d | |
2420 | | |
|
2420 | | | |
2421 | ~ |
|
2421 | ~ | |
2422 |
|
2422 | |||
2423 | $ hg log -Gfr 'desc("mDBm-0")' d |
|
2423 | $ hg log -Gfr 'desc("mDBm-0")' d | |
2424 | o d-2 re-add d |
|
2424 | o d-2 re-add d | |
2425 | | |
|
2425 | | | |
2426 | ~ |
|
2426 | ~ | |
2427 |
|
2427 | |||
2428 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' |
|
2428 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBDm-0")' | |
2429 | M b |
|
2429 | M b | |
2430 | A d |
|
2430 | A d | |
2431 | A t |
|
2431 | A t | |
2432 | p |
|
2432 | p | |
2433 | R a |
|
2433 | R a | |
2434 | R p |
|
2434 | R p | |
2435 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' |
|
2435 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDBm-0")' | |
2436 | M b |
|
2436 | M b | |
2437 | A d |
|
2437 | A d | |
2438 | A t |
|
2438 | A t | |
2439 | p |
|
2439 | p | |
2440 | R a |
|
2440 | R a | |
2441 | R p |
|
2441 | R p | |
2442 |
|
2442 | |||
2443 |
|
2443 | |||
2444 | Comparing with a merge with colliding rename |
|
2444 | Comparing with a merge with colliding rename | |
2445 | -------------------------------------------- |
|
2445 | -------------------------------------------- | |
2446 |
|
2446 | |||
2447 | Subcase: new copy information on both side |
|
2447 | Subcase: new copy information on both side | |
2448 | `````````````````````````````````````````` |
|
2448 | `````````````````````````````````````````` | |
2449 |
|
2449 | |||
2450 | - the "e-" branch renaming b to f (through 'g') |
|
2450 | - the "e-" branch renaming b to f (through 'g') | |
2451 | - the "a-" branch renaming d to f (through e) |
|
2451 | - the "a-" branch renaming d to f (through e) | |
2452 |
|
2452 | |||
2453 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' |
|
2453 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
2454 | o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way |
|
2454 | o mEAm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - the other way | |
2455 | |\ |
|
2455 | |\ | |
2456 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way |
|
2456 | +---o mAEm-0 merge with copies info on both side - A side: rename d to f, E side: b to f, (same content for f) - one way | |
2457 | | |/ |
|
2457 | | |/ | |
2458 | | o e-2 g -move-> f |
|
2458 | | o e-2 g -move-> f | |
2459 | | | |
|
2459 | | | | |
2460 | | o e-1 b -move-> g |
|
2460 | | o e-1 b -move-> g | |
2461 | | | |
|
2461 | | | | |
2462 | o | a-2: e -move-> f |
|
2462 | o | a-2: e -move-> f | |
2463 | | | |
|
2463 | | | | |
2464 | o | a-1: d -move-> e |
|
2464 | o | a-1: d -move-> e | |
2465 | |/ |
|
2465 | |/ | |
2466 | o i-2: c -move-> d, s -move-> t |
|
2466 | o i-2: c -move-> d, s -move-> t | |
2467 | | |
|
2467 | | | |
2468 | o i-1: a -move-> c, p -move-> s |
|
2468 | o i-1: a -move-> c, p -move-> s | |
2469 | | |
|
2469 | | | |
2470 | o i-0 initial commit: a b h p q r |
|
2470 | o i-0 initial commit: a b h p q r | |
2471 |
|
2471 | |||
2472 | #if no-changeset |
|
2472 | #if no-changeset | |
2473 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
2473 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |
2474 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f |
|
2474 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f | |
2475 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
2475 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |
2476 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f |
|
2476 | 2ff93c643948464ee1f871867910ae43a45b0bea 644 f | |
2477 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
2477 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
2478 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f |
|
2478 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f | |
2479 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
2479 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
2480 | e8825b386367b29fec957283a80bb47b47483fe1 644 f |
|
2480 | e8825b386367b29fec957283a80bb47b47483fe1 644 f | |
2481 | $ hg debugindex f | "$PYTHON" ../no-linkrev |
|
2481 | $ hg debugindex f | "$PYTHON" ../no-linkrev | |
2482 | rev linkrev nodeid p1 p2 |
|
2482 | rev linkrev nodeid p1 p2 | |
2483 | 0 * b76eb76580df 000000000000 000000000000 |
|
2483 | 0 * b76eb76580df 000000000000 000000000000 | |
2484 | 1 * e8825b386367 000000000000 000000000000 |
|
2484 | 1 * e8825b386367 000000000000 000000000000 | |
2485 | 2 * 2ff93c643948 b76eb76580df e8825b386367 |
|
2485 | 2 * 2ff93c643948 b76eb76580df e8825b386367 | |
2486 | 3 * 2f649fba7eb2 b76eb76580df e8825b386367 |
|
2486 | 3 * 2f649fba7eb2 b76eb76580df e8825b386367 | |
2487 | 4 * 774e7c1637d5 e8825b386367 b76eb76580df |
|
2487 | 4 * 774e7c1637d5 e8825b386367 b76eb76580df | |
2488 | #else |
|
2488 | #else | |
2489 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' |
|
2489 | $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' | |
2490 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
2490 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
2491 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
|
2491 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' | |
2492 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
2492 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
2493 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
2493 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
2494 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
2494 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
2495 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
2495 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
2496 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
2496 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
2497 | $ hg debugindex f | "$PYTHON" ../no-linkrev |
|
2497 | $ hg debugindex f | "$PYTHON" ../no-linkrev | |
2498 | rev linkrev nodeid p1 p2 |
|
2498 | rev linkrev nodeid p1 p2 | |
2499 | 0 * ae258f702dfe 000000000000 000000000000 |
|
2499 | 0 * ae258f702dfe 000000000000 000000000000 | |
2500 | 1 * d3613c1ec831 ae258f702dfe 000000000000 |
|
2500 | 1 * d3613c1ec831 ae258f702dfe 000000000000 | |
2501 | 2 * 05e03c868bbc ae258f702dfe 000000000000 |
|
2501 | 2 * 05e03c868bbc ae258f702dfe 000000000000 | |
2502 | #endif |
|
2502 | #endif | |
2503 |
|
2503 | |||
2504 | # Here the filelog based implementation is not looking at the rename |
|
2504 | # Here the filelog based implementation is not looking at the rename | |
2505 | # information (because the file exist on both side). However the changelog |
|
2505 | # information (because the file exist on both side). However the changelog | |
2506 | # based on works fine. We have different output. |
|
2506 | # based on works fine. We have different output. | |
2507 |
|
2507 | |||
2508 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' |
|
2508 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")' | |
2509 | M f (no-changeset !) |
|
2509 | M f (no-changeset !) | |
2510 | b (no-filelog no-changeset !) |
|
2510 | b (no-filelog no-changeset !) | |
2511 | R b |
|
2511 | R b | |
2512 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' |
|
2512 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")' | |
2513 | M f (no-changeset !) |
|
2513 | M f (no-changeset !) | |
2514 | b (no-filelog no-changeset !) |
|
2514 | b (no-filelog no-changeset !) | |
2515 | R b |
|
2515 | R b | |
2516 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' |
|
2516 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")' | |
2517 | M f (no-changeset !) |
|
2517 | M f (no-changeset !) | |
2518 | d (no-filelog no-changeset !) |
|
2518 | d (no-filelog no-changeset !) | |
2519 | R d |
|
2519 | R d | |
2520 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' |
|
2520 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")' | |
2521 | M f (no-changeset !) |
|
2521 | M f (no-changeset !) | |
2522 | d (no-filelog no-changeset !) |
|
2522 | d (no-filelog no-changeset !) | |
2523 | R d |
|
2523 | R d | |
2524 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
|
2524 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' | |
2525 | A f |
|
2525 | A f | |
2526 | d |
|
2526 | d | |
2527 | R d |
|
2527 | R d | |
2528 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
|
2528 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' | |
2529 | A f |
|
2529 | A f | |
2530 | b |
|
2530 | b | |
2531 | R b |
|
2531 | R b | |
2532 |
|
2532 | |||
2533 | # From here, we run status against revision where both source file exists. |
|
2533 | # From here, we run status against revision where both source file exists. | |
2534 | # |
|
2534 | # | |
2535 | # The filelog based implementation picks an arbitrary side based on revision |
|
2535 | # The filelog based implementation picks an arbitrary side based on revision | |
2536 | # numbers. So the same side "wins" whatever the parents order is. This is |
|
2536 | # numbers. So the same side "wins" whatever the parents order is. This is | |
2537 | # sub-optimal because depending on revision numbers means the result can be |
|
2537 | # sub-optimal because depending on revision numbers means the result can be | |
2538 | # different from one repository to the next. |
|
2538 | # different from one repository to the next. | |
2539 | # |
|
2539 | # | |
2540 | # The changeset based algorithm use the parent order to break tie on conflicting |
|
2540 | # The changeset based algorithm use the parent order to break tie on conflicting | |
2541 | # information and will have a different order depending on who is p1 and p2. |
|
2541 | # information and will have a different order depending on who is p1 and p2. | |
2542 | # That order is stable accross repositories. (data from p1 prevails) |
|
2542 | # That order is stable accross repositories. (data from p1 prevails) | |
2543 |
|
2543 | |||
2544 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' |
|
2544 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")' | |
2545 | A f |
|
2545 | A f | |
2546 | d |
|
2546 | d | |
2547 | R b |
|
2547 | R b | |
2548 | R d |
|
2548 | R d | |
2549 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' |
|
2549 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")' | |
2550 | A f |
|
2550 | A f | |
2551 | d (filelog !) |
|
2551 | d (filelog !) | |
2552 | b (no-filelog !) |
|
2552 | b (no-filelog !) | |
2553 | R b |
|
2553 | R b | |
2554 | R d |
|
2554 | R d | |
2555 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' |
|
2555 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")' | |
2556 | A f |
|
2556 | A f | |
2557 | a |
|
2557 | a | |
2558 | A t |
|
2558 | A t | |
2559 | p |
|
2559 | p | |
2560 | R a |
|
2560 | R a | |
2561 | R b |
|
2561 | R b | |
2562 | R p |
|
2562 | R p | |
2563 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' |
|
2563 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")' | |
2564 | A f |
|
2564 | A f | |
2565 | a (filelog !) |
|
2565 | a (filelog !) | |
2566 | b (no-filelog !) |
|
2566 | b (no-filelog !) | |
2567 | A t |
|
2567 | A t | |
2568 | p |
|
2568 | p | |
2569 | R a |
|
2569 | R a | |
2570 | R b |
|
2570 | R b | |
2571 | R p |
|
2571 | R p | |
2572 |
|
2572 | |||
2573 |
|
2573 | |||
2574 | Subcase: existing copy information overwritten on one branch |
|
2574 | Subcase: existing copy information overwritten on one branch | |
2575 | ```````````````````````````````````````````````````````````` |
|
2575 | ```````````````````````````````````````````````````````````` | |
2576 |
|
2576 | |||
2577 | Note: |
|
2577 | Note: | |
2578 | | In this case, one of the merge wrongly record a merge while there is none. |
|
2578 | | In this case, one of the merge wrongly record a merge while there is none. | |
2579 | | This lead to bad copy tracing information to be dug up. |
|
2579 | | This lead to bad copy tracing information to be dug up. | |
2580 |
|
2580 | |||
2581 |
|
2581 | |||
2582 | Merge: |
|
2582 | Merge: | |
2583 | - one with change to an unrelated file (b) |
|
2583 | - one with change to an unrelated file (b) | |
2584 | - one overwriting a file (d) with a rename (from h to i to d) |
|
2584 | - one overwriting a file (d) with a rename (from h to i to d) | |
2585 |
|
2585 | |||
2586 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' |
|
2586 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |
2587 | o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
2587 | o mFBm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
2588 | |\ |
|
2588 | |\ | |
2589 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
2589 | +---o mBFm-0 simple merge - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
2590 | | |/ |
|
2590 | | |/ | |
2591 | | o f-2: rename i -> d |
|
2591 | | o f-2: rename i -> d | |
2592 | | | |
|
2592 | | | | |
2593 | | o f-1: rename h -> i |
|
2593 | | o f-1: rename h -> i | |
2594 | | | |
|
2594 | | | | |
2595 | o | b-1: b update |
|
2595 | o | b-1: b update | |
2596 | |/ |
|
2596 | |/ | |
2597 | o i-2: c -move-> d, s -move-> t |
|
2597 | o i-2: c -move-> d, s -move-> t | |
2598 | | |
|
2598 | | | |
2599 | o i-1: a -move-> c, p -move-> s |
|
2599 | o i-1: a -move-> c, p -move-> s | |
2600 | | |
|
2600 | | | |
2601 | o i-0 initial commit: a b h p q r |
|
2601 | o i-0 initial commit: a b h p q r | |
2602 |
|
2602 | |||
2603 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' |
|
2603 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' | |
2604 | M b |
|
2604 | M b | |
2605 | A d |
|
2605 | A d | |
2606 | h |
|
2606 | h | |
2607 | A t |
|
2607 | A t | |
2608 | p |
|
2608 | p | |
2609 | R a |
|
2609 | R a | |
2610 | R h |
|
2610 | R h | |
2611 | R p |
|
2611 | R p | |
2612 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' |
|
2612 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFBm-0")' | |
2613 | M b |
|
2613 | M b | |
2614 | A d |
|
2614 | A d | |
2615 | h |
|
2615 | h | |
2616 | A t |
|
2616 | A t | |
2617 | p |
|
2617 | p | |
2618 | R a |
|
2618 | R a | |
2619 | R h |
|
2619 | R h | |
2620 | R p |
|
2620 | R p | |
2621 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' |
|
2621 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")' | |
2622 | M d (no-changeset !) |
|
2622 | M d (no-changeset !) | |
2623 | h (no-filelog no-changeset !) |
|
2623 | h (no-filelog no-changeset !) | |
2624 | R h |
|
2624 | R h | |
2625 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' |
|
2625 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")' | |
2626 | M b |
|
2626 | M b | |
2627 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' |
|
2627 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")' | |
2628 | M b |
|
2628 | M b | |
2629 | M d (no-changeset !) |
|
2629 | M d (no-changeset !) | |
2630 | i (no-filelog no-changeset !) |
|
2630 | i (no-filelog no-changeset !) | |
2631 | R i |
|
2631 | R i | |
2632 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' |
|
2632 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")' | |
2633 | M d (no-changeset !) |
|
2633 | M d (no-changeset !) | |
2634 | h (no-filelog no-changeset !) |
|
2634 | h (no-filelog no-changeset !) | |
2635 | R h |
|
2635 | R h | |
2636 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' |
|
2636 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")' | |
2637 | M b |
|
2637 | M b | |
2638 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' |
|
2638 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")' | |
2639 | M b |
|
2639 | M b | |
2640 | M d (no-changeset !) |
|
2640 | M d (no-changeset !) | |
2641 | i (no-filelog no-changeset !) |
|
2641 | i (no-filelog no-changeset !) | |
2642 | R i |
|
2642 | R i | |
2643 |
|
2643 | |||
2644 | #if no-changeset |
|
2644 | #if no-changeset | |
2645 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
2645 | $ hg log -Gfr 'desc("mBFm-0")' d | |
2646 | o f-2: rename i -> d |
|
2646 | o f-2: rename i -> d | |
2647 | | |
|
2647 | | | |
2648 | o f-1: rename h -> i |
|
2648 | o f-1: rename h -> i | |
2649 | : |
|
2649 | : | |
2650 | o i-0 initial commit: a b h p q r |
|
2650 | o i-0 initial commit: a b h p q r | |
2651 |
|
2651 | |||
2652 | #else |
|
2652 | #else | |
2653 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2653 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2654 | $ hg log -Gfr 'desc("mBFm-0")' d |
|
2654 | $ hg log -Gfr 'desc("mBFm-0")' d | |
2655 | o i-2: c -move-> d, s -move-> t |
|
2655 | o i-2: c -move-> d, s -move-> t | |
2656 | | |
|
2656 | | | |
2657 | ~ |
|
2657 | ~ | |
2658 | #endif |
|
2658 | #endif | |
2659 |
|
2659 | |||
2660 | #if no-changeset |
|
2660 | #if no-changeset | |
2661 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
2661 | $ hg log -Gfr 'desc("mFBm-0")' d | |
2662 | o f-2: rename i -> d |
|
2662 | o f-2: rename i -> d | |
2663 | | |
|
2663 | | | |
2664 | o f-1: rename h -> i |
|
2664 | o f-1: rename h -> i | |
2665 | : |
|
2665 | : | |
2666 | o i-0 initial commit: a b h p q r |
|
2666 | o i-0 initial commit: a b h p q r | |
2667 |
|
2667 | |||
2668 | #else |
|
2668 | #else | |
2669 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2669 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2670 | $ hg log -Gfr 'desc("mFBm-0")' d |
|
2670 | $ hg log -Gfr 'desc("mFBm-0")' d | |
2671 | o i-2: c -move-> d, s -move-> t |
|
2671 | o i-2: c -move-> d, s -move-> t | |
2672 | | |
|
2672 | | | |
2673 | ~ |
|
2673 | ~ | |
2674 | #endif |
|
2674 | #endif | |
2675 |
|
2675 | |||
2676 |
|
2676 | |||
2677 | Subcase: existing copy information overwritten on one branch, with different content) |
|
2677 | Subcase: existing copy information overwritten on one branch, with different content) | |
2678 | ````````````````````````````````````````````````````````````````````````````````````` |
|
2678 | ````````````````````````````````````````````````````````````````````````````````````` | |
2679 |
|
2679 | |||
2680 | Merge: |
|
2680 | Merge: | |
2681 | - one with change to an unrelated file (b) |
|
2681 | - one with change to an unrelated file (b) | |
2682 | - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch |
|
2682 | - one overwriting a file (t) with a rename (from r to x to t), v content is not the same as on the other branch | |
2683 |
|
2683 | |||
2684 | $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))' |
|
2684 | $ hg log -G --rev '::(desc("mBRm")+desc("mRBm"))' | |
2685 | o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way |
|
2685 | o mRBm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - the other way | |
2686 | |\ |
|
2686 | |\ | |
2687 | +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way |
|
2687 | +---o mBRm-0 simple merge - B side: unrelated change, R side: overwrite d with a copy (from r->x->t) different content - one way | |
2688 | | |/ |
|
2688 | | |/ | |
2689 | | o r-2: rename t -> x |
|
2689 | | o r-2: rename t -> x | |
2690 | | | |
|
2690 | | | | |
2691 | | o r-1: rename r -> x |
|
2691 | | o r-1: rename r -> x | |
2692 | | | |
|
2692 | | | | |
2693 | o | b-1: b update |
|
2693 | o | b-1: b update | |
2694 | |/ |
|
2694 | |/ | |
2695 | o i-2: c -move-> d, s -move-> t |
|
2695 | o i-2: c -move-> d, s -move-> t | |
2696 | | |
|
2696 | | | |
2697 | o i-1: a -move-> c, p -move-> s |
|
2697 | o i-1: a -move-> c, p -move-> s | |
2698 | | |
|
2698 | | | |
2699 | o i-0 initial commit: a b h p q r |
|
2699 | o i-0 initial commit: a b h p q r | |
2700 |
|
2700 | |||
2701 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBRm-0")' |
|
2701 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBRm-0")' | |
2702 | M b |
|
2702 | M b | |
2703 | A d |
|
2703 | A d | |
2704 | a |
|
2704 | a | |
2705 | A t |
|
2705 | A t | |
2706 | r |
|
2706 | r | |
2707 | R a |
|
2707 | R a | |
2708 | R p |
|
2708 | R p | |
2709 | R r |
|
2709 | R r | |
2710 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mRBm-0")' |
|
2710 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mRBm-0")' | |
2711 | M b |
|
2711 | M b | |
2712 | A d |
|
2712 | A d | |
2713 | a |
|
2713 | a | |
2714 | A t |
|
2714 | A t | |
2715 | r |
|
2715 | r | |
2716 | R a |
|
2716 | R a | |
2717 | R p |
|
2717 | R p | |
2718 | R r |
|
2718 | R r | |
2719 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBRm-0")' |
|
2719 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBRm-0")' | |
2720 | M t |
|
2720 | M t | |
2721 | r (no-filelog !) |
|
2721 | r (no-filelog !) | |
2722 | R r |
|
2722 | R r | |
2723 | $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mBRm-0")' |
|
2723 | $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mBRm-0")' | |
2724 | M b |
|
2724 | M b | |
2725 | $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mBRm-0")' |
|
2725 | $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mBRm-0")' | |
2726 | M b |
|
2726 | M b | |
2727 | M t |
|
2727 | M t | |
2728 | x (no-filelog !) |
|
2728 | x (no-filelog !) | |
2729 | R x |
|
2729 | R x | |
2730 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mRBm-0")' |
|
2730 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mRBm-0")' | |
2731 | M t |
|
2731 | M t | |
2732 | r (no-filelog !) |
|
2732 | r (no-filelog !) | |
2733 | R r |
|
2733 | R r | |
2734 | $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mRBm-0")' |
|
2734 | $ hg status --copies --rev 'desc("r-2")' --rev 'desc("mRBm-0")' | |
2735 | M b |
|
2735 | M b | |
2736 | $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mRBm-0")' |
|
2736 | $ hg status --copies --rev 'desc("r-1")' --rev 'desc("mRBm-0")' | |
2737 | M b |
|
2737 | M b | |
2738 | M t |
|
2738 | M t | |
2739 | x (no-filelog !) |
|
2739 | x (no-filelog !) | |
2740 | R x |
|
2740 | R x | |
2741 |
|
2741 | |||
2742 | #if no-changeset |
|
2742 | #if no-changeset | |
2743 | $ hg log -Gfr 'desc("mBRm-0")' d |
|
2743 | $ hg log -Gfr 'desc("mBRm-0")' d | |
2744 | o i-2: c -move-> d, s -move-> t |
|
2744 | o i-2: c -move-> d, s -move-> t | |
2745 | | |
|
2745 | | | |
2746 | o i-1: a -move-> c, p -move-> s |
|
2746 | o i-1: a -move-> c, p -move-> s | |
2747 | | |
|
2747 | | | |
2748 | o i-0 initial commit: a b h p q r |
|
2748 | o i-0 initial commit: a b h p q r | |
2749 |
|
2749 | |||
2750 | #else |
|
2750 | #else | |
2751 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2751 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2752 | $ hg log -Gfr 'desc("mBRm-0")' d |
|
2752 | $ hg log -Gfr 'desc("mBRm-0")' d | |
2753 | o i-2: c -move-> d, s -move-> t |
|
2753 | o i-2: c -move-> d, s -move-> t | |
2754 | | |
|
2754 | | | |
2755 | ~ |
|
2755 | ~ | |
2756 | #endif |
|
2756 | #endif | |
2757 |
|
2757 | |||
2758 | #if no-changeset |
|
2758 | #if no-changeset | |
2759 | $ hg log -Gfr 'desc("mRBm-0")' d |
|
2759 | $ hg log -Gfr 'desc("mRBm-0")' d | |
2760 | o i-2: c -move-> d, s -move-> t |
|
2760 | o i-2: c -move-> d, s -move-> t | |
2761 | | |
|
2761 | | | |
2762 | o i-1: a -move-> c, p -move-> s |
|
2762 | o i-1: a -move-> c, p -move-> s | |
2763 | | |
|
2763 | | | |
2764 | o i-0 initial commit: a b h p q r |
|
2764 | o i-0 initial commit: a b h p q r | |
2765 |
|
2765 | |||
2766 | #else |
|
2766 | #else | |
2767 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2767 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2768 | $ hg log -Gfr 'desc("mRBm-0")' d |
|
2768 | $ hg log -Gfr 'desc("mRBm-0")' d | |
2769 | o i-2: c -move-> d, s -move-> t |
|
2769 | o i-2: c -move-> d, s -move-> t | |
2770 | | |
|
2770 | | | |
2771 | ~ |
|
2771 | ~ | |
2772 | #endif |
|
2772 | #endif | |
2773 |
|
2773 | |||
2774 | Subcase: reset of the copy history on one side |
|
2774 | Subcase: reset of the copy history on one side | |
2775 | `````````````````````````````````````````````` |
|
2775 | `````````````````````````````````````````````` | |
2776 |
|
2776 | |||
2777 | Merge: |
|
2777 | Merge: | |
2778 | - one with change to a file |
|
2778 | - one with change to a file | |
2779 | - one deleting and recreating the file |
|
2779 | - one deleting and recreating the file | |
2780 |
|
2780 | |||
2781 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should |
|
2781 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should | |
2782 | consider history and rename on both branch of the merge. |
|
2782 | consider history and rename on both branch of the merge. | |
2783 |
|
2783 | |||
2784 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' |
|
2784 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |
2785 | o mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way |
|
2785 | o mGDm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - the other way | |
2786 | |\ |
|
2786 | |\ | |
2787 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2787 | +---o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
2788 | | |/ |
|
2788 | | |/ | |
2789 | | o g-1: update d |
|
2789 | | o g-1: update d | |
2790 | | | |
|
2790 | | | | |
2791 | o | d-2 re-add d |
|
2791 | o | d-2 re-add d | |
2792 | | | |
|
2792 | | | | |
2793 | o | d-1 delete d |
|
2793 | o | d-1 delete d | |
2794 | |/ |
|
2794 | |/ | |
2795 | o i-2: c -move-> d, s -move-> t |
|
2795 | o i-2: c -move-> d, s -move-> t | |
2796 | | |
|
2796 | | | |
2797 | o i-1: a -move-> c, p -move-> s |
|
2797 | o i-1: a -move-> c, p -move-> s | |
2798 | | |
|
2798 | | | |
2799 | o i-0 initial commit: a b h p q r |
|
2799 | o i-0 initial commit: a b h p q r | |
2800 |
|
2800 | |||
2801 | One side of the merge have a long history with rename. The other side of the |
|
2801 | One side of the merge have a long history with rename. The other side of the | |
2802 | merge point to a new file with a smaller history. Each side is "valid". |
|
2802 | merge point to a new file with a smaller history. Each side is "valid". | |
2803 |
|
2803 | |||
2804 | (and again the filelog based algorithm only explore one, with a pick based on |
|
2804 | (and again the filelog based algorithm only explore one, with a pick based on | |
2805 | revision numbers) |
|
2805 | revision numbers) | |
2806 |
|
2806 | |||
2807 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' |
|
2807 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' | |
2808 | A d |
|
2808 | A d | |
2809 | a (filelog !) |
|
2809 | a (filelog !) | |
2810 | A t |
|
2810 | A t | |
2811 | p |
|
2811 | p | |
2812 | R a |
|
2812 | R a | |
2813 | R p |
|
2813 | R p | |
2814 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' |
|
2814 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")' | |
2815 | A d |
|
2815 | A d | |
2816 | a |
|
2816 | a | |
2817 | A t |
|
2817 | A t | |
2818 | p |
|
2818 | p | |
2819 | R a |
|
2819 | R a | |
2820 | R p |
|
2820 | R p | |
2821 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' |
|
2821 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mDGm-0")' | |
2822 | M d |
|
2822 | M d | |
2823 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' |
|
2823 | $ hg status --copies --rev 'desc("d-2")' --rev 'desc("mGDm-0")' | |
2824 | M d |
|
2824 | M d | |
2825 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' |
|
2825 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mDGm-0")' | |
2826 | M d |
|
2826 | M d | |
2827 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' |
|
2827 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGDm-0")' | |
2828 | M d |
|
2828 | M d | |
2829 |
|
2829 | |||
2830 | #if no-changeset |
|
2830 | #if no-changeset | |
2831 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
2831 | $ hg log -Gfr 'desc("mDGm-0")' d | |
2832 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2832 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
2833 | |\ |
|
2833 | |\ | |
2834 | | o g-1: update d |
|
2834 | | o g-1: update d | |
2835 | | | |
|
2835 | | | | |
2836 | o | d-2 re-add d |
|
2836 | o | d-2 re-add d | |
2837 | |/ |
|
2837 | |/ | |
2838 | o i-2: c -move-> d, s -move-> t |
|
2838 | o i-2: c -move-> d, s -move-> t | |
2839 | | |
|
2839 | | | |
2840 | o i-1: a -move-> c, p -move-> s |
|
2840 | o i-1: a -move-> c, p -move-> s | |
2841 | | |
|
2841 | | | |
2842 | o i-0 initial commit: a b h p q r |
|
2842 | o i-0 initial commit: a b h p q r | |
2843 |
|
2843 | |||
2844 | #else |
|
2844 | #else | |
2845 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2845 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2846 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
2846 | $ hg log -Gfr 'desc("mDGm-0")' d | |
2847 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2847 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
2848 | |\ |
|
2848 | |\ | |
2849 | | o g-1: update d |
|
2849 | | o g-1: update d | |
2850 | | | |
|
2850 | | | | |
2851 | o | d-2 re-add d |
|
2851 | o | d-2 re-add d | |
2852 | |/ |
|
2852 | |/ | |
2853 | o i-2: c -move-> d, s -move-> t |
|
2853 | o i-2: c -move-> d, s -move-> t | |
2854 | | |
|
2854 | | | |
2855 | ~ |
|
2855 | ~ | |
2856 | #endif |
|
2856 | #endif | |
2857 |
|
2857 | |||
2858 |
|
2858 | |||
2859 | #if no-changeset |
|
2859 | #if no-changeset | |
2860 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
2860 | $ hg log -Gfr 'desc("mDGm-0")' d | |
2861 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2861 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
2862 | |\ |
|
2862 | |\ | |
2863 | | o g-1: update d |
|
2863 | | o g-1: update d | |
2864 | | | |
|
2864 | | | | |
2865 | o | d-2 re-add d |
|
2865 | o | d-2 re-add d | |
2866 | |/ |
|
2866 | |/ | |
2867 | o i-2: c -move-> d, s -move-> t |
|
2867 | o i-2: c -move-> d, s -move-> t | |
2868 | | |
|
2868 | | | |
2869 | o i-1: a -move-> c, p -move-> s |
|
2869 | o i-1: a -move-> c, p -move-> s | |
2870 | | |
|
2870 | | | |
2871 | o i-0 initial commit: a b h p q r |
|
2871 | o i-0 initial commit: a b h p q r | |
2872 |
|
2872 | |||
2873 | #else |
|
2873 | #else | |
2874 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2874 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2875 | $ hg log -Gfr 'desc("mDGm-0")' d |
|
2875 | $ hg log -Gfr 'desc("mDGm-0")' d | |
2876 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way |
|
2876 | o mDGm-0 actual content merge, copies on one side - D side: delete and re-add (different content), G side: update content - one way | |
2877 | |\ |
|
2877 | |\ | |
2878 | | o g-1: update d |
|
2878 | | o g-1: update d | |
2879 | | | |
|
2879 | | | | |
2880 | o | d-2 re-add d |
|
2880 | o | d-2 re-add d | |
2881 | |/ |
|
2881 | |/ | |
2882 | o i-2: c -move-> d, s -move-> t |
|
2882 | o i-2: c -move-> d, s -move-> t | |
2883 | | |
|
2883 | | | |
2884 | ~ |
|
2884 | ~ | |
2885 | #endif |
|
2885 | #endif | |
2886 |
|
2886 | |||
2887 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch |
|
2887 | Subcase: merging a change to a file with a "copy overwrite" to that file from another branch | |
2888 | ```````````````````````````````````````````````````````````````````````````````````````````` |
|
2888 | ```````````````````````````````````````````````````````````````````````````````````````````` | |
2889 |
|
2889 | |||
2890 | Merge: |
|
2890 | Merge: | |
2891 | - one with change to a file (d) |
|
2891 | - one with change to a file (d) | |
2892 | - one overwriting that file with a rename (from h to i, to d) |
|
2892 | - one overwriting that file with a rename (from h to i, to d) | |
2893 |
|
2893 | |||
2894 | This case is similar to BF/FB, but an actual merge happens, so both side of the |
|
2894 | This case is similar to BF/FB, but an actual merge happens, so both side of the | |
2895 | history are relevant. |
|
2895 | history are relevant. | |
2896 |
|
2896 | |||
2897 |
|
2897 | |||
2898 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' |
|
2898 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |
2899 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
2899 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
2900 | |\ |
|
2900 | |\ | |
2901 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
2901 | +---o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
2902 | | |/ |
|
2902 | | |/ | |
2903 | | o g-1: update d |
|
2903 | | o g-1: update d | |
2904 | | | |
|
2904 | | | | |
2905 | o | f-2: rename i -> d |
|
2905 | o | f-2: rename i -> d | |
2906 | | | |
|
2906 | | | | |
2907 | o | f-1: rename h -> i |
|
2907 | o | f-1: rename h -> i | |
2908 | |/ |
|
2908 | |/ | |
2909 | o i-2: c -move-> d, s -move-> t |
|
2909 | o i-2: c -move-> d, s -move-> t | |
2910 | | |
|
2910 | | | |
2911 | o i-1: a -move-> c, p -move-> s |
|
2911 | o i-1: a -move-> c, p -move-> s | |
2912 | | |
|
2912 | | | |
2913 | o i-0 initial commit: a b h p q r |
|
2913 | o i-0 initial commit: a b h p q r | |
2914 |
|
2914 | |||
2915 |
|
2915 | |||
2916 | Note: |
|
2916 | Note: | |
2917 | | In this case, the merge get conflicting information since on one side we have |
|
2917 | | In this case, the merge get conflicting information since on one side we have | |
2918 | | "a -> c -> d". and one the other one we have "h -> i -> d". |
|
2918 | | "a -> c -> d". and one the other one we have "h -> i -> d". | |
2919 | | |
|
2919 | | | |
2920 | | The current code arbitrarily pick one side depending the ordering of the merged hash: |
|
2920 | | The current code arbitrarily pick one side depending the ordering of the merged hash: | |
2921 |
|
2921 | |||
2922 | 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"): |
|
2922 | 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"): | |
2923 |
|
2923 | |||
2924 | Details on this hash ordering pick: |
|
2924 | Details on this hash ordering pick: | |
2925 |
|
2925 | |||
2926 | $ hg manifest --debug 'desc("g-1")' | egrep 'd$' |
|
2926 | $ hg manifest --debug 'desc("g-1")' | egrep 'd$' | |
2927 | 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !) |
|
2927 | 17ec97e605773eb44a117d1136b3849bcdc1924f 644 d (no-changeset !) | |
2928 | 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !) |
|
2928 | 5cce88bf349f7c742bb440f2c53f81db9c294279 644 d (changeset !) | |
2929 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d |
|
2929 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("g-1")' d | |
2930 | A d |
|
2930 | A d | |
2931 | a (no-changeset no-compatibility !) |
|
2931 | a (no-changeset no-compatibility !) | |
2932 |
|
2932 | |||
2933 | $ hg manifest --debug 'desc("f-2")' | egrep 'd$' |
|
2933 | $ hg manifest --debug 'desc("f-2")' | egrep 'd$' | |
2934 | 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !) |
|
2934 | 7b79e2fe0c8924e0e598a82f048a7b024afa4d96 644 d (no-changeset !) | |
2935 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) |
|
2935 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) | |
2936 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d |
|
2936 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("f-2")' d | |
2937 | A d |
|
2937 | A d | |
2938 | h (no-changeset no-compatibility !) |
|
2938 | h (no-changeset no-compatibility !) | |
2939 |
|
2939 | |||
2940 | Copy tracing data on the resulting merge: |
|
2940 | Copy tracing data on the resulting merge: | |
2941 |
|
2941 | |||
2942 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' |
|
2942 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' | |
2943 | A d |
|
2943 | A d | |
2944 | h (no-filelog !) |
|
2944 | h (no-filelog !) | |
2945 | a (filelog !) |
|
2945 | a (filelog !) | |
2946 | A t |
|
2946 | A t | |
2947 | p |
|
2947 | p | |
2948 | R a |
|
2948 | R a | |
2949 | R h |
|
2949 | R h | |
2950 | R p |
|
2950 | R p | |
2951 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' |
|
2951 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")' | |
2952 | A d |
|
2952 | A d | |
2953 | a (no-changeset !) |
|
2953 | a (no-changeset !) | |
2954 | h (changeset !) |
|
2954 | h (changeset !) | |
2955 | A t |
|
2955 | A t | |
2956 | p |
|
2956 | p | |
2957 | R a |
|
2957 | R a | |
2958 | R h |
|
2958 | R h | |
2959 | R p |
|
2959 | R p | |
2960 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' |
|
2960 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFGm-0")' | |
2961 | M d |
|
2961 | M d | |
2962 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' |
|
2962 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mGFm-0")' | |
2963 | M d |
|
2963 | M d | |
2964 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' |
|
2964 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFGm-0")' | |
2965 | M d |
|
2965 | M d | |
2966 | i (no-filelog !) |
|
2966 | i (no-filelog !) | |
2967 | R i |
|
2967 | R i | |
2968 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' |
|
2968 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mGFm-0")' | |
2969 | M d |
|
2969 | M d | |
2970 | i (no-filelog !) |
|
2970 | i (no-filelog !) | |
2971 | R i |
|
2971 | R i | |
2972 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' |
|
2972 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mFGm-0")' | |
2973 | M d (no-changeset !) |
|
2973 | M d (no-changeset !) | |
2974 | h (no-filelog no-changeset !) |
|
2974 | h (no-filelog no-changeset !) | |
2975 | R h |
|
2975 | R h | |
2976 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' |
|
2976 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGFm-0")' | |
2977 | M d (no-changeset !) |
|
2977 | M d (no-changeset !) | |
2978 | h (no-filelog no-changeset !) |
|
2978 | h (no-filelog no-changeset !) | |
2979 | R h |
|
2979 | R h | |
2980 |
|
2980 | |||
2981 | #if no-changeset |
|
2981 | #if no-changeset | |
2982 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
2982 | $ hg log -Gfr 'desc("mFGm-0")' d | |
2983 | o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way |
|
2983 | o mFGm-0 merge - G side: content change, F side: copy overwrite, no content change - one way | |
2984 | |\ |
|
2984 | |\ | |
2985 | | o g-1: update d |
|
2985 | | o g-1: update d | |
2986 | | | |
|
2986 | | | | |
2987 | o | f-2: rename i -> d |
|
2987 | o | f-2: rename i -> d | |
2988 | | | |
|
2988 | | | | |
2989 | o | f-1: rename h -> i |
|
2989 | o | f-1: rename h -> i | |
2990 | |/ |
|
2990 | |/ | |
2991 | o i-2: c -move-> d, s -move-> t |
|
2991 | o i-2: c -move-> d, s -move-> t | |
2992 | | |
|
2992 | | | |
2993 | o i-1: a -move-> c, p -move-> s |
|
2993 | o i-1: a -move-> c, p -move-> s | |
2994 | | |
|
2994 | | | |
2995 | o i-0 initial commit: a b h p q r |
|
2995 | o i-0 initial commit: a b h p q r | |
2996 |
|
2996 | |||
2997 | #else |
|
2997 | #else | |
2998 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
2998 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
2999 | $ hg log -Gfr 'desc("mFGm-0")' d |
|
2999 | $ hg log -Gfr 'desc("mFGm-0")' d | |
3000 | o g-1: update d |
|
3000 | o g-1: update d | |
3001 | | |
|
3001 | | | |
3002 | o i-2: c -move-> d, s -move-> t |
|
3002 | o i-2: c -move-> d, s -move-> t | |
3003 | | |
|
3003 | | | |
3004 | ~ |
|
3004 | ~ | |
3005 | #endif |
|
3005 | #endif | |
3006 |
|
3006 | |||
3007 | #if no-changeset |
|
3007 | #if no-changeset | |
3008 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
3008 | $ hg log -Gfr 'desc("mGFm-0")' d | |
3009 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way |
|
3009 | o mGFm-0 merge - G side: content change, F side: copy overwrite, no content change - the other way | |
3010 | |\ |
|
3010 | |\ | |
3011 | | o g-1: update d |
|
3011 | | o g-1: update d | |
3012 | | | |
|
3012 | | | | |
3013 | o | f-2: rename i -> d |
|
3013 | o | f-2: rename i -> d | |
3014 | | | |
|
3014 | | | | |
3015 | o | f-1: rename h -> i |
|
3015 | o | f-1: rename h -> i | |
3016 | |/ |
|
3016 | |/ | |
3017 | o i-2: c -move-> d, s -move-> t |
|
3017 | o i-2: c -move-> d, s -move-> t | |
3018 | | |
|
3018 | | | |
3019 | o i-1: a -move-> c, p -move-> s |
|
3019 | o i-1: a -move-> c, p -move-> s | |
3020 | | |
|
3020 | | | |
3021 | o i-0 initial commit: a b h p q r |
|
3021 | o i-0 initial commit: a b h p q r | |
3022 |
|
3022 | |||
3023 | #else |
|
3023 | #else | |
3024 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
3024 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
3025 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
3025 | $ hg log -Gfr 'desc("mGFm-0")' d | |
3026 | o g-1: update d |
|
3026 | o g-1: update d | |
3027 | | |
|
3027 | | | |
3028 | o i-2: c -move-> d, s -move-> t |
|
3028 | o i-2: c -move-> d, s -move-> t | |
3029 | | |
|
3029 | | | |
3030 | ~ |
|
3030 | ~ | |
3031 | #endif |
|
3031 | #endif | |
3032 |
|
3032 | |||
3033 | Subcase: new copy information on both side with an actual merge happening |
|
3033 | Subcase: new copy information on both side with an actual merge happening | |
3034 | ````````````````````````````````````````````````````````````````````````` |
|
3034 | ````````````````````````````````````````````````````````````````````````` | |
3035 |
|
3035 | |||
3036 | - the "p-" branch renaming 't' to 'v' (through 'u') |
|
3036 | - the "p-" branch renaming 't' to 'v' (through 'u') | |
3037 | - the "q-" branch renaming 'r' to 'v' (through 'w') |
|
3037 | - the "q-" branch renaming 'r' to 'v' (through 'w') | |
3038 |
|
3038 | |||
3039 |
|
3039 | |||
3040 | $ hg log -G --rev '::(desc("mPQm")+desc("mQPm"))' |
|
3040 | $ hg log -G --rev '::(desc("mPQm")+desc("mQPm"))' | |
3041 | o mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way |
|
3041 | o mQPm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - the other way | |
3042 | |\ |
|
3042 | |\ | |
3043 | +---o mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way |
|
3043 | +---o mPQm-0 merge with copies info on both side - P side: rename t to v, Q side: r to v, (different content) - one way | |
3044 | | |/ |
|
3044 | | |/ | |
3045 | | o q-2 w -move-> v |
|
3045 | | o q-2 w -move-> v | |
3046 | | | |
|
3046 | | | | |
3047 | | o q-1 r -move-> w |
|
3047 | | o q-1 r -move-> w | |
3048 | | | |
|
3048 | | | | |
3049 | o | p-2: u -move-> v |
|
3049 | o | p-2: u -move-> v | |
3050 | | | |
|
3050 | | | | |
3051 | o | p-1: t -move-> u |
|
3051 | o | p-1: t -move-> u | |
3052 | |/ |
|
3052 | |/ | |
3053 | o i-2: c -move-> d, s -move-> t |
|
3053 | o i-2: c -move-> d, s -move-> t | |
3054 | | |
|
3054 | | | |
3055 | o i-1: a -move-> c, p -move-> s |
|
3055 | o i-1: a -move-> c, p -move-> s | |
3056 | | |
|
3056 | | | |
3057 | o i-0 initial commit: a b h p q r |
|
3057 | o i-0 initial commit: a b h p q r | |
3058 |
|
3058 | |||
3059 |
|
3059 | |||
3060 | #if no-changeset |
|
3060 | #if no-changeset | |
3061 | $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v' |
|
3061 | $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v' | |
3062 | 0946c662ef16e4e67397fd717389eb6693d41749 644 v |
|
3062 | 0946c662ef16e4e67397fd717389eb6693d41749 644 v | |
3063 | $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v' |
|
3063 | $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v' | |
3064 | 0db3aad7fcc1ec27fab57060e327b9e864ea0cc9 644 v |
|
3064 | 0db3aad7fcc1ec27fab57060e327b9e864ea0cc9 644 v | |
3065 | $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v' |
|
3065 | $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v' | |
3066 | 3f91841cd75cadc9a1f1b4e7c1aa6d411f76032e 644 v |
|
3066 | 3f91841cd75cadc9a1f1b4e7c1aa6d411f76032e 644 v | |
3067 | $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v' |
|
3067 | $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v' | |
3068 | c43c088b811fd27983c0a9aadf44f3343cd4cd7e 644 v |
|
3068 | c43c088b811fd27983c0a9aadf44f3343cd4cd7e 644 v | |
3069 | $ hg debugindex v | "$PYTHON" ../no-linkrev |
|
3069 | $ hg debugindex v | "$PYTHON" ../no-linkrev | |
3070 | rev linkrev nodeid p1 p2 |
|
3070 | rev linkrev nodeid p1 p2 | |
3071 | 0 * 3f91841cd75c 000000000000 000000000000 |
|
3071 | 0 * 3f91841cd75c 000000000000 000000000000 | |
3072 | 1 * c43c088b811f 000000000000 000000000000 |
|
3072 | 1 * c43c088b811f 000000000000 000000000000 | |
3073 | 2 * 0946c662ef16 3f91841cd75c c43c088b811f |
|
3073 | 2 * 0946c662ef16 3f91841cd75c c43c088b811f | |
3074 | 3 * 0db3aad7fcc1 c43c088b811f 3f91841cd75c |
|
3074 | 3 * 0db3aad7fcc1 c43c088b811f 3f91841cd75c | |
3075 | #else |
|
3075 | #else | |
3076 | $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v' |
|
3076 | $ hg manifest --debug --rev 'desc("mPQm-0")' | grep '644 v' | |
3077 | 65fde9f6e4d4da23b3f610e07b53673ea9541d75 644 v |
|
3077 | 65fde9f6e4d4da23b3f610e07b53673ea9541d75 644 v | |
3078 | $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v' |
|
3078 | $ hg manifest --debug --rev 'desc("mQPm-0")' | grep '644 v' | |
3079 | a098dda6413aecf154eefc976afc38b295acb7e5 644 v |
|
3079 | a098dda6413aecf154eefc976afc38b295acb7e5 644 v | |
3080 | $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v' |
|
3080 | $ hg manifest --debug --rev 'desc("p-2")' | grep '644 v' | |
3081 | 5aed6a8dbff0301328c08360d24354d3d064cf0d 644 v |
|
3081 | 5aed6a8dbff0301328c08360d24354d3d064cf0d 644 v | |
3082 | $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v' |
|
3082 | $ hg manifest --debug --rev 'desc("q-2")' | grep '644 v' | |
3083 | a38b2fa170219750dac9bc7d19df831f213ba708 644 v |
|
3083 | a38b2fa170219750dac9bc7d19df831f213ba708 644 v | |
3084 | $ hg debugindex v | "$PYTHON" ../no-linkrev |
|
3084 | $ hg debugindex v | "$PYTHON" ../no-linkrev | |
3085 | rev linkrev nodeid p1 p2 |
|
3085 | rev linkrev nodeid p1 p2 | |
3086 | 0 * 5aed6a8dbff0 000000000000 000000000000 |
|
3086 | 0 * 5aed6a8dbff0 000000000000 000000000000 | |
3087 | 1 * a38b2fa17021 000000000000 000000000000 |
|
3087 | 1 * a38b2fa17021 000000000000 000000000000 | |
3088 | 2 * 65fde9f6e4d4 5aed6a8dbff0 a38b2fa17021 |
|
3088 | 2 * 65fde9f6e4d4 5aed6a8dbff0 a38b2fa17021 | |
3089 | 3 * a098dda6413a a38b2fa17021 5aed6a8dbff0 |
|
3089 | 3 * a098dda6413a a38b2fa17021 5aed6a8dbff0 | |
3090 | #endif |
|
3090 | #endif | |
3091 |
|
3091 | |||
3092 | # Here the filelog based implementation is not looking at the rename |
|
3092 | # Here the filelog based implementation is not looking at the rename | |
3093 | # information (because the file exist on both side). However the changelog |
|
3093 | # information (because the file exist on both side). However the changelog | |
3094 | # based on works fine. We have different output. |
|
3094 | # based on works fine. We have different output. | |
3095 |
|
3095 | |||
3096 | $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mPQm-0")' |
|
3096 | $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mPQm-0")' | |
3097 | M v |
|
3097 | M v | |
3098 | r (no-filelog !) |
|
3098 | r (no-filelog !) | |
3099 | R r |
|
3099 | R r | |
3100 | $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mQPm-0")' |
|
3100 | $ hg status --copies --rev 'desc("p-2")' --rev 'desc("mQPm-0")' | |
3101 | M v |
|
3101 | M v | |
3102 | r (no-filelog !) |
|
3102 | r (no-filelog !) | |
3103 | R r |
|
3103 | R r | |
3104 | $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mPQm-0")' |
|
3104 | $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mPQm-0")' | |
3105 | M v |
|
3105 | M v | |
3106 | t (no-filelog !) |
|
3106 | t (no-filelog !) | |
3107 | R t |
|
3107 | R t | |
3108 | $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mQPm-0")' |
|
3108 | $ hg status --copies --rev 'desc("q-2")' --rev 'desc("mQPm-0")' | |
3109 | M v |
|
3109 | M v | |
3110 | t (no-filelog !) |
|
3110 | t (no-filelog !) | |
3111 | R t |
|
3111 | R t | |
3112 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("p-2")' |
|
3112 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("p-2")' | |
3113 | A v |
|
3113 | A v | |
3114 | t |
|
3114 | t | |
3115 | R t |
|
3115 | R t | |
3116 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("q-2")' |
|
3116 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("q-2")' | |
3117 | A v |
|
3117 | A v | |
3118 | r |
|
3118 | r | |
3119 | R r |
|
3119 | R r | |
3120 |
|
3120 | |||
3121 | # From here, we run status against revision where both source file exists. |
|
3121 | # From here, we run status against revision where both source file exists. | |
3122 | # |
|
3122 | # | |
3123 | # The filelog based implementation picks an arbitrary side based on revision |
|
3123 | # The filelog based implementation picks an arbitrary side based on revision | |
3124 | # numbers. So the same side "wins" whatever the parents order is. This is |
|
3124 | # numbers. So the same side "wins" whatever the parents order is. This is | |
3125 | # sub-optimal because depending on revision numbers means the result can be |
|
3125 | # sub-optimal because depending on revision numbers means the result can be | |
3126 | # different from one repository to the next. |
|
3126 | # different from one repository to the next. | |
3127 | # |
|
3127 | # | |
3128 | # The changeset based algorithm use the parent order to break tie on conflicting |
|
3128 | # The changeset based algorithm use the parent order to break tie on conflicting | |
3129 | # information and will have a different order depending on who is p1 and p2. |
|
3129 | # information and will have a different order depending on who is p1 and p2. | |
3130 | # That order is stable accross repositories. (data from p1 prevails) |
|
3130 | # That order is stable accross repositories. (data from p1 prevails) | |
3131 |
|
3131 | |||
3132 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mPQm-0")' |
|
3132 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mPQm-0")' | |
3133 | A v |
|
3133 | A v | |
3134 | t |
|
3134 | t | |
3135 | R r |
|
3135 | R r | |
3136 | R t |
|
3136 | R t | |
3137 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mQPm-0")' |
|
3137 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mQPm-0")' | |
3138 | A v |
|
3138 | A v | |
3139 | t (filelog !) |
|
3139 | t (filelog !) | |
3140 | r (no-filelog !) |
|
3140 | r (no-filelog !) | |
3141 | R r |
|
3141 | R r | |
3142 | R t |
|
3142 | R t | |
3143 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm-0")' |
|
3143 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm-0")' | |
3144 | A d |
|
3144 | A d | |
3145 | a |
|
3145 | a | |
3146 | A v |
|
3146 | A v | |
3147 | r (filelog !) |
|
3147 | r (filelog !) | |
3148 | p (no-filelog !) |
|
3148 | p (no-filelog !) | |
3149 | R a |
|
3149 | R a | |
3150 | R p |
|
3150 | R p | |
3151 | R r |
|
3151 | R r | |
3152 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm-0")' |
|
3152 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm-0")' | |
3153 | A d |
|
3153 | A d | |
3154 | a |
|
3154 | a | |
3155 | A v |
|
3155 | A v | |
3156 | r |
|
3156 | r | |
3157 | R a |
|
3157 | R a | |
3158 | R p |
|
3158 | R p | |
3159 | R r |
|
3159 | R r | |
3160 |
|
3160 | |||
3161 |
|
3161 | |||
3162 | Comparing with merging with a deletion (and keeping the file) |
|
3162 | Comparing with merging with a deletion (and keeping the file) | |
3163 | ------------------------------------------------------------- |
|
3163 | ------------------------------------------------------------- | |
3164 |
|
3164 | |||
3165 | Merge: |
|
3165 | Merge: | |
3166 | - one removing a file (d) |
|
3166 | - one removing a file (d) | |
3167 | - one updating that file |
|
3167 | - one updating that file | |
3168 | - the merge keep the modified version of the file (canceling the delete) |
|
3168 | - the merge keep the modified version of the file (canceling the delete) | |
3169 |
|
3169 | |||
3170 | In this case, the file keep on living after the merge. So we should not drop its |
|
3170 | In this case, the file keep on living after the merge. So we should not drop its | |
3171 | copy tracing chain. |
|
3171 | copy tracing chain. | |
3172 |
|
3172 | |||
3173 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' |
|
3173 | $ hg log -G --rev '::(desc("mCGm")+desc("mGCm"))' | |
3174 | o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way |
|
3174 | o mGCm-0 merge updated/deleted - revive the file (updated content) - the other way | |
3175 | |\ |
|
3175 | |\ | |
3176 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way |
|
3176 | +---o mCGm-0 merge updated/deleted - revive the file (updated content) - one way | |
3177 | | |/ |
|
3177 | | |/ | |
3178 | | o g-1: update d |
|
3178 | | o g-1: update d | |
3179 | | | |
|
3179 | | | | |
3180 | o | c-1 delete d |
|
3180 | o | c-1 delete d | |
3181 | |/ |
|
3181 | |/ | |
3182 | o i-2: c -move-> d, s -move-> t |
|
3182 | o i-2: c -move-> d, s -move-> t | |
3183 | | |
|
3183 | | | |
3184 | o i-1: a -move-> c, p -move-> s |
|
3184 | o i-1: a -move-> c, p -move-> s | |
3185 | | |
|
3185 | | | |
3186 | o i-0 initial commit: a b h p q r |
|
3186 | o i-0 initial commit: a b h p q r | |
3187 |
|
3187 | |||
3188 |
|
3188 | |||
3189 | 'a' is the copy source of 'd' |
|
3189 | 'a' is the copy source of 'd' | |
3190 |
|
3190 | |||
3191 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' |
|
3191 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCGm-0")' | |
3192 | A d |
|
3192 | A d | |
3193 | a (no-compatibility no-changeset !) |
|
3193 | a (no-compatibility no-changeset !) | |
3194 | A t |
|
3194 | A t | |
3195 | p |
|
3195 | p | |
3196 | R a |
|
3196 | R a | |
3197 | R p |
|
3197 | R p | |
3198 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' |
|
3198 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGCm-0")' | |
3199 | A d |
|
3199 | A d | |
3200 | a (no-compatibility no-changeset !) |
|
3200 | a (no-compatibility no-changeset !) | |
3201 | A t |
|
3201 | A t | |
3202 | p |
|
3202 | p | |
3203 | R a |
|
3203 | R a | |
3204 | R p |
|
3204 | R p | |
3205 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' |
|
3205 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCGm-0")' | |
3206 | A d |
|
3206 | A d | |
3207 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' |
|
3207 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mGCm-0")' | |
3208 | A d |
|
3208 | A d | |
3209 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' |
|
3209 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mCGm-0")' | |
3210 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' |
|
3210 | $ hg status --copies --rev 'desc("g-1")' --rev 'desc("mGCm-0")' | |
3211 |
|
3211 | |||
3212 |
|
3212 | |||
3213 | Comparing with merge restoring an untouched deleted file |
|
3213 | Comparing with merge restoring an untouched deleted file | |
3214 | -------------------------------------------------------- |
|
3214 | -------------------------------------------------------- | |
3215 |
|
3215 | |||
3216 | Merge: |
|
3216 | Merge: | |
3217 | - one removing a file (d) |
|
3217 | - one removing a file (d) | |
3218 | - one leaving the file untouched |
|
3218 | - one leaving the file untouched | |
3219 | - the merge actively restore the file to the same content. |
|
3219 | - the merge actively restore the file to the same content. | |
3220 |
|
3220 | |||
3221 | In this case, the file keep on living after the merge. So we should not drop its |
|
3221 | In this case, the file keep on living after the merge. So we should not drop its | |
3222 | copy tracing chain. |
|
3222 | copy tracing chain. | |
3223 |
|
3223 | |||
3224 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' |
|
3224 | $ hg log -G --rev '::(desc("mCB-revert-m")+desc("mBC-revert-m"))' | |
3225 | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
3225 | o mBC-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
3226 | |\ |
|
3226 | |\ | |
3227 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
3227 | +---o mCB-revert-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
3228 | | |/ |
|
3228 | | |/ | |
3229 | | o c-1 delete d |
|
3229 | | o c-1 delete d | |
3230 | | | |
|
3230 | | | | |
3231 | o | b-1: b update |
|
3231 | o | b-1: b update | |
3232 | |/ |
|
3232 | |/ | |
3233 | o i-2: c -move-> d, s -move-> t |
|
3233 | o i-2: c -move-> d, s -move-> t | |
3234 | | |
|
3234 | | | |
3235 | o i-1: a -move-> c, p -move-> s |
|
3235 | o i-1: a -move-> c, p -move-> s | |
3236 | | |
|
3236 | | | |
3237 | o i-0 initial commit: a b h p q r |
|
3237 | o i-0 initial commit: a b h p q r | |
3238 |
|
3238 | |||
3239 |
|
3239 | |||
3240 | 'a' is the the copy source of 'd' |
|
3240 | 'a' is the the copy source of 'd' | |
3241 |
|
3241 | |||
3242 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' |
|
3242 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | |
3243 | M b |
|
3243 | M b | |
3244 | A d |
|
3244 | A d | |
3245 | a (no-compatibility no-changeset !) |
|
3245 | a (no-compatibility no-changeset !) | |
3246 | A t |
|
3246 | A t | |
3247 | p |
|
3247 | p | |
3248 | R a |
|
3248 | R a | |
3249 | R p |
|
3249 | R p | |
3250 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' |
|
3250 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | |
3251 | M b |
|
3251 | M b | |
3252 | A d |
|
3252 | A d | |
3253 | a (no-compatibility no-changeset !) |
|
3253 | a (no-compatibility no-changeset !) | |
3254 | A t |
|
3254 | A t | |
3255 | p |
|
3255 | p | |
3256 | R a |
|
3256 | R a | |
3257 | R p |
|
3257 | R p | |
3258 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' |
|
3258 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-revert-m-0")' | |
3259 | M b |
|
3259 | M b | |
3260 | A d |
|
3260 | A d | |
3261 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' |
|
3261 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-revert-m-0")' | |
3262 | M b |
|
3262 | M b | |
3263 | A d |
|
3263 | A d | |
3264 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' |
|
3264 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-revert-m-0")' | |
3265 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' |
|
3265 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-revert-m-0")' | |
3266 |
|
3266 | |||
3267 |
|
3267 | |||
3268 | Merging a branch where a rename was deleted with a branch where the same file was renamed |
|
3268 | Merging a branch where a rename was deleted with a branch where the same file was renamed | |
3269 | ------------------------------------------------------------------------------------------ |
|
3269 | ------------------------------------------------------------------------------------------ | |
3270 |
|
3270 | |||
3271 | Create a "conflicting" merge where `d` get removed on one branch before its |
|
3271 | Create a "conflicting" merge where `d` get removed on one branch before its | |
3272 | rename information actually conflict with the other branch. |
|
3272 | rename information actually conflict with the other branch. | |
3273 |
|
3273 | |||
3274 | (the copy information from the branch that was not deleted should win). |
|
3274 | (the copy information from the branch that was not deleted should win). | |
3275 |
|
3275 | |||
3276 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' |
|
3276 | $ hg log -G --rev '::(desc("mCH-delete-before-conflict-m")+desc("mHC-delete-before-conflict-m"))' | |
3277 | o mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way |
|
3277 | o mHC-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - the other way | |
3278 | |\ |
|
3278 | |\ | |
3279 | +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way |
|
3279 | +---o mCH-delete-before-conflict-m-0 simple merge - C side: d is the results of renames then deleted, H side: d is result of another rename (same content as the other branch) - one way | |
3280 | | |/ |
|
3280 | | |/ | |
3281 | | o h-1: b -(move)-> d |
|
3281 | | o h-1: b -(move)-> d | |
3282 | | | |
|
3282 | | | | |
3283 | o | c-1 delete d |
|
3283 | o | c-1 delete d | |
3284 | | | |
|
3284 | | | | |
3285 | o | i-2: c -move-> d, s -move-> t |
|
3285 | o | i-2: c -move-> d, s -move-> t | |
3286 | | | |
|
3286 | | | | |
3287 | o | i-1: a -move-> c, p -move-> s |
|
3287 | o | i-1: a -move-> c, p -move-> s | |
3288 | |/ |
|
3288 | |/ | |
3289 | o i-0 initial commit: a b h p q r |
|
3289 | o i-0 initial commit: a b h p q r | |
3290 |
|
3290 | |||
3291 |
|
3291 | |||
3292 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
3292 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCH-delete-before-conflict-m")' | |
3293 | A d |
|
3293 | A d | |
3294 | b (no-compatibility no-changeset !) |
|
3294 | b (no-compatibility no-changeset !) | |
3295 | A t |
|
3295 | A t | |
3296 | p |
|
3296 | p | |
3297 | R a |
|
3297 | R a | |
3298 | R b |
|
3298 | R b | |
3299 | R p |
|
3299 | R p | |
3300 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
3300 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mHC-delete-before-conflict-m")' | |
3301 | A d |
|
3301 | A d | |
3302 | b |
|
3302 | b | |
3303 | A t |
|
3303 | A t | |
3304 | p |
|
3304 | p | |
3305 | R a |
|
3305 | R a | |
3306 | R b |
|
3306 | R b | |
3307 | R p |
|
3307 | R p | |
3308 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
3308 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCH-delete-before-conflict-m")' | |
3309 | A d |
|
3309 | A d | |
3310 | b |
|
3310 | b | |
3311 | R b |
|
3311 | R b | |
3312 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
3312 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mHC-delete-before-conflict-m")' | |
3313 | A d |
|
3313 | A d | |
3314 | b |
|
3314 | b | |
3315 | R b |
|
3315 | R b | |
3316 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' |
|
3316 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mCH-delete-before-conflict-m")' | |
3317 | A t |
|
3317 | A t | |
3318 | p |
|
3318 | p | |
3319 | R a |
|
3319 | R a | |
3320 | R p |
|
3320 | R p | |
3321 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' |
|
3321 | $ hg status --copies --rev 'desc("h-1")' --rev 'desc("mHC-delete-before-conflict-m")' | |
3322 | A t |
|
3322 | A t | |
3323 | p |
|
3323 | p | |
3324 | R a |
|
3324 | R a | |
3325 | R p |
|
3325 | R p | |
3326 |
|
3326 | |||
3327 | Variant of previous with extra changes introduced by the merge |
|
3327 | Variant of previous with extra changes introduced by the merge | |
3328 | -------------------------------------------------------------- |
|
3328 | -------------------------------------------------------------- | |
3329 |
|
3329 | |||
3330 | (see case declaration for details) |
|
3330 | (see case declaration for details) | |
3331 |
|
3331 | |||
3332 | Subcase: merge has same initial content on both side, but merge introduced a change |
|
3332 | Subcase: merge has same initial content on both side, but merge introduced a change | |
3333 | ``````````````````````````````````````````````````````````````````````````````````` |
|
3333 | ``````````````````````````````````````````````````````````````````````````````````` | |
3334 |
|
3334 | |||
3335 | - the "e-" branch renaming b to f (through 'g') |
|
3335 | - the "e-" branch renaming b to f (through 'g') | |
3336 | - the "a-" branch renaming d to f (through e) |
|
3336 | - the "a-" branch renaming d to f (through e) | |
3337 | - the merge add new change to b |
|
3337 | - the merge add new change to b | |
3338 |
|
3338 | |||
3339 | $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))' |
|
3339 | $ hg log -G --rev '::(desc("mAE-change-m")+desc("mEA-change-m"))' | |
3340 | o mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way |
|
3340 | o mEA-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - the other way | |
3341 | |\ |
|
3341 | |\ | |
3342 | +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way |
|
3342 | +---o mAE-change-m-0 merge with file update and copies info on both side - A side: rename d to f, E side: b to f, (same content for f in parent) - one way | |
3343 | | |/ |
|
3343 | | |/ | |
3344 | | o e-2 g -move-> f |
|
3344 | | o e-2 g -move-> f | |
3345 | | | |
|
3345 | | | | |
3346 | | o e-1 b -move-> g |
|
3346 | | o e-1 b -move-> g | |
3347 | | | |
|
3347 | | | | |
3348 | o | a-2: e -move-> f |
|
3348 | o | a-2: e -move-> f | |
3349 | | | |
|
3349 | | | | |
3350 | o | a-1: d -move-> e |
|
3350 | o | a-1: d -move-> e | |
3351 | |/ |
|
3351 | |/ | |
3352 | o i-2: c -move-> d, s -move-> t |
|
3352 | o i-2: c -move-> d, s -move-> t | |
3353 | | |
|
3353 | | | |
3354 | o i-1: a -move-> c, p -move-> s |
|
3354 | o i-1: a -move-> c, p -move-> s | |
3355 | | |
|
3355 | | | |
3356 | o i-0 initial commit: a b h p q r |
|
3356 | o i-0 initial commit: a b h p q r | |
3357 |
|
3357 | |||
3358 | #if no-changeset |
|
3358 | #if no-changeset | |
3359 | $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f' |
|
3359 | $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f' | |
3360 | 2f649fba7eb284e720d02b61f0546fcef694c045 644 f |
|
3360 | 2f649fba7eb284e720d02b61f0546fcef694c045 644 f | |
3361 | $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f' |
|
3361 | $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f' | |
3362 | 774e7c1637d536b99e2d8ef16fd731f87a82bd09 644 f |
|
3362 | 774e7c1637d536b99e2d8ef16fd731f87a82bd09 644 f | |
3363 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
3363 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
3364 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f |
|
3364 | b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f | |
3365 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
3365 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
3366 | e8825b386367b29fec957283a80bb47b47483fe1 644 f |
|
3366 | e8825b386367b29fec957283a80bb47b47483fe1 644 f | |
3367 | $ hg debugindex f | "$PYTHON" ../no-linkrev |
|
3367 | $ hg debugindex f | "$PYTHON" ../no-linkrev | |
3368 | rev linkrev nodeid p1 p2 |
|
3368 | rev linkrev nodeid p1 p2 | |
3369 | 0 * b76eb76580df 000000000000 000000000000 |
|
3369 | 0 * b76eb76580df 000000000000 000000000000 | |
3370 | 1 * e8825b386367 000000000000 000000000000 |
|
3370 | 1 * e8825b386367 000000000000 000000000000 | |
3371 | 2 * 2ff93c643948 b76eb76580df e8825b386367 |
|
3371 | 2 * 2ff93c643948 b76eb76580df e8825b386367 | |
3372 | 3 * 2f649fba7eb2 b76eb76580df e8825b386367 |
|
3372 | 3 * 2f649fba7eb2 b76eb76580df e8825b386367 | |
3373 | 4 * 774e7c1637d5 e8825b386367 b76eb76580df |
|
3373 | 4 * 774e7c1637d5 e8825b386367 b76eb76580df | |
3374 | #else |
|
3374 | #else | |
3375 | $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f' |
|
3375 | $ hg manifest --debug --rev 'desc("mAE-change-m-0")' | grep '644 f' | |
3376 | d3613c1ec8310a812ac4268fd853ac576b6caea5 644 f |
|
3376 | d3613c1ec8310a812ac4268fd853ac576b6caea5 644 f | |
3377 | $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f' |
|
3377 | $ hg manifest --debug --rev 'desc("mEA-change-m-0")' | grep '644 f' | |
3378 | 05e03c868bbcab4a649cb33a238d7aa07398a469 644 f |
|
3378 | 05e03c868bbcab4a649cb33a238d7aa07398a469 644 f | |
3379 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' |
|
3379 | $ hg manifest --debug --rev 'desc("a-2")' | grep '644 f' | |
3380 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
3380 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
3381 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' |
|
3381 | $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' | |
3382 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f |
|
3382 | ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f | |
3383 | $ hg debugindex f | "$PYTHON" ../no-linkrev |
|
3383 | $ hg debugindex f | "$PYTHON" ../no-linkrev | |
3384 | rev linkrev nodeid p1 p2 |
|
3384 | rev linkrev nodeid p1 p2 | |
3385 | 0 * ae258f702dfe 000000000000 000000000000 |
|
3385 | 0 * ae258f702dfe 000000000000 000000000000 | |
3386 | 1 * d3613c1ec831 ae258f702dfe 000000000000 |
|
3386 | 1 * d3613c1ec831 ae258f702dfe 000000000000 | |
3387 | 2 * 05e03c868bbc ae258f702dfe 000000000000 |
|
3387 | 2 * 05e03c868bbc ae258f702dfe 000000000000 | |
3388 | #endif |
|
3388 | #endif | |
3389 |
|
3389 | |||
3390 | # Here the filelog based implementation is not looking at the rename |
|
3390 | # Here the filelog based implementation is not looking at the rename | |
3391 | # information (because the file exist on both side). However the changelog |
|
3391 | # information (because the file exist on both side). However the changelog | |
3392 | # based on works fine. We have different output. |
|
3392 | # based on works fine. We have different output. | |
3393 |
|
3393 | |||
3394 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAE-change-m-0")' |
|
3394 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAE-change-m-0")' | |
3395 | M f |
|
3395 | M f | |
3396 | b (no-filelog !) |
|
3396 | b (no-filelog !) | |
3397 | R b |
|
3397 | R b | |
3398 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEA-change-m-0")' |
|
3398 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEA-change-m-0")' | |
3399 | M f |
|
3399 | M f | |
3400 | b (no-filelog !) |
|
3400 | b (no-filelog !) | |
3401 | R b |
|
3401 | R b | |
3402 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAE-change-m-0")' |
|
3402 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAE-change-m-0")' | |
3403 | M f |
|
3403 | M f | |
3404 | d (no-filelog !) |
|
3404 | d (no-filelog !) | |
3405 | R d |
|
3405 | R d | |
3406 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEA-change-m-0")' |
|
3406 | $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEA-change-m-0")' | |
3407 | M f |
|
3407 | M f | |
3408 | d (no-filelog !) |
|
3408 | d (no-filelog !) | |
3409 | R d |
|
3409 | R d | |
3410 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' |
|
3410 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")' | |
3411 | A f |
|
3411 | A f | |
3412 | d |
|
3412 | d | |
3413 | R d |
|
3413 | R d | |
3414 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' |
|
3414 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("e-2")' | |
3415 | A f |
|
3415 | A f | |
3416 | b |
|
3416 | b | |
3417 | R b |
|
3417 | R b | |
3418 |
|
3418 | |||
3419 | # From here, we run status against revision where both source file exists. |
|
3419 | # From here, we run status against revision where both source file exists. | |
3420 | # |
|
3420 | # | |
3421 | # The filelog based implementation picks an arbitrary side based on revision |
|
3421 | # The filelog based implementation picks an arbitrary side based on revision | |
3422 | # numbers. So the same side "wins" whatever the parents order is. This is |
|
3422 | # numbers. So the same side "wins" whatever the parents order is. This is | |
3423 | # sub-optimal because depending on revision numbers means the result can be |
|
3423 | # sub-optimal because depending on revision numbers means the result can be | |
3424 | # different from one repository to the next. |
|
3424 | # different from one repository to the next. | |
3425 | # |
|
3425 | # | |
3426 | # The changeset based algorithm use the parent order to break tie on conflicting |
|
3426 | # The changeset based algorithm use the parent order to break tie on conflicting | |
3427 | # information and will have a different order depending on who is p1 and p2. |
|
3427 | # information and will have a different order depending on who is p1 and p2. | |
3428 | # That order is stable accross repositories. (data from p1 prevails) |
|
3428 | # That order is stable accross repositories. (data from p1 prevails) | |
3429 |
|
3429 | |||
3430 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAE-change-m-0")' |
|
3430 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAE-change-m-0")' | |
3431 | A f |
|
3431 | A f | |
3432 | d |
|
3432 | d | |
3433 | R b |
|
3433 | R b | |
3434 | R d |
|
3434 | R d | |
3435 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEA-change-m-0")' |
|
3435 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEA-change-m-0")' | |
3436 | A f |
|
3436 | A f | |
3437 | d (filelog !) |
|
3437 | d (filelog !) | |
3438 | b (no-filelog !) |
|
3438 | b (no-filelog !) | |
3439 | R b |
|
3439 | R b | |
3440 | R d |
|
3440 | R d | |
3441 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")' |
|
3441 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m-0")' | |
3442 | A f |
|
3442 | A f | |
3443 | a |
|
3443 | a | |
3444 | A t |
|
3444 | A t | |
3445 | p |
|
3445 | p | |
3446 | R a |
|
3446 | R a | |
3447 | R b |
|
3447 | R b | |
3448 | R p |
|
3448 | R p | |
3449 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")' |
|
3449 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m-0")' | |
3450 | A f |
|
3450 | A f | |
3451 | a (filelog !) |
|
3451 | a (filelog !) | |
3452 | b (no-filelog !) |
|
3452 | b (no-filelog !) | |
3453 | A t |
|
3453 | A t | |
3454 | p |
|
3454 | p | |
3455 | R a |
|
3455 | R a | |
3456 | R b |
|
3456 | R b | |
3457 | R p |
|
3457 | R p | |
3458 |
|
3458 | |||
3459 |
|
3459 | |||
3460 | Subcase: merge overwrite common copy information, but with extra change during the merge |
|
3460 | Subcase: merge overwrite common copy information, but with extra change during the merge | |
3461 | ``````````````````````````````````````````````````````````````````````````````````` |
|
3461 | ``````````````````````````````````````````````````````````````````````````````````` | |
3462 |
|
3462 | |||
3463 | Merge: |
|
3463 | Merge: | |
3464 | - one with change to an unrelated file (b) |
|
3464 | - one with change to an unrelated file (b) | |
3465 | - one overwriting a file (d) with a rename (from h to i to d) |
|
3465 | - one overwriting a file (d) with a rename (from h to i to d) | |
3466 |
|
3466 | |||
3467 | $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))' |
|
3467 | $ hg log -G --rev '::(desc("mBF-change-m")+desc("mFB-change-m"))' | |
3468 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
3468 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
3469 | |\ |
|
3469 | |\ | |
3470 | +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
3470 | +---o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
3471 | | |/ |
|
3471 | | |/ | |
3472 | | o f-2: rename i -> d |
|
3472 | | o f-2: rename i -> d | |
3473 | | | |
|
3473 | | | | |
3474 | | o f-1: rename h -> i |
|
3474 | | o f-1: rename h -> i | |
3475 | | | |
|
3475 | | | | |
3476 | o | b-1: b update |
|
3476 | o | b-1: b update | |
3477 | |/ |
|
3477 | |/ | |
3478 | o i-2: c -move-> d, s -move-> t |
|
3478 | o i-2: c -move-> d, s -move-> t | |
3479 | | |
|
3479 | | | |
3480 | o i-1: a -move-> c, p -move-> s |
|
3480 | o i-1: a -move-> c, p -move-> s | |
3481 | | |
|
3481 | | | |
3482 | o i-0 initial commit: a b h p q r |
|
3482 | o i-0 initial commit: a b h p q r | |
3483 |
|
3483 | |||
3484 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBF-change-m-0")' |
|
3484 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBF-change-m-0")' | |
3485 | M b |
|
3485 | M b | |
3486 | A d |
|
3486 | A d | |
3487 | h |
|
3487 | h | |
3488 | A t |
|
3488 | A t | |
3489 | p |
|
3489 | p | |
3490 | R a |
|
3490 | R a | |
3491 | R h |
|
3491 | R h | |
3492 | R p |
|
3492 | R p | |
3493 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")' |
|
3493 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFB-change-m-0")' | |
3494 | M b |
|
3494 | M b | |
3495 | A d |
|
3495 | A d | |
3496 | h |
|
3496 | h | |
3497 | A t |
|
3497 | A t | |
3498 | p |
|
3498 | p | |
3499 | R a |
|
3499 | R a | |
3500 | R h |
|
3500 | R h | |
3501 | R p |
|
3501 | R p | |
3502 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBF-change-m-0")' |
|
3502 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBF-change-m-0")' | |
3503 | M d |
|
3503 | M d | |
3504 | h (no-filelog !) |
|
3504 | h (no-filelog !) | |
3505 | R h |
|
3505 | R h | |
3506 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBF-change-m-0")' |
|
3506 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBF-change-m-0")' | |
3507 | M b |
|
3507 | M b | |
3508 | M d |
|
3508 | M d | |
3509 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBF-change-m-0")' |
|
3509 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBF-change-m-0")' | |
3510 | M b |
|
3510 | M b | |
3511 | M d |
|
3511 | M d | |
3512 | i (no-filelog !) |
|
3512 | i (no-filelog !) | |
3513 | R i |
|
3513 | R i | |
3514 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFB-change-m-0")' |
|
3514 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFB-change-m-0")' | |
3515 | M d |
|
3515 | M d | |
3516 | h (no-filelog !) |
|
3516 | h (no-filelog !) | |
3517 | R h |
|
3517 | R h | |
3518 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFB-change-m-0")' |
|
3518 | $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFB-change-m-0")' | |
3519 | M b |
|
3519 | M b | |
3520 | M d |
|
3520 | M d | |
3521 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFB-change-m-0")' |
|
3521 | $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFB-change-m-0")' | |
3522 | M b |
|
3522 | M b | |
3523 | M d |
|
3523 | M d | |
3524 | i (no-filelog !) |
|
3524 | i (no-filelog !) | |
3525 | R i |
|
3525 | R i | |
3526 |
|
3526 | |||
3527 | #if no-changeset |
|
3527 | #if no-changeset | |
3528 | $ hg log -Gfr 'desc("mBF-change-m-0")' d |
|
3528 | $ hg log -Gfr 'desc("mBF-change-m-0")' d | |
3529 | o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
3529 | o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
3530 | |\ |
|
3530 | |\ | |
3531 | o : f-2: rename i -> d |
|
3531 | o : f-2: rename i -> d | |
3532 | | : |
|
3532 | | : | |
3533 | o : f-1: rename h -> i |
|
3533 | o : f-1: rename h -> i | |
3534 | :/ |
|
3534 | :/ | |
3535 | o i-0 initial commit: a b h p q r |
|
3535 | o i-0 initial commit: a b h p q r | |
3536 |
|
3536 | |||
3537 | #else |
|
3537 | #else | |
3538 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
3538 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
3539 | $ hg log -Gfr 'desc("mBF-change-m-0")' d |
|
3539 | $ hg log -Gfr 'desc("mBF-change-m-0")' d | |
3540 | o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way |
|
3540 | o mBF-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - one way | |
3541 | : |
|
3541 | : | |
3542 | o i-2: c -move-> d, s -move-> t |
|
3542 | o i-2: c -move-> d, s -move-> t | |
3543 | | |
|
3543 | | | |
3544 | ~ |
|
3544 | ~ | |
3545 | #endif |
|
3545 | #endif | |
3546 |
|
3546 | |||
3547 | #if no-changeset |
|
3547 | #if no-changeset | |
3548 | $ hg log -Gfr 'desc("mFB-change-m-0")' d |
|
3548 | $ hg log -Gfr 'desc("mFB-change-m-0")' d | |
3549 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
3549 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
3550 | |\ |
|
3550 | |\ | |
3551 | o : f-2: rename i -> d |
|
3551 | o : f-2: rename i -> d | |
3552 | | : |
|
3552 | | : | |
3553 | o : f-1: rename h -> i |
|
3553 | o : f-1: rename h -> i | |
3554 | :/ |
|
3554 | :/ | |
3555 | o i-0 initial commit: a b h p q r |
|
3555 | o i-0 initial commit: a b h p q r | |
3556 |
|
3556 | |||
3557 | #else |
|
3557 | #else | |
3558 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work |
|
3558 | BROKEN: `hg log --follow <file>` relies on filelog metadata to work | |
3559 | $ hg log -Gfr 'desc("mFB-change-m-0")' d |
|
3559 | $ hg log -Gfr 'desc("mFB-change-m-0")' d | |
3560 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way |
|
3560 | o mFB-change-m-0 merge with extra change - B side: unrelated change, F side: overwrite d with a copy (from h->i->d) - the other way | |
3561 | : |
|
3561 | : | |
3562 | o i-2: c -move-> d, s -move-> t |
|
3562 | o i-2: c -move-> d, s -move-> t | |
3563 | | |
|
3563 | | | |
3564 | ~ |
|
3564 | ~ | |
3565 | #endif |
|
3565 | #endif | |
3566 |
|
3566 | |||
3567 |
|
3567 | |||
3568 | Subcase: restoring and untouched deleted file, while touching it |
|
3568 | Subcase: restoring and untouched deleted file, while touching it | |
3569 | ```````````````````````````````````````````````````````````````` |
|
3569 | ```````````````````````````````````````````````````````````````` | |
3570 |
|
3570 | |||
3571 | Merge: |
|
3571 | Merge: | |
3572 | - one removing a file (d) |
|
3572 | - one removing a file (d) | |
3573 | - one leaving the file untouched |
|
3573 | - one leaving the file untouched | |
3574 | - the merge actively restore the file to the same content. |
|
3574 | - the merge actively restore the file to the same content. | |
3575 |
|
3575 | |||
3576 | In this case, the file keep on living after the merge. So we should not drop its |
|
3576 | In this case, the file keep on living after the merge. So we should not drop its | |
3577 | copy tracing chain. |
|
3577 | copy tracing chain. | |
3578 |
|
3578 | |||
3579 | $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))' |
|
3579 | $ hg log -G --rev '::(desc("mCB-change-m")+desc("mBC-change-m"))' | |
3580 | o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way |
|
3580 | o mBC-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - the other way | |
3581 | |\ |
|
3581 | |\ | |
3582 | +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way |
|
3582 | +---o mCB-change-m-0 merge explicitely revive deleted file - B side: unrelated change, C side: delete d (restored by merge) - one way | |
3583 | | |/ |
|
3583 | | |/ | |
3584 | | o c-1 delete d |
|
3584 | | o c-1 delete d | |
3585 | | | |
|
3585 | | | | |
3586 | o | b-1: b update |
|
3586 | o | b-1: b update | |
3587 | |/ |
|
3587 | |/ | |
3588 | o i-2: c -move-> d, s -move-> t |
|
3588 | o i-2: c -move-> d, s -move-> t | |
3589 | | |
|
3589 | | | |
3590 | o i-1: a -move-> c, p -move-> s |
|
3590 | o i-1: a -move-> c, p -move-> s | |
3591 | | |
|
3591 | | | |
3592 | o i-0 initial commit: a b h p q r |
|
3592 | o i-0 initial commit: a b h p q r | |
3593 |
|
3593 | |||
3594 |
|
3594 | |||
3595 | 'a' is the the copy source of 'd' |
|
3595 | 'a' is the the copy source of 'd' | |
3596 |
|
3596 | |||
3597 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-change-m-0")' |
|
3597 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-change-m-0")' | |
3598 | M b |
|
3598 | M b | |
3599 | A d |
|
3599 | A d | |
3600 | a (no-compatibility no-changeset !) |
|
3600 | a (no-compatibility no-changeset !) | |
3601 | A t |
|
3601 | A t | |
3602 | p |
|
3602 | p | |
3603 | R a |
|
3603 | R a | |
3604 | R p |
|
3604 | R p | |
3605 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-change-m-0")' |
|
3605 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-change-m-0")' | |
3606 | M b |
|
3606 | M b | |
3607 | A d |
|
3607 | A d | |
3608 | a (no-compatibility no-changeset !) |
|
3608 | a (no-compatibility no-changeset !) | |
3609 | A t |
|
3609 | A t | |
3610 | p |
|
3610 | p | |
3611 | R a |
|
3611 | R a | |
3612 | R p |
|
3612 | R p | |
3613 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-change-m-0")' |
|
3613 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mCB-change-m-0")' | |
3614 | M b |
|
3614 | M b | |
3615 | A d |
|
3615 | A d | |
3616 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-change-m-0")' |
|
3616 | $ hg status --copies --rev 'desc("c-1")' --rev 'desc("mBC-change-m-0")' | |
3617 | M b |
|
3617 | M b | |
3618 | A d |
|
3618 | A d | |
3619 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-change-m-0")' |
|
3619 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mCB-change-m-0")' | |
3620 | M d |
|
3620 | M d | |
3621 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-change-m-0")' |
|
3621 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBC-change-m-0")' | |
3622 | M d |
|
3622 | M d | |
3623 |
|
3623 | |||
3624 |
|
3624 | |||
3625 | Decision from previous merge are properly chained with later merge |
|
3625 | Decision from previous merge are properly chained with later merge | |
3626 | ------------------------------------------------------------------ |
|
3626 | ------------------------------------------------------------------ | |
3627 |
|
3627 | |||
3628 |
|
3628 | |||
3629 | Subcase: chaining conflicting rename resolution |
|
3629 | Subcase: chaining conflicting rename resolution | |
3630 | ``````````````````````````````````````````````` |
|
3630 | ``````````````````````````````````````````````` | |
3631 |
|
3631 | |||
3632 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We |
|
3632 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We | |
3633 | add more change on the respective branch and merge again. These second merge |
|
3633 | add more change on the respective branch and merge again. These second merge | |
3634 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
3634 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" | |
3635 | about that file should stay unchanged. |
|
3635 | about that file should stay unchanged. | |
3636 |
|
3636 | |||
3637 | The result from mAEm is the same for the subsequent merge: |
|
3637 | The result from mAEm is the same for the subsequent merge: | |
3638 |
|
3638 | |||
3639 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f |
|
3639 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm")' f | |
3640 | A f |
|
3640 | A f | |
3641 | a (no-changeset no-compatibility !) |
|
3641 | a (no-changeset no-compatibility !) | |
3642 |
|
3642 | |||
3643 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f |
|
3643 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE,Km")' f | |
3644 | A f |
|
3644 | A f | |
3645 | a (no-changeset no-compatibility !) |
|
3645 | a (no-changeset no-compatibility !) | |
3646 |
|
3646 | |||
3647 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f |
|
3647 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AEm")' f | |
3648 | A f |
|
3648 | A f | |
3649 | a (no-changeset no-compatibility !) |
|
3649 | a (no-changeset no-compatibility !) | |
3650 |
|
3650 | |||
3651 |
|
3651 | |||
3652 | The result from mEAm is the same for the subsequent merge: |
|
3652 | The result from mEAm is the same for the subsequent merge: | |
3653 |
|
3653 | |||
3654 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f |
|
3654 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm")' f | |
3655 | A f |
|
3655 | A f | |
3656 | a (filelog !) |
|
3656 | a (filelog !) | |
3657 | b (no-changeset no-compatibility no-filelog !) |
|
3657 | b (no-changeset no-compatibility no-filelog !) | |
3658 |
|
3658 | |||
3659 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f |
|
3659 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA,Jm")' f | |
3660 | A f |
|
3660 | A f | |
3661 | a (filelog !) |
|
3661 | a (filelog !) | |
3662 | b (no-changeset no-compatibility no-filelog !) |
|
3662 | b (no-changeset no-compatibility no-filelog !) | |
3663 |
|
3663 | |||
3664 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f |
|
3664 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EAm")' f | |
3665 | A f |
|
3665 | A f | |
3666 | a (filelog !) |
|
3666 | a (filelog !) | |
3667 | b (no-changeset no-compatibility no-filelog !) |
|
3667 | b (no-changeset no-compatibility no-filelog !) | |
3668 |
|
3668 | |||
3669 | Subcase: chaining conflicting rename resolution |
|
3669 | Subcase: chaining conflicting rename resolution | |
3670 | ``````````````````````````````````````````````` |
|
3670 | ``````````````````````````````````````````````` | |
3671 |
|
3671 | |||
3672 | The "mPQm" and "mQPm" case create a rename tracking conflict on file 'v'. We |
|
3672 | The "mPQm" and "mQPm" case create a rename tracking conflict on file 'v'. We | |
3673 | add more change on the respective branch and merge again. These second merge |
|
3673 | add more change on the respective branch and merge again. These second merge | |
3674 | does not involve the file 'v' and the arbitration done within "mPQm" and "mQP" |
|
3674 | does not involve the file 'v' and the arbitration done within "mPQm" and "mQP" | |
3675 | about that file should stay unchanged. |
|
3675 | about that file should stay unchanged. | |
3676 |
|
3676 | |||
3677 | The result from mPQm is the same for the subsequent merge: |
|
3677 | The result from mPQm is the same for the subsequent merge: | |
3678 |
|
3678 | |||
3679 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm")' v |
|
3679 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQm")' v | |
3680 | A v |
|
3680 | A v | |
3681 | r (filelog !) |
|
3681 | r (filelog !) | |
3682 | p (no-changeset no-compatibility no-filelog !) |
|
3682 | p (no-changeset no-compatibility no-filelog !) | |
3683 |
|
3683 | |||
3684 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v |
|
3684 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mPQ,Tm")' v | |
3685 | A v |
|
3685 | A v | |
3686 | r (filelog !) |
|
3686 | r (filelog !) | |
3687 | p (no-changeset no-compatibility no-filelog !) |
|
3687 | p (no-changeset no-compatibility no-filelog !) | |
3688 |
|
3688 | |||
3689 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v |
|
3689 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mT,PQm")' v | |
3690 | A v |
|
3690 | A v | |
3691 | r (filelog !) |
|
3691 | r (filelog !) | |
3692 | p (no-changeset no-compatibility no-filelog !) |
|
3692 | p (no-changeset no-compatibility no-filelog !) | |
3693 |
|
3693 | |||
3694 | The result from mQPm is the same for the subsequent merge: |
|
3694 | The result from mQPm is the same for the subsequent merge: | |
3695 |
|
3695 | |||
3696 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm")' v |
|
3696 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQPm")' v | |
3697 | A v |
|
3697 | A v | |
3698 | r (no-changeset no-compatibility !) |
|
3698 | r (no-changeset no-compatibility !) | |
3699 |
|
3699 | |||
3700 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQP,Sm")' v |
|
3700 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mQP,Sm")' v | |
3701 | A v |
|
3701 | A v | |
3702 | r (no-changeset no-compatibility !) |
|
3702 | r (no-changeset no-compatibility !) | |
3703 |
|
3703 | |||
3704 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mS,QPm")' v |
|
3704 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mS,QPm")' v | |
3705 | A v |
|
3705 | A v | |
3706 | r (filelog !) |
|
3706 | r (filelog !) | |
3707 | r (no-changeset no-compatibility no-filelog !) |
|
3707 | r (no-changeset no-compatibility no-filelog !) | |
3708 |
|
3708 | |||
3709 |
|
3709 | |||
3710 | Subcase: chaining salvage information during a merge |
|
3710 | Subcase: chaining salvage information during a merge | |
3711 | ```````````````````````````````````````````````````` |
|
3711 | ```````````````````````````````````````````````````` | |
3712 |
|
3712 | |||
3713 | We add more change on the branch were the file was deleted. merging again |
|
3713 | We add more change on the branch were the file was deleted. merging again | |
3714 | should preserve the fact eh file was salvaged. |
|
3714 | should preserve the fact eh file was salvaged. | |
3715 |
|
3715 | |||
3716 | reference output: |
|
3716 | reference output: | |
3717 |
|
3717 | |||
3718 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' |
|
3718 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB-revert-m-0")' | |
3719 | M b |
|
3719 | M b | |
3720 | A d |
|
3720 | A d | |
3721 | a (no-changeset no-compatibility !) |
|
3721 | a (no-changeset no-compatibility !) | |
3722 | A t |
|
3722 | A t | |
3723 | p |
|
3723 | p | |
3724 | R a |
|
3724 | R a | |
3725 | R p |
|
3725 | R p | |
3726 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' |
|
3726 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC-revert-m-0")' | |
3727 | M b |
|
3727 | M b | |
3728 | A d |
|
3728 | A d | |
3729 | a (no-changeset no-compatibility !) |
|
3729 | a (no-changeset no-compatibility !) | |
3730 | A t |
|
3730 | A t | |
3731 | p |
|
3731 | p | |
3732 | R a |
|
3732 | R a | |
3733 | R p |
|
3733 | R p | |
3734 |
|
3734 | |||
3735 | chained output |
|
3735 | chained output | |
3736 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")' |
|
3736 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBC+revert,Lm")' | |
3737 | M b |
|
3737 | M b | |
3738 | A d |
|
3738 | A d | |
3739 | a (no-changeset no-compatibility !) |
|
3739 | a (no-changeset no-compatibility !) | |
3740 | A t |
|
3740 | A t | |
3741 | p |
|
3741 | p | |
3742 | A unrelated-l |
|
3742 | A unrelated-l | |
3743 | R a |
|
3743 | R a | |
3744 | R p |
|
3744 | R p | |
3745 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")' |
|
3745 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mCB+revert,Lm")' | |
3746 | M b |
|
3746 | M b | |
3747 | A d |
|
3747 | A d | |
3748 | a (no-changeset no-compatibility !) |
|
3748 | a (no-changeset no-compatibility !) | |
3749 | A t |
|
3749 | A t | |
3750 | p |
|
3750 | p | |
3751 | A unrelated-l |
|
3751 | A unrelated-l | |
3752 | R a |
|
3752 | R a | |
3753 | R p |
|
3753 | R p | |
3754 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")' |
|
3754 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,BC+revertm")' | |
3755 | M b |
|
3755 | M b | |
3756 | A d |
|
3756 | A d | |
3757 | a (no-changeset no-compatibility !) |
|
3757 | a (no-changeset no-compatibility !) | |
3758 | A t |
|
3758 | A t | |
3759 | p |
|
3759 | p | |
3760 | A unrelated-l |
|
3760 | A unrelated-l | |
3761 | R a |
|
3761 | R a | |
3762 | R p |
|
3762 | R p | |
3763 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")' |
|
3763 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mL,CB+revertm")' | |
3764 | M b |
|
3764 | M b | |
3765 | A d |
|
3765 | A d | |
3766 | a (no-changeset no-compatibility !) |
|
3766 | a (no-changeset no-compatibility !) | |
3767 | A t |
|
3767 | A t | |
3768 | p |
|
3768 | p | |
3769 | A unrelated-l |
|
3769 | A unrelated-l | |
3770 | R a |
|
3770 | R a | |
3771 | R p |
|
3771 | R p | |
3772 |
|
3772 | |||
3773 | Subcase: chaining "merged" information during a merge |
|
3773 | Subcase: chaining "merged" information during a merge | |
3774 | `````````````````````````````````````````````````````` |
|
3774 | `````````````````````````````````````````````````````` | |
3775 |
|
3775 | |||
3776 | When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges. |
|
3776 | When a non-rename change are merged with a copy overwrite, the merge pick the copy source from (p1) as the reference. We should preserve this information in subsequent merges. | |
3777 |
|
3777 | |||
3778 |
|
3778 | |||
3779 | reference output: |
|
3779 | reference output: | |
3780 |
|
3780 | |||
3781 | (for details about the filelog pick, check the mFGm/mGFm case) |
|
3781 | (for details about the filelog pick, check the mFGm/mGFm case) | |
3782 |
|
3782 | |||
3783 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d |
|
3783 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm")' d | |
3784 | A d |
|
3784 | A d | |
3785 | a (filelog !) |
|
3785 | a (filelog !) | |
3786 | h (no-changeset no-compatibility no-filelog !) |
|
3786 | h (no-changeset no-compatibility no-filelog !) | |
3787 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d |
|
3787 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm")' d | |
3788 | A d |
|
3788 | A d | |
3789 | a (filelog !) |
|
3789 | a (filelog !) | |
3790 | a (no-changeset no-compatibility no-filelog !) |
|
3790 | a (no-changeset no-compatibility no-filelog !) | |
3791 |
|
3791 | |||
3792 | Chained output |
|
3792 | Chained output | |
3793 |
|
3793 | |||
3794 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d |
|
3794 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mO,FGm")' d | |
3795 | A d |
|
3795 | A d | |
3796 | a (filelog !) |
|
3796 | a (filelog !) | |
3797 | h (no-changeset no-compatibility no-filelog !) |
|
3797 | h (no-changeset no-compatibility no-filelog !) | |
3798 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d |
|
3798 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFG,Om")' d | |
3799 | A d |
|
3799 | A d | |
3800 | a (filelog !) |
|
3800 | a (filelog !) | |
3801 | h (no-changeset no-compatibility no-filelog !) |
|
3801 | h (no-changeset no-compatibility no-filelog !) | |
3802 |
|
3802 | |||
3803 |
|
3803 | |||
3804 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d |
|
3804 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGF,Nm")' d | |
3805 | A d |
|
3805 | A d | |
3806 | a (no-changeset no-compatibility !) |
|
3806 | a (no-changeset no-compatibility !) | |
3807 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d |
|
3807 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mN,GFm")' d | |
3808 | A d |
|
3808 | A d | |
3809 | a (no-changeset no-compatibility !) |
|
3809 | a (no-changeset no-compatibility !) | |
3810 |
|
3810 | |||
3811 |
|
3811 | |||
3812 | Subcase: chaining conflicting rename resolution, with extra change during the merge |
|
3812 | Subcase: chaining conflicting rename resolution, with extra change during the merge | |
3813 | ``````````````````````````````````````````````````````````````````````````````````` |
|
3813 | ``````````````````````````````````````````````````````````````````````````````````` | |
3814 |
|
3814 | |||
3815 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We |
|
3815 | The "mAEm" and "mEAm" case create a rename tracking conflict on file 'f'. We | |
3816 | add more change on the respective branch and merge again. These second merge |
|
3816 | add more change on the respective branch and merge again. These second merge | |
3817 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" |
|
3817 | does not involve the file 'f' and the arbitration done within "mAEm" and "mEA" | |
3818 | about that file should stay unchanged. |
|
3818 | about that file should stay unchanged. | |
3819 |
|
3819 | |||
3820 | The result from mAEm is the same for the subsequent merge: |
|
3820 | The result from mAEm is the same for the subsequent merge: | |
3821 |
|
3821 | |||
3822 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m")' f |
|
3822 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change-m")' f | |
3823 | A f |
|
3823 | A f | |
3824 | a (no-changeset no-compatibility !) |
|
3824 | a (no-changeset no-compatibility !) | |
3825 |
|
3825 | |||
3826 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f |
|
3826 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAE-change,Km")' f | |
3827 | A f |
|
3827 | A f | |
3828 | a (no-changeset no-compatibility !) |
|
3828 | a (no-changeset no-compatibility !) | |
3829 |
|
3829 | |||
3830 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AE-change-m")' f |
|
3830 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mK,AE-change-m")' f | |
3831 | A f |
|
3831 | A f | |
3832 | a (no-changeset no-compatibility !) |
|
3832 | a (no-changeset no-compatibility !) | |
3833 |
|
3833 | |||
3834 |
|
3834 | |||
3835 | The result from mEAm is the same for the subsequent merge: |
|
3835 | The result from mEAm is the same for the subsequent merge: | |
3836 |
|
3836 | |||
3837 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m")' f |
|
3837 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change-m")' f | |
3838 | A f |
|
3838 | A f | |
3839 | a (filelog !) |
|
3839 | a (filelog !) | |
3840 | b (no-changeset no-compatibility no-filelog !) |
|
3840 | b (no-changeset no-compatibility no-filelog !) | |
3841 |
|
3841 | |||
3842 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f |
|
3842 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEA-change,Jm")' f | |
3843 | A f |
|
3843 | A f | |
3844 | a (filelog !) |
|
3844 | a (filelog !) | |
3845 | b (no-changeset no-compatibility no-filelog !) |
|
3845 | b (no-changeset no-compatibility no-filelog !) | |
3846 |
|
3846 | |||
3847 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f |
|
3847 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mJ,EA-change-m")' f | |
3848 | A f |
|
3848 | A f | |
3849 | a (filelog !) |
|
3849 | a (filelog !) | |
3850 | b (no-changeset no-compatibility no-filelog !) |
|
3850 | b (no-changeset no-compatibility no-filelog !) |
@@ -1,141 +1,141 b'' | |||||
1 | Make sure that the internal merge tools (internal:fail, internal:local, |
|
1 | Make sure that the internal merge tools (internal:fail, internal:local, | |
2 | internal:union and internal:other) are used when matched by a |
|
2 | internal:union and internal:other) are used when matched by a | |
3 | merge-pattern in hgrc |
|
3 | merge-pattern in hgrc | |
4 |
|
4 | |||
5 | Make sure HGMERGE doesn't interfere with the test: |
|
5 | Make sure HGMERGE doesn't interfere with the test: | |
6 |
|
6 | |||
7 | $ unset HGMERGE |
|
7 | $ unset HGMERGE | |
8 |
|
8 | |||
9 | $ hg init |
|
9 | $ hg init | |
10 |
|
10 | |||
11 | Initial file contents: |
|
11 | Initial file contents: | |
12 |
|
12 | |||
13 | $ echo "line 1" > f |
|
13 | $ echo "line 1" > f | |
14 | $ echo "line 2" >> f |
|
14 | $ echo "line 2" >> f | |
15 | $ echo "line 3" >> f |
|
15 | $ echo "line 3" >> f | |
16 | $ hg ci -Am "revision 0" |
|
16 | $ hg ci -Am "revision 0" | |
17 | adding f |
|
17 | adding f | |
18 |
|
18 | |||
19 | $ cat f |
|
19 | $ cat f | |
20 | line 1 |
|
20 | line 1 | |
21 | line 2 |
|
21 | line 2 | |
22 | line 3 |
|
22 | line 3 | |
23 |
|
23 | |||
24 | Branch 1: editing line 1: |
|
24 | Branch 1: editing line 1: | |
25 |
|
25 | |||
26 | $ sed 's/line 1/first line/' f > f.new |
|
26 | $ sed 's/line 1/first line/' f > f.new | |
27 | $ mv f.new f |
|
27 | $ mv f.new f | |
28 | $ hg ci -Am "edited first line" |
|
28 | $ hg ci -Am "edited first line" | |
29 |
|
29 | |||
30 | Branch 2: editing line 3: |
|
30 | Branch 2: editing line 3: | |
31 |
|
31 | |||
32 | $ hg update 0 |
|
32 | $ hg update 0 | |
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | $ sed 's/line 3/third line/' f > f.new |
|
34 | $ sed 's/line 3/third line/' f > f.new | |
35 | $ mv f.new f |
|
35 | $ mv f.new f | |
36 | $ hg ci -Am "edited third line" |
|
36 | $ hg ci -Am "edited third line" | |
37 | created new head |
|
37 | created new head | |
38 |
|
38 | |||
39 | Merge using internal:fail tool: |
|
39 | Merge using internal:fail tool: | |
40 |
|
40 | |||
41 | $ echo "[merge-patterns]" > .hg/hgrc |
|
41 | $ echo "[merge-patterns]" > .hg/hgrc | |
42 | $ echo "* = internal:fail" >> .hg/hgrc |
|
42 | $ echo "* = internal:fail" >> .hg/hgrc | |
43 |
|
43 | |||
44 | $ hg merge |
|
44 | $ hg merge | |
45 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
45 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
46 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
46 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
47 | [1] |
|
47 | [1] | |
48 |
|
48 | |||
49 | $ cat f |
|
49 | $ cat f | |
50 | line 1 |
|
50 | line 1 | |
51 | line 2 |
|
51 | line 2 | |
52 | third line |
|
52 | third line | |
53 |
|
53 | |||
54 | $ hg stat |
|
54 | $ hg stat | |
55 | M f |
|
55 | M f | |
56 |
|
56 | |||
57 | Merge using internal:local tool: |
|
57 | Merge using internal:local tool: | |
58 |
|
58 | |||
59 | $ hg update -C 2 |
|
59 | $ hg update -C 2 | |
60 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
60 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
61 | $ sed 's/internal:fail/internal:local/' .hg/hgrc > .hg/hgrc.new |
|
61 | $ sed 's/internal:fail/internal:local/' .hg/hgrc > .hg/hgrc.new | |
62 | $ mv .hg/hgrc.new .hg/hgrc |
|
62 | $ mv .hg/hgrc.new .hg/hgrc | |
63 |
|
63 | |||
64 | $ hg merge |
|
64 | $ hg merge | |
65 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
65 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
66 | (branch merge, don't forget to commit) |
|
66 | (branch merge, don't forget to commit) | |
67 |
|
67 | |||
68 | $ cat f |
|
68 | $ cat f | |
69 | line 1 |
|
69 | line 1 | |
70 | line 2 |
|
70 | line 2 | |
71 | third line |
|
71 | third line | |
72 |
|
72 | |||
73 | $ hg stat |
|
73 | $ hg stat | |
74 | M f |
|
74 | M f | |
75 |
|
75 | |||
76 | Merge using internal:other tool: |
|
76 | Merge using internal:other tool: | |
77 |
|
77 | |||
78 | $ hg update -C 2 |
|
78 | $ hg update -C 2 | |
79 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
80 | $ sed 's/internal:local/internal:other/' .hg/hgrc > .hg/hgrc.new |
|
80 | $ sed 's/internal:local/internal:other/' .hg/hgrc > .hg/hgrc.new | |
81 | $ mv .hg/hgrc.new .hg/hgrc |
|
81 | $ mv .hg/hgrc.new .hg/hgrc | |
82 |
|
82 | |||
83 | $ hg merge |
|
83 | $ hg merge | |
84 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
84 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
85 | (branch merge, don't forget to commit) |
|
85 | (branch merge, don't forget to commit) | |
86 |
|
86 | |||
87 | $ cat f |
|
87 | $ cat f | |
88 | first line |
|
88 | first line | |
89 | line 2 |
|
89 | line 2 | |
90 | line 3 |
|
90 | line 3 | |
91 |
|
91 | |||
92 | $ hg stat |
|
92 | $ hg stat | |
93 | M f |
|
93 | M f | |
94 |
|
94 | |||
95 | Merge using default tool: |
|
95 | Merge using default tool: | |
96 |
|
96 | |||
97 | $ hg update -C 2 |
|
97 | $ hg update -C 2 | |
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
99 | $ rm .hg/hgrc |
|
99 | $ rm .hg/hgrc | |
100 |
|
100 | |||
101 | $ hg merge |
|
101 | $ hg merge | |
102 | merging f |
|
102 | merging f | |
103 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
103 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
104 | (branch merge, don't forget to commit) |
|
104 | (branch merge, don't forget to commit) | |
105 |
|
105 | |||
106 | $ cat f |
|
106 | $ cat f | |
107 | first line |
|
107 | first line | |
108 | line 2 |
|
108 | line 2 | |
109 | third line |
|
109 | third line | |
110 |
|
110 | |||
111 | $ hg stat |
|
111 | $ hg stat | |
112 | M f |
|
112 | M f | |
113 |
|
113 | |||
114 | Merge using internal:union tool: |
|
114 | Merge using internal:union tool: | |
115 |
|
115 | |||
116 | $ hg update -C 2 |
|
116 | $ hg update -C 2 | |
117 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
117 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
118 |
|
118 | |||
119 | $ echo "line 4a" >>f |
|
119 | $ echo "line 4a" >>f | |
120 | $ hg ci -Am "Adding fourth line (commit 4)" |
|
120 | $ hg ci -Am "Adding fourth line (commit 4)" | |
121 | $ hg update 2 |
|
121 | $ hg update 2 | |
122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
122 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
123 |
|
123 | |||
124 | $ echo "line 4b" >>f |
|
124 | $ echo "line 4b" >>f | |
125 | $ hg ci -Am "Adding fourth line v2 (commit 5)" |
|
125 | $ hg ci -Am "Adding fourth line v2 (commit 5)" | |
126 | created new head |
|
126 | created new head | |
127 |
|
127 | |||
128 | $ echo "[merge-patterns]" > .hg/hgrc |
|
128 | $ echo "[merge-patterns]" > .hg/hgrc | |
129 | $ echo "* = internal:union" >> .hg/hgrc |
|
129 | $ echo "* = internal:union" >> .hg/hgrc | |
130 |
|
130 | |||
131 | $ hg merge 3 |
|
131 | $ hg merge 3 | |
132 | merging f |
|
132 | merging f | |
133 |
|
|
133 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
134 | (branch merge, don't forget to commit) |
|
134 | (branch merge, don't forget to commit) | |
135 |
|
135 | |||
136 | $ cat f |
|
136 | $ cat f | |
137 | line 1 |
|
137 | line 1 | |
138 | line 2 |
|
138 | line 2 | |
139 | third line |
|
139 | third line | |
140 | line 4b |
|
140 | line 4b | |
141 | line 4a |
|
141 | line 4a |
General Comments 0
You need to be logged in to leave comments.
Login now