Show More
@@ -1,365 +1,370 b'' | |||||
1 | # copies.py - copy detection for Mercurial |
|
1 | # copies.py - copy detection for Mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2008 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2008 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | import util |
|
8 | import util | |
9 | import heapq |
|
9 | import heapq | |
10 |
|
10 | |||
11 | def _nonoverlap(d1, d2, d3): |
|
11 | def _nonoverlap(d1, d2, d3): | |
12 | "Return list of elements in d1 not in d2 or d3" |
|
12 | "Return list of elements in d1 not in d2 or d3" | |
13 | return sorted([d for d in d1 if d not in d3 and d not in d2]) |
|
13 | return sorted([d for d in d1 if d not in d3 and d not in d2]) | |
14 |
|
14 | |||
15 | def _dirname(f): |
|
15 | def _dirname(f): | |
16 | s = f.rfind("/") |
|
16 | s = f.rfind("/") | |
17 | if s == -1: |
|
17 | if s == -1: | |
18 | return "" |
|
18 | return "" | |
19 | return f[:s] |
|
19 | return f[:s] | |
20 |
|
20 | |||
21 | def _findlimit(repo, a, b): |
|
21 | def _findlimit(repo, a, b): | |
22 | """Find the earliest revision that's an ancestor of a or b but not both, |
|
22 | """Find the earliest revision that's an ancestor of a or b but not both, | |
23 | None if no such revision exists. |
|
23 | None if no such revision exists. | |
24 | """ |
|
24 | """ | |
25 | # basic idea: |
|
25 | # basic idea: | |
26 | # - mark a and b with different sides |
|
26 | # - mark a and b with different sides | |
27 | # - if a parent's children are all on the same side, the parent is |
|
27 | # - if a parent's children are all on the same side, the parent is | |
28 | # on that side, otherwise it is on no side |
|
28 | # on that side, otherwise it is on no side | |
29 | # - walk the graph in topological order with the help of a heap; |
|
29 | # - walk the graph in topological order with the help of a heap; | |
30 | # - add unseen parents to side map |
|
30 | # - add unseen parents to side map | |
31 | # - clear side of any parent that has children on different sides |
|
31 | # - clear side of any parent that has children on different sides | |
32 | # - track number of interesting revs that might still be on a side |
|
32 | # - track number of interesting revs that might still be on a side | |
33 | # - track the lowest interesting rev seen |
|
33 | # - track the lowest interesting rev seen | |
34 | # - quit when interesting revs is zero |
|
34 | # - quit when interesting revs is zero | |
35 |
|
35 | |||
36 | cl = repo.changelog |
|
36 | cl = repo.changelog | |
37 | working = len(cl) # pseudo rev for the working directory |
|
37 | working = len(cl) # pseudo rev for the working directory | |
38 | if a is None: |
|
38 | if a is None: | |
39 | a = working |
|
39 | a = working | |
40 | if b is None: |
|
40 | if b is None: | |
41 | b = working |
|
41 | b = working | |
42 |
|
42 | |||
43 | side = {a: -1, b: 1} |
|
43 | side = {a: -1, b: 1} | |
44 | visit = [-a, -b] |
|
44 | visit = [-a, -b] | |
45 | heapq.heapify(visit) |
|
45 | heapq.heapify(visit) | |
46 | interesting = len(visit) |
|
46 | interesting = len(visit) | |
47 | hascommonancestor = False |
|
47 | hascommonancestor = False | |
48 | limit = working |
|
48 | limit = working | |
49 |
|
49 | |||
50 | while interesting: |
|
50 | while interesting: | |
51 | r = -heapq.heappop(visit) |
|
51 | r = -heapq.heappop(visit) | |
52 | if r == working: |
|
52 | if r == working: | |
53 | parents = [cl.rev(p) for p in repo.dirstate.parents()] |
|
53 | parents = [cl.rev(p) for p in repo.dirstate.parents()] | |
54 | else: |
|
54 | else: | |
55 | parents = cl.parentrevs(r) |
|
55 | parents = cl.parentrevs(r) | |
56 | for p in parents: |
|
56 | for p in parents: | |
57 | if p < 0: |
|
57 | if p < 0: | |
58 | continue |
|
58 | continue | |
59 | if p not in side: |
|
59 | if p not in side: | |
60 | # first time we see p; add it to visit |
|
60 | # first time we see p; add it to visit | |
61 | side[p] = side[r] |
|
61 | side[p] = side[r] | |
62 | if side[p]: |
|
62 | if side[p]: | |
63 | interesting += 1 |
|
63 | interesting += 1 | |
64 | heapq.heappush(visit, -p) |
|
64 | heapq.heappush(visit, -p) | |
65 | elif side[p] and side[p] != side[r]: |
|
65 | elif side[p] and side[p] != side[r]: | |
66 | # p was interesting but now we know better |
|
66 | # p was interesting but now we know better | |
67 | side[p] = 0 |
|
67 | side[p] = 0 | |
68 | interesting -= 1 |
|
68 | interesting -= 1 | |
69 | hascommonancestor = True |
|
69 | hascommonancestor = True | |
70 | if side[r]: |
|
70 | if side[r]: | |
71 | limit = r # lowest rev visited |
|
71 | limit = r # lowest rev visited | |
72 | interesting -= 1 |
|
72 | interesting -= 1 | |
73 |
|
73 | |||
74 | if not hascommonancestor: |
|
74 | if not hascommonancestor: | |
75 | return None |
|
75 | return None | |
76 | return limit |
|
76 | return limit | |
77 |
|
77 | |||
78 | def _chain(src, dst, a, b): |
|
78 | def _chain(src, dst, a, b): | |
79 | '''chain two sets of copies a->b''' |
|
79 | '''chain two sets of copies a->b''' | |
80 | t = a.copy() |
|
80 | t = a.copy() | |
81 | for k, v in b.iteritems(): |
|
81 | for k, v in b.iteritems(): | |
82 | if v in t: |
|
82 | if v in t: | |
83 | # found a chain |
|
83 | # found a chain | |
84 | if t[v] != k: |
|
84 | if t[v] != k: | |
85 | # file wasn't renamed back to itself |
|
85 | # file wasn't renamed back to itself | |
86 | t[k] = t[v] |
|
86 | t[k] = t[v] | |
87 | if v not in dst: |
|
87 | if v not in dst: | |
88 | # chain was a rename, not a copy |
|
88 | # chain was a rename, not a copy | |
89 | del t[v] |
|
89 | del t[v] | |
90 | if v in src: |
|
90 | if v in src: | |
91 | # file is a copy of an existing file |
|
91 | # file is a copy of an existing file | |
92 | t[k] = v |
|
92 | t[k] = v | |
93 |
|
93 | |||
94 | # remove criss-crossed copies |
|
94 | # remove criss-crossed copies | |
95 | for k, v in t.items(): |
|
95 | for k, v in t.items(): | |
96 | if k in src and v in dst: |
|
96 | if k in src and v in dst: | |
97 | del t[k] |
|
97 | del t[k] | |
98 |
|
98 | |||
99 | return t |
|
99 | return t | |
100 |
|
100 | |||
101 | def _tracefile(fctx, actx): |
|
101 | def _tracefile(fctx, actx): | |
102 | '''return file context that is the ancestor of fctx present in actx''' |
|
102 | '''return file context that is the ancestor of fctx present in actx''' | |
103 | stop = actx.rev() |
|
103 | stop = actx.rev() | |
104 | am = actx.manifest() |
|
104 | am = actx.manifest() | |
105 |
|
105 | |||
106 | for f in fctx.ancestors(): |
|
106 | for f in fctx.ancestors(): | |
107 | if am.get(f.path(), None) == f.filenode(): |
|
107 | if am.get(f.path(), None) == f.filenode(): | |
108 | return f |
|
108 | return f | |
109 | if f.rev() < stop: |
|
109 | if f.rev() < stop: | |
110 | return None |
|
110 | return None | |
111 |
|
111 | |||
112 | def _dirstatecopies(d): |
|
112 | def _dirstatecopies(d): | |
113 | ds = d._repo.dirstate |
|
113 | ds = d._repo.dirstate | |
114 | c = ds.copies().copy() |
|
114 | c = ds.copies().copy() | |
115 | for k in c.keys(): |
|
115 | for k in c.keys(): | |
116 | if ds[k] not in 'anm': |
|
116 | if ds[k] not in 'anm': | |
117 | del c[k] |
|
117 | del c[k] | |
118 | return c |
|
118 | return c | |
119 |
|
119 | |||
120 | def _forwardcopies(a, b): |
|
120 | def _forwardcopies(a, b): | |
121 | '''find {dst@b: src@a} copy mapping where a is an ancestor of b''' |
|
121 | '''find {dst@b: src@a} copy mapping where a is an ancestor of b''' | |
122 |
|
122 | |||
123 | # check for working copy |
|
123 | # check for working copy | |
124 | w = None |
|
124 | w = None | |
125 | if b.rev() is None: |
|
125 | if b.rev() is None: | |
126 | w = b |
|
126 | w = b | |
127 | b = w.p1() |
|
127 | b = w.p1() | |
128 | if a == b: |
|
128 | if a == b: | |
129 | # short-circuit to avoid issues with merge states |
|
129 | # short-circuit to avoid issues with merge states | |
130 | return _dirstatecopies(w) |
|
130 | return _dirstatecopies(w) | |
131 |
|
131 | |||
132 | # find where new files came from |
|
132 | # find where new files came from | |
133 | # we currently don't try to find where old files went, too expensive |
|
133 | # we currently don't try to find where old files went, too expensive | |
134 | # this means we can miss a case like 'hg rm b; hg cp a b' |
|
134 | # this means we can miss a case like 'hg rm b; hg cp a b' | |
135 | cm = {} |
|
135 | cm = {} | |
136 | for f in b: |
|
136 | for f in b: | |
137 | if f not in a: |
|
137 | if f not in a: | |
138 | ofctx = _tracefile(b[f], a) |
|
138 | ofctx = _tracefile(b[f], a) | |
139 | if ofctx: |
|
139 | if ofctx: | |
140 | cm[f] = ofctx.path() |
|
140 | cm[f] = ofctx.path() | |
141 |
|
141 | |||
142 | # combine copies from dirstate if necessary |
|
142 | # combine copies from dirstate if necessary | |
143 | if w is not None: |
|
143 | if w is not None: | |
144 | cm = _chain(a, w, cm, _dirstatecopies(w)) |
|
144 | cm = _chain(a, w, cm, _dirstatecopies(w)) | |
145 |
|
145 | |||
146 | return cm |
|
146 | return cm | |
147 |
|
147 | |||
148 | def _backwardcopies(a, b): |
|
148 | def _backwardcopies(a, b): | |
149 | # because the forward mapping is 1:n, we can lose renames here |
|
149 | # because the forward mapping is 1:n, we can lose renames here | |
150 | # in particular, we find renames better than copies |
|
150 | # in particular, we find renames better than copies | |
151 | f = _forwardcopies(b, a) |
|
151 | f = _forwardcopies(b, a) | |
152 | r = {} |
|
152 | r = {} | |
153 | for k, v in f.iteritems(): |
|
153 | for k, v in f.iteritems(): | |
154 | r[v] = k |
|
154 | r[v] = k | |
155 | return r |
|
155 | return r | |
156 |
|
156 | |||
157 | def pathcopies(x, y): |
|
157 | def pathcopies(x, y): | |
158 | '''find {dst@y: src@x} copy mapping for directed compare''' |
|
158 | '''find {dst@y: src@x} copy mapping for directed compare''' | |
159 | if x == y or not x or not y: |
|
159 | if x == y or not x or not y: | |
160 | return {} |
|
160 | return {} | |
161 | a = y.ancestor(x) |
|
161 | a = y.ancestor(x) | |
162 | if a == x: |
|
162 | if a == x: | |
163 | return _forwardcopies(x, y) |
|
163 | return _forwardcopies(x, y) | |
164 | if a == y: |
|
164 | if a == y: | |
165 | return _backwardcopies(x, y) |
|
165 | return _backwardcopies(x, y) | |
166 | return _chain(x, y, _backwardcopies(x, a), _forwardcopies(a, y)) |
|
166 | return _chain(x, y, _backwardcopies(x, a), _forwardcopies(a, y)) | |
167 |
|
167 | |||
168 | def mergecopies(repo, c1, c2, ca): |
|
168 | def mergecopies(repo, c1, c2, ca): | |
169 | """ |
|
169 | """ | |
170 | Find moves and copies between context c1 and c2 that are relevant |
|
170 | Find moves and copies between context c1 and c2 that are relevant | |
171 | for merging. |
|
171 | for merging. | |
172 |
|
172 | |||
173 | Returns two dicts, "copy" and "diverge". |
|
173 | Returns two dicts, "copy" and "diverge". | |
174 |
|
174 | |||
175 | "copy" is a mapping from destination name -> source name, |
|
175 | "copy" is a mapping from destination name -> source name, | |
176 | where source is in c1 and destination is in c2 or vice-versa. |
|
176 | where source is in c1 and destination is in c2 or vice-versa. | |
177 |
|
177 | |||
178 | "diverge" is a mapping of source name -> list of destination names |
|
178 | "diverge" is a mapping of source name -> list of destination names | |
179 | for divergent renames. |
|
179 | for divergent renames. | |
180 |
|
180 | |||
181 | "renamedelete" is a mapping of source name -> list of destination |
|
181 | "renamedelete" is a mapping of source name -> list of destination | |
182 | names for files deleted in c1 that were renamed in c2 or vice-versa. |
|
182 | names for files deleted in c1 that were renamed in c2 or vice-versa. | |
183 | """ |
|
183 | """ | |
184 | # avoid silly behavior for update from empty dir |
|
184 | # avoid silly behavior for update from empty dir | |
185 | if not c1 or not c2 or c1 == c2: |
|
185 | if not c1 or not c2 or c1 == c2: | |
186 | return {}, {}, {} |
|
186 | return {}, {}, {} | |
187 |
|
187 | |||
188 | # avoid silly behavior for parent -> working dir |
|
188 | # avoid silly behavior for parent -> working dir | |
189 | if c2.node() is None and c1.node() == repo.dirstate.p1(): |
|
189 | if c2.node() is None and c1.node() == repo.dirstate.p1(): | |
190 | return repo.dirstate.copies(), {}, {} |
|
190 | return repo.dirstate.copies(), {}, {} | |
191 |
|
191 | |||
192 | limit = _findlimit(repo, c1.rev(), c2.rev()) |
|
192 | limit = _findlimit(repo, c1.rev(), c2.rev()) | |
193 | if limit is None: |
|
193 | if limit is None: | |
194 | # no common ancestor, no copies |
|
194 | # no common ancestor, no copies | |
195 | return {}, {}, {} |
|
195 | return {}, {}, {} | |
196 | m1 = c1.manifest() |
|
196 | m1 = c1.manifest() | |
197 | m2 = c2.manifest() |
|
197 | m2 = c2.manifest() | |
198 | ma = ca.manifest() |
|
198 | ma = ca.manifest() | |
199 |
|
199 | |||
200 | def makectx(f, n): |
|
200 | def makectx(f, n): | |
201 | if len(n) != 20: # in a working context? |
|
201 | if len(n) != 20: # in a working context? | |
202 | if c1.rev() is None: |
|
202 | if c1.rev() is None: | |
203 | return c1.filectx(f) |
|
203 | return c1.filectx(f) | |
204 | return c2.filectx(f) |
|
204 | return c2.filectx(f) | |
205 | return repo.filectx(f, fileid=n) |
|
205 | return repo.filectx(f, fileid=n) | |
206 |
|
206 | |||
207 | ctx = util.lrucachefunc(makectx) |
|
207 | ctx = util.lrucachefunc(makectx) | |
208 | copy = {} |
|
208 | copy = {} | |
209 | fullcopy = {} |
|
209 | fullcopy = {} | |
210 | diverge = {} |
|
210 | diverge = {} | |
211 |
|
211 | |||
212 | def related(f1, f2, limit): |
|
212 | def related(f1, f2, limit): | |
213 | # Walk back to common ancestor to see if the two files originate |
|
213 | # Walk back to common ancestor to see if the two files originate | |
214 | # from the same file. Since workingfilectx's rev() is None it messes |
|
214 | # from the same file. Since workingfilectx's rev() is None it messes | |
215 | # up the integer comparison logic, hence the pre-step check for |
|
215 | # up the integer comparison logic, hence the pre-step check for | |
216 | # None (f1 and f2 can only be workingfilectx's initially). |
|
216 | # None (f1 and f2 can only be workingfilectx's initially). | |
217 |
|
217 | |||
218 | if f1 == f2: |
|
218 | if f1 == f2: | |
219 | return f1 # a match |
|
219 | return f1 # a match | |
220 |
|
220 | |||
221 | g1, g2 = f1.ancestors(), f2.ancestors() |
|
221 | g1, g2 = f1.ancestors(), f2.ancestors() | |
222 | try: |
|
222 | try: | |
223 | f1r, f2r = f1.rev(), f2.rev() |
|
223 | f1r, f2r = f1.rev(), f2.rev() | |
224 |
|
224 | |||
225 | if f1r is None: |
|
225 | if f1r is None: | |
226 | f1 = g1.next() |
|
226 | f1 = g1.next() | |
227 | if f2r is None: |
|
227 | if f2r is None: | |
228 | f2 = g2.next() |
|
228 | f2 = g2.next() | |
229 |
|
229 | |||
230 | while True: |
|
230 | while True: | |
231 | f1r, f2r = f1.rev(), f2.rev() |
|
231 | f1r, f2r = f1.rev(), f2.rev() | |
232 | if f1r > f2r: |
|
232 | if f1r > f2r: | |
233 | f1 = g1.next() |
|
233 | f1 = g1.next() | |
234 | elif f2r > f1r: |
|
234 | elif f2r > f1r: | |
235 | f2 = g2.next() |
|
235 | f2 = g2.next() | |
236 | elif f1 == f2: |
|
236 | elif f1 == f2: | |
237 | return f1 # a match |
|
237 | return f1 # a match | |
238 | elif f1r == f2r or f1r < limit or f2r < limit: |
|
238 | elif f1r == f2r or f1r < limit or f2r < limit: | |
239 | return False # copy no longer relevant |
|
239 | return False # copy no longer relevant | |
240 | except StopIteration: |
|
240 | except StopIteration: | |
241 | return False |
|
241 | return False | |
242 |
|
242 | |||
243 | def checkcopies(f, m1, m2): |
|
243 | def checkcopies(f, m1, m2): | |
244 | '''check possible copies of f from m1 to m2''' |
|
244 | '''check possible copies of f from m1 to m2''' | |
245 | of = None |
|
245 | of = None | |
246 | seen = set([f]) |
|
246 | seen = set([f]) | |
247 | for oc in ctx(f, m1[f]).ancestors(): |
|
247 | for oc in ctx(f, m1[f]).ancestors(): | |
248 | ocr = oc.rev() |
|
248 | ocr = oc.rev() | |
249 | of = oc.path() |
|
249 | of = oc.path() | |
250 | if of in seen: |
|
250 | if of in seen: | |
251 | # check limit late - grab last rename before |
|
251 | # check limit late - grab last rename before | |
252 | if ocr < limit: |
|
252 | if ocr < limit: | |
253 | break |
|
253 | break | |
254 | continue |
|
254 | continue | |
255 | seen.add(of) |
|
255 | seen.add(of) | |
256 |
|
256 | |||
257 | fullcopy[f] = of # remember for dir rename detection |
|
257 | fullcopy[f] = of # remember for dir rename detection | |
258 | if of not in m2: |
|
258 | if of not in m2: | |
259 | continue # no match, keep looking |
|
259 | continue # no match, keep looking | |
260 | if m2[of] == ma.get(of): |
|
260 | if m2[of] == ma.get(of): | |
261 | break # no merge needed, quit early |
|
261 | break # no merge needed, quit early | |
262 | c2 = ctx(of, m2[of]) |
|
262 | c2 = ctx(of, m2[of]) | |
263 | cr = related(oc, c2, ca.rev()) |
|
263 | cr = related(oc, c2, ca.rev()) | |
264 | if cr and (of == f or of == c2.path()): # non-divergent |
|
264 | if cr and (of == f or of == c2.path()): # non-divergent | |
265 | copy[f] = of |
|
265 | copy[f] = of | |
266 | of = None |
|
266 | of = None | |
267 | break |
|
267 | break | |
268 |
|
268 | |||
269 | if of in ma: |
|
269 | if of in ma: | |
270 | diverge.setdefault(of, []).append(f) |
|
270 | diverge.setdefault(of, []).append(f) | |
271 |
|
271 | |||
272 | repo.ui.debug(" searching for copies back to rev %d\n" % limit) |
|
272 | repo.ui.debug(" searching for copies back to rev %d\n" % limit) | |
273 |
|
273 | |||
274 | u1 = _nonoverlap(m1, m2, ma) |
|
274 | u1 = _nonoverlap(m1, m2, ma) | |
275 | u2 = _nonoverlap(m2, m1, ma) |
|
275 | u2 = _nonoverlap(m2, m1, ma) | |
276 |
|
276 | |||
277 | if u1: |
|
277 | if u1: | |
278 | repo.ui.debug(" unmatched files in local:\n %s\n" |
|
278 | repo.ui.debug(" unmatched files in local:\n %s\n" | |
279 | % "\n ".join(u1)) |
|
279 | % "\n ".join(u1)) | |
280 | if u2: |
|
280 | if u2: | |
281 | repo.ui.debug(" unmatched files in other:\n %s\n" |
|
281 | repo.ui.debug(" unmatched files in other:\n %s\n" | |
282 | % "\n ".join(u2)) |
|
282 | % "\n ".join(u2)) | |
283 |
|
283 | |||
284 | for f in u1: |
|
284 | for f in u1: | |
285 | checkcopies(f, m1, m2) |
|
285 | checkcopies(f, m1, m2) | |
286 | for f in u2: |
|
286 | for f in u2: | |
287 | checkcopies(f, m2, m1) |
|
287 | checkcopies(f, m2, m1) | |
288 |
|
288 | |||
289 | renamedelete = {} |
|
289 | renamedelete = {} | |
|
290 | renamedelete2 = set() | |||
290 | diverge2 = set() |
|
291 | diverge2 = set() | |
291 | for of, fl in diverge.items(): |
|
292 | for of, fl in diverge.items(): | |
292 | if len(fl) == 1 or of in c1 or of in c2: |
|
293 | if len(fl) == 1 or of in c1 or of in c2: | |
293 | del diverge[of] # not actually divergent, or not a rename |
|
294 | del diverge[of] # not actually divergent, or not a rename | |
294 | if of not in c1 and of not in c2: |
|
295 | if of not in c1 and of not in c2: | |
295 | # renamed on one side, deleted on the other side, but filter |
|
296 | # renamed on one side, deleted on the other side, but filter | |
296 | # out files that have been renamed and then deleted |
|
297 | # out files that have been renamed and then deleted | |
297 | renamedelete[of] = [f for f in fl if f in c1 or f in c2] |
|
298 | renamedelete[of] = [f for f in fl if f in c1 or f in c2] | |
|
299 | renamedelete2.update(fl) # reverse map for below | |||
298 | else: |
|
300 | else: | |
299 | diverge2.update(fl) # reverse map for below |
|
301 | diverge2.update(fl) # reverse map for below | |
300 |
|
302 | |||
301 | if fullcopy: |
|
303 | if fullcopy: | |
302 |
repo.ui.debug(" all copies found (* = to merge, ! = divergent |
|
304 | repo.ui.debug(" all copies found (* = to merge, ! = divergent, " | |
|
305 | "% = renamed and deleted):\n") | |||
303 | for f in fullcopy: |
|
306 | for f in fullcopy: | |
304 | note = "" |
|
307 | note = "" | |
305 | if f in copy: |
|
308 | if f in copy: | |
306 | note += "*" |
|
309 | note += "*" | |
307 | if f in diverge2: |
|
310 | if f in diverge2: | |
308 | note += "!" |
|
311 | note += "!" | |
|
312 | if f in renamedelete2: | |||
|
313 | note += "%" | |||
309 | repo.ui.debug(" %s -> %s %s\n" % (f, fullcopy[f], note)) |
|
314 | repo.ui.debug(" %s -> %s %s\n" % (f, fullcopy[f], note)) | |
310 | del diverge2 |
|
315 | del diverge2 | |
311 |
|
316 | |||
312 | if not fullcopy: |
|
317 | if not fullcopy: | |
313 | return copy, diverge, renamedelete |
|
318 | return copy, diverge, renamedelete | |
314 |
|
319 | |||
315 | repo.ui.debug(" checking for directory renames\n") |
|
320 | repo.ui.debug(" checking for directory renames\n") | |
316 |
|
321 | |||
317 | # generate a directory move map |
|
322 | # generate a directory move map | |
318 | d1, d2 = c1.dirs(), c2.dirs() |
|
323 | d1, d2 = c1.dirs(), c2.dirs() | |
319 | invalid = set([""]) |
|
324 | invalid = set([""]) | |
320 | dirmove = {} |
|
325 | dirmove = {} | |
321 |
|
326 | |||
322 | # examine each file copy for a potential directory move, which is |
|
327 | # examine each file copy for a potential directory move, which is | |
323 | # when all the files in a directory are moved to a new directory |
|
328 | # when all the files in a directory are moved to a new directory | |
324 | for dst, src in fullcopy.iteritems(): |
|
329 | for dst, src in fullcopy.iteritems(): | |
325 | dsrc, ddst = _dirname(src), _dirname(dst) |
|
330 | dsrc, ddst = _dirname(src), _dirname(dst) | |
326 | if dsrc in invalid: |
|
331 | if dsrc in invalid: | |
327 | # already seen to be uninteresting |
|
332 | # already seen to be uninteresting | |
328 | continue |
|
333 | continue | |
329 | elif dsrc in d1 and ddst in d1: |
|
334 | elif dsrc in d1 and ddst in d1: | |
330 | # directory wasn't entirely moved locally |
|
335 | # directory wasn't entirely moved locally | |
331 | invalid.add(dsrc) |
|
336 | invalid.add(dsrc) | |
332 | elif dsrc in d2 and ddst in d2: |
|
337 | elif dsrc in d2 and ddst in d2: | |
333 | # directory wasn't entirely moved remotely |
|
338 | # directory wasn't entirely moved remotely | |
334 | invalid.add(dsrc) |
|
339 | invalid.add(dsrc) | |
335 | elif dsrc in dirmove and dirmove[dsrc] != ddst: |
|
340 | elif dsrc in dirmove and dirmove[dsrc] != ddst: | |
336 | # files from the same directory moved to two different places |
|
341 | # files from the same directory moved to two different places | |
337 | invalid.add(dsrc) |
|
342 | invalid.add(dsrc) | |
338 | else: |
|
343 | else: | |
339 | # looks good so far |
|
344 | # looks good so far | |
340 | dirmove[dsrc + "/"] = ddst + "/" |
|
345 | dirmove[dsrc + "/"] = ddst + "/" | |
341 |
|
346 | |||
342 | for i in invalid: |
|
347 | for i in invalid: | |
343 | if i in dirmove: |
|
348 | if i in dirmove: | |
344 | del dirmove[i] |
|
349 | del dirmove[i] | |
345 | del d1, d2, invalid |
|
350 | del d1, d2, invalid | |
346 |
|
351 | |||
347 | if not dirmove: |
|
352 | if not dirmove: | |
348 | return copy, diverge, renamedelete |
|
353 | return copy, diverge, renamedelete | |
349 |
|
354 | |||
350 | for d in dirmove: |
|
355 | for d in dirmove: | |
351 | repo.ui.debug(" dir %s -> %s\n" % (d, dirmove[d])) |
|
356 | repo.ui.debug(" dir %s -> %s\n" % (d, dirmove[d])) | |
352 |
|
357 | |||
353 | # check unaccounted nonoverlapping files against directory moves |
|
358 | # check unaccounted nonoverlapping files against directory moves | |
354 | for f in u1 + u2: |
|
359 | for f in u1 + u2: | |
355 | if f not in fullcopy: |
|
360 | if f not in fullcopy: | |
356 | for d in dirmove: |
|
361 | for d in dirmove: | |
357 | if f.startswith(d): |
|
362 | if f.startswith(d): | |
358 | # new file added in a directory that was moved, move it |
|
363 | # new file added in a directory that was moved, move it | |
359 | df = dirmove[d] + f[len(d):] |
|
364 | df = dirmove[d] + f[len(d):] | |
360 | if df not in copy: |
|
365 | if df not in copy: | |
361 | copy[f] = df |
|
366 | copy[f] = df | |
362 | repo.ui.debug(" file %s -> %s\n" % (f, copy[f])) |
|
367 | repo.ui.debug(" file %s -> %s\n" % (f, copy[f])) | |
363 | break |
|
368 | break | |
364 |
|
369 | |||
365 | return copy, diverge, renamedelete |
|
370 | return copy, diverge, renamedelete |
@@ -1,62 +1,62 b'' | |||||
1 | $ hg init t |
|
1 | $ hg init t | |
2 | $ cd t |
|
2 | $ cd t | |
3 |
|
3 | |||
4 | $ echo 1 > a |
|
4 | $ echo 1 > a | |
5 | $ hg ci -qAm "first" |
|
5 | $ hg ci -qAm "first" | |
6 |
|
6 | |||
7 | $ hg cp a b |
|
7 | $ hg cp a b | |
8 | $ hg mv a c |
|
8 | $ hg mv a c | |
9 | $ echo 2 >> b |
|
9 | $ echo 2 >> b | |
10 | $ echo 2 >> c |
|
10 | $ echo 2 >> c | |
11 |
|
11 | |||
12 | $ hg ci -qAm "second" |
|
12 | $ hg ci -qAm "second" | |
13 |
|
13 | |||
14 | $ hg co -C 0 |
|
14 | $ hg co -C 0 | |
15 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
16 |
|
16 | |||
17 | $ echo 0 > a |
|
17 | $ echo 0 > a | |
18 | $ echo 1 >> a |
|
18 | $ echo 1 >> a | |
19 |
|
19 | |||
20 | $ hg ci -qAm "other" |
|
20 | $ hg ci -qAm "other" | |
21 |
|
21 | |||
22 | $ hg merge --debug |
|
22 | $ hg merge --debug | |
23 | searching for copies back to rev 1 |
|
23 | searching for copies back to rev 1 | |
24 | unmatched files in other: |
|
24 | unmatched files in other: | |
25 | b |
|
25 | b | |
26 | c |
|
26 | c | |
27 | all copies found (* = to merge, ! = divergent): |
|
27 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
28 | c -> a * |
|
28 | c -> a * | |
29 | b -> a * |
|
29 | b -> a * | |
30 | checking for directory renames |
|
30 | checking for directory renames | |
31 | resolving manifests |
|
31 | resolving manifests | |
32 | overwrite: False, partial: False |
|
32 | overwrite: False, partial: False | |
33 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 |
|
33 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 | |
34 | a: remote moved to c -> m |
|
34 | a: remote moved to c -> m | |
35 | a: remote moved to b -> m |
|
35 | a: remote moved to b -> m | |
36 | preserving a for resolve of b |
|
36 | preserving a for resolve of b | |
37 | preserving a for resolve of c |
|
37 | preserving a for resolve of c | |
38 | removing a |
|
38 | removing a | |
39 | updating: a 1/2 files (50.00%) |
|
39 | updating: a 1/2 files (50.00%) | |
40 | picked tool 'internal:merge' for b (binary False symlink False) |
|
40 | picked tool 'internal:merge' for b (binary False symlink False) | |
41 | merging a and b to b |
|
41 | merging a and b to b | |
42 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
42 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
43 | premerge successful |
|
43 | premerge successful | |
44 | updating: a 2/2 files (100.00%) |
|
44 | updating: a 2/2 files (100.00%) | |
45 | picked tool 'internal:merge' for c (binary False symlink False) |
|
45 | picked tool 'internal:merge' for c (binary False symlink False) | |
46 | merging a and c to c |
|
46 | merging a and c to c | |
47 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
47 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc | |
48 | premerge successful |
|
48 | premerge successful | |
49 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
49 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
50 | (branch merge, don't forget to commit) |
|
50 | (branch merge, don't forget to commit) | |
51 |
|
51 | |||
52 | file b |
|
52 | file b | |
53 | $ cat b |
|
53 | $ cat b | |
54 | 0 |
|
54 | 0 | |
55 | 1 |
|
55 | 1 | |
56 | 2 |
|
56 | 2 | |
57 |
|
57 | |||
58 | file c |
|
58 | file c | |
59 | $ cat c |
|
59 | $ cat c | |
60 | 0 |
|
60 | 0 | |
61 | 1 |
|
61 | 1 | |
62 | 2 |
|
62 | 2 |
@@ -1,65 +1,65 b'' | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 |
|
3 | |||
4 | $ echo line 1 > foo |
|
4 | $ echo line 1 > foo | |
5 | $ hg ci -qAm 'add foo' |
|
5 | $ hg ci -qAm 'add foo' | |
6 |
|
6 | |||
7 | copy foo to bar and change both files |
|
7 | copy foo to bar and change both files | |
8 | $ hg cp foo bar |
|
8 | $ hg cp foo bar | |
9 | $ echo line 2-1 >> foo |
|
9 | $ echo line 2-1 >> foo | |
10 | $ echo line 2-2 >> bar |
|
10 | $ echo line 2-2 >> bar | |
11 | $ hg ci -m 'cp foo bar; change both' |
|
11 | $ hg ci -m 'cp foo bar; change both' | |
12 |
|
12 | |||
13 | in another branch, change foo in a way that doesn't conflict with |
|
13 | in another branch, change foo in a way that doesn't conflict with | |
14 | the other changes |
|
14 | the other changes | |
15 | $ hg up -qC 0 |
|
15 | $ hg up -qC 0 | |
16 | $ echo line 0 > foo |
|
16 | $ echo line 0 > foo | |
17 | $ hg cat foo >> foo |
|
17 | $ hg cat foo >> foo | |
18 | $ hg ci -m 'change foo' |
|
18 | $ hg ci -m 'change foo' | |
19 | created new head |
|
19 | created new head | |
20 |
|
20 | |||
21 | we get conflicts that shouldn't be there |
|
21 | we get conflicts that shouldn't be there | |
22 | $ hg merge -P |
|
22 | $ hg merge -P | |
23 | changeset: 1:484bf6903104 |
|
23 | changeset: 1:484bf6903104 | |
24 | user: test |
|
24 | user: test | |
25 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
25 | date: Thu Jan 01 00:00:00 1970 +0000 | |
26 | summary: cp foo bar; change both |
|
26 | summary: cp foo bar; change both | |
27 |
|
27 | |||
28 | $ hg merge --debug |
|
28 | $ hg merge --debug | |
29 | searching for copies back to rev 1 |
|
29 | searching for copies back to rev 1 | |
30 | unmatched files in other: |
|
30 | unmatched files in other: | |
31 | bar |
|
31 | bar | |
32 | all copies found (* = to merge, ! = divergent): |
|
32 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
33 | bar -> foo * |
|
33 | bar -> foo * | |
34 | checking for directory renames |
|
34 | checking for directory renames | |
35 | resolving manifests |
|
35 | resolving manifests | |
36 | overwrite: False, partial: False |
|
36 | overwrite: False, partial: False | |
37 | ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104 |
|
37 | ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104 | |
38 | foo: versions differ -> m |
|
38 | foo: versions differ -> m | |
39 | foo: remote copied to bar -> m |
|
39 | foo: remote copied to bar -> m | |
40 | preserving foo for resolve of bar |
|
40 | preserving foo for resolve of bar | |
41 | preserving foo for resolve of foo |
|
41 | preserving foo for resolve of foo | |
42 | updating: foo 1/2 files (50.00%) |
|
42 | updating: foo 1/2 files (50.00%) | |
43 | picked tool 'internal:merge' for bar (binary False symlink False) |
|
43 | picked tool 'internal:merge' for bar (binary False symlink False) | |
44 | merging foo and bar to bar |
|
44 | merging foo and bar to bar | |
45 | my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc |
|
45 | my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc | |
46 | premerge successful |
|
46 | premerge successful | |
47 | updating: foo 2/2 files (100.00%) |
|
47 | updating: foo 2/2 files (100.00%) | |
48 | picked tool 'internal:merge' for foo (binary False symlink False) |
|
48 | picked tool 'internal:merge' for foo (binary False symlink False) | |
49 | merging foo |
|
49 | merging foo | |
50 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc |
|
50 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc | |
51 | premerge successful |
|
51 | premerge successful | |
52 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
52 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
53 | (branch merge, don't forget to commit) |
|
53 | (branch merge, don't forget to commit) | |
54 |
|
54 | |||
55 | contents of foo |
|
55 | contents of foo | |
56 | $ cat foo |
|
56 | $ cat foo | |
57 | line 0 |
|
57 | line 0 | |
58 | line 1 |
|
58 | line 1 | |
59 | line 2-1 |
|
59 | line 2-1 | |
60 |
|
60 | |||
61 | contents of bar |
|
61 | contents of bar | |
62 | $ cat bar |
|
62 | $ cat bar | |
63 | line 0 |
|
63 | line 0 | |
64 | line 1 |
|
64 | line 1 | |
65 | line 2-2 |
|
65 | line 2-2 |
@@ -1,289 +1,289 b'' | |||||
1 | Create a repo with some stuff in it: |
|
1 | Create a repo with some stuff in it: | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ echo a > d |
|
6 | $ echo a > d | |
7 | $ echo a > e |
|
7 | $ echo a > e | |
8 | $ hg ci -qAm0 |
|
8 | $ hg ci -qAm0 | |
9 | $ echo b > a |
|
9 | $ echo b > a | |
10 | $ hg ci -m1 -u bar |
|
10 | $ hg ci -m1 -u bar | |
11 | $ hg mv a b |
|
11 | $ hg mv a b | |
12 | $ hg ci -m2 |
|
12 | $ hg ci -m2 | |
13 | $ hg cp b c |
|
13 | $ hg cp b c | |
14 | $ hg ci -m3 -u baz |
|
14 | $ hg ci -m3 -u baz | |
15 | $ echo b > d |
|
15 | $ echo b > d | |
16 | $ echo f > e |
|
16 | $ echo f > e | |
17 | $ hg ci -m4 |
|
17 | $ hg ci -m4 | |
18 | $ hg up -q 3 |
|
18 | $ hg up -q 3 | |
19 | $ echo b > e |
|
19 | $ echo b > e | |
20 | $ hg branch -q stable |
|
20 | $ hg branch -q stable | |
21 | $ hg ci -m5 |
|
21 | $ hg ci -m5 | |
22 | $ hg merge -q default --tool internal:local |
|
22 | $ hg merge -q default --tool internal:local | |
23 | $ hg branch -q default |
|
23 | $ hg branch -q default | |
24 | $ hg ci -m6 |
|
24 | $ hg ci -m6 | |
25 | $ hg phase --public 3 |
|
25 | $ hg phase --public 3 | |
26 | $ hg phase --force --secret 6 |
|
26 | $ hg phase --force --secret 6 | |
27 |
|
27 | |||
28 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
28 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
29 | @ test@6.secret: 6 |
|
29 | @ test@6.secret: 6 | |
30 | |\ |
|
30 | |\ | |
31 | | o test@5.draft: 5 |
|
31 | | o test@5.draft: 5 | |
32 | | | |
|
32 | | | | |
33 | o | test@4.draft: 4 |
|
33 | o | test@4.draft: 4 | |
34 | |/ |
|
34 | |/ | |
35 | o baz@3.public: 3 |
|
35 | o baz@3.public: 3 | |
36 | | |
|
36 | | | |
37 | o test@2.public: 2 |
|
37 | o test@2.public: 2 | |
38 | | |
|
38 | | | |
39 | o bar@1.public: 1 |
|
39 | o bar@1.public: 1 | |
40 | | |
|
40 | | | |
41 | o test@0.public: 0 |
|
41 | o test@0.public: 0 | |
42 |
|
42 | |||
43 |
|
43 | |||
44 | Need to specify a rev: |
|
44 | Need to specify a rev: | |
45 |
|
45 | |||
46 | $ hg graft |
|
46 | $ hg graft | |
47 | abort: no revisions specified |
|
47 | abort: no revisions specified | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | Can't graft ancestor: |
|
50 | Can't graft ancestor: | |
51 |
|
51 | |||
52 | $ hg graft 1 2 |
|
52 | $ hg graft 1 2 | |
53 | skipping ancestor revision 1 |
|
53 | skipping ancestor revision 1 | |
54 | skipping ancestor revision 2 |
|
54 | skipping ancestor revision 2 | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | Can't graft with dirty wd: |
|
57 | Can't graft with dirty wd: | |
58 |
|
58 | |||
59 | $ hg up -q 0 |
|
59 | $ hg up -q 0 | |
60 | $ echo foo > a |
|
60 | $ echo foo > a | |
61 | $ hg graft 1 |
|
61 | $ hg graft 1 | |
62 | abort: outstanding uncommitted changes |
|
62 | abort: outstanding uncommitted changes | |
63 | [255] |
|
63 | [255] | |
64 | $ hg revert a |
|
64 | $ hg revert a | |
65 |
|
65 | |||
66 | Graft a rename: |
|
66 | Graft a rename: | |
67 |
|
67 | |||
68 | $ hg graft 2 -u foo |
|
68 | $ hg graft 2 -u foo | |
69 | grafting revision 2 |
|
69 | grafting revision 2 | |
70 | merging a and b to b |
|
70 | merging a and b to b | |
71 | $ hg export tip --git |
|
71 | $ hg export tip --git | |
72 | # HG changeset patch |
|
72 | # HG changeset patch | |
73 | # User foo |
|
73 | # User foo | |
74 | # Date 0 0 |
|
74 | # Date 0 0 | |
75 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
75 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
76 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
76 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e | |
77 | 2 |
|
77 | 2 | |
78 |
|
78 | |||
79 | diff --git a/a b/b |
|
79 | diff --git a/a b/b | |
80 | rename from a |
|
80 | rename from a | |
81 | rename to b |
|
81 | rename to b | |
82 |
|
82 | |||
83 | Look for extra:source |
|
83 | Look for extra:source | |
84 |
|
84 | |||
85 | $ hg log --debug -r tip |
|
85 | $ hg log --debug -r tip | |
86 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
86 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
87 | tag: tip |
|
87 | tag: tip | |
88 | phase: draft |
|
88 | phase: draft | |
89 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
89 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e | |
90 | parent: -1:0000000000000000000000000000000000000000 |
|
90 | parent: -1:0000000000000000000000000000000000000000 | |
91 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb |
|
91 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb | |
92 | user: foo |
|
92 | user: foo | |
93 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
93 | date: Thu Jan 01 00:00:00 1970 +0000 | |
94 | files+: b |
|
94 | files+: b | |
95 | files-: a |
|
95 | files-: a | |
96 | extra: branch=default |
|
96 | extra: branch=default | |
97 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
97 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
98 | description: |
|
98 | description: | |
99 | 2 |
|
99 | 2 | |
100 |
|
100 | |||
101 |
|
101 | |||
102 |
|
102 | |||
103 | Graft out of order, skipping a merge and a duplicate |
|
103 | Graft out of order, skipping a merge and a duplicate | |
104 |
|
104 | |||
105 | $ hg graft 1 5 4 3 'merge()' 2 -n |
|
105 | $ hg graft 1 5 4 3 'merge()' 2 -n | |
106 | skipping ungraftable merge revision 6 |
|
106 | skipping ungraftable merge revision 6 | |
107 | skipping already grafted revision 2 |
|
107 | skipping already grafted revision 2 | |
108 | grafting revision 1 |
|
108 | grafting revision 1 | |
109 | grafting revision 5 |
|
109 | grafting revision 5 | |
110 | grafting revision 4 |
|
110 | grafting revision 4 | |
111 | grafting revision 3 |
|
111 | grafting revision 3 | |
112 |
|
112 | |||
113 | $ hg graft 1 5 4 3 'merge()' 2 --debug |
|
113 | $ hg graft 1 5 4 3 'merge()' 2 --debug | |
114 | skipping ungraftable merge revision 6 |
|
114 | skipping ungraftable merge revision 6 | |
115 | scanning for duplicate grafts |
|
115 | scanning for duplicate grafts | |
116 | skipping already grafted revision 2 |
|
116 | skipping already grafted revision 2 | |
117 | grafting revision 1 |
|
117 | grafting revision 1 | |
118 | searching for copies back to rev 1 |
|
118 | searching for copies back to rev 1 | |
119 | unmatched files in local: |
|
119 | unmatched files in local: | |
120 | b |
|
120 | b | |
121 | all copies found (* = to merge, ! = divergent): |
|
121 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
122 | b -> a * |
|
122 | b -> a * | |
123 | checking for directory renames |
|
123 | checking for directory renames | |
124 | resolving manifests |
|
124 | resolving manifests | |
125 | overwrite: False, partial: False |
|
125 | overwrite: False, partial: False | |
126 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 |
|
126 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 | |
127 | b: local copied/moved to a -> m |
|
127 | b: local copied/moved to a -> m | |
128 | preserving b for resolve of b |
|
128 | preserving b for resolve of b | |
129 | updating: b 1/1 files (100.00%) |
|
129 | updating: b 1/1 files (100.00%) | |
130 | picked tool 'internal:merge' for b (binary False symlink False) |
|
130 | picked tool 'internal:merge' for b (binary False symlink False) | |
131 | merging b and a to b |
|
131 | merging b and a to b | |
132 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 |
|
132 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 | |
133 | premerge successful |
|
133 | premerge successful | |
134 | b |
|
134 | b | |
135 | grafting revision 5 |
|
135 | grafting revision 5 | |
136 | searching for copies back to rev 1 |
|
136 | searching for copies back to rev 1 | |
137 | resolving manifests |
|
137 | resolving manifests | |
138 | overwrite: False, partial: False |
|
138 | overwrite: False, partial: False | |
139 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 |
|
139 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 | |
140 | e: remote is newer -> g |
|
140 | e: remote is newer -> g | |
141 | updating: e 1/1 files (100.00%) |
|
141 | updating: e 1/1 files (100.00%) | |
142 | getting e |
|
142 | getting e | |
143 | e |
|
143 | e | |
144 | grafting revision 4 |
|
144 | grafting revision 4 | |
145 | searching for copies back to rev 1 |
|
145 | searching for copies back to rev 1 | |
146 | resolving manifests |
|
146 | resolving manifests | |
147 | overwrite: False, partial: False |
|
147 | overwrite: False, partial: False | |
148 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d |
|
148 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d | |
149 | e: versions differ -> m |
|
149 | e: versions differ -> m | |
150 | d: remote is newer -> g |
|
150 | d: remote is newer -> g | |
151 | preserving e for resolve of e |
|
151 | preserving e for resolve of e | |
152 | updating: d 1/2 files (50.00%) |
|
152 | updating: d 1/2 files (50.00%) | |
153 | getting d |
|
153 | getting d | |
154 | updating: e 2/2 files (100.00%) |
|
154 | updating: e 2/2 files (100.00%) | |
155 | picked tool 'internal:merge' for e (binary False symlink False) |
|
155 | picked tool 'internal:merge' for e (binary False symlink False) | |
156 | merging e |
|
156 | merging e | |
157 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 |
|
157 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 | |
158 | warning: conflicts during merge. |
|
158 | warning: conflicts during merge. | |
159 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
159 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') | |
160 | abort: unresolved conflicts, can't continue |
|
160 | abort: unresolved conflicts, can't continue | |
161 | (use hg resolve and hg graft --continue) |
|
161 | (use hg resolve and hg graft --continue) | |
162 | [255] |
|
162 | [255] | |
163 |
|
163 | |||
164 | Continue without resolve should fail: |
|
164 | Continue without resolve should fail: | |
165 |
|
165 | |||
166 | $ hg graft -c |
|
166 | $ hg graft -c | |
167 | grafting revision 4 |
|
167 | grafting revision 4 | |
168 | abort: unresolved merge conflicts (see hg help resolve) |
|
168 | abort: unresolved merge conflicts (see hg help resolve) | |
169 | [255] |
|
169 | [255] | |
170 |
|
170 | |||
171 | Fix up: |
|
171 | Fix up: | |
172 |
|
172 | |||
173 | $ echo b > e |
|
173 | $ echo b > e | |
174 | $ hg resolve -m e |
|
174 | $ hg resolve -m e | |
175 |
|
175 | |||
176 | Continue with a revision should fail: |
|
176 | Continue with a revision should fail: | |
177 |
|
177 | |||
178 | $ hg graft -c 6 |
|
178 | $ hg graft -c 6 | |
179 | abort: can't specify --continue and revisions |
|
179 | abort: can't specify --continue and revisions | |
180 | [255] |
|
180 | [255] | |
181 |
|
181 | |||
182 | Continue for real, clobber usernames |
|
182 | Continue for real, clobber usernames | |
183 |
|
183 | |||
184 | $ hg graft -c -U |
|
184 | $ hg graft -c -U | |
185 | grafting revision 4 |
|
185 | grafting revision 4 | |
186 | grafting revision 3 |
|
186 | grafting revision 3 | |
187 |
|
187 | |||
188 | Compare with original: |
|
188 | Compare with original: | |
189 |
|
189 | |||
190 | $ hg diff -r 6 |
|
190 | $ hg diff -r 6 | |
191 | $ hg status --rev 0:. -C |
|
191 | $ hg status --rev 0:. -C | |
192 | M d |
|
192 | M d | |
193 | M e |
|
193 | M e | |
194 | A b |
|
194 | A b | |
195 | a |
|
195 | a | |
196 | A c |
|
196 | A c | |
197 | a |
|
197 | a | |
198 | R a |
|
198 | R a | |
199 |
|
199 | |||
200 | View graph: |
|
200 | View graph: | |
201 |
|
201 | |||
202 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
202 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
203 | @ test@11.draft: 3 |
|
203 | @ test@11.draft: 3 | |
204 | | |
|
204 | | | |
205 | o test@10.draft: 4 |
|
205 | o test@10.draft: 4 | |
206 | | |
|
206 | | | |
207 | o test@9.draft: 5 |
|
207 | o test@9.draft: 5 | |
208 | | |
|
208 | | | |
209 | o bar@8.draft: 1 |
|
209 | o bar@8.draft: 1 | |
210 | | |
|
210 | | | |
211 | o foo@7.draft: 2 |
|
211 | o foo@7.draft: 2 | |
212 | | |
|
212 | | | |
213 | | o test@6.secret: 6 |
|
213 | | o test@6.secret: 6 | |
214 | | |\ |
|
214 | | |\ | |
215 | | | o test@5.draft: 5 |
|
215 | | | o test@5.draft: 5 | |
216 | | | | |
|
216 | | | | | |
217 | | o | test@4.draft: 4 |
|
217 | | o | test@4.draft: 4 | |
218 | | |/ |
|
218 | | |/ | |
219 | | o baz@3.public: 3 |
|
219 | | o baz@3.public: 3 | |
220 | | | |
|
220 | | | | |
221 | | o test@2.public: 2 |
|
221 | | o test@2.public: 2 | |
222 | | | |
|
222 | | | | |
223 | | o bar@1.public: 1 |
|
223 | | o bar@1.public: 1 | |
224 | |/ |
|
224 | |/ | |
225 | o test@0.public: 0 |
|
225 | o test@0.public: 0 | |
226 |
|
226 | |||
227 | Graft again onto another branch should preserve the original source |
|
227 | Graft again onto another branch should preserve the original source | |
228 | $ hg up -q 0 |
|
228 | $ hg up -q 0 | |
229 | $ echo 'g'>g |
|
229 | $ echo 'g'>g | |
230 | $ hg add g |
|
230 | $ hg add g | |
231 | $ hg ci -m 7 |
|
231 | $ hg ci -m 7 | |
232 | created new head |
|
232 | created new head | |
233 | $ hg graft 7 |
|
233 | $ hg graft 7 | |
234 | grafting revision 7 |
|
234 | grafting revision 7 | |
235 |
|
235 | |||
236 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
236 | $ hg log -r 7 --template '{rev}:{node}\n' | |
237 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
237 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
238 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
238 | $ hg log -r 2 --template '{rev}:{node}\n' | |
239 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
239 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
240 |
|
240 | |||
241 | $ hg log --debug -r tip |
|
241 | $ hg log --debug -r tip | |
242 | changeset: 13:9db0f28fd3747e92c57d015f53b5593aeec53c2d |
|
242 | changeset: 13:9db0f28fd3747e92c57d015f53b5593aeec53c2d | |
243 | tag: tip |
|
243 | tag: tip | |
244 | phase: draft |
|
244 | phase: draft | |
245 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
245 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
246 | parent: -1:0000000000000000000000000000000000000000 |
|
246 | parent: -1:0000000000000000000000000000000000000000 | |
247 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 |
|
247 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 | |
248 | user: foo |
|
248 | user: foo | |
249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
249 | date: Thu Jan 01 00:00:00 1970 +0000 | |
250 | files+: b |
|
250 | files+: b | |
251 | files-: a |
|
251 | files-: a | |
252 | extra: branch=default |
|
252 | extra: branch=default | |
253 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
253 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
254 | description: |
|
254 | description: | |
255 | 2 |
|
255 | 2 | |
256 |
|
256 | |||
257 |
|
257 | |||
258 | Disallow grafting an already grafted cset onto its original branch |
|
258 | Disallow grafting an already grafted cset onto its original branch | |
259 | $ hg up -q 6 |
|
259 | $ hg up -q 6 | |
260 | $ hg graft 7 |
|
260 | $ hg graft 7 | |
261 | skipping already grafted revision 7 (was grafted from 2) |
|
261 | skipping already grafted revision 7 (was grafted from 2) | |
262 | [255] |
|
262 | [255] | |
263 |
|
263 | |||
264 | Disallow grafting already grafted csets with the same origin onto each other |
|
264 | Disallow grafting already grafted csets with the same origin onto each other | |
265 | $ hg up -q 13 |
|
265 | $ hg up -q 13 | |
266 | $ hg graft 2 |
|
266 | $ hg graft 2 | |
267 | skipping already grafted revision 2 |
|
267 | skipping already grafted revision 2 | |
268 | [255] |
|
268 | [255] | |
269 | $ hg graft 7 |
|
269 | $ hg graft 7 | |
270 | skipping already grafted revision 7 (same origin 2) |
|
270 | skipping already grafted revision 7 (same origin 2) | |
271 | [255] |
|
271 | [255] | |
272 |
|
272 | |||
273 | $ hg up -q 7 |
|
273 | $ hg up -q 7 | |
274 | $ hg graft 2 |
|
274 | $ hg graft 2 | |
275 | skipping already grafted revision 2 |
|
275 | skipping already grafted revision 2 | |
276 | [255] |
|
276 | [255] | |
277 | $ hg graft tip |
|
277 | $ hg graft tip | |
278 | skipping already grafted revision 13 (same origin 2) |
|
278 | skipping already grafted revision 13 (same origin 2) | |
279 | [255] |
|
279 | [255] | |
280 |
|
280 | |||
281 | Graft with --log |
|
281 | Graft with --log | |
282 |
|
282 | |||
283 | $ hg up -Cq 1 |
|
283 | $ hg up -Cq 1 | |
284 | $ hg graft 3 --log -u foo |
|
284 | $ hg graft 3 --log -u foo | |
285 | grafting revision 3 |
|
285 | grafting revision 3 | |
286 | warning: can't find ancestor for 'c' copied from 'b'! |
|
286 | warning: can't find ancestor for 'c' copied from 'b'! | |
287 | $ hg log --template '{rev} {parents} {desc}\n' -r tip |
|
287 | $ hg log --template '{rev} {parents} {desc}\n' -r tip | |
288 | 14 1:5d205f8b35b6 3 |
|
288 | 14 1:5d205f8b35b6 3 | |
289 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
|
289 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
@@ -1,101 +1,101 b'' | |||||
1 | http://mercurial.selenic.com/bts/issue672 |
|
1 | http://mercurial.selenic.com/bts/issue672 | |
2 |
|
2 | |||
3 | # 0-2-4 |
|
3 | # 0-2-4 | |
4 | # \ \ \ |
|
4 | # \ \ \ | |
5 | # 1-3-5 |
|
5 | # 1-3-5 | |
6 | # |
|
6 | # | |
7 | # rename in #1, content change in #4. |
|
7 | # rename in #1, content change in #4. | |
8 |
|
8 | |||
9 | $ hg init |
|
9 | $ hg init | |
10 |
|
10 | |||
11 | $ touch 1 |
|
11 | $ touch 1 | |
12 | $ touch 2 |
|
12 | $ touch 2 | |
13 | $ hg commit -Am init # 0 |
|
13 | $ hg commit -Am init # 0 | |
14 | adding 1 |
|
14 | adding 1 | |
15 | adding 2 |
|
15 | adding 2 | |
16 |
|
16 | |||
17 | $ hg rename 1 1a |
|
17 | $ hg rename 1 1a | |
18 | $ hg commit -m rename # 1 |
|
18 | $ hg commit -m rename # 1 | |
19 |
|
19 | |||
20 | $ hg co -C 0 |
|
20 | $ hg co -C 0 | |
21 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
22 |
|
22 | |||
23 | $ echo unrelated >> 2 |
|
23 | $ echo unrelated >> 2 | |
24 | $ hg ci -m unrelated1 # 2 |
|
24 | $ hg ci -m unrelated1 # 2 | |
25 | created new head |
|
25 | created new head | |
26 |
|
26 | |||
27 | $ hg merge --debug 1 |
|
27 | $ hg merge --debug 1 | |
28 | searching for copies back to rev 1 |
|
28 | searching for copies back to rev 1 | |
29 | unmatched files in other: |
|
29 | unmatched files in other: | |
30 | 1a |
|
30 | 1a | |
31 | all copies found (* = to merge, ! = divergent): |
|
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
32 | 1a -> 1 |
|
32 | 1a -> 1 | |
33 | checking for directory renames |
|
33 | checking for directory renames | |
34 | resolving manifests |
|
34 | resolving manifests | |
35 | overwrite: False, partial: False |
|
35 | overwrite: False, partial: False | |
36 | ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a |
|
36 | ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a | |
37 | 1: other deleted -> r |
|
37 | 1: other deleted -> r | |
38 | 1a: remote created -> g |
|
38 | 1a: remote created -> g | |
39 | updating: 1 1/2 files (50.00%) |
|
39 | updating: 1 1/2 files (50.00%) | |
40 | removing 1 |
|
40 | removing 1 | |
41 | updating: 1a 2/2 files (100.00%) |
|
41 | updating: 1a 2/2 files (100.00%) | |
42 | getting 1a |
|
42 | getting 1a | |
43 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
44 | (branch merge, don't forget to commit) |
|
44 | (branch merge, don't forget to commit) | |
45 |
|
45 | |||
46 | $ hg ci -m merge1 # 3 |
|
46 | $ hg ci -m merge1 # 3 | |
47 |
|
47 | |||
48 | $ hg co -C 2 |
|
48 | $ hg co -C 2 | |
49 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
49 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
50 |
|
50 | |||
51 | $ echo hello >> 1 |
|
51 | $ echo hello >> 1 | |
52 | $ hg ci -m unrelated2 # 4 |
|
52 | $ hg ci -m unrelated2 # 4 | |
53 | created new head |
|
53 | created new head | |
54 |
|
54 | |||
55 | $ hg co -C 3 |
|
55 | $ hg co -C 3 | |
56 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
56 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
57 |
|
57 | |||
58 | $ hg merge -y --debug 4 |
|
58 | $ hg merge -y --debug 4 | |
59 | searching for copies back to rev 1 |
|
59 | searching for copies back to rev 1 | |
60 | unmatched files in local: |
|
60 | unmatched files in local: | |
61 | 1a |
|
61 | 1a | |
62 | all copies found (* = to merge, ! = divergent): |
|
62 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
63 | 1a -> 1 * |
|
63 | 1a -> 1 * | |
64 | checking for directory renames |
|
64 | checking for directory renames | |
65 | resolving manifests |
|
65 | resolving manifests | |
66 | overwrite: False, partial: False |
|
66 | overwrite: False, partial: False | |
67 | ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96 |
|
67 | ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96 | |
68 | 1a: local copied/moved to 1 -> m |
|
68 | 1a: local copied/moved to 1 -> m | |
69 | preserving 1a for resolve of 1a |
|
69 | preserving 1a for resolve of 1a | |
70 | updating: 1a 1/1 files (100.00%) |
|
70 | updating: 1a 1/1 files (100.00%) | |
71 | picked tool 'internal:merge' for 1a (binary False symlink False) |
|
71 | picked tool 'internal:merge' for 1a (binary False symlink False) | |
72 | merging 1a and 1 to 1a |
|
72 | merging 1a and 1 to 1a | |
73 | my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d |
|
73 | my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d | |
74 | premerge successful |
|
74 | premerge successful | |
75 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
75 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
76 | (branch merge, don't forget to commit) |
|
76 | (branch merge, don't forget to commit) | |
77 |
|
77 | |||
78 | $ hg co -C 4 |
|
78 | $ hg co -C 4 | |
79 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
79 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
80 |
|
80 | |||
81 | $ hg merge -y --debug 3 |
|
81 | $ hg merge -y --debug 3 | |
82 | searching for copies back to rev 1 |
|
82 | searching for copies back to rev 1 | |
83 | unmatched files in other: |
|
83 | unmatched files in other: | |
84 | 1a |
|
84 | 1a | |
85 | all copies found (* = to merge, ! = divergent): |
|
85 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
86 | 1a -> 1 * |
|
86 | 1a -> 1 * | |
87 | checking for directory renames |
|
87 | checking for directory renames | |
88 | resolving manifests |
|
88 | resolving manifests | |
89 | overwrite: False, partial: False |
|
89 | overwrite: False, partial: False | |
90 | ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8 |
|
90 | ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8 | |
91 | 1: remote moved to 1a -> m |
|
91 | 1: remote moved to 1a -> m | |
92 | preserving 1 for resolve of 1a |
|
92 | preserving 1 for resolve of 1a | |
93 | removing 1 |
|
93 | removing 1 | |
94 | updating: 1 1/1 files (100.00%) |
|
94 | updating: 1 1/1 files (100.00%) | |
95 | picked tool 'internal:merge' for 1a (binary False symlink False) |
|
95 | picked tool 'internal:merge' for 1a (binary False symlink False) | |
96 | merging 1 and 1a to 1a |
|
96 | merging 1 and 1a to 1a | |
97 | my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d |
|
97 | my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d | |
98 | premerge successful |
|
98 | premerge successful | |
99 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
99 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
100 | (branch merge, don't forget to commit) |
|
100 | (branch merge, don't forget to commit) | |
101 |
|
101 |
@@ -1,157 +1,157 b'' | |||||
1 | $ hg init t |
|
1 | $ hg init t | |
2 | $ cd t |
|
2 | $ cd t | |
3 |
|
3 | |||
4 | $ mkdir a |
|
4 | $ mkdir a | |
5 | $ echo foo > a/a |
|
5 | $ echo foo > a/a | |
6 | $ echo bar > a/b |
|
6 | $ echo bar > a/b | |
7 | $ hg ci -Am "0" |
|
7 | $ hg ci -Am "0" | |
8 | adding a/a |
|
8 | adding a/a | |
9 | adding a/b |
|
9 | adding a/b | |
10 |
|
10 | |||
11 | $ hg co -C 0 |
|
11 | $ hg co -C 0 | |
12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
13 | $ hg mv a b |
|
13 | $ hg mv a b | |
14 | moving a/a to b/a (glob) |
|
14 | moving a/a to b/a (glob) | |
15 | moving a/b to b/b (glob) |
|
15 | moving a/b to b/b (glob) | |
16 | $ hg ci -m "1 mv a/ b/" |
|
16 | $ hg ci -m "1 mv a/ b/" | |
17 |
|
17 | |||
18 | $ hg co -C 0 |
|
18 | $ hg co -C 0 | |
19 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
19 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
20 | $ echo baz > a/c |
|
20 | $ echo baz > a/c | |
21 | $ echo quux > a/d |
|
21 | $ echo quux > a/d | |
22 | $ hg add a/c |
|
22 | $ hg add a/c | |
23 | $ hg ci -m "2 add a/c" |
|
23 | $ hg ci -m "2 add a/c" | |
24 | created new head |
|
24 | created new head | |
25 |
|
25 | |||
26 | $ hg merge --debug 1 |
|
26 | $ hg merge --debug 1 | |
27 | searching for copies back to rev 1 |
|
27 | searching for copies back to rev 1 | |
28 | unmatched files in local: |
|
28 | unmatched files in local: | |
29 | a/c |
|
29 | a/c | |
30 | unmatched files in other: |
|
30 | unmatched files in other: | |
31 | b/a |
|
31 | b/a | |
32 | b/b |
|
32 | b/b | |
33 | all copies found (* = to merge, ! = divergent): |
|
33 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
34 | b/a -> a/a |
|
34 | b/a -> a/a | |
35 | b/b -> a/b |
|
35 | b/b -> a/b | |
36 | checking for directory renames |
|
36 | checking for directory renames | |
37 | dir a/ -> b/ |
|
37 | dir a/ -> b/ | |
38 | file a/c -> b/c |
|
38 | file a/c -> b/c | |
39 | resolving manifests |
|
39 | resolving manifests | |
40 | overwrite: False, partial: False |
|
40 | overwrite: False, partial: False | |
41 | ancestor: f9b20c0d4c51, local: ce36d17b18fb+, remote: 397f8b00a740 |
|
41 | ancestor: f9b20c0d4c51, local: ce36d17b18fb+, remote: 397f8b00a740 | |
42 | a/c: remote renamed directory to b/c -> d |
|
42 | a/c: remote renamed directory to b/c -> d | |
43 | a/b: other deleted -> r |
|
43 | a/b: other deleted -> r | |
44 | a/a: other deleted -> r |
|
44 | a/a: other deleted -> r | |
45 | b/a: remote created -> g |
|
45 | b/a: remote created -> g | |
46 | b/b: remote created -> g |
|
46 | b/b: remote created -> g | |
47 | updating: a/a 1/5 files (20.00%) |
|
47 | updating: a/a 1/5 files (20.00%) | |
48 | removing a/a |
|
48 | removing a/a | |
49 | updating: a/b 2/5 files (40.00%) |
|
49 | updating: a/b 2/5 files (40.00%) | |
50 | removing a/b |
|
50 | removing a/b | |
51 | updating: a/c 3/5 files (60.00%) |
|
51 | updating: a/c 3/5 files (60.00%) | |
52 | moving a/c to b/c |
|
52 | moving a/c to b/c | |
53 | updating: b/a 4/5 files (80.00%) |
|
53 | updating: b/a 4/5 files (80.00%) | |
54 | getting b/a |
|
54 | getting b/a | |
55 | updating: b/b 5/5 files (100.00%) |
|
55 | updating: b/b 5/5 files (100.00%) | |
56 | getting b/b |
|
56 | getting b/b | |
57 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
57 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
58 | (branch merge, don't forget to commit) |
|
58 | (branch merge, don't forget to commit) | |
59 |
|
59 | |||
60 | $ echo a/* b/* |
|
60 | $ echo a/* b/* | |
61 | a/d b/a b/b b/c |
|
61 | a/d b/a b/b b/c | |
62 | $ hg st -C |
|
62 | $ hg st -C | |
63 | M b/a |
|
63 | M b/a | |
64 | M b/b |
|
64 | M b/b | |
65 | A b/c |
|
65 | A b/c | |
66 | a/c |
|
66 | a/c | |
67 | R a/a |
|
67 | R a/a | |
68 | R a/b |
|
68 | R a/b | |
69 | R a/c |
|
69 | R a/c | |
70 | ? a/d |
|
70 | ? a/d | |
71 | $ hg ci -m "3 merge 2+1" |
|
71 | $ hg ci -m "3 merge 2+1" | |
72 | $ hg debugrename b/c |
|
72 | $ hg debugrename b/c | |
73 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) |
|
73 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) | |
74 |
|
74 | |||
75 | $ hg co -C 1 |
|
75 | $ hg co -C 1 | |
76 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
76 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
77 | $ hg merge --debug 2 |
|
77 | $ hg merge --debug 2 | |
78 | searching for copies back to rev 1 |
|
78 | searching for copies back to rev 1 | |
79 | unmatched files in local: |
|
79 | unmatched files in local: | |
80 | b/a |
|
80 | b/a | |
81 | b/b |
|
81 | b/b | |
82 | unmatched files in other: |
|
82 | unmatched files in other: | |
83 | a/c |
|
83 | a/c | |
84 | all copies found (* = to merge, ! = divergent): |
|
84 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
85 | b/a -> a/a |
|
85 | b/a -> a/a | |
86 | b/b -> a/b |
|
86 | b/b -> a/b | |
87 | checking for directory renames |
|
87 | checking for directory renames | |
88 | dir a/ -> b/ |
|
88 | dir a/ -> b/ | |
89 | file a/c -> b/c |
|
89 | file a/c -> b/c | |
90 | resolving manifests |
|
90 | resolving manifests | |
91 | overwrite: False, partial: False |
|
91 | overwrite: False, partial: False | |
92 | ancestor: f9b20c0d4c51, local: 397f8b00a740+, remote: ce36d17b18fb |
|
92 | ancestor: f9b20c0d4c51, local: 397f8b00a740+, remote: ce36d17b18fb | |
93 | None: local renamed directory to b/c -> d |
|
93 | None: local renamed directory to b/c -> d | |
94 | updating:None 1/1 files (100.00%) |
|
94 | updating:None 1/1 files (100.00%) | |
95 | getting a/c to b/c |
|
95 | getting a/c to b/c | |
96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 | (branch merge, don't forget to commit) |
|
97 | (branch merge, don't forget to commit) | |
98 |
|
98 | |||
99 | $ echo a/* b/* |
|
99 | $ echo a/* b/* | |
100 | a/d b/a b/b b/c |
|
100 | a/d b/a b/b b/c | |
101 | $ hg st -C |
|
101 | $ hg st -C | |
102 | A b/c |
|
102 | A b/c | |
103 | a/c |
|
103 | a/c | |
104 | ? a/d |
|
104 | ? a/d | |
105 | $ hg ci -m "4 merge 1+2" |
|
105 | $ hg ci -m "4 merge 1+2" | |
106 | created new head |
|
106 | created new head | |
107 | $ hg debugrename b/c |
|
107 | $ hg debugrename b/c | |
108 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) |
|
108 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob) | |
109 |
|
109 | |||
110 |
|
110 | |||
111 | Second scenario with two repos: |
|
111 | Second scenario with two repos: | |
112 |
|
112 | |||
113 | $ cd .. |
|
113 | $ cd .. | |
114 | $ hg init r1 |
|
114 | $ hg init r1 | |
115 | $ cd r1 |
|
115 | $ cd r1 | |
116 | $ mkdir a |
|
116 | $ mkdir a | |
117 | $ echo foo > a/f |
|
117 | $ echo foo > a/f | |
118 | $ hg add a |
|
118 | $ hg add a | |
119 | adding a/f (glob) |
|
119 | adding a/f (glob) | |
120 | $ hg ci -m "a/f == foo" |
|
120 | $ hg ci -m "a/f == foo" | |
121 | $ cd .. |
|
121 | $ cd .. | |
122 |
|
122 | |||
123 | $ hg clone r1 r2 |
|
123 | $ hg clone r1 r2 | |
124 | updating to branch default |
|
124 | updating to branch default | |
125 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
125 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
126 | $ cd r2 |
|
126 | $ cd r2 | |
127 | $ hg mv a b |
|
127 | $ hg mv a b | |
128 | moving a/f to b/f (glob) |
|
128 | moving a/f to b/f (glob) | |
129 | $ echo foo1 > b/f |
|
129 | $ echo foo1 > b/f | |
130 | $ hg ci -m" a -> b, b/f == foo1" |
|
130 | $ hg ci -m" a -> b, b/f == foo1" | |
131 | $ cd .. |
|
131 | $ cd .. | |
132 |
|
132 | |||
133 | $ cd r1 |
|
133 | $ cd r1 | |
134 | $ mkdir a/aa |
|
134 | $ mkdir a/aa | |
135 | $ echo bar > a/aa/g |
|
135 | $ echo bar > a/aa/g | |
136 | $ hg add a/aa |
|
136 | $ hg add a/aa | |
137 | adding a/aa/g (glob) |
|
137 | adding a/aa/g (glob) | |
138 | $ hg ci -m "a/aa/g" |
|
138 | $ hg ci -m "a/aa/g" | |
139 | $ hg pull ../r2 |
|
139 | $ hg pull ../r2 | |
140 | pulling from ../r2 |
|
140 | pulling from ../r2 | |
141 | searching for changes |
|
141 | searching for changes | |
142 | adding changesets |
|
142 | adding changesets | |
143 | adding manifests |
|
143 | adding manifests | |
144 | adding file changes |
|
144 | adding file changes | |
145 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
145 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
146 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
146 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
147 |
|
147 | |||
148 | $ hg merge |
|
148 | $ hg merge | |
149 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
149 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
150 | (branch merge, don't forget to commit) |
|
150 | (branch merge, don't forget to commit) | |
151 |
|
151 | |||
152 | $ hg st -C |
|
152 | $ hg st -C | |
153 | M b/f |
|
153 | M b/f | |
154 | A b/aa/g |
|
154 | A b/aa/g | |
155 | a/aa/g |
|
155 | a/aa/g | |
156 | R a/aa/g |
|
156 | R a/aa/g | |
157 | R a/f |
|
157 | R a/f |
@@ -1,181 +1,195 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 |
|
2 | |||
3 | $ echo "[merge]" >> .hg/hgrc |
|
3 | $ echo "[merge]" >> .hg/hgrc | |
4 | $ echo "followcopies = 1" >> .hg/hgrc |
|
4 | $ echo "followcopies = 1" >> .hg/hgrc | |
5 |
|
5 | |||
6 | $ echo foo > a |
|
6 | $ echo foo > a | |
7 | $ echo foo > a2 |
|
7 | $ echo foo > a2 | |
8 | $ hg add a a2 |
|
8 | $ hg add a a2 | |
9 | $ hg ci -m "start" |
|
9 | $ hg ci -m "start" | |
10 |
|
10 | |||
11 | $ hg mv a b |
|
11 | $ hg mv a b | |
12 | $ hg mv a2 b2 |
|
12 | $ hg mv a2 b2 | |
13 | $ hg ci -m "rename" |
|
13 | $ hg ci -m "rename" | |
14 |
|
14 | |||
15 | $ hg co 0 |
|
15 | $ hg co 0 | |
16 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
16 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
17 |
|
17 | |||
18 | $ echo blahblah > a |
|
18 | $ echo blahblah > a | |
19 | $ echo blahblah > a2 |
|
19 | $ echo blahblah > a2 | |
20 | $ hg mv a2 c2 |
|
20 | $ hg mv a2 c2 | |
21 | $ hg ci -m "modify" |
|
21 | $ hg ci -m "modify" | |
22 | created new head |
|
22 | created new head | |
23 |
|
23 | |||
24 | $ hg merge -y --debug |
|
24 | $ hg merge -y --debug | |
25 | searching for copies back to rev 1 |
|
25 | searching for copies back to rev 1 | |
26 | unmatched files in local: |
|
26 | unmatched files in local: | |
27 | c2 |
|
27 | c2 | |
28 | unmatched files in other: |
|
28 | unmatched files in other: | |
29 | b |
|
29 | b | |
30 | b2 |
|
30 | b2 | |
31 | all copies found (* = to merge, ! = divergent): |
|
31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
32 | c2 -> a2 ! |
|
32 | c2 -> a2 ! | |
33 | b -> a * |
|
33 | b -> a * | |
34 | b2 -> a2 ! |
|
34 | b2 -> a2 ! | |
35 | checking for directory renames |
|
35 | checking for directory renames | |
36 | a2: divergent renames -> dr |
|
36 | a2: divergent renames -> dr | |
37 | resolving manifests |
|
37 | resolving manifests | |
38 | overwrite: False, partial: False |
|
38 | overwrite: False, partial: False | |
39 | ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c |
|
39 | ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c | |
40 | a: remote moved to b -> m |
|
40 | a: remote moved to b -> m | |
41 | b2: remote created -> g |
|
41 | b2: remote created -> g | |
42 | preserving a for resolve of b |
|
42 | preserving a for resolve of b | |
43 | removing a |
|
43 | removing a | |
44 | updating: a 1/3 files (33.33%) |
|
44 | updating: a 1/3 files (33.33%) | |
45 | picked tool 'internal:merge' for b (binary False symlink False) |
|
45 | picked tool 'internal:merge' for b (binary False symlink False) | |
46 | merging a and b to b |
|
46 | merging a and b to b | |
47 | my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c |
|
47 | my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c | |
48 | premerge successful |
|
48 | premerge successful | |
49 | updating: a2 2/3 files (66.67%) |
|
49 | updating: a2 2/3 files (66.67%) | |
50 | note: possible conflict - a2 was renamed multiple times to: |
|
50 | note: possible conflict - a2 was renamed multiple times to: | |
51 | c2 |
|
51 | c2 | |
52 | b2 |
|
52 | b2 | |
53 | updating: b2 3/3 files (100.00%) |
|
53 | updating: b2 3/3 files (100.00%) | |
54 | getting b2 |
|
54 | getting b2 | |
55 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
55 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
56 | (branch merge, don't forget to commit) |
|
56 | (branch merge, don't forget to commit) | |
57 |
|
57 | |||
58 | $ hg status -AC |
|
58 | $ hg status -AC | |
59 | M b |
|
59 | M b | |
60 | a |
|
60 | a | |
61 | M b2 |
|
61 | M b2 | |
62 | R a |
|
62 | R a | |
63 | C c2 |
|
63 | C c2 | |
64 |
|
64 | |||
65 | $ cat b |
|
65 | $ cat b | |
66 | blahblah |
|
66 | blahblah | |
67 |
|
67 | |||
68 | $ hg ci -m "merge" |
|
68 | $ hg ci -m "merge" | |
69 |
|
69 | |||
70 | $ hg debugindex b |
|
70 | $ hg debugindex b | |
71 | rev offset length base linkrev nodeid p1 p2 |
|
71 | rev offset length base linkrev nodeid p1 p2 | |
72 | 0 0 67 0 1 57eacc201a7f 000000000000 000000000000 |
|
72 | 0 0 67 0 1 57eacc201a7f 000000000000 000000000000 | |
73 | 1 67 72 1 3 4727ba907962 000000000000 57eacc201a7f |
|
73 | 1 67 72 1 3 4727ba907962 000000000000 57eacc201a7f | |
74 |
|
74 | |||
75 | $ hg debugrename b |
|
75 | $ hg debugrename b | |
76 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 |
|
76 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 | |
77 |
|
77 | |||
78 | This used to trigger a "divergent renames" warning, despite no renames |
|
78 | This used to trigger a "divergent renames" warning, despite no renames | |
79 |
|
79 | |||
80 | $ hg cp b b3 |
|
80 | $ hg cp b b3 | |
81 | $ hg cp b b4 |
|
81 | $ hg cp b b4 | |
82 | $ hg ci -A -m 'copy b twice' |
|
82 | $ hg ci -A -m 'copy b twice' | |
83 | $ hg up eb92d88a9712 |
|
83 | $ hg up eb92d88a9712 | |
84 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
84 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
85 | $ hg up |
|
85 | $ hg up | |
86 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
87 | $ hg rm b3 b4 |
|
87 | $ hg rm b3 b4 | |
88 | $ hg ci -m 'clean up a bit of our mess' |
|
88 | $ hg ci -m 'clean up a bit of our mess' | |
89 |
|
89 | |||
90 | We'd rather not warn on divergent renames done in the same changeset (issue2113) |
|
90 | We'd rather not warn on divergent renames done in the same changeset (issue2113) | |
91 |
|
91 | |||
92 | $ hg cp b b3 |
|
92 | $ hg cp b b3 | |
93 | $ hg mv b b4 |
|
93 | $ hg mv b b4 | |
94 | $ hg ci -A -m 'divergent renames in same changeset' |
|
94 | $ hg ci -A -m 'divergent renames in same changeset' | |
95 | $ hg up c761c6948de0 |
|
95 | $ hg up c761c6948de0 | |
96 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
96 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
97 | $ hg up |
|
97 | $ hg up | |
98 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
98 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
99 |
|
99 | |||
100 | Check for issue2642 |
|
100 | Check for issue2642 | |
101 |
|
101 | |||
102 | $ hg init t |
|
102 | $ hg init t | |
103 | $ cd t |
|
103 | $ cd t | |
104 |
|
104 | |||
105 | $ echo c0 > f1 |
|
105 | $ echo c0 > f1 | |
106 | $ hg ci -Aqm0 |
|
106 | $ hg ci -Aqm0 | |
107 |
|
107 | |||
108 | $ hg up null -q |
|
108 | $ hg up null -q | |
109 | $ echo c1 > f1 # backport |
|
109 | $ echo c1 > f1 # backport | |
110 | $ hg ci -Aqm1 |
|
110 | $ hg ci -Aqm1 | |
111 | $ hg mv f1 f2 |
|
111 | $ hg mv f1 f2 | |
112 | $ hg ci -qm2 |
|
112 | $ hg ci -qm2 | |
113 |
|
113 | |||
114 | $ hg up 0 -q |
|
114 | $ hg up 0 -q | |
115 | $ hg merge 1 -q --tool internal:local |
|
115 | $ hg merge 1 -q --tool internal:local | |
116 | $ hg ci -qm3 |
|
116 | $ hg ci -qm3 | |
117 |
|
117 | |||
118 | $ hg merge 2 |
|
118 | $ hg merge 2 | |
119 | merging f1 and f2 to f2 |
|
119 | merging f1 and f2 to f2 | |
120 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
120 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
121 | (branch merge, don't forget to commit) |
|
121 | (branch merge, don't forget to commit) | |
122 |
|
122 | |||
123 | $ cat f2 |
|
123 | $ cat f2 | |
124 | c0 |
|
124 | c0 | |
125 |
|
125 | |||
126 | $ cd .. |
|
126 | $ cd .. | |
127 |
|
127 | |||
128 | Check for issue2089 |
|
128 | Check for issue2089 | |
129 |
|
129 | |||
130 | $ hg init repo2089 |
|
130 | $ hg init repo2089 | |
131 | $ cd repo2089 |
|
131 | $ cd repo2089 | |
132 |
|
132 | |||
133 | $ echo c0 > f1 |
|
133 | $ echo c0 > f1 | |
134 | $ hg ci -Aqm0 |
|
134 | $ hg ci -Aqm0 | |
135 |
|
135 | |||
136 | $ hg up null -q |
|
136 | $ hg up null -q | |
137 | $ echo c1 > f1 |
|
137 | $ echo c1 > f1 | |
138 | $ hg ci -Aqm1 |
|
138 | $ hg ci -Aqm1 | |
139 |
|
139 | |||
140 | $ hg up 0 -q |
|
140 | $ hg up 0 -q | |
141 | $ hg merge 1 -q --tool internal:local |
|
141 | $ hg merge 1 -q --tool internal:local | |
142 | $ echo c2 > f1 |
|
142 | $ echo c2 > f1 | |
143 | $ hg ci -qm2 |
|
143 | $ hg ci -qm2 | |
144 |
|
144 | |||
145 | $ hg up 1 -q |
|
145 | $ hg up 1 -q | |
146 | $ hg mv f1 f2 |
|
146 | $ hg mv f1 f2 | |
147 | $ hg ci -Aqm3 |
|
147 | $ hg ci -Aqm3 | |
148 |
|
148 | |||
149 | $ hg up 2 -q |
|
149 | $ hg up 2 -q | |
150 | $ hg merge 3 |
|
150 | $ hg merge 3 | |
151 | merging f1 and f2 to f2 |
|
151 | merging f1 and f2 to f2 | |
152 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
152 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
153 | (branch merge, don't forget to commit) |
|
153 | (branch merge, don't forget to commit) | |
154 |
|
154 | |||
155 | $ cat f2 |
|
155 | $ cat f2 | |
156 | c2 |
|
156 | c2 | |
157 |
|
157 | |||
158 | $ cd .. |
|
158 | $ cd .. | |
159 |
|
159 | |||
160 | Check for issue3074 |
|
160 | Check for issue3074 | |
161 |
|
161 | |||
162 | $ hg init repo3074 |
|
162 | $ hg init repo3074 | |
163 | $ cd repo3074 |
|
163 | $ cd repo3074 | |
164 | $ echo foo > file |
|
164 | $ echo foo > file | |
165 | $ hg add file |
|
165 | $ hg add file | |
166 | $ hg commit -m "added file" |
|
166 | $ hg commit -m "added file" | |
167 | $ hg mv file newfile |
|
167 | $ hg mv file newfile | |
168 | $ hg commit -m "renamed file" |
|
168 | $ hg commit -m "renamed file" | |
169 | $ hg update 0 |
|
169 | $ hg update 0 | |
170 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
170 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
171 | $ hg rm file |
|
171 | $ hg rm file | |
172 | $ hg commit -m "deleted file" |
|
172 | $ hg commit -m "deleted file" | |
173 | created new head |
|
173 | created new head | |
174 | $ hg merge |
|
174 | $ hg merge --debug | |
|
175 | searching for copies back to rev 1 | |||
|
176 | unmatched files in other: | |||
|
177 | newfile | |||
|
178 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |||
|
179 | newfile -> file % | |||
|
180 | checking for directory renames | |||
|
181 | file: rename and delete -> rd | |||
|
182 | resolving manifests | |||
|
183 | overwrite: False, partial: False | |||
|
184 | ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0 | |||
|
185 | newfile: remote created -> g | |||
|
186 | updating: file 1/2 files (50.00%) | |||
175 | note: possible conflict - file was deleted and renamed to: |
|
187 | note: possible conflict - file was deleted and renamed to: | |
176 | newfile |
|
188 | newfile | |
|
189 | updating: newfile 2/2 files (100.00%) | |||
|
190 | getting newfile | |||
177 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
191 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
178 | (branch merge, don't forget to commit) |
|
192 | (branch merge, don't forget to commit) | |
179 | $ hg status |
|
193 | $ hg status | |
180 | M newfile |
|
194 | M newfile | |
181 | $ cd .. |
|
195 | $ cd .. |
@@ -1,752 +1,752 b'' | |||||
1 |
|
1 | |||
2 | $ mkdir -p t |
|
2 | $ mkdir -p t | |
3 | $ cd t |
|
3 | $ cd t | |
4 | $ cat <<EOF > merge |
|
4 | $ cat <<EOF > merge | |
5 | > import sys, os |
|
5 | > import sys, os | |
6 | > f = open(sys.argv[1], "wb") |
|
6 | > f = open(sys.argv[1], "wb") | |
7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) |
|
7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) | |
8 | > f.close() |
|
8 | > f.close() | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | perform a test merge with possible renaming |
|
11 | perform a test merge with possible renaming | |
12 | args: |
|
12 | args: | |
13 | $1 = action in local branch |
|
13 | $1 = action in local branch | |
14 | $2 = action in remote branch |
|
14 | $2 = action in remote branch | |
15 | $3 = action in working dir |
|
15 | $3 = action in working dir | |
16 | $4 = expected result |
|
16 | $4 = expected result | |
17 |
|
17 | |||
18 | $ tm() |
|
18 | $ tm() | |
19 | > { |
|
19 | > { | |
20 | > hg init t |
|
20 | > hg init t | |
21 | > cd t |
|
21 | > cd t | |
22 | > echo "[merge]" >> .hg/hgrc |
|
22 | > echo "[merge]" >> .hg/hgrc | |
23 | > echo "followcopies = 1" >> .hg/hgrc |
|
23 | > echo "followcopies = 1" >> .hg/hgrc | |
24 | > |
|
24 | > | |
25 | > # base |
|
25 | > # base | |
26 | > echo base > a |
|
26 | > echo base > a | |
27 | > echo base > rev # used to force commits |
|
27 | > echo base > rev # used to force commits | |
28 | > hg add a rev |
|
28 | > hg add a rev | |
29 | > hg ci -m "base" |
|
29 | > hg ci -m "base" | |
30 | > |
|
30 | > | |
31 | > # remote |
|
31 | > # remote | |
32 | > echo remote > rev |
|
32 | > echo remote > rev | |
33 | > if [ "$2" != "" ] ; then $2 ; fi |
|
33 | > if [ "$2" != "" ] ; then $2 ; fi | |
34 | > hg ci -m "remote" |
|
34 | > hg ci -m "remote" | |
35 | > |
|
35 | > | |
36 | > # local |
|
36 | > # local | |
37 | > hg co -q 0 |
|
37 | > hg co -q 0 | |
38 | > echo local > rev |
|
38 | > echo local > rev | |
39 | > if [ "$1" != "" ] ; then $1 ; fi |
|
39 | > if [ "$1" != "" ] ; then $1 ; fi | |
40 | > hg ci -m "local" |
|
40 | > hg ci -m "local" | |
41 | > |
|
41 | > | |
42 | > # working dir |
|
42 | > # working dir | |
43 | > echo local > rev |
|
43 | > echo local > rev | |
44 | > if [ "$3" != "" ] ; then $3 ; fi |
|
44 | > if [ "$3" != "" ] ; then $3 ; fi | |
45 | > |
|
45 | > | |
46 | > # merge |
|
46 | > # merge | |
47 | > echo "--------------" |
|
47 | > echo "--------------" | |
48 | > echo "test L:$1 R:$2 W:$3 - $4" |
|
48 | > echo "test L:$1 R:$2 W:$3 - $4" | |
49 | > echo "--------------" |
|
49 | > echo "--------------" | |
50 | > hg merge -y --debug --traceback --tool="python ../merge" |
|
50 | > hg merge -y --debug --traceback --tool="python ../merge" | |
51 | > |
|
51 | > | |
52 | > echo "--------------" |
|
52 | > echo "--------------" | |
53 | > hg status -camC -X rev |
|
53 | > hg status -camC -X rev | |
54 | > |
|
54 | > | |
55 | > hg ci -m "merge" |
|
55 | > hg ci -m "merge" | |
56 | > |
|
56 | > | |
57 | > echo "--------------" |
|
57 | > echo "--------------" | |
58 | > echo |
|
58 | > echo | |
59 | > |
|
59 | > | |
60 | > cd .. |
|
60 | > cd .. | |
61 | > rm -r t |
|
61 | > rm -r t | |
62 | > } |
|
62 | > } | |
63 | $ up() { |
|
63 | $ up() { | |
64 | > cp rev $1 |
|
64 | > cp rev $1 | |
65 | > hg add $1 2> /dev/null |
|
65 | > hg add $1 2> /dev/null | |
66 | > if [ "$2" != "" ] ; then |
|
66 | > if [ "$2" != "" ] ; then | |
67 | > cp rev $2 |
|
67 | > cp rev $2 | |
68 | > hg add $2 2> /dev/null |
|
68 | > hg add $2 2> /dev/null | |
69 | > fi |
|
69 | > fi | |
70 | > } |
|
70 | > } | |
71 | $ uc() { up $1; hg cp $1 $2; } # update + copy |
|
71 | $ uc() { up $1; hg cp $1 $2; } # update + copy | |
72 | $ um() { up $1; hg mv $1 $2; } |
|
72 | $ um() { up $1; hg mv $1 $2; } | |
73 | $ nc() { hg cp $1 $2; } # just copy |
|
73 | $ nc() { hg cp $1 $2; } # just copy | |
74 | $ nm() { hg mv $1 $2; } # just move |
|
74 | $ nm() { hg mv $1 $2; } # just move | |
75 | $ tm "up a " "nc a b" " " "1 get local a to b" |
|
75 | $ tm "up a " "nc a b" " " "1 get local a to b" | |
76 | created new head |
|
76 | created new head | |
77 | -------------- |
|
77 | -------------- | |
78 | test L:up a R:nc a b W: - 1 get local a to b |
|
78 | test L:up a R:nc a b W: - 1 get local a to b | |
79 | -------------- |
|
79 | -------------- | |
80 | searching for copies back to rev 1 |
|
80 | searching for copies back to rev 1 | |
81 | unmatched files in other: |
|
81 | unmatched files in other: | |
82 | b |
|
82 | b | |
83 | all copies found (* = to merge, ! = divergent): |
|
83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
84 | b -> a * |
|
84 | b -> a * | |
85 | checking for directory renames |
|
85 | checking for directory renames | |
86 | resolving manifests |
|
86 | resolving manifests | |
87 | overwrite: False, partial: False |
|
87 | overwrite: False, partial: False | |
88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 |
|
88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 | |
89 | rev: versions differ -> m |
|
89 | rev: versions differ -> m | |
90 | a: remote copied to b -> m |
|
90 | a: remote copied to b -> m | |
91 | preserving a for resolve of b |
|
91 | preserving a for resolve of b | |
92 | preserving rev for resolve of rev |
|
92 | preserving rev for resolve of rev | |
93 | updating: a 1/2 files (50.00%) |
|
93 | updating: a 1/2 files (50.00%) | |
94 | picked tool 'python ../merge' for b (binary False symlink False) |
|
94 | picked tool 'python ../merge' for b (binary False symlink False) | |
95 | merging a and b to b |
|
95 | merging a and b to b | |
96 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 |
|
96 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 | |
97 | premerge successful |
|
97 | premerge successful | |
98 | updating: rev 2/2 files (100.00%) |
|
98 | updating: rev 2/2 files (100.00%) | |
99 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
99 | picked tool 'python ../merge' for rev (binary False symlink False) | |
100 | merging rev |
|
100 | merging rev | |
101 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
101 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
102 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
102 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
103 | (branch merge, don't forget to commit) |
|
103 | (branch merge, don't forget to commit) | |
104 | -------------- |
|
104 | -------------- | |
105 | M b |
|
105 | M b | |
106 | a |
|
106 | a | |
107 | C a |
|
107 | C a | |
108 | -------------- |
|
108 | -------------- | |
109 |
|
109 | |||
110 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" |
|
110 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" | |
111 | created new head |
|
111 | created new head | |
112 | -------------- |
|
112 | -------------- | |
113 | test L:nc a b R:up a W: - 2 get rem change to a and b |
|
113 | test L:nc a b R:up a W: - 2 get rem change to a and b | |
114 | -------------- |
|
114 | -------------- | |
115 | searching for copies back to rev 1 |
|
115 | searching for copies back to rev 1 | |
116 | unmatched files in local: |
|
116 | unmatched files in local: | |
117 | b |
|
117 | b | |
118 | all copies found (* = to merge, ! = divergent): |
|
118 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
119 | b -> a * |
|
119 | b -> a * | |
120 | checking for directory renames |
|
120 | checking for directory renames | |
121 | resolving manifests |
|
121 | resolving manifests | |
122 | overwrite: False, partial: False |
|
122 | overwrite: False, partial: False | |
123 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 |
|
123 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 | |
124 | a: remote is newer -> g |
|
124 | a: remote is newer -> g | |
125 | b: local copied/moved to a -> m |
|
125 | b: local copied/moved to a -> m | |
126 | rev: versions differ -> m |
|
126 | rev: versions differ -> m | |
127 | preserving b for resolve of b |
|
127 | preserving b for resolve of b | |
128 | preserving rev for resolve of rev |
|
128 | preserving rev for resolve of rev | |
129 | updating: a 1/3 files (33.33%) |
|
129 | updating: a 1/3 files (33.33%) | |
130 | getting a |
|
130 | getting a | |
131 | updating: b 2/3 files (66.67%) |
|
131 | updating: b 2/3 files (66.67%) | |
132 | picked tool 'python ../merge' for b (binary False symlink False) |
|
132 | picked tool 'python ../merge' for b (binary False symlink False) | |
133 | merging b and a to b |
|
133 | merging b and a to b | |
134 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
134 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 | |
135 | premerge successful |
|
135 | premerge successful | |
136 | updating: rev 3/3 files (100.00%) |
|
136 | updating: rev 3/3 files (100.00%) | |
137 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
137 | picked tool 'python ../merge' for rev (binary False symlink False) | |
138 | merging rev |
|
138 | merging rev | |
139 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
139 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
140 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
140 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
141 | (branch merge, don't forget to commit) |
|
141 | (branch merge, don't forget to commit) | |
142 | -------------- |
|
142 | -------------- | |
143 | M a |
|
143 | M a | |
144 | M b |
|
144 | M b | |
145 | a |
|
145 | a | |
146 | -------------- |
|
146 | -------------- | |
147 |
|
147 | |||
148 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" |
|
148 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" | |
149 | created new head |
|
149 | created new head | |
150 | -------------- |
|
150 | -------------- | |
151 | test L:up a R:nm a b W: - 3 get local a change to b, remove a |
|
151 | test L:up a R:nm a b W: - 3 get local a change to b, remove a | |
152 | -------------- |
|
152 | -------------- | |
153 | searching for copies back to rev 1 |
|
153 | searching for copies back to rev 1 | |
154 | unmatched files in other: |
|
154 | unmatched files in other: | |
155 | b |
|
155 | b | |
156 | all copies found (* = to merge, ! = divergent): |
|
156 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
157 | b -> a * |
|
157 | b -> a * | |
158 | checking for directory renames |
|
158 | checking for directory renames | |
159 | resolving manifests |
|
159 | resolving manifests | |
160 | overwrite: False, partial: False |
|
160 | overwrite: False, partial: False | |
161 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a |
|
161 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a | |
162 | rev: versions differ -> m |
|
162 | rev: versions differ -> m | |
163 | a: remote moved to b -> m |
|
163 | a: remote moved to b -> m | |
164 | preserving a for resolve of b |
|
164 | preserving a for resolve of b | |
165 | preserving rev for resolve of rev |
|
165 | preserving rev for resolve of rev | |
166 | removing a |
|
166 | removing a | |
167 | updating: a 1/2 files (50.00%) |
|
167 | updating: a 1/2 files (50.00%) | |
168 | picked tool 'python ../merge' for b (binary False symlink False) |
|
168 | picked tool 'python ../merge' for b (binary False symlink False) | |
169 | merging a and b to b |
|
169 | merging a and b to b | |
170 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 |
|
170 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 | |
171 | premerge successful |
|
171 | premerge successful | |
172 | updating: rev 2/2 files (100.00%) |
|
172 | updating: rev 2/2 files (100.00%) | |
173 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
173 | picked tool 'python ../merge' for rev (binary False symlink False) | |
174 | merging rev |
|
174 | merging rev | |
175 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
175 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 | |
176 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
176 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
177 | (branch merge, don't forget to commit) |
|
177 | (branch merge, don't forget to commit) | |
178 | -------------- |
|
178 | -------------- | |
179 | M b |
|
179 | M b | |
180 | a |
|
180 | a | |
181 | -------------- |
|
181 | -------------- | |
182 |
|
182 | |||
183 | $ tm "nm a b" "up a " " " "4 get remote change to b" |
|
183 | $ tm "nm a b" "up a " " " "4 get remote change to b" | |
184 | created new head |
|
184 | created new head | |
185 | -------------- |
|
185 | -------------- | |
186 | test L:nm a b R:up a W: - 4 get remote change to b |
|
186 | test L:nm a b R:up a W: - 4 get remote change to b | |
187 | -------------- |
|
187 | -------------- | |
188 | searching for copies back to rev 1 |
|
188 | searching for copies back to rev 1 | |
189 | unmatched files in local: |
|
189 | unmatched files in local: | |
190 | b |
|
190 | b | |
191 | all copies found (* = to merge, ! = divergent): |
|
191 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
192 | b -> a * |
|
192 | b -> a * | |
193 | checking for directory renames |
|
193 | checking for directory renames | |
194 | resolving manifests |
|
194 | resolving manifests | |
195 | overwrite: False, partial: False |
|
195 | overwrite: False, partial: False | |
196 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 |
|
196 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 | |
197 | b: local copied/moved to a -> m |
|
197 | b: local copied/moved to a -> m | |
198 | rev: versions differ -> m |
|
198 | rev: versions differ -> m | |
199 | preserving b for resolve of b |
|
199 | preserving b for resolve of b | |
200 | preserving rev for resolve of rev |
|
200 | preserving rev for resolve of rev | |
201 | updating: b 1/2 files (50.00%) |
|
201 | updating: b 1/2 files (50.00%) | |
202 | picked tool 'python ../merge' for b (binary False symlink False) |
|
202 | picked tool 'python ../merge' for b (binary False symlink False) | |
203 | merging b and a to b |
|
203 | merging b and a to b | |
204 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
204 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 | |
205 | premerge successful |
|
205 | premerge successful | |
206 | updating: rev 2/2 files (100.00%) |
|
206 | updating: rev 2/2 files (100.00%) | |
207 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
207 | picked tool 'python ../merge' for rev (binary False symlink False) | |
208 | merging rev |
|
208 | merging rev | |
209 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
209 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
210 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
210 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
211 | (branch merge, don't forget to commit) |
|
211 | (branch merge, don't forget to commit) | |
212 | -------------- |
|
212 | -------------- | |
213 | M b |
|
213 | M b | |
214 | a |
|
214 | a | |
215 | -------------- |
|
215 | -------------- | |
216 |
|
216 | |||
217 | $ tm " " "nc a b" " " "5 get b" |
|
217 | $ tm " " "nc a b" " " "5 get b" | |
218 | created new head |
|
218 | created new head | |
219 | -------------- |
|
219 | -------------- | |
220 | test L: R:nc a b W: - 5 get b |
|
220 | test L: R:nc a b W: - 5 get b | |
221 | -------------- |
|
221 | -------------- | |
222 | searching for copies back to rev 1 |
|
222 | searching for copies back to rev 1 | |
223 | unmatched files in other: |
|
223 | unmatched files in other: | |
224 | b |
|
224 | b | |
225 | all copies found (* = to merge, ! = divergent): |
|
225 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
226 | b -> a |
|
226 | b -> a | |
227 | checking for directory renames |
|
227 | checking for directory renames | |
228 | resolving manifests |
|
228 | resolving manifests | |
229 | overwrite: False, partial: False |
|
229 | overwrite: False, partial: False | |
230 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 |
|
230 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 | |
231 | rev: versions differ -> m |
|
231 | rev: versions differ -> m | |
232 | b: remote created -> g |
|
232 | b: remote created -> g | |
233 | preserving rev for resolve of rev |
|
233 | preserving rev for resolve of rev | |
234 | updating: b 1/2 files (50.00%) |
|
234 | updating: b 1/2 files (50.00%) | |
235 | getting b |
|
235 | getting b | |
236 | updating: rev 2/2 files (100.00%) |
|
236 | updating: rev 2/2 files (100.00%) | |
237 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
237 | picked tool 'python ../merge' for rev (binary False symlink False) | |
238 | merging rev |
|
238 | merging rev | |
239 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
239 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
240 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
240 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
241 | (branch merge, don't forget to commit) |
|
241 | (branch merge, don't forget to commit) | |
242 | -------------- |
|
242 | -------------- | |
243 | M b |
|
243 | M b | |
244 | C a |
|
244 | C a | |
245 | -------------- |
|
245 | -------------- | |
246 |
|
246 | |||
247 | $ tm "nc a b" " " " " "6 nothing" |
|
247 | $ tm "nc a b" " " " " "6 nothing" | |
248 | created new head |
|
248 | created new head | |
249 | -------------- |
|
249 | -------------- | |
250 | test L:nc a b R: W: - 6 nothing |
|
250 | test L:nc a b R: W: - 6 nothing | |
251 | -------------- |
|
251 | -------------- | |
252 | searching for copies back to rev 1 |
|
252 | searching for copies back to rev 1 | |
253 | unmatched files in local: |
|
253 | unmatched files in local: | |
254 | b |
|
254 | b | |
255 | all copies found (* = to merge, ! = divergent): |
|
255 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
256 | b -> a |
|
256 | b -> a | |
257 | checking for directory renames |
|
257 | checking for directory renames | |
258 | resolving manifests |
|
258 | resolving manifests | |
259 | overwrite: False, partial: False |
|
259 | overwrite: False, partial: False | |
260 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 |
|
260 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 | |
261 | rev: versions differ -> m |
|
261 | rev: versions differ -> m | |
262 | preserving rev for resolve of rev |
|
262 | preserving rev for resolve of rev | |
263 | updating: rev 1/1 files (100.00%) |
|
263 | updating: rev 1/1 files (100.00%) | |
264 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
264 | picked tool 'python ../merge' for rev (binary False symlink False) | |
265 | merging rev |
|
265 | merging rev | |
266 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
266 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 | |
267 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
267 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
268 | (branch merge, don't forget to commit) |
|
268 | (branch merge, don't forget to commit) | |
269 | -------------- |
|
269 | -------------- | |
270 | C a |
|
270 | C a | |
271 | C b |
|
271 | C b | |
272 | -------------- |
|
272 | -------------- | |
273 |
|
273 | |||
274 | $ tm " " "nm a b" " " "7 get b" |
|
274 | $ tm " " "nm a b" " " "7 get b" | |
275 | created new head |
|
275 | created new head | |
276 | -------------- |
|
276 | -------------- | |
277 | test L: R:nm a b W: - 7 get b |
|
277 | test L: R:nm a b W: - 7 get b | |
278 | -------------- |
|
278 | -------------- | |
279 | searching for copies back to rev 1 |
|
279 | searching for copies back to rev 1 | |
280 | unmatched files in other: |
|
280 | unmatched files in other: | |
281 | b |
|
281 | b | |
282 | all copies found (* = to merge, ! = divergent): |
|
282 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
283 | b -> a |
|
283 | b -> a | |
284 | checking for directory renames |
|
284 | checking for directory renames | |
285 | resolving manifests |
|
285 | resolving manifests | |
286 | overwrite: False, partial: False |
|
286 | overwrite: False, partial: False | |
287 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a |
|
287 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a | |
288 | a: other deleted -> r |
|
288 | a: other deleted -> r | |
289 | rev: versions differ -> m |
|
289 | rev: versions differ -> m | |
290 | b: remote created -> g |
|
290 | b: remote created -> g | |
291 | preserving rev for resolve of rev |
|
291 | preserving rev for resolve of rev | |
292 | updating: a 1/3 files (33.33%) |
|
292 | updating: a 1/3 files (33.33%) | |
293 | removing a |
|
293 | removing a | |
294 | updating: b 2/3 files (66.67%) |
|
294 | updating: b 2/3 files (66.67%) | |
295 | getting b |
|
295 | getting b | |
296 | updating: rev 3/3 files (100.00%) |
|
296 | updating: rev 3/3 files (100.00%) | |
297 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
297 | picked tool 'python ../merge' for rev (binary False symlink False) | |
298 | merging rev |
|
298 | merging rev | |
299 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
299 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 | |
300 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
300 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
301 | (branch merge, don't forget to commit) |
|
301 | (branch merge, don't forget to commit) | |
302 | -------------- |
|
302 | -------------- | |
303 | M b |
|
303 | M b | |
304 | -------------- |
|
304 | -------------- | |
305 |
|
305 | |||
306 | $ tm "nm a b" " " " " "8 nothing" |
|
306 | $ tm "nm a b" " " " " "8 nothing" | |
307 | created new head |
|
307 | created new head | |
308 | -------------- |
|
308 | -------------- | |
309 | test L:nm a b R: W: - 8 nothing |
|
309 | test L:nm a b R: W: - 8 nothing | |
310 | -------------- |
|
310 | -------------- | |
311 | searching for copies back to rev 1 |
|
311 | searching for copies back to rev 1 | |
312 | unmatched files in local: |
|
312 | unmatched files in local: | |
313 | b |
|
313 | b | |
314 | all copies found (* = to merge, ! = divergent): |
|
314 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
315 | b -> a |
|
315 | b -> a | |
316 | checking for directory renames |
|
316 | checking for directory renames | |
317 | resolving manifests |
|
317 | resolving manifests | |
318 | overwrite: False, partial: False |
|
318 | overwrite: False, partial: False | |
319 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 |
|
319 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 | |
320 | rev: versions differ -> m |
|
320 | rev: versions differ -> m | |
321 | preserving rev for resolve of rev |
|
321 | preserving rev for resolve of rev | |
322 | updating: rev 1/1 files (100.00%) |
|
322 | updating: rev 1/1 files (100.00%) | |
323 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
323 | picked tool 'python ../merge' for rev (binary False symlink False) | |
324 | merging rev |
|
324 | merging rev | |
325 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
325 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 | |
326 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
326 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
327 | (branch merge, don't forget to commit) |
|
327 | (branch merge, don't forget to commit) | |
328 | -------------- |
|
328 | -------------- | |
329 | C b |
|
329 | C b | |
330 | -------------- |
|
330 | -------------- | |
331 |
|
331 | |||
332 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" |
|
332 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" | |
333 | created new head |
|
333 | created new head | |
334 | -------------- |
|
334 | -------------- | |
335 | test L:um a b R:um a b W: - 9 do merge with ancestor in a |
|
335 | test L:um a b R:um a b W: - 9 do merge with ancestor in a | |
336 | -------------- |
|
336 | -------------- | |
337 | searching for copies back to rev 1 |
|
337 | searching for copies back to rev 1 | |
338 | resolving manifests |
|
338 | resolving manifests | |
339 | overwrite: False, partial: False |
|
339 | overwrite: False, partial: False | |
340 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 |
|
340 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 | |
341 | b: versions differ -> m |
|
341 | b: versions differ -> m | |
342 | rev: versions differ -> m |
|
342 | rev: versions differ -> m | |
343 | preserving b for resolve of b |
|
343 | preserving b for resolve of b | |
344 | preserving rev for resolve of rev |
|
344 | preserving rev for resolve of rev | |
345 | updating: b 1/2 files (50.00%) |
|
345 | updating: b 1/2 files (50.00%) | |
346 | picked tool 'python ../merge' for b (binary False symlink False) |
|
346 | picked tool 'python ../merge' for b (binary False symlink False) | |
347 | merging b |
|
347 | merging b | |
348 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 |
|
348 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 | |
349 | updating: rev 2/2 files (100.00%) |
|
349 | updating: rev 2/2 files (100.00%) | |
350 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
350 | picked tool 'python ../merge' for rev (binary False symlink False) | |
351 | merging rev |
|
351 | merging rev | |
352 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
352 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
353 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
353 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
354 | (branch merge, don't forget to commit) |
|
354 | (branch merge, don't forget to commit) | |
355 | -------------- |
|
355 | -------------- | |
356 | M b |
|
356 | M b | |
357 | -------------- |
|
357 | -------------- | |
358 |
|
358 | |||
359 |
|
359 | |||
360 | m "um a c" "um x c" " " "10 do merge with no ancestor" |
|
360 | m "um a c" "um x c" " " "10 do merge with no ancestor" | |
361 |
|
361 | |||
362 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" |
|
362 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" | |
363 | created new head |
|
363 | created new head | |
364 | -------------- |
|
364 | -------------- | |
365 | test L:nm a b R:nm a c W: - 11 get c, keep b |
|
365 | test L:nm a b R:nm a c W: - 11 get c, keep b | |
366 | -------------- |
|
366 | -------------- | |
367 | searching for copies back to rev 1 |
|
367 | searching for copies back to rev 1 | |
368 | unmatched files in local: |
|
368 | unmatched files in local: | |
369 | b |
|
369 | b | |
370 | unmatched files in other: |
|
370 | unmatched files in other: | |
371 | c |
|
371 | c | |
372 | all copies found (* = to merge, ! = divergent): |
|
372 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
373 | c -> a ! |
|
373 | c -> a ! | |
374 | b -> a ! |
|
374 | b -> a ! | |
375 | checking for directory renames |
|
375 | checking for directory renames | |
376 | a: divergent renames -> dr |
|
376 | a: divergent renames -> dr | |
377 | resolving manifests |
|
377 | resolving manifests | |
378 | overwrite: False, partial: False |
|
378 | overwrite: False, partial: False | |
379 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e |
|
379 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e | |
380 | rev: versions differ -> m |
|
380 | rev: versions differ -> m | |
381 | c: remote created -> g |
|
381 | c: remote created -> g | |
382 | preserving rev for resolve of rev |
|
382 | preserving rev for resolve of rev | |
383 | updating: a 1/3 files (33.33%) |
|
383 | updating: a 1/3 files (33.33%) | |
384 | note: possible conflict - a was renamed multiple times to: |
|
384 | note: possible conflict - a was renamed multiple times to: | |
385 | b |
|
385 | b | |
386 | c |
|
386 | c | |
387 | updating: c 2/3 files (66.67%) |
|
387 | updating: c 2/3 files (66.67%) | |
388 | getting c |
|
388 | getting c | |
389 | updating: rev 3/3 files (100.00%) |
|
389 | updating: rev 3/3 files (100.00%) | |
390 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
390 | picked tool 'python ../merge' for rev (binary False symlink False) | |
391 | merging rev |
|
391 | merging rev | |
392 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 |
|
392 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 | |
393 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
393 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
394 | (branch merge, don't forget to commit) |
|
394 | (branch merge, don't forget to commit) | |
395 | -------------- |
|
395 | -------------- | |
396 | M c |
|
396 | M c | |
397 | C b |
|
397 | C b | |
398 | -------------- |
|
398 | -------------- | |
399 |
|
399 | |||
400 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" |
|
400 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" | |
401 | created new head |
|
401 | created new head | |
402 | -------------- |
|
402 | -------------- | |
403 | test L:nc a b R:up b W: - 12 merge b no ancestor |
|
403 | test L:nc a b R:up b W: - 12 merge b no ancestor | |
404 | -------------- |
|
404 | -------------- | |
405 | searching for copies back to rev 1 |
|
405 | searching for copies back to rev 1 | |
406 | resolving manifests |
|
406 | resolving manifests | |
407 | overwrite: False, partial: False |
|
407 | overwrite: False, partial: False | |
408 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 |
|
408 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 | |
409 | b: versions differ -> m |
|
409 | b: versions differ -> m | |
410 | rev: versions differ -> m |
|
410 | rev: versions differ -> m | |
411 | preserving b for resolve of b |
|
411 | preserving b for resolve of b | |
412 | preserving rev for resolve of rev |
|
412 | preserving rev for resolve of rev | |
413 | updating: b 1/2 files (50.00%) |
|
413 | updating: b 1/2 files (50.00%) | |
414 | picked tool 'python ../merge' for b (binary False symlink False) |
|
414 | picked tool 'python ../merge' for b (binary False symlink False) | |
415 | merging b |
|
415 | merging b | |
416 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 |
|
416 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 | |
417 | updating: rev 2/2 files (100.00%) |
|
417 | updating: rev 2/2 files (100.00%) | |
418 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
418 | picked tool 'python ../merge' for rev (binary False symlink False) | |
419 | merging rev |
|
419 | merging rev | |
420 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 |
|
420 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 | |
421 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
421 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
422 | (branch merge, don't forget to commit) |
|
422 | (branch merge, don't forget to commit) | |
423 | -------------- |
|
423 | -------------- | |
424 | M b |
|
424 | M b | |
425 | C a |
|
425 | C a | |
426 | -------------- |
|
426 | -------------- | |
427 |
|
427 | |||
428 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" |
|
428 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" | |
429 | created new head |
|
429 | created new head | |
430 | -------------- |
|
430 | -------------- | |
431 | test L:up b R:nm a b W: - 13 merge b no ancestor |
|
431 | test L:up b R:nm a b W: - 13 merge b no ancestor | |
432 | -------------- |
|
432 | -------------- | |
433 | searching for copies back to rev 1 |
|
433 | searching for copies back to rev 1 | |
434 | resolving manifests |
|
434 | resolving manifests | |
435 | overwrite: False, partial: False |
|
435 | overwrite: False, partial: False | |
436 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
436 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a | |
437 | a: other deleted -> r |
|
437 | a: other deleted -> r | |
438 | b: versions differ -> m |
|
438 | b: versions differ -> m | |
439 | rev: versions differ -> m |
|
439 | rev: versions differ -> m | |
440 | preserving b for resolve of b |
|
440 | preserving b for resolve of b | |
441 | preserving rev for resolve of rev |
|
441 | preserving rev for resolve of rev | |
442 | updating: a 1/3 files (33.33%) |
|
442 | updating: a 1/3 files (33.33%) | |
443 | removing a |
|
443 | removing a | |
444 | updating: b 2/3 files (66.67%) |
|
444 | updating: b 2/3 files (66.67%) | |
445 | picked tool 'python ../merge' for b (binary False symlink False) |
|
445 | picked tool 'python ../merge' for b (binary False symlink False) | |
446 | merging b |
|
446 | merging b | |
447 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
447 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
448 | updating: rev 3/3 files (100.00%) |
|
448 | updating: rev 3/3 files (100.00%) | |
449 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
449 | picked tool 'python ../merge' for rev (binary False symlink False) | |
450 | merging rev |
|
450 | merging rev | |
451 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
451 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
452 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
452 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
453 | (branch merge, don't forget to commit) |
|
453 | (branch merge, don't forget to commit) | |
454 | -------------- |
|
454 | -------------- | |
455 | M b |
|
455 | M b | |
456 | -------------- |
|
456 | -------------- | |
457 |
|
457 | |||
458 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" |
|
458 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" | |
459 | created new head |
|
459 | created new head | |
460 | -------------- |
|
460 | -------------- | |
461 | test L:nc a b R:up a b W: - 14 merge b no ancestor |
|
461 | test L:nc a b R:up a b W: - 14 merge b no ancestor | |
462 | -------------- |
|
462 | -------------- | |
463 | searching for copies back to rev 1 |
|
463 | searching for copies back to rev 1 | |
464 | resolving manifests |
|
464 | resolving manifests | |
465 | overwrite: False, partial: False |
|
465 | overwrite: False, partial: False | |
466 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
466 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a | |
467 | a: remote is newer -> g |
|
467 | a: remote is newer -> g | |
468 | b: versions differ -> m |
|
468 | b: versions differ -> m | |
469 | rev: versions differ -> m |
|
469 | rev: versions differ -> m | |
470 | preserving b for resolve of b |
|
470 | preserving b for resolve of b | |
471 | preserving rev for resolve of rev |
|
471 | preserving rev for resolve of rev | |
472 | updating: a 1/3 files (33.33%) |
|
472 | updating: a 1/3 files (33.33%) | |
473 | getting a |
|
473 | getting a | |
474 | updating: b 2/3 files (66.67%) |
|
474 | updating: b 2/3 files (66.67%) | |
475 | picked tool 'python ../merge' for b (binary False symlink False) |
|
475 | picked tool 'python ../merge' for b (binary False symlink False) | |
476 | merging b |
|
476 | merging b | |
477 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
477 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
478 | updating: rev 3/3 files (100.00%) |
|
478 | updating: rev 3/3 files (100.00%) | |
479 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
479 | picked tool 'python ../merge' for rev (binary False symlink False) | |
480 | merging rev |
|
480 | merging rev | |
481 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
481 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
482 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
482 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
483 | (branch merge, don't forget to commit) |
|
483 | (branch merge, don't forget to commit) | |
484 | -------------- |
|
484 | -------------- | |
485 | M a |
|
485 | M a | |
486 | M b |
|
486 | M b | |
487 | -------------- |
|
487 | -------------- | |
488 |
|
488 | |||
489 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" |
|
489 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" | |
490 | created new head |
|
490 | created new head | |
491 | -------------- |
|
491 | -------------- | |
492 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a |
|
492 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a | |
493 | -------------- |
|
493 | -------------- | |
494 | searching for copies back to rev 1 |
|
494 | searching for copies back to rev 1 | |
495 | resolving manifests |
|
495 | resolving manifests | |
496 | overwrite: False, partial: False |
|
496 | overwrite: False, partial: False | |
497 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
497 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a | |
498 | a: other deleted -> r |
|
498 | a: other deleted -> r | |
499 | b: versions differ -> m |
|
499 | b: versions differ -> m | |
500 | rev: versions differ -> m |
|
500 | rev: versions differ -> m | |
501 | preserving b for resolve of b |
|
501 | preserving b for resolve of b | |
502 | preserving rev for resolve of rev |
|
502 | preserving rev for resolve of rev | |
503 | updating: a 1/3 files (33.33%) |
|
503 | updating: a 1/3 files (33.33%) | |
504 | removing a |
|
504 | removing a | |
505 | updating: b 2/3 files (66.67%) |
|
505 | updating: b 2/3 files (66.67%) | |
506 | picked tool 'python ../merge' for b (binary False symlink False) |
|
506 | picked tool 'python ../merge' for b (binary False symlink False) | |
507 | merging b |
|
507 | merging b | |
508 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
508 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 | |
509 | updating: rev 3/3 files (100.00%) |
|
509 | updating: rev 3/3 files (100.00%) | |
510 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
510 | picked tool 'python ../merge' for rev (binary False symlink False) | |
511 | merging rev |
|
511 | merging rev | |
512 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
512 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
513 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
513 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved | |
514 | (branch merge, don't forget to commit) |
|
514 | (branch merge, don't forget to commit) | |
515 | -------------- |
|
515 | -------------- | |
516 | M b |
|
516 | M b | |
517 | -------------- |
|
517 | -------------- | |
518 |
|
518 | |||
519 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" |
|
519 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" | |
520 | created new head |
|
520 | created new head | |
521 | -------------- |
|
521 | -------------- | |
522 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor |
|
522 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor | |
523 | -------------- |
|
523 | -------------- | |
524 | searching for copies back to rev 1 |
|
524 | searching for copies back to rev 1 | |
525 | resolving manifests |
|
525 | resolving manifests | |
526 | overwrite: False, partial: False |
|
526 | overwrite: False, partial: False | |
527 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
527 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a | |
528 | a: remote is newer -> g |
|
528 | a: remote is newer -> g | |
529 | b: versions differ -> m |
|
529 | b: versions differ -> m | |
530 | rev: versions differ -> m |
|
530 | rev: versions differ -> m | |
531 | preserving b for resolve of b |
|
531 | preserving b for resolve of b | |
532 | preserving rev for resolve of rev |
|
532 | preserving rev for resolve of rev | |
533 | updating: a 1/3 files (33.33%) |
|
533 | updating: a 1/3 files (33.33%) | |
534 | getting a |
|
534 | getting a | |
535 | updating: b 2/3 files (66.67%) |
|
535 | updating: b 2/3 files (66.67%) | |
536 | picked tool 'python ../merge' for b (binary False symlink False) |
|
536 | picked tool 'python ../merge' for b (binary False symlink False) | |
537 | merging b |
|
537 | merging b | |
538 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
538 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 | |
539 | updating: rev 3/3 files (100.00%) |
|
539 | updating: rev 3/3 files (100.00%) | |
540 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
540 | picked tool 'python ../merge' for rev (binary False symlink False) | |
541 | merging rev |
|
541 | merging rev | |
542 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
542 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
543 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
543 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
544 | (branch merge, don't forget to commit) |
|
544 | (branch merge, don't forget to commit) | |
545 | -------------- |
|
545 | -------------- | |
546 | M a |
|
546 | M a | |
547 | M b |
|
547 | M b | |
548 | -------------- |
|
548 | -------------- | |
549 |
|
549 | |||
550 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" |
|
550 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" | |
551 | created new head |
|
551 | created new head | |
552 | -------------- |
|
552 | -------------- | |
553 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor |
|
553 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor | |
554 | -------------- |
|
554 | -------------- | |
555 | searching for copies back to rev 1 |
|
555 | searching for copies back to rev 1 | |
556 | resolving manifests |
|
556 | resolving manifests | |
557 | overwrite: False, partial: False |
|
557 | overwrite: False, partial: False | |
558 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 |
|
558 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 | |
559 | b: versions differ -> m |
|
559 | b: versions differ -> m | |
560 | rev: versions differ -> m |
|
560 | rev: versions differ -> m | |
561 | preserving b for resolve of b |
|
561 | preserving b for resolve of b | |
562 | preserving rev for resolve of rev |
|
562 | preserving rev for resolve of rev | |
563 | updating: b 1/2 files (50.00%) |
|
563 | updating: b 1/2 files (50.00%) | |
564 | picked tool 'python ../merge' for b (binary False symlink False) |
|
564 | picked tool 'python ../merge' for b (binary False symlink False) | |
565 | merging b |
|
565 | merging b | |
566 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 |
|
566 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 | |
567 | updating: rev 2/2 files (100.00%) |
|
567 | updating: rev 2/2 files (100.00%) | |
568 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
568 | picked tool 'python ../merge' for rev (binary False symlink False) | |
569 | merging rev |
|
569 | merging rev | |
570 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
570 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
571 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
571 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
572 | (branch merge, don't forget to commit) |
|
572 | (branch merge, don't forget to commit) | |
573 | -------------- |
|
573 | -------------- | |
574 | M b |
|
574 | M b | |
575 | C a |
|
575 | C a | |
576 | -------------- |
|
576 | -------------- | |
577 |
|
577 | |||
578 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" |
|
578 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" | |
579 | created new head |
|
579 | created new head | |
580 | -------------- |
|
580 | -------------- | |
581 | test L:nm a b R:up a b W: - 18 merge b no ancestor |
|
581 | test L:nm a b R:up a b W: - 18 merge b no ancestor | |
582 | -------------- |
|
582 | -------------- | |
583 | searching for copies back to rev 1 |
|
583 | searching for copies back to rev 1 | |
584 | resolving manifests |
|
584 | resolving manifests | |
585 | overwrite: False, partial: False |
|
585 | overwrite: False, partial: False | |
586 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a |
|
586 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a | |
587 | b: versions differ -> m |
|
587 | b: versions differ -> m | |
588 | rev: versions differ -> m |
|
588 | rev: versions differ -> m | |
589 | remote changed a which local deleted |
|
589 | remote changed a which local deleted | |
590 | use (c)hanged version or leave (d)eleted? c |
|
590 | use (c)hanged version or leave (d)eleted? c | |
591 | a: prompt recreating -> g |
|
591 | a: prompt recreating -> g | |
592 | preserving b for resolve of b |
|
592 | preserving b for resolve of b | |
593 | preserving rev for resolve of rev |
|
593 | preserving rev for resolve of rev | |
594 | updating: a 1/3 files (33.33%) |
|
594 | updating: a 1/3 files (33.33%) | |
595 | getting a |
|
595 | getting a | |
596 | updating: b 2/3 files (66.67%) |
|
596 | updating: b 2/3 files (66.67%) | |
597 | picked tool 'python ../merge' for b (binary False symlink False) |
|
597 | picked tool 'python ../merge' for b (binary False symlink False) | |
598 | merging b |
|
598 | merging b | |
599 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 |
|
599 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 | |
600 | updating: rev 3/3 files (100.00%) |
|
600 | updating: rev 3/3 files (100.00%) | |
601 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
601 | picked tool 'python ../merge' for rev (binary False symlink False) | |
602 | merging rev |
|
602 | merging rev | |
603 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
603 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 | |
604 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
604 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
605 | (branch merge, don't forget to commit) |
|
605 | (branch merge, don't forget to commit) | |
606 | -------------- |
|
606 | -------------- | |
607 | M a |
|
607 | M a | |
608 | M b |
|
608 | M b | |
609 | -------------- |
|
609 | -------------- | |
610 |
|
610 | |||
611 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" |
|
611 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" | |
612 | created new head |
|
612 | created new head | |
613 | -------------- |
|
613 | -------------- | |
614 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a |
|
614 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a | |
615 | -------------- |
|
615 | -------------- | |
616 | searching for copies back to rev 1 |
|
616 | searching for copies back to rev 1 | |
617 | resolving manifests |
|
617 | resolving manifests | |
618 | overwrite: False, partial: False |
|
618 | overwrite: False, partial: False | |
619 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a |
|
619 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a | |
620 | local changed a which remote deleted |
|
620 | local changed a which remote deleted | |
621 | use (c)hanged version or (d)elete? c |
|
621 | use (c)hanged version or (d)elete? c | |
622 | a: prompt keep -> a |
|
622 | a: prompt keep -> a | |
623 | b: versions differ -> m |
|
623 | b: versions differ -> m | |
624 | rev: versions differ -> m |
|
624 | rev: versions differ -> m | |
625 | preserving b for resolve of b |
|
625 | preserving b for resolve of b | |
626 | preserving rev for resolve of rev |
|
626 | preserving rev for resolve of rev | |
627 | updating: a 1/3 files (33.33%) |
|
627 | updating: a 1/3 files (33.33%) | |
628 | updating: b 2/3 files (66.67%) |
|
628 | updating: b 2/3 files (66.67%) | |
629 | picked tool 'python ../merge' for b (binary False symlink False) |
|
629 | picked tool 'python ../merge' for b (binary False symlink False) | |
630 | merging b |
|
630 | merging b | |
631 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 |
|
631 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 | |
632 | updating: rev 3/3 files (100.00%) |
|
632 | updating: rev 3/3 files (100.00%) | |
633 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
633 | picked tool 'python ../merge' for rev (binary False symlink False) | |
634 | merging rev |
|
634 | merging rev | |
635 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
635 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 | |
636 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
636 | 0 files updated, 2 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 | -------------- |
|
638 | -------------- | |
639 | M b |
|
639 | M b | |
640 | C a |
|
640 | C a | |
641 | -------------- |
|
641 | -------------- | |
642 |
|
642 | |||
643 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" |
|
643 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" | |
644 | created new head |
|
644 | created new head | |
645 | -------------- |
|
645 | -------------- | |
646 | test L:up a R:um a b W: - 20 merge a and b to b, remove a |
|
646 | test L:up a R:um a b W: - 20 merge a and b to b, remove a | |
647 | -------------- |
|
647 | -------------- | |
648 | searching for copies back to rev 1 |
|
648 | searching for copies back to rev 1 | |
649 | unmatched files in other: |
|
649 | unmatched files in other: | |
650 | b |
|
650 | b | |
651 | all copies found (* = to merge, ! = divergent): |
|
651 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
652 | b -> a * |
|
652 | b -> a * | |
653 | checking for directory renames |
|
653 | checking for directory renames | |
654 | resolving manifests |
|
654 | resolving manifests | |
655 | overwrite: False, partial: False |
|
655 | overwrite: False, partial: False | |
656 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 |
|
656 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 | |
657 | rev: versions differ -> m |
|
657 | rev: versions differ -> m | |
658 | a: remote moved to b -> m |
|
658 | a: remote moved to b -> m | |
659 | preserving a for resolve of b |
|
659 | preserving a for resolve of b | |
660 | preserving rev for resolve of rev |
|
660 | preserving rev for resolve of rev | |
661 | removing a |
|
661 | removing a | |
662 | updating: a 1/2 files (50.00%) |
|
662 | updating: a 1/2 files (50.00%) | |
663 | picked tool 'python ../merge' for b (binary False symlink False) |
|
663 | picked tool 'python ../merge' for b (binary False symlink False) | |
664 | merging a and b to b |
|
664 | merging a and b to b | |
665 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 |
|
665 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 | |
666 | updating: rev 2/2 files (100.00%) |
|
666 | updating: rev 2/2 files (100.00%) | |
667 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
667 | picked tool 'python ../merge' for rev (binary False symlink False) | |
668 | merging rev |
|
668 | merging rev | |
669 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
669 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
670 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
670 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
671 | (branch merge, don't forget to commit) |
|
671 | (branch merge, don't forget to commit) | |
672 | -------------- |
|
672 | -------------- | |
673 | M b |
|
673 | M b | |
674 | a |
|
674 | a | |
675 | -------------- |
|
675 | -------------- | |
676 |
|
676 | |||
677 | $ tm "um a b" "up a " " " "21 merge a and b to b" |
|
677 | $ tm "um a b" "up a " " " "21 merge a and b to b" | |
678 | created new head |
|
678 | created new head | |
679 | -------------- |
|
679 | -------------- | |
680 | test L:um a b R:up a W: - 21 merge a and b to b |
|
680 | test L:um a b R:up a W: - 21 merge a and b to b | |
681 | -------------- |
|
681 | -------------- | |
682 | searching for copies back to rev 1 |
|
682 | searching for copies back to rev 1 | |
683 | unmatched files in local: |
|
683 | unmatched files in local: | |
684 | b |
|
684 | b | |
685 | all copies found (* = to merge, ! = divergent): |
|
685 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
686 | b -> a * |
|
686 | b -> a * | |
687 | checking for directory renames |
|
687 | checking for directory renames | |
688 | resolving manifests |
|
688 | resolving manifests | |
689 | overwrite: False, partial: False |
|
689 | overwrite: False, partial: False | |
690 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 |
|
690 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 | |
691 | b: local copied/moved to a -> m |
|
691 | b: local copied/moved to a -> m | |
692 | rev: versions differ -> m |
|
692 | rev: versions differ -> m | |
693 | preserving b for resolve of b |
|
693 | preserving b for resolve of b | |
694 | preserving rev for resolve of rev |
|
694 | preserving rev for resolve of rev | |
695 | updating: b 1/2 files (50.00%) |
|
695 | updating: b 1/2 files (50.00%) | |
696 | picked tool 'python ../merge' for b (binary False symlink False) |
|
696 | picked tool 'python ../merge' for b (binary False symlink False) | |
697 | merging b and a to b |
|
697 | merging b and a to b | |
698 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
698 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 | |
699 | updating: rev 2/2 files (100.00%) |
|
699 | updating: rev 2/2 files (100.00%) | |
700 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
700 | picked tool 'python ../merge' for rev (binary False symlink False) | |
701 | merging rev |
|
701 | merging rev | |
702 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
702 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
703 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
703 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
704 | (branch merge, don't forget to commit) |
|
704 | (branch merge, don't forget to commit) | |
705 | -------------- |
|
705 | -------------- | |
706 | M b |
|
706 | M b | |
707 | a |
|
707 | a | |
708 | -------------- |
|
708 | -------------- | |
709 |
|
709 | |||
710 |
|
710 | |||
711 | m "nm a b" "um x a" " " "22 get a, keep b" |
|
711 | m "nm a b" "um x a" " " "22 get a, keep b" | |
712 |
|
712 | |||
713 | $ tm "nm a b" "up a c" " " "23 get c, keep b" |
|
713 | $ tm "nm a b" "up a c" " " "23 get c, keep b" | |
714 | created new head |
|
714 | created new head | |
715 | -------------- |
|
715 | -------------- | |
716 | test L:nm a b R:up a c W: - 23 get c, keep b |
|
716 | test L:nm a b R:up a c W: - 23 get c, keep b | |
717 | -------------- |
|
717 | -------------- | |
718 | searching for copies back to rev 1 |
|
718 | searching for copies back to rev 1 | |
719 | unmatched files in local: |
|
719 | unmatched files in local: | |
720 | b |
|
720 | b | |
721 | unmatched files in other: |
|
721 | unmatched files in other: | |
722 | c |
|
722 | c | |
723 | all copies found (* = to merge, ! = divergent): |
|
723 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
724 | b -> a * |
|
724 | b -> a * | |
725 | checking for directory renames |
|
725 | checking for directory renames | |
726 | resolving manifests |
|
726 | resolving manifests | |
727 | overwrite: False, partial: False |
|
727 | overwrite: False, partial: False | |
728 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f |
|
728 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f | |
729 | b: local copied/moved to a -> m |
|
729 | b: local copied/moved to a -> m | |
730 | rev: versions differ -> m |
|
730 | rev: versions differ -> m | |
731 | c: remote created -> g |
|
731 | c: remote created -> g | |
732 | preserving b for resolve of b |
|
732 | preserving b for resolve of b | |
733 | preserving rev for resolve of rev |
|
733 | preserving rev for resolve of rev | |
734 | updating: b 1/3 files (33.33%) |
|
734 | updating: b 1/3 files (33.33%) | |
735 | picked tool 'python ../merge' for b (binary False symlink False) |
|
735 | picked tool 'python ../merge' for b (binary False symlink False) | |
736 | merging b and a to b |
|
736 | merging b and a to b | |
737 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 |
|
737 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 | |
738 | premerge successful |
|
738 | premerge successful | |
739 | updating: c 2/3 files (66.67%) |
|
739 | updating: c 2/3 files (66.67%) | |
740 | getting c |
|
740 | getting c | |
741 | updating: rev 3/3 files (100.00%) |
|
741 | updating: rev 3/3 files (100.00%) | |
742 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
742 | picked tool 'python ../merge' for rev (binary False symlink False) | |
743 | merging rev |
|
743 | merging rev | |
744 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 |
|
744 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 | |
745 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
745 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved | |
746 | (branch merge, don't forget to commit) |
|
746 | (branch merge, don't forget to commit) | |
747 | -------------- |
|
747 | -------------- | |
748 | M b |
|
748 | M b | |
749 | a |
|
749 | a | |
750 | M c |
|
750 | M c | |
751 | -------------- |
|
751 | -------------- | |
752 |
|
752 |
General Comments 0
You need to be logged in to leave comments.
Login now