Show More
@@ -1,1203 +1,1220 b'' | |||
|
1 | 1 | # merge.py - directory-level update/merge handling for Mercurial |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | 10 | import errno |
|
11 | 11 | import os |
|
12 | 12 | import shutil |
|
13 | 13 | import struct |
|
14 | 14 | |
|
15 | 15 | from .i18n import _ |
|
16 | 16 | from .node import ( |
|
17 | 17 | bin, |
|
18 | 18 | hex, |
|
19 | 19 | nullid, |
|
20 | 20 | nullrev, |
|
21 | 21 | ) |
|
22 | 22 | from . import ( |
|
23 | 23 | copies, |
|
24 | 24 | destutil, |
|
25 | 25 | error, |
|
26 | 26 | filemerge, |
|
27 | 27 | obsolete, |
|
28 | 28 | subrepo, |
|
29 | 29 | util, |
|
30 | 30 | worker, |
|
31 | 31 | ) |
|
32 | 32 | |
|
33 | 33 | _pack = struct.pack |
|
34 | 34 | _unpack = struct.unpack |
|
35 | 35 | |
|
36 | 36 | def _droponode(data): |
|
37 | 37 | # used for compatibility for v1 |
|
38 | 38 | bits = data.split('\0') |
|
39 | 39 | bits = bits[:-2] + bits[-1:] |
|
40 | 40 | return '\0'.join(bits) |
|
41 | 41 | |
|
42 | 42 | class mergestate(object): |
|
43 | 43 | '''track 3-way merge state of individual files |
|
44 | 44 | |
|
45 | 45 | it is stored on disk when needed. Two file are used, one with an old |
|
46 | 46 | format, one with a new format. Both contains similar data, but the new |
|
47 | 47 | format can store new kinds of field. |
|
48 | 48 | |
|
49 | 49 | Current new format is a list of arbitrary record of the form: |
|
50 | 50 | |
|
51 | 51 | [type][length][content] |
|
52 | 52 | |
|
53 | 53 | Type is a single character, length is a 4 bytes integer, content is an |
|
54 | 54 | arbitrary suites of bytes of length `length`. |
|
55 | 55 | |
|
56 | 56 | Type should be a letter. Capital letter are mandatory record, Mercurial |
|
57 | 57 | should abort if they are unknown. lower case record can be safely ignored. |
|
58 | 58 | |
|
59 | 59 | Currently known record: |
|
60 | 60 | |
|
61 | 61 | L: the node of the "local" part of the merge (hexified version) |
|
62 | 62 | O: the node of the "other" part of the merge (hexified version) |
|
63 | 63 | F: a file to be merged entry |
|
64 | 64 | ''' |
|
65 | 65 | statepathv1 = 'merge/state' |
|
66 | 66 | statepathv2 = 'merge/state2' |
|
67 | 67 | |
|
68 | 68 | def __init__(self, repo): |
|
69 | 69 | self._repo = repo |
|
70 | 70 | self._dirty = False |
|
71 | 71 | self._read() |
|
72 | 72 | |
|
73 | 73 | def reset(self, node=None, other=None): |
|
74 | 74 | self._state = {} |
|
75 | 75 | self._local = None |
|
76 | 76 | self._other = None |
|
77 | 77 | if node: |
|
78 | 78 | self._local = node |
|
79 | 79 | self._other = other |
|
80 | 80 | shutil.rmtree(self._repo.join('merge'), True) |
|
81 | 81 | self._dirty = False |
|
82 | 82 | |
|
83 | 83 | def _read(self): |
|
84 | 84 | """Analyse each record content to restore a serialized state from disk |
|
85 | 85 | |
|
86 | 86 | This function process "record" entry produced by the de-serialization |
|
87 | 87 | of on disk file. |
|
88 | 88 | """ |
|
89 | 89 | self._state = {} |
|
90 | 90 | self._local = None |
|
91 | 91 | self._other = None |
|
92 | 92 | records = self._readrecords() |
|
93 | 93 | for rtype, record in records: |
|
94 | 94 | if rtype == 'L': |
|
95 | 95 | self._local = bin(record) |
|
96 | 96 | elif rtype == 'O': |
|
97 | 97 | self._other = bin(record) |
|
98 | 98 | elif rtype == 'F': |
|
99 | 99 | bits = record.split('\0') |
|
100 | 100 | self._state[bits[0]] = bits[1:] |
|
101 | 101 | elif not rtype.islower(): |
|
102 | 102 | raise error.Abort(_('unsupported merge state record: %s') |
|
103 | 103 | % rtype) |
|
104 | 104 | self._dirty = False |
|
105 | 105 | |
|
106 | 106 | def _readrecords(self): |
|
107 | 107 | """Read merge state from disk and return a list of record (TYPE, data) |
|
108 | 108 | |
|
109 | 109 | We read data from both v1 and v2 files and decide which one to use. |
|
110 | 110 | |
|
111 | 111 | V1 has been used by version prior to 2.9.1 and contains less data than |
|
112 | 112 | v2. We read both versions and check if no data in v2 contradicts |
|
113 | 113 | v1. If there is not contradiction we can safely assume that both v1 |
|
114 | 114 | and v2 were written at the same time and use the extract data in v2. If |
|
115 | 115 | there is contradiction we ignore v2 content as we assume an old version |
|
116 | 116 | of Mercurial has overwritten the mergestate file and left an old v2 |
|
117 | 117 | file around. |
|
118 | 118 | |
|
119 | 119 | returns list of record [(TYPE, data), ...]""" |
|
120 | 120 | v1records = self._readrecordsv1() |
|
121 | 121 | v2records = self._readrecordsv2() |
|
122 | 122 | if self._v1v2match(v1records, v2records): |
|
123 | 123 | return v2records |
|
124 | 124 | else: |
|
125 | 125 | # v1 file is newer than v2 file, use it |
|
126 | 126 | # we have to infer the "other" changeset of the merge |
|
127 | 127 | # we cannot do better than that with v1 of the format |
|
128 | 128 | mctx = self._repo[None].parents()[-1] |
|
129 | 129 | v1records.append(('O', mctx.hex())) |
|
130 | 130 | # add place holder "other" file node information |
|
131 | 131 | # nobody is using it yet so we do no need to fetch the data |
|
132 | 132 | # if mctx was wrong `mctx[bits[-2]]` may fails. |
|
133 | 133 | for idx, r in enumerate(v1records): |
|
134 | 134 | if r[0] == 'F': |
|
135 | 135 | bits = r[1].split('\0') |
|
136 | 136 | bits.insert(-2, '') |
|
137 | 137 | v1records[idx] = (r[0], '\0'.join(bits)) |
|
138 | 138 | return v1records |
|
139 | 139 | |
|
140 | 140 | def _v1v2match(self, v1records, v2records): |
|
141 | 141 | oldv2 = set() # old format version of v2 record |
|
142 | 142 | for rec in v2records: |
|
143 | 143 | if rec[0] == 'L': |
|
144 | 144 | oldv2.add(rec) |
|
145 | 145 | elif rec[0] == 'F': |
|
146 | 146 | # drop the onode data (not contained in v1) |
|
147 | 147 | oldv2.add(('F', _droponode(rec[1]))) |
|
148 | 148 | for rec in v1records: |
|
149 | 149 | if rec not in oldv2: |
|
150 | 150 | return False |
|
151 | 151 | else: |
|
152 | 152 | return True |
|
153 | 153 | |
|
154 | 154 | def _readrecordsv1(self): |
|
155 | 155 | """read on disk merge state for version 1 file |
|
156 | 156 | |
|
157 | 157 | returns list of record [(TYPE, data), ...] |
|
158 | 158 | |
|
159 | 159 | Note: the "F" data from this file are one entry short |
|
160 | 160 | (no "other file node" entry) |
|
161 | 161 | """ |
|
162 | 162 | records = [] |
|
163 | 163 | try: |
|
164 | 164 | f = self._repo.vfs(self.statepathv1) |
|
165 | 165 | for i, l in enumerate(f): |
|
166 | 166 | if i == 0: |
|
167 | 167 | records.append(('L', l[:-1])) |
|
168 | 168 | else: |
|
169 | 169 | records.append(('F', l[:-1])) |
|
170 | 170 | f.close() |
|
171 | 171 | except IOError as err: |
|
172 | 172 | if err.errno != errno.ENOENT: |
|
173 | 173 | raise |
|
174 | 174 | return records |
|
175 | 175 | |
|
176 | 176 | def _readrecordsv2(self): |
|
177 | 177 | """read on disk merge state for version 2 file |
|
178 | 178 | |
|
179 | 179 | returns list of record [(TYPE, data), ...] |
|
180 | 180 | """ |
|
181 | 181 | records = [] |
|
182 | 182 | try: |
|
183 | 183 | f = self._repo.vfs(self.statepathv2) |
|
184 | 184 | data = f.read() |
|
185 | 185 | off = 0 |
|
186 | 186 | end = len(data) |
|
187 | 187 | while off < end: |
|
188 | 188 | rtype = data[off] |
|
189 | 189 | off += 1 |
|
190 | 190 | length = _unpack('>I', data[off:(off + 4)])[0] |
|
191 | 191 | off += 4 |
|
192 | 192 | record = data[off:(off + length)] |
|
193 | 193 | off += length |
|
194 | 194 | records.append((rtype, record)) |
|
195 | 195 | f.close() |
|
196 | 196 | except IOError as err: |
|
197 | 197 | if err.errno != errno.ENOENT: |
|
198 | 198 | raise |
|
199 | 199 | return records |
|
200 | 200 | |
|
201 | 201 | def active(self): |
|
202 | 202 | """Whether mergestate is active. |
|
203 | 203 | |
|
204 | 204 | Returns True if there appears to be mergestate. This is a rough proxy |
|
205 | 205 | for "is a merge in progress." |
|
206 | 206 | """ |
|
207 | 207 | # Check local variables before looking at filesystem for performance |
|
208 | 208 | # reasons. |
|
209 | 209 | return bool(self._local) or bool(self._state) or \ |
|
210 | 210 | self._repo.vfs.exists(self.statepathv1) or \ |
|
211 | 211 | self._repo.vfs.exists(self.statepathv2) |
|
212 | 212 | |
|
213 | 213 | def commit(self): |
|
214 | 214 | """Write current state on disk (if necessary)""" |
|
215 | 215 | if self._dirty: |
|
216 | 216 | records = [] |
|
217 | 217 | records.append(('L', hex(self._local))) |
|
218 | 218 | records.append(('O', hex(self._other))) |
|
219 | 219 | for d, v in self._state.iteritems(): |
|
220 | 220 | records.append(('F', '\0'.join([d] + v))) |
|
221 | 221 | self._writerecords(records) |
|
222 | 222 | self._dirty = False |
|
223 | 223 | |
|
224 | 224 | def _writerecords(self, records): |
|
225 | 225 | """Write current state on disk (both v1 and v2)""" |
|
226 | 226 | self._writerecordsv1(records) |
|
227 | 227 | self._writerecordsv2(records) |
|
228 | 228 | |
|
229 | 229 | def _writerecordsv1(self, records): |
|
230 | 230 | """Write current state on disk in a version 1 file""" |
|
231 | 231 | f = self._repo.vfs(self.statepathv1, 'w') |
|
232 | 232 | irecords = iter(records) |
|
233 | 233 | lrecords = irecords.next() |
|
234 | 234 | assert lrecords[0] == 'L' |
|
235 | 235 | f.write(hex(self._local) + '\n') |
|
236 | 236 | for rtype, data in irecords: |
|
237 | 237 | if rtype == 'F': |
|
238 | 238 | f.write('%s\n' % _droponode(data)) |
|
239 | 239 | f.close() |
|
240 | 240 | |
|
241 | 241 | def _writerecordsv2(self, records): |
|
242 | 242 | """Write current state on disk in a version 2 file""" |
|
243 | 243 | f = self._repo.vfs(self.statepathv2, 'w') |
|
244 | 244 | for key, data in records: |
|
245 | 245 | assert len(key) == 1 |
|
246 | 246 | format = '>sI%is' % len(data) |
|
247 | 247 | f.write(_pack(format, key, len(data), data)) |
|
248 | 248 | f.close() |
|
249 | 249 | |
|
250 | 250 | def add(self, fcl, fco, fca, fd): |
|
251 | 251 | """add a new (potentially?) conflicting file the merge state |
|
252 | 252 | fcl: file context for local, |
|
253 | 253 | fco: file context for remote, |
|
254 | 254 | fca: file context for ancestors, |
|
255 | 255 | fd: file path of the resulting merge. |
|
256 | 256 | |
|
257 | 257 | note: also write the local version to the `.hg/merge` directory. |
|
258 | 258 | """ |
|
259 | 259 | hash = util.sha1(fcl.path()).hexdigest() |
|
260 | 260 | self._repo.vfs.write('merge/' + hash, fcl.data()) |
|
261 | 261 | self._state[fd] = ['u', hash, fcl.path(), |
|
262 | 262 | fca.path(), hex(fca.filenode()), |
|
263 | 263 | fco.path(), hex(fco.filenode()), |
|
264 | 264 | fcl.flags()] |
|
265 | 265 | self._dirty = True |
|
266 | 266 | |
|
267 | 267 | def __contains__(self, dfile): |
|
268 | 268 | return dfile in self._state |
|
269 | 269 | |
|
270 | 270 | def __getitem__(self, dfile): |
|
271 | 271 | return self._state[dfile][0] |
|
272 | 272 | |
|
273 | 273 | def __iter__(self): |
|
274 | 274 | return iter(sorted(self._state)) |
|
275 | 275 | |
|
276 | 276 | def files(self): |
|
277 | 277 | return self._state.keys() |
|
278 | 278 | |
|
279 | 279 | def mark(self, dfile, state): |
|
280 | 280 | self._state[dfile][0] = state |
|
281 | 281 | self._dirty = True |
|
282 | 282 | |
|
283 | 283 | def unresolved(self): |
|
284 | 284 | """Obtain the paths of unresolved files.""" |
|
285 | 285 | |
|
286 | 286 | for f, entry in self._state.items(): |
|
287 | 287 | if entry[0] == 'u': |
|
288 | 288 | yield f |
|
289 | 289 | |
|
290 | 290 | def _resolve(self, preresolve, dfile, wctx, labels=None): |
|
291 | 291 | """rerun merge process for file path `dfile`""" |
|
292 | 292 | if self[dfile] == 'r': |
|
293 | 293 | return True, 0 |
|
294 | 294 | stateentry = self._state[dfile] |
|
295 | 295 | state, hash, lfile, afile, anode, ofile, onode, flags = stateentry |
|
296 | 296 | octx = self._repo[self._other] |
|
297 | 297 | fcd = wctx[dfile] |
|
298 | 298 | fco = octx[ofile] |
|
299 | 299 | fca = self._repo.filectx(afile, fileid=anode) |
|
300 | 300 | # "premerge" x flags |
|
301 | 301 | flo = fco.flags() |
|
302 | 302 | fla = fca.flags() |
|
303 | 303 | if 'x' in flags + flo + fla and 'l' not in flags + flo + fla: |
|
304 | 304 | if fca.node() == nullid: |
|
305 | 305 | if preresolve: |
|
306 | 306 | self._repo.ui.warn( |
|
307 | 307 | _('warning: cannot merge flags for %s\n') % afile) |
|
308 | 308 | elif flags == fla: |
|
309 | 309 | flags = flo |
|
310 | 310 | if preresolve: |
|
311 | 311 | # restore local |
|
312 | 312 | f = self._repo.vfs('merge/' + hash) |
|
313 | 313 | self._repo.wwrite(dfile, f.read(), flags) |
|
314 | 314 | f.close() |
|
315 | 315 | complete, r = filemerge.premerge(self._repo, self._local, lfile, |
|
316 | 316 | fcd, fco, fca, labels=labels) |
|
317 | 317 | else: |
|
318 | 318 | complete, r = filemerge.filemerge(self._repo, self._local, lfile, |
|
319 | 319 | fcd, fco, fca, labels=labels) |
|
320 | 320 | if r is None: |
|
321 | 321 | # no real conflict |
|
322 | 322 | del self._state[dfile] |
|
323 | 323 | self._dirty = True |
|
324 | 324 | elif not r: |
|
325 | 325 | self.mark(dfile, 'r') |
|
326 | 326 | return complete, r |
|
327 | 327 | |
|
328 | 328 | def preresolve(self, dfile, wctx, labels=None): |
|
329 | 329 | return self._resolve(True, dfile, wctx, labels=labels) |
|
330 | 330 | |
|
331 | 331 | def resolve(self, dfile, wctx, labels=None): |
|
332 | 332 | """rerun merge process for file path `dfile`""" |
|
333 | 333 | return self._resolve(False, dfile, wctx, labels=labels)[1] |
|
334 | 334 | |
|
335 | 335 | def _checkunknownfile(repo, wctx, mctx, f, f2=None): |
|
336 | 336 | if f2 is None: |
|
337 | 337 | f2 = f |
|
338 | 338 | return (os.path.isfile(repo.wjoin(f)) |
|
339 | 339 | and repo.wvfs.audit.check(f) |
|
340 | 340 | and repo.dirstate.normalize(f) not in repo.dirstate |
|
341 | 341 | and mctx[f2].cmp(wctx[f])) |
|
342 | 342 | |
|
343 | 343 | def _checkunknownfiles(repo, wctx, mctx, force, actions): |
|
344 | 344 | """ |
|
345 | 345 | Considers any actions that care about the presence of conflicting unknown |
|
346 | 346 | files. For some actions, the result is to abort; for others, it is to |
|
347 | 347 | choose a different action. |
|
348 | 348 | """ |
|
349 | 349 | aborts = [] |
|
350 | 350 | if not force: |
|
351 | 351 | for f, (m, args, msg) in actions.iteritems(): |
|
352 | 352 | if m in ('c', 'dc'): |
|
353 | 353 | if _checkunknownfile(repo, wctx, mctx, f): |
|
354 | 354 | aborts.append(f) |
|
355 | 355 | elif m == 'dg': |
|
356 | 356 | if _checkunknownfile(repo, wctx, mctx, f, args[0]): |
|
357 | 357 | aborts.append(f) |
|
358 | 358 | |
|
359 | 359 | for f in sorted(aborts): |
|
360 | 360 | repo.ui.warn(_("%s: untracked file differs\n") % f) |
|
361 | 361 | if aborts: |
|
362 | 362 | raise error.Abort(_("untracked files in working directory differ " |
|
363 | 363 | "from files in requested revision")) |
|
364 | 364 | |
|
365 | 365 | for f, (m, args, msg) in actions.iteritems(): |
|
366 | 366 | if m == 'c': |
|
367 | 367 | actions[f] = ('g', args, msg) |
|
368 | 368 | elif m == 'cm': |
|
369 | 369 | fl2, anc = args |
|
370 | 370 | different = _checkunknownfile(repo, wctx, mctx, f) |
|
371 | 371 | if different: |
|
372 | 372 | actions[f] = ('m', (f, f, None, False, anc), |
|
373 | 373 | "remote differs from untracked local") |
|
374 | 374 | else: |
|
375 | 375 | actions[f] = ('g', (fl2,), "remote created") |
|
376 | 376 | |
|
377 | 377 | def _forgetremoved(wctx, mctx, branchmerge): |
|
378 | 378 | """ |
|
379 | 379 | Forget removed files |
|
380 | 380 | |
|
381 | 381 | If we're jumping between revisions (as opposed to merging), and if |
|
382 | 382 | neither the working directory nor the target rev has the file, |
|
383 | 383 | then we need to remove it from the dirstate, to prevent the |
|
384 | 384 | dirstate from listing the file when it is no longer in the |
|
385 | 385 | manifest. |
|
386 | 386 | |
|
387 | 387 | If we're merging, and the other revision has removed a file |
|
388 | 388 | that is not present in the working directory, we need to mark it |
|
389 | 389 | as removed. |
|
390 | 390 | """ |
|
391 | 391 | |
|
392 | 392 | actions = {} |
|
393 | 393 | m = 'f' |
|
394 | 394 | if branchmerge: |
|
395 | 395 | m = 'r' |
|
396 | 396 | for f in wctx.deleted(): |
|
397 | 397 | if f not in mctx: |
|
398 | 398 | actions[f] = m, None, "forget deleted" |
|
399 | 399 | |
|
400 | 400 | if not branchmerge: |
|
401 | 401 | for f in wctx.removed(): |
|
402 | 402 | if f not in mctx: |
|
403 | 403 | actions[f] = 'f', None, "forget removed" |
|
404 | 404 | |
|
405 | 405 | return actions |
|
406 | 406 | |
|
407 | 407 | def _checkcollision(repo, wmf, actions): |
|
408 | 408 | # build provisional merged manifest up |
|
409 | 409 | pmmf = set(wmf) |
|
410 | 410 | |
|
411 | 411 | if actions: |
|
412 | 412 | # k, dr, e and rd are no-op |
|
413 | 413 | for m in 'a', 'f', 'g', 'cd', 'dc': |
|
414 | 414 | for f, args, msg in actions[m]: |
|
415 | 415 | pmmf.add(f) |
|
416 | 416 | for f, args, msg in actions['r']: |
|
417 | 417 | pmmf.discard(f) |
|
418 | 418 | for f, args, msg in actions['dm']: |
|
419 | 419 | f2, flags = args |
|
420 | 420 | pmmf.discard(f2) |
|
421 | 421 | pmmf.add(f) |
|
422 | 422 | for f, args, msg in actions['dg']: |
|
423 | 423 | pmmf.add(f) |
|
424 | 424 | for f, args, msg in actions['m']: |
|
425 | 425 | f1, f2, fa, move, anc = args |
|
426 | 426 | if move: |
|
427 | 427 | pmmf.discard(f1) |
|
428 | 428 | pmmf.add(f) |
|
429 | 429 | |
|
430 | 430 | # check case-folding collision in provisional merged manifest |
|
431 | 431 | foldmap = {} |
|
432 | 432 | for f in sorted(pmmf): |
|
433 | 433 | fold = util.normcase(f) |
|
434 | 434 | if fold in foldmap: |
|
435 | 435 | raise error.Abort(_("case-folding collision between %s and %s") |
|
436 | 436 | % (f, foldmap[fold])) |
|
437 | 437 | foldmap[fold] = f |
|
438 | 438 | |
|
439 | 439 | def manifestmerge(repo, wctx, p2, pa, branchmerge, force, partial, |
|
440 | 440 | acceptremote, followcopies): |
|
441 | 441 | """ |
|
442 | 442 | Merge p1 and p2 with ancestor pa and generate merge action list |
|
443 | 443 | |
|
444 | 444 | branchmerge and force are as passed in to update |
|
445 | 445 | partial = function to filter file lists |
|
446 | 446 | acceptremote = accept the incoming changes without prompting |
|
447 | 447 | """ |
|
448 | 448 | |
|
449 | 449 | copy, movewithdir, diverge, renamedelete = {}, {}, {}, {} |
|
450 | 450 | |
|
451 | 451 | # manifests fetched in order are going to be faster, so prime the caches |
|
452 | 452 | [x.manifest() for x in |
|
453 | 453 | sorted(wctx.parents() + [p2, pa], key=lambda x: x.rev())] |
|
454 | 454 | |
|
455 | 455 | if followcopies: |
|
456 | 456 | ret = copies.mergecopies(repo, wctx, p2, pa) |
|
457 | 457 | copy, movewithdir, diverge, renamedelete = ret |
|
458 | 458 | |
|
459 | 459 | repo.ui.note(_("resolving manifests\n")) |
|
460 | 460 | repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n" |
|
461 | 461 | % (bool(branchmerge), bool(force), bool(partial))) |
|
462 | 462 | repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, wctx, p2)) |
|
463 | 463 | |
|
464 | 464 | m1, m2, ma = wctx.manifest(), p2.manifest(), pa.manifest() |
|
465 | 465 | copied = set(copy.values()) |
|
466 | 466 | copied.update(movewithdir.values()) |
|
467 | 467 | |
|
468 | 468 | if '.hgsubstate' in m1: |
|
469 | 469 | # check whether sub state is modified |
|
470 | 470 | for s in sorted(wctx.substate): |
|
471 | 471 | if wctx.sub(s).dirty(): |
|
472 | 472 | m1['.hgsubstate'] += '+' |
|
473 | 473 | break |
|
474 | 474 | |
|
475 | 475 | # Compare manifests |
|
476 | 476 | diff = m1.diff(m2) |
|
477 | 477 | |
|
478 | 478 | actions = {} |
|
479 | 479 | for f, ((n1, fl1), (n2, fl2)) in diff.iteritems(): |
|
480 | 480 | if partial and not partial(f): |
|
481 | 481 | continue |
|
482 | 482 | if n1 and n2: # file exists on both local and remote side |
|
483 | 483 | if f not in ma: |
|
484 | 484 | fa = copy.get(f, None) |
|
485 | 485 | if fa is not None: |
|
486 | 486 | actions[f] = ('m', (f, f, fa, False, pa.node()), |
|
487 | 487 | "both renamed from " + fa) |
|
488 | 488 | else: |
|
489 | 489 | actions[f] = ('m', (f, f, None, False, pa.node()), |
|
490 | 490 | "both created") |
|
491 | 491 | else: |
|
492 | 492 | a = ma[f] |
|
493 | 493 | fla = ma.flags(f) |
|
494 | 494 | nol = 'l' not in fl1 + fl2 + fla |
|
495 | 495 | if n2 == a and fl2 == fla: |
|
496 | 496 | actions[f] = ('k' , (), "remote unchanged") |
|
497 | 497 | elif n1 == a and fl1 == fla: # local unchanged - use remote |
|
498 | 498 | if n1 == n2: # optimization: keep local content |
|
499 | 499 | actions[f] = ('e', (fl2,), "update permissions") |
|
500 | 500 | else: |
|
501 | 501 | actions[f] = ('g', (fl2,), "remote is newer") |
|
502 | 502 | elif nol and n2 == a: # remote only changed 'x' |
|
503 | 503 | actions[f] = ('e', (fl2,), "update permissions") |
|
504 | 504 | elif nol and n1 == a: # local only changed 'x' |
|
505 | 505 | actions[f] = ('g', (fl1,), "remote is newer") |
|
506 | 506 | else: # both changed something |
|
507 | 507 | actions[f] = ('m', (f, f, f, False, pa.node()), |
|
508 | 508 | "versions differ") |
|
509 | 509 | elif n1: # file exists only on local side |
|
510 | 510 | if f in copied: |
|
511 | 511 | pass # we'll deal with it on m2 side |
|
512 | 512 | elif f in movewithdir: # directory rename, move local |
|
513 | 513 | f2 = movewithdir[f] |
|
514 | 514 | if f2 in m2: |
|
515 | 515 | actions[f2] = ('m', (f, f2, None, True, pa.node()), |
|
516 | 516 | "remote directory rename, both created") |
|
517 | 517 | else: |
|
518 | 518 | actions[f2] = ('dm', (f, fl1), |
|
519 | 519 | "remote directory rename - move from " + f) |
|
520 | 520 | elif f in copy: |
|
521 | 521 | f2 = copy[f] |
|
522 | 522 | actions[f] = ('m', (f, f2, f2, False, pa.node()), |
|
523 | 523 | "local copied/moved from " + f2) |
|
524 | 524 | elif f in ma: # clean, a different, no remote |
|
525 | 525 | if n1 != ma[f]: |
|
526 | 526 | if acceptremote: |
|
527 | 527 | actions[f] = ('r', None, "remote delete") |
|
528 | 528 | else: |
|
529 | 529 | actions[f] = ('cd', None, "prompt changed/deleted") |
|
530 | 530 | elif n1[20:] == 'a': |
|
531 | 531 | # This extra 'a' is added by working copy manifest to mark |
|
532 | 532 | # the file as locally added. We should forget it instead of |
|
533 | 533 | # deleting it. |
|
534 | 534 | actions[f] = ('f', None, "remote deleted") |
|
535 | 535 | else: |
|
536 | 536 | actions[f] = ('r', None, "other deleted") |
|
537 | 537 | elif n2: # file exists only on remote side |
|
538 | 538 | if f in copied: |
|
539 | 539 | pass # we'll deal with it on m1 side |
|
540 | 540 | elif f in movewithdir: |
|
541 | 541 | f2 = movewithdir[f] |
|
542 | 542 | if f2 in m1: |
|
543 | 543 | actions[f2] = ('m', (f2, f, None, False, pa.node()), |
|
544 | 544 | "local directory rename, both created") |
|
545 | 545 | else: |
|
546 | 546 | actions[f2] = ('dg', (f, fl2), |
|
547 | 547 | "local directory rename - get from " + f) |
|
548 | 548 | elif f in copy: |
|
549 | 549 | f2 = copy[f] |
|
550 | 550 | if f2 in m2: |
|
551 | 551 | actions[f] = ('m', (f2, f, f2, False, pa.node()), |
|
552 | 552 | "remote copied from " + f2) |
|
553 | 553 | else: |
|
554 | 554 | actions[f] = ('m', (f2, f, f2, True, pa.node()), |
|
555 | 555 | "remote moved from " + f2) |
|
556 | 556 | elif f not in ma: |
|
557 | 557 | # local unknown, remote created: the logic is described by the |
|
558 | 558 | # following table: |
|
559 | 559 | # |
|
560 | 560 | # force branchmerge different | action |
|
561 | 561 | # n * * | create |
|
562 | 562 | # y n * | create |
|
563 | 563 | # y y n | create |
|
564 | 564 | # y y y | merge |
|
565 | 565 | # |
|
566 | 566 | # Checking whether the files are different is expensive, so we |
|
567 | 567 | # don't do that when we can avoid it. |
|
568 | 568 | if not force: |
|
569 | 569 | actions[f] = ('c', (fl2,), "remote created") |
|
570 | 570 | elif not branchmerge: |
|
571 | 571 | actions[f] = ('c', (fl2,), "remote created") |
|
572 | 572 | else: |
|
573 | 573 | actions[f] = ('cm', (fl2, pa.node()), |
|
574 | 574 | "remote created, get or merge") |
|
575 | 575 | elif n2 != ma[f]: |
|
576 | 576 | if acceptremote: |
|
577 | 577 | actions[f] = ('c', (fl2,), "remote recreating") |
|
578 | 578 | else: |
|
579 | 579 | actions[f] = ('dc', (fl2,), "prompt deleted/changed") |
|
580 | 580 | |
|
581 | 581 | return actions, diverge, renamedelete |
|
582 | 582 | |
|
583 | 583 | def _resolvetrivial(repo, wctx, mctx, ancestor, actions): |
|
584 | 584 | """Resolves false conflicts where the nodeid changed but the content |
|
585 | 585 | remained the same.""" |
|
586 | 586 | |
|
587 | 587 | for f, (m, args, msg) in actions.items(): |
|
588 | 588 | if m == 'cd' and f in ancestor and not wctx[f].cmp(ancestor[f]): |
|
589 | 589 | # local did change but ended up with same content |
|
590 | 590 | actions[f] = 'r', None, "prompt same" |
|
591 | 591 | elif m == 'dc' and f in ancestor and not mctx[f].cmp(ancestor[f]): |
|
592 | 592 | # remote did change but ended up with same content |
|
593 | 593 | del actions[f] # don't get = keep local deleted |
|
594 | 594 | |
|
595 | 595 | def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, partial, |
|
596 | 596 | acceptremote, followcopies): |
|
597 | 597 | "Calculate the actions needed to merge mctx into wctx using ancestors" |
|
598 | 598 | |
|
599 | 599 | if len(ancestors) == 1: # default |
|
600 | 600 | actions, diverge, renamedelete = manifestmerge( |
|
601 | 601 | repo, wctx, mctx, ancestors[0], branchmerge, force, partial, |
|
602 | 602 | acceptremote, followcopies) |
|
603 | 603 | _checkunknownfiles(repo, wctx, mctx, force, actions) |
|
604 | 604 | |
|
605 | 605 | else: # only when merge.preferancestor=* - the default |
|
606 | 606 | repo.ui.note( |
|
607 | 607 | _("note: merging %s and %s using bids from ancestors %s\n") % |
|
608 | 608 | (wctx, mctx, _(' and ').join(str(anc) for anc in ancestors))) |
|
609 | 609 | |
|
610 | 610 | # Call for bids |
|
611 | 611 | fbids = {} # mapping filename to bids (action method to list af actions) |
|
612 | 612 | diverge, renamedelete = None, None |
|
613 | 613 | for ancestor in ancestors: |
|
614 | 614 | repo.ui.note(_('\ncalculating bids for ancestor %s\n') % ancestor) |
|
615 | 615 | actions, diverge1, renamedelete1 = manifestmerge( |
|
616 | 616 | repo, wctx, mctx, ancestor, branchmerge, force, partial, |
|
617 | 617 | acceptremote, followcopies) |
|
618 | 618 | _checkunknownfiles(repo, wctx, mctx, force, actions) |
|
619 | 619 | |
|
620 | 620 | # Track the shortest set of warning on the theory that bid |
|
621 | 621 | # merge will correctly incorporate more information |
|
622 | 622 | if diverge is None or len(diverge1) < len(diverge): |
|
623 | 623 | diverge = diverge1 |
|
624 | 624 | if renamedelete is None or len(renamedelete) < len(renamedelete1): |
|
625 | 625 | renamedelete = renamedelete1 |
|
626 | 626 | |
|
627 | 627 | for f, a in sorted(actions.iteritems()): |
|
628 | 628 | m, args, msg = a |
|
629 | 629 | repo.ui.debug(' %s: %s -> %s\n' % (f, msg, m)) |
|
630 | 630 | if f in fbids: |
|
631 | 631 | d = fbids[f] |
|
632 | 632 | if m in d: |
|
633 | 633 | d[m].append(a) |
|
634 | 634 | else: |
|
635 | 635 | d[m] = [a] |
|
636 | 636 | else: |
|
637 | 637 | fbids[f] = {m: [a]} |
|
638 | 638 | |
|
639 | 639 | # Pick the best bid for each file |
|
640 | 640 | repo.ui.note(_('\nauction for merging merge bids\n')) |
|
641 | 641 | actions = {} |
|
642 | 642 | for f, bids in sorted(fbids.items()): |
|
643 | 643 | # bids is a mapping from action method to list af actions |
|
644 | 644 | # Consensus? |
|
645 | 645 | if len(bids) == 1: # all bids are the same kind of method |
|
646 | 646 | m, l = bids.items()[0] |
|
647 | 647 | if all(a == l[0] for a in l[1:]): # len(bids) is > 1 |
|
648 | 648 | repo.ui.note(" %s: consensus for %s\n" % (f, m)) |
|
649 | 649 | actions[f] = l[0] |
|
650 | 650 | continue |
|
651 | 651 | # If keep is an option, just do it. |
|
652 | 652 | if 'k' in bids: |
|
653 | 653 | repo.ui.note(" %s: picking 'keep' action\n" % f) |
|
654 | 654 | actions[f] = bids['k'][0] |
|
655 | 655 | continue |
|
656 | 656 | # If there are gets and they all agree [how could they not?], do it. |
|
657 | 657 | if 'g' in bids: |
|
658 | 658 | ga0 = bids['g'][0] |
|
659 | 659 | if all(a == ga0 for a in bids['g'][1:]): |
|
660 | 660 | repo.ui.note(" %s: picking 'get' action\n" % f) |
|
661 | 661 | actions[f] = ga0 |
|
662 | 662 | continue |
|
663 | 663 | # TODO: Consider other simple actions such as mode changes |
|
664 | 664 | # Handle inefficient democrazy. |
|
665 | 665 | repo.ui.note(_(' %s: multiple bids for merge action:\n') % f) |
|
666 | 666 | for m, l in sorted(bids.items()): |
|
667 | 667 | for _f, args, msg in l: |
|
668 | 668 | repo.ui.note(' %s -> %s\n' % (msg, m)) |
|
669 | 669 | # Pick random action. TODO: Instead, prompt user when resolving |
|
670 | 670 | m, l = bids.items()[0] |
|
671 | 671 | repo.ui.warn(_(' %s: ambiguous merge - picked %s action\n') % |
|
672 | 672 | (f, m)) |
|
673 | 673 | actions[f] = l[0] |
|
674 | 674 | continue |
|
675 | 675 | repo.ui.note(_('end of auction\n\n')) |
|
676 | 676 | |
|
677 | 677 | _resolvetrivial(repo, wctx, mctx, ancestors[0], actions) |
|
678 | 678 | |
|
679 | 679 | if wctx.rev() is None: |
|
680 | 680 | fractions = _forgetremoved(wctx, mctx, branchmerge) |
|
681 | 681 | actions.update(fractions) |
|
682 | 682 | |
|
683 | 683 | return actions, diverge, renamedelete |
|
684 | 684 | |
|
685 | 685 | def batchremove(repo, actions): |
|
686 | 686 | """apply removes to the working directory |
|
687 | 687 | |
|
688 | 688 | yields tuples for progress updates |
|
689 | 689 | """ |
|
690 | 690 | verbose = repo.ui.verbose |
|
691 | 691 | unlink = util.unlinkpath |
|
692 | 692 | wjoin = repo.wjoin |
|
693 | 693 | audit = repo.wvfs.audit |
|
694 | 694 | i = 0 |
|
695 | 695 | for f, args, msg in actions: |
|
696 | 696 | repo.ui.debug(" %s: %s -> r\n" % (f, msg)) |
|
697 | 697 | if verbose: |
|
698 | 698 | repo.ui.note(_("removing %s\n") % f) |
|
699 | 699 | audit(f) |
|
700 | 700 | try: |
|
701 | 701 | unlink(wjoin(f), ignoremissing=True) |
|
702 | 702 | except OSError as inst: |
|
703 | 703 | repo.ui.warn(_("update failed to remove %s: %s!\n") % |
|
704 | 704 | (f, inst.strerror)) |
|
705 | 705 | if i == 100: |
|
706 | 706 | yield i, f |
|
707 | 707 | i = 0 |
|
708 | 708 | i += 1 |
|
709 | 709 | if i > 0: |
|
710 | 710 | yield i, f |
|
711 | 711 | |
|
712 | 712 | def batchget(repo, mctx, actions): |
|
713 | 713 | """apply gets to the working directory |
|
714 | 714 | |
|
715 | 715 | mctx is the context to get from |
|
716 | 716 | |
|
717 | 717 | yields tuples for progress updates |
|
718 | 718 | """ |
|
719 | 719 | verbose = repo.ui.verbose |
|
720 | 720 | fctx = mctx.filectx |
|
721 | 721 | wwrite = repo.wwrite |
|
722 | 722 | i = 0 |
|
723 | 723 | for f, args, msg in actions: |
|
724 | 724 | repo.ui.debug(" %s: %s -> g\n" % (f, msg)) |
|
725 | 725 | if verbose: |
|
726 | 726 | repo.ui.note(_("getting %s\n") % f) |
|
727 | 727 | wwrite(f, fctx(f).data(), args[0]) |
|
728 | 728 | if i == 100: |
|
729 | 729 | yield i, f |
|
730 | 730 | i = 0 |
|
731 | 731 | i += 1 |
|
732 | 732 | if i > 0: |
|
733 | 733 | yield i, f |
|
734 | 734 | |
|
735 | 735 | def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None): |
|
736 | 736 | """apply the merge action list to the working directory |
|
737 | 737 | |
|
738 | 738 | wctx is the working copy context |
|
739 | 739 | mctx is the context to be merged into the working copy |
|
740 | 740 | |
|
741 | 741 | Return a tuple of counts (updated, merged, removed, unresolved) that |
|
742 | 742 | describes how many files were affected by the update. |
|
743 | 743 | """ |
|
744 | 744 | |
|
745 | 745 | updated, merged, removed, unresolved = 0, 0, 0, 0 |
|
746 | 746 | ms = mergestate(repo) |
|
747 | 747 | ms.reset(wctx.p1().node(), mctx.node()) |
|
748 | 748 | moves = [] |
|
749 | 749 | for m, l in actions.items(): |
|
750 | 750 | l.sort() |
|
751 | 751 | |
|
752 | 752 | # prescan for merges |
|
753 | 753 | for f, args, msg in actions['m']: |
|
754 | 754 | f1, f2, fa, move, anc = args |
|
755 | 755 | if f == '.hgsubstate': # merged internally |
|
756 | 756 | continue |
|
757 | 757 | repo.ui.debug(" preserving %s for resolve of %s\n" % (f1, f)) |
|
758 | 758 | fcl = wctx[f1] |
|
759 | 759 | fco = mctx[f2] |
|
760 | 760 | actx = repo[anc] |
|
761 | 761 | if fa in actx: |
|
762 | 762 | fca = actx[fa] |
|
763 | 763 | else: |
|
764 | 764 | fca = repo.filectx(f1, fileid=nullrev) |
|
765 | 765 | ms.add(fcl, fco, fca, f) |
|
766 | 766 | if f1 != f and move: |
|
767 | 767 | moves.append(f1) |
|
768 | 768 | |
|
769 | 769 | audit = repo.wvfs.audit |
|
770 | 770 | _updating = _('updating') |
|
771 | 771 | _files = _('files') |
|
772 | 772 | progress = repo.ui.progress |
|
773 | 773 | |
|
774 | 774 | # remove renamed files after safely stored |
|
775 | 775 | for f in moves: |
|
776 | 776 | if os.path.lexists(repo.wjoin(f)): |
|
777 | 777 | repo.ui.debug("removing %s\n" % f) |
|
778 | 778 | audit(f) |
|
779 | 779 | util.unlinkpath(repo.wjoin(f)) |
|
780 | 780 | |
|
781 | 781 | numupdates = sum(len(l) for m, l in actions.items() if m != 'k') |
|
782 | 782 | |
|
783 | 783 | if [a for a in actions['r'] if a[0] == '.hgsubstate']: |
|
784 | 784 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
785 | 785 | |
|
786 | 786 | # remove in parallel (must come first) |
|
787 | 787 | z = 0 |
|
788 | 788 | prog = worker.worker(repo.ui, 0.001, batchremove, (repo,), actions['r']) |
|
789 | 789 | for i, item in prog: |
|
790 | 790 | z += i |
|
791 | 791 | progress(_updating, z, item=item, total=numupdates, unit=_files) |
|
792 | 792 | removed = len(actions['r']) |
|
793 | 793 | |
|
794 | 794 | # get in parallel |
|
795 | 795 | prog = worker.worker(repo.ui, 0.001, batchget, (repo, mctx), actions['g']) |
|
796 | 796 | for i, item in prog: |
|
797 | 797 | z += i |
|
798 | 798 | progress(_updating, z, item=item, total=numupdates, unit=_files) |
|
799 | 799 | updated = len(actions['g']) |
|
800 | 800 | |
|
801 | 801 | if [a for a in actions['g'] if a[0] == '.hgsubstate']: |
|
802 | 802 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
803 | 803 | |
|
804 | 804 | # forget (manifest only, just log it) (must come first) |
|
805 | 805 | for f, args, msg in actions['f']: |
|
806 | 806 | repo.ui.debug(" %s: %s -> f\n" % (f, msg)) |
|
807 | 807 | z += 1 |
|
808 | 808 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
809 | 809 | |
|
810 | 810 | # re-add (manifest only, just log it) |
|
811 | 811 | for f, args, msg in actions['a']: |
|
812 | 812 | repo.ui.debug(" %s: %s -> a\n" % (f, msg)) |
|
813 | 813 | z += 1 |
|
814 | 814 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
815 | 815 | |
|
816 | 816 | # keep (noop, just log it) |
|
817 | 817 | for f, args, msg in actions['k']: |
|
818 | 818 | repo.ui.debug(" %s: %s -> k\n" % (f, msg)) |
|
819 | 819 | # no progress |
|
820 | 820 | |
|
821 | 821 | # directory rename, move local |
|
822 | 822 | for f, args, msg in actions['dm']: |
|
823 | 823 | repo.ui.debug(" %s: %s -> dm\n" % (f, msg)) |
|
824 | 824 | z += 1 |
|
825 | 825 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
826 | 826 | f0, flags = args |
|
827 | 827 | repo.ui.note(_("moving %s to %s\n") % (f0, f)) |
|
828 | 828 | audit(f) |
|
829 | 829 | repo.wwrite(f, wctx.filectx(f0).data(), flags) |
|
830 | 830 | util.unlinkpath(repo.wjoin(f0)) |
|
831 | 831 | updated += 1 |
|
832 | 832 | |
|
833 | 833 | # local directory rename, get |
|
834 | 834 | for f, args, msg in actions['dg']: |
|
835 | 835 | repo.ui.debug(" %s: %s -> dg\n" % (f, msg)) |
|
836 | 836 | z += 1 |
|
837 | 837 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
838 | 838 | f0, flags = args |
|
839 | 839 | repo.ui.note(_("getting %s to %s\n") % (f0, f)) |
|
840 | 840 | repo.wwrite(f, mctx.filectx(f0).data(), flags) |
|
841 | 841 | updated += 1 |
|
842 | 842 | |
|
843 | 843 | # exec |
|
844 | 844 | for f, args, msg in actions['e']: |
|
845 | 845 | repo.ui.debug(" %s: %s -> e\n" % (f, msg)) |
|
846 | 846 | z += 1 |
|
847 | 847 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
848 | 848 | flags, = args |
|
849 | 849 | audit(f) |
|
850 | 850 | util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags) |
|
851 | 851 | updated += 1 |
|
852 | 852 | |
|
853 | # merge | |
|
853 | # premerge | |
|
854 | tocomplete = [] | |
|
854 | 855 | for f, args, msg in actions['m']: |
|
855 | repo.ui.debug(" %s: %s -> m\n" % (f, msg)) | |
|
856 | repo.ui.debug(" %s: %s -> m (premerge)\n" % (f, msg)) | |
|
856 | 857 | z += 1 |
|
857 | 858 | progress(_updating, z, item=f, total=numupdates, unit=_files) |
|
858 | 859 | if f == '.hgsubstate': # subrepo states need updating |
|
859 | 860 | subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), |
|
860 | 861 | overwrite) |
|
861 | 862 | continue |
|
862 | 863 | audit(f) |
|
863 | 864 | complete, r = ms.preresolve(f, wctx, labels=labels) |
|
864 |
if |
|
|
865 | r = ms.resolve(f, wctx, labels=labels) | |
|
865 | if complete: | |
|
866 | if r is not None and r > 0: | |
|
867 | unresolved += 1 | |
|
868 | else: | |
|
869 | if r is None: | |
|
870 | updated += 1 | |
|
871 | else: | |
|
872 | merged += 1 | |
|
873 | else: | |
|
874 | numupdates += 1 | |
|
875 | tocomplete.append((f, args, msg)) | |
|
876 | ||
|
877 | # merge | |
|
878 | for f, args, msg in tocomplete: | |
|
879 | repo.ui.debug(" %s: %s -> m (merge)\n" % (f, msg)) | |
|
880 | z += 1 | |
|
881 | progress(_updating, z, item=f, total=numupdates, unit=_files) | |
|
882 | r = ms.resolve(f, wctx, labels=labels) | |
|
866 | 883 | if r is not None and r > 0: |
|
867 | 884 | unresolved += 1 |
|
868 | 885 | else: |
|
869 | 886 | if r is None: |
|
870 | 887 | updated += 1 |
|
871 | 888 | else: |
|
872 | 889 | merged += 1 |
|
873 | 890 | |
|
874 | 891 | ms.commit() |
|
875 | 892 | progress(_updating, None, total=numupdates, unit=_files) |
|
876 | 893 | |
|
877 | 894 | return updated, merged, removed, unresolved |
|
878 | 895 | |
|
879 | 896 | def recordupdates(repo, actions, branchmerge): |
|
880 | 897 | "record merge actions to the dirstate" |
|
881 | 898 | # remove (must come first) |
|
882 | 899 | for f, args, msg in actions['r']: |
|
883 | 900 | if branchmerge: |
|
884 | 901 | repo.dirstate.remove(f) |
|
885 | 902 | else: |
|
886 | 903 | repo.dirstate.drop(f) |
|
887 | 904 | |
|
888 | 905 | # forget (must come first) |
|
889 | 906 | for f, args, msg in actions['f']: |
|
890 | 907 | repo.dirstate.drop(f) |
|
891 | 908 | |
|
892 | 909 | # re-add |
|
893 | 910 | for f, args, msg in actions['a']: |
|
894 | 911 | if not branchmerge: |
|
895 | 912 | repo.dirstate.add(f) |
|
896 | 913 | |
|
897 | 914 | # exec change |
|
898 | 915 | for f, args, msg in actions['e']: |
|
899 | 916 | repo.dirstate.normallookup(f) |
|
900 | 917 | |
|
901 | 918 | # keep |
|
902 | 919 | for f, args, msg in actions['k']: |
|
903 | 920 | pass |
|
904 | 921 | |
|
905 | 922 | # get |
|
906 | 923 | for f, args, msg in actions['g']: |
|
907 | 924 | if branchmerge: |
|
908 | 925 | repo.dirstate.otherparent(f) |
|
909 | 926 | else: |
|
910 | 927 | repo.dirstate.normal(f) |
|
911 | 928 | |
|
912 | 929 | # merge |
|
913 | 930 | for f, args, msg in actions['m']: |
|
914 | 931 | f1, f2, fa, move, anc = args |
|
915 | 932 | if branchmerge: |
|
916 | 933 | # We've done a branch merge, mark this file as merged |
|
917 | 934 | # so that we properly record the merger later |
|
918 | 935 | repo.dirstate.merge(f) |
|
919 | 936 | if f1 != f2: # copy/rename |
|
920 | 937 | if move: |
|
921 | 938 | repo.dirstate.remove(f1) |
|
922 | 939 | if f1 != f: |
|
923 | 940 | repo.dirstate.copy(f1, f) |
|
924 | 941 | else: |
|
925 | 942 | repo.dirstate.copy(f2, f) |
|
926 | 943 | else: |
|
927 | 944 | # We've update-merged a locally modified file, so |
|
928 | 945 | # we set the dirstate to emulate a normal checkout |
|
929 | 946 | # of that file some time in the past. Thus our |
|
930 | 947 | # merge will appear as a normal local file |
|
931 | 948 | # modification. |
|
932 | 949 | if f2 == f: # file not locally copied/moved |
|
933 | 950 | repo.dirstate.normallookup(f) |
|
934 | 951 | if move: |
|
935 | 952 | repo.dirstate.drop(f1) |
|
936 | 953 | |
|
937 | 954 | # directory rename, move local |
|
938 | 955 | for f, args, msg in actions['dm']: |
|
939 | 956 | f0, flag = args |
|
940 | 957 | if branchmerge: |
|
941 | 958 | repo.dirstate.add(f) |
|
942 | 959 | repo.dirstate.remove(f0) |
|
943 | 960 | repo.dirstate.copy(f0, f) |
|
944 | 961 | else: |
|
945 | 962 | repo.dirstate.normal(f) |
|
946 | 963 | repo.dirstate.drop(f0) |
|
947 | 964 | |
|
948 | 965 | # directory rename, get |
|
949 | 966 | for f, args, msg in actions['dg']: |
|
950 | 967 | f0, flag = args |
|
951 | 968 | if branchmerge: |
|
952 | 969 | repo.dirstate.add(f) |
|
953 | 970 | repo.dirstate.copy(f0, f) |
|
954 | 971 | else: |
|
955 | 972 | repo.dirstate.normal(f) |
|
956 | 973 | |
|
957 | 974 | def update(repo, node, branchmerge, force, partial, ancestor=None, |
|
958 | 975 | mergeancestor=False, labels=None): |
|
959 | 976 | """ |
|
960 | 977 | Perform a merge between the working directory and the given node |
|
961 | 978 | |
|
962 | 979 | node = the node to update to, or None if unspecified |
|
963 | 980 | branchmerge = whether to merge between branches |
|
964 | 981 | force = whether to force branch merging or file overwriting |
|
965 | 982 | partial = a function to filter file lists (dirstate not updated) |
|
966 | 983 | mergeancestor = whether it is merging with an ancestor. If true, |
|
967 | 984 | we should accept the incoming changes for any prompts that occur. |
|
968 | 985 | If false, merging with an ancestor (fast-forward) is only allowed |
|
969 | 986 | between different named branches. This flag is used by rebase extension |
|
970 | 987 | as a temporary fix and should be avoided in general. |
|
971 | 988 | |
|
972 | 989 | The table below shows all the behaviors of the update command |
|
973 | 990 | given the -c and -C or no options, whether the working directory |
|
974 | 991 | is dirty, whether a revision is specified, and the relationship of |
|
975 | 992 | the parent rev to the target rev (linear, on the same named |
|
976 | 993 | branch, or on another named branch). |
|
977 | 994 | |
|
978 | 995 | This logic is tested by test-update-branches.t. |
|
979 | 996 | |
|
980 | 997 | -c -C dirty rev | linear same cross |
|
981 | 998 | n n n n | ok (1) x |
|
982 | 999 | n n n y | ok ok ok |
|
983 | 1000 | n n y n | merge (2) (2) |
|
984 | 1001 | n n y y | merge (3) (3) |
|
985 | 1002 | n y * * | --- discard --- |
|
986 | 1003 | y n y * | --- (4) --- |
|
987 | 1004 | y n n * | --- ok --- |
|
988 | 1005 | y y * * | --- (5) --- |
|
989 | 1006 | |
|
990 | 1007 | x = can't happen |
|
991 | 1008 | * = don't-care |
|
992 | 1009 | 1 = abort: not a linear update (merge or update --check to force update) |
|
993 | 1010 | 2 = abort: uncommitted changes (commit and merge, or update --clean to |
|
994 | 1011 | discard changes) |
|
995 | 1012 | 3 = abort: uncommitted changes (commit or update --clean to discard changes) |
|
996 | 1013 | 4 = abort: uncommitted changes (checked in commands.py) |
|
997 | 1014 | 5 = incompatible options (checked in commands.py) |
|
998 | 1015 | |
|
999 | 1016 | Return the same tuple as applyupdates(). |
|
1000 | 1017 | """ |
|
1001 | 1018 | |
|
1002 | 1019 | onode = node |
|
1003 | 1020 | wlock = repo.wlock() |
|
1004 | 1021 | try: |
|
1005 | 1022 | wc = repo[None] |
|
1006 | 1023 | pl = wc.parents() |
|
1007 | 1024 | p1 = pl[0] |
|
1008 | 1025 | pas = [None] |
|
1009 | 1026 | if ancestor is not None: |
|
1010 | 1027 | pas = [repo[ancestor]] |
|
1011 | 1028 | |
|
1012 | 1029 | if node is None: |
|
1013 | 1030 | node = repo[destutil.destupdate(repo)].node() |
|
1014 | 1031 | |
|
1015 | 1032 | overwrite = force and not branchmerge |
|
1016 | 1033 | |
|
1017 | 1034 | p2 = repo[node] |
|
1018 | 1035 | if pas[0] is None: |
|
1019 | 1036 | if repo.ui.configlist('merge', 'preferancestor', ['*']) == ['*']: |
|
1020 | 1037 | cahs = repo.changelog.commonancestorsheads(p1.node(), p2.node()) |
|
1021 | 1038 | pas = [repo[anc] for anc in (sorted(cahs) or [nullid])] |
|
1022 | 1039 | else: |
|
1023 | 1040 | pas = [p1.ancestor(p2, warn=branchmerge)] |
|
1024 | 1041 | |
|
1025 | 1042 | fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) |
|
1026 | 1043 | |
|
1027 | 1044 | ### check phase |
|
1028 | 1045 | if not overwrite and len(pl) > 1: |
|
1029 | 1046 | raise error.Abort(_("outstanding uncommitted merge")) |
|
1030 | 1047 | if branchmerge: |
|
1031 | 1048 | if pas == [p2]: |
|
1032 | 1049 | raise error.Abort(_("merging with a working directory ancestor" |
|
1033 | 1050 | " has no effect")) |
|
1034 | 1051 | elif pas == [p1]: |
|
1035 | 1052 | if not mergeancestor and p1.branch() == p2.branch(): |
|
1036 | 1053 | raise error.Abort(_("nothing to merge"), |
|
1037 | 1054 | hint=_("use 'hg update' " |
|
1038 | 1055 | "or check 'hg heads'")) |
|
1039 | 1056 | if not force and (wc.files() or wc.deleted()): |
|
1040 | 1057 | raise error.Abort(_("uncommitted changes"), |
|
1041 | 1058 | hint=_("use 'hg status' to list changes")) |
|
1042 | 1059 | for s in sorted(wc.substate): |
|
1043 | 1060 | wc.sub(s).bailifchanged() |
|
1044 | 1061 | |
|
1045 | 1062 | elif not overwrite: |
|
1046 | 1063 | if p1 == p2: # no-op update |
|
1047 | 1064 | # call the hooks and exit early |
|
1048 | 1065 | repo.hook('preupdate', throw=True, parent1=xp2, parent2='') |
|
1049 | 1066 | repo.hook('update', parent1=xp2, parent2='', error=0) |
|
1050 | 1067 | return 0, 0, 0, 0 |
|
1051 | 1068 | |
|
1052 | 1069 | if pas not in ([p1], [p2]): # nonlinear |
|
1053 | 1070 | dirty = wc.dirty(missing=True) |
|
1054 | 1071 | if dirty or onode is None: |
|
1055 | 1072 | # Branching is a bit strange to ensure we do the minimal |
|
1056 | 1073 | # amount of call to obsolete.background. |
|
1057 | 1074 | foreground = obsolete.foreground(repo, [p1.node()]) |
|
1058 | 1075 | # note: the <node> variable contains a random identifier |
|
1059 | 1076 | if repo[node].node() in foreground: |
|
1060 | 1077 | pas = [p1] # allow updating to successors |
|
1061 | 1078 | elif dirty: |
|
1062 | 1079 | msg = _("uncommitted changes") |
|
1063 | 1080 | if onode is None: |
|
1064 | 1081 | hint = _("commit and merge, or update --clean to" |
|
1065 | 1082 | " discard changes") |
|
1066 | 1083 | else: |
|
1067 | 1084 | hint = _("commit or update --clean to discard" |
|
1068 | 1085 | " changes") |
|
1069 | 1086 | raise error.Abort(msg, hint=hint) |
|
1070 | 1087 | else: # node is none |
|
1071 | 1088 | msg = _("not a linear update") |
|
1072 | 1089 | hint = _("merge or update --check to force update") |
|
1073 | 1090 | raise error.Abort(msg, hint=hint) |
|
1074 | 1091 | else: |
|
1075 | 1092 | # Allow jumping branches if clean and specific rev given |
|
1076 | 1093 | pas = [p1] |
|
1077 | 1094 | |
|
1078 | 1095 | # deprecated config: merge.followcopies |
|
1079 | 1096 | followcopies = False |
|
1080 | 1097 | if overwrite: |
|
1081 | 1098 | pas = [wc] |
|
1082 | 1099 | elif pas == [p2]: # backwards |
|
1083 | 1100 | pas = [wc.p1()] |
|
1084 | 1101 | elif not branchmerge and not wc.dirty(missing=True): |
|
1085 | 1102 | pass |
|
1086 | 1103 | elif pas[0] and repo.ui.configbool('merge', 'followcopies', True): |
|
1087 | 1104 | followcopies = True |
|
1088 | 1105 | |
|
1089 | 1106 | ### calculate phase |
|
1090 | 1107 | actionbyfile, diverge, renamedelete = calculateupdates( |
|
1091 | 1108 | repo, wc, p2, pas, branchmerge, force, partial, mergeancestor, |
|
1092 | 1109 | followcopies) |
|
1093 | 1110 | # Convert to dictionary-of-lists format |
|
1094 | 1111 | actions = dict((m, []) for m in 'a f g cd dc r dm dg m e k'.split()) |
|
1095 | 1112 | for f, (m, args, msg) in actionbyfile.iteritems(): |
|
1096 | 1113 | if m not in actions: |
|
1097 | 1114 | actions[m] = [] |
|
1098 | 1115 | actions[m].append((f, args, msg)) |
|
1099 | 1116 | |
|
1100 | 1117 | if not util.checkcase(repo.path): |
|
1101 | 1118 | # check collision between files only in p2 for clean update |
|
1102 | 1119 | if (not branchmerge and |
|
1103 | 1120 | (force or not wc.dirty(missing=True, branch=False))): |
|
1104 | 1121 | _checkcollision(repo, p2.manifest(), None) |
|
1105 | 1122 | else: |
|
1106 | 1123 | _checkcollision(repo, wc.manifest(), actions) |
|
1107 | 1124 | |
|
1108 | 1125 | # Prompt and create actions. TODO: Move this towards resolve phase. |
|
1109 | 1126 | for f, args, msg in sorted(actions['cd']): |
|
1110 | 1127 | if repo.ui.promptchoice( |
|
1111 | 1128 | _("local changed %s which remote deleted\n" |
|
1112 | 1129 | "use (c)hanged version or (d)elete?" |
|
1113 | 1130 | "$$ &Changed $$ &Delete") % f, 0): |
|
1114 | 1131 | actions['r'].append((f, None, "prompt delete")) |
|
1115 | 1132 | else: |
|
1116 | 1133 | actions['a'].append((f, None, "prompt keep")) |
|
1117 | 1134 | del actions['cd'][:] |
|
1118 | 1135 | |
|
1119 | 1136 | for f, args, msg in sorted(actions['dc']): |
|
1120 | 1137 | flags, = args |
|
1121 | 1138 | if repo.ui.promptchoice( |
|
1122 | 1139 | _("remote changed %s which local deleted\n" |
|
1123 | 1140 | "use (c)hanged version or leave (d)eleted?" |
|
1124 | 1141 | "$$ &Changed $$ &Deleted") % f, 0) == 0: |
|
1125 | 1142 | actions['g'].append((f, (flags,), "prompt recreating")) |
|
1126 | 1143 | del actions['dc'][:] |
|
1127 | 1144 | |
|
1128 | 1145 | ### apply phase |
|
1129 | 1146 | if not branchmerge: # just jump to the new rev |
|
1130 | 1147 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' |
|
1131 | 1148 | if not partial: |
|
1132 | 1149 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) |
|
1133 | 1150 | # note that we're in the middle of an update |
|
1134 | 1151 | repo.vfs.write('updatestate', p2.hex()) |
|
1135 | 1152 | |
|
1136 | 1153 | stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) |
|
1137 | 1154 | |
|
1138 | 1155 | # divergent renames |
|
1139 | 1156 | for f, fl in sorted(diverge.iteritems()): |
|
1140 | 1157 | repo.ui.warn(_("note: possible conflict - %s was renamed " |
|
1141 | 1158 | "multiple times to:\n") % f) |
|
1142 | 1159 | for nf in fl: |
|
1143 | 1160 | repo.ui.warn(" %s\n" % nf) |
|
1144 | 1161 | |
|
1145 | 1162 | # rename and delete |
|
1146 | 1163 | for f, fl in sorted(renamedelete.iteritems()): |
|
1147 | 1164 | repo.ui.warn(_("note: possible conflict - %s was deleted " |
|
1148 | 1165 | "and renamed to:\n") % f) |
|
1149 | 1166 | for nf in fl: |
|
1150 | 1167 | repo.ui.warn(" %s\n" % nf) |
|
1151 | 1168 | |
|
1152 | 1169 | if not partial: |
|
1153 | 1170 | repo.dirstate.beginparentchange() |
|
1154 | 1171 | repo.setparents(fp1, fp2) |
|
1155 | 1172 | recordupdates(repo, actions, branchmerge) |
|
1156 | 1173 | # update completed, clear state |
|
1157 | 1174 | util.unlink(repo.join('updatestate')) |
|
1158 | 1175 | |
|
1159 | 1176 | if not branchmerge: |
|
1160 | 1177 | repo.dirstate.setbranch(p2.branch()) |
|
1161 | 1178 | repo.dirstate.endparentchange() |
|
1162 | 1179 | finally: |
|
1163 | 1180 | wlock.release() |
|
1164 | 1181 | |
|
1165 | 1182 | if not partial: |
|
1166 | 1183 | def updatehook(parent1=xp1, parent2=xp2, error=stats[3]): |
|
1167 | 1184 | repo.hook('update', parent1=parent1, parent2=parent2, error=error) |
|
1168 | 1185 | repo._afterlock(updatehook) |
|
1169 | 1186 | return stats |
|
1170 | 1187 | |
|
1171 | 1188 | def graft(repo, ctx, pctx, labels): |
|
1172 | 1189 | """Do a graft-like merge. |
|
1173 | 1190 | |
|
1174 | 1191 | This is a merge where the merge ancestor is chosen such that one |
|
1175 | 1192 | or more changesets are grafted onto the current changeset. In |
|
1176 | 1193 | addition to the merge, this fixes up the dirstate to include only |
|
1177 | 1194 | a single parent and tries to duplicate any renames/copies |
|
1178 | 1195 | appropriately. |
|
1179 | 1196 | |
|
1180 | 1197 | ctx - changeset to rebase |
|
1181 | 1198 | pctx - merge base, usually ctx.p1() |
|
1182 | 1199 | labels - merge labels eg ['local', 'graft'] |
|
1183 | 1200 | |
|
1184 | 1201 | """ |
|
1185 | 1202 | # If we're grafting a descendant onto an ancestor, be sure to pass |
|
1186 | 1203 | # mergeancestor=True to update. This does two things: 1) allows the merge if |
|
1187 | 1204 | # the destination is the same as the parent of the ctx (so we can use graft |
|
1188 | 1205 | # to copy commits), and 2) informs update that the incoming changes are |
|
1189 | 1206 | # newer than the destination so it doesn't prompt about "remote changed foo |
|
1190 | 1207 | # which local deleted". |
|
1191 | 1208 | mergeancestor = repo.changelog.isancestor(repo['.'].node(), ctx.node()) |
|
1192 | 1209 | |
|
1193 | 1210 | stats = update(repo, ctx.node(), True, True, False, pctx.node(), |
|
1194 | 1211 | mergeancestor=mergeancestor, labels=labels) |
|
1195 | 1212 | |
|
1196 | 1213 | # drop the second merge parent |
|
1197 | 1214 | repo.dirstate.beginparentchange() |
|
1198 | 1215 | repo.setparents(repo['.'].node(), nullid) |
|
1199 | 1216 | repo.dirstate.write() |
|
1200 | 1217 | # fix up dirstate for copies and renames |
|
1201 | 1218 | copies.duplicatecopies(repo, ctx.rev(), pctx.rev()) |
|
1202 | 1219 | repo.dirstate.endparentchange() |
|
1203 | 1220 | return stats |
@@ -1,165 +1,165 b'' | |||
|
1 | 1 | $ hg init t |
|
2 | 2 | $ cd t |
|
3 | 3 | |
|
4 | 4 | $ echo 1 > a |
|
5 | 5 | $ hg ci -qAm "first" |
|
6 | 6 | |
|
7 | 7 | $ hg cp a b |
|
8 | 8 | $ hg mv a c |
|
9 | 9 | $ echo 2 >> b |
|
10 | 10 | $ echo 2 >> c |
|
11 | 11 | |
|
12 | 12 | $ hg ci -qAm "second" |
|
13 | 13 | |
|
14 | 14 | $ hg co -C 0 |
|
15 | 15 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
16 | 16 | |
|
17 | 17 | $ echo 0 > a |
|
18 | 18 | $ echo 1 >> a |
|
19 | 19 | |
|
20 | 20 | $ hg ci -qAm "other" |
|
21 | 21 | |
|
22 | 22 | $ hg merge --debug |
|
23 | 23 | searching for copies back to rev 1 |
|
24 | 24 | unmatched files in other: |
|
25 | 25 | b |
|
26 | 26 | c |
|
27 | 27 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
28 | 28 | src: 'a' -> dst: 'b' * |
|
29 | 29 | src: 'a' -> dst: 'c' * |
|
30 | 30 | checking for directory renames |
|
31 | 31 | resolving manifests |
|
32 | 32 | branchmerge: True, force: False, partial: False |
|
33 | 33 | ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6 |
|
34 | 34 | preserving a for resolve of b |
|
35 | 35 | preserving a for resolve of c |
|
36 | 36 | removing a |
|
37 | b: remote moved from a -> m | |
|
37 | b: remote moved from a -> m (premerge) | |
|
38 | 38 | picked tool ':merge' for b (binary False symlink False) |
|
39 | 39 | merging a and b to b |
|
40 | 40 | my b@add3f11052fa+ other b@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
41 | 41 | premerge successful |
|
42 | c: remote moved from a -> m | |
|
42 | c: remote moved from a -> m (premerge) | |
|
43 | 43 | picked tool ':merge' for c (binary False symlink False) |
|
44 | 44 | merging a and c to c |
|
45 | 45 | my c@add3f11052fa+ other c@17c05bb7fcb6 ancestor a@b8bf91eeebbc |
|
46 | 46 | premerge successful |
|
47 | 47 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
48 | 48 | (branch merge, don't forget to commit) |
|
49 | 49 | |
|
50 | 50 | file b |
|
51 | 51 | $ cat b |
|
52 | 52 | 0 |
|
53 | 53 | 1 |
|
54 | 54 | 2 |
|
55 | 55 | |
|
56 | 56 | file c |
|
57 | 57 | $ cat c |
|
58 | 58 | 0 |
|
59 | 59 | 1 |
|
60 | 60 | 2 |
|
61 | 61 | |
|
62 | 62 | Test disabling copy tracing |
|
63 | 63 | |
|
64 | 64 | - first verify copy metadata was kept |
|
65 | 65 | |
|
66 | 66 | $ hg up -qC 2 |
|
67 | 67 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= |
|
68 | 68 | rebasing 2:add3f11052fa "other" (tip) |
|
69 | 69 | merging b and a to b |
|
70 | 70 | merging c and a to c |
|
71 | 71 | |
|
72 | 72 | $ cat b |
|
73 | 73 | 0 |
|
74 | 74 | 1 |
|
75 | 75 | 2 |
|
76 | 76 | |
|
77 | 77 | - next verify copy metadata is lost when disabled |
|
78 | 78 | |
|
79 | 79 | $ hg strip -r . --config extensions.strip= |
|
80 | 80 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
81 | 81 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/550bd84c0cd3-fc575957-backup.hg (glob) |
|
82 | 82 | $ hg up -qC 2 |
|
83 | 83 | $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True |
|
84 | 84 | rebasing 2:add3f11052fa "other" (tip) |
|
85 | 85 | remote changed a which local deleted |
|
86 | 86 | use (c)hanged version or leave (d)eleted? c |
|
87 | 87 | |
|
88 | 88 | $ cat b |
|
89 | 89 | 1 |
|
90 | 90 | 2 |
|
91 | 91 | |
|
92 | 92 | $ cd .. |
|
93 | 93 | |
|
94 | 94 | Verify disabling copy tracing still keeps copies from rebase source |
|
95 | 95 | |
|
96 | 96 | $ hg init copydisable |
|
97 | 97 | $ cd copydisable |
|
98 | 98 | $ touch a |
|
99 | 99 | $ hg ci -Aqm 'add a' |
|
100 | 100 | $ touch b |
|
101 | 101 | $ hg ci -Aqm 'add b, c' |
|
102 | 102 | $ hg cp b x |
|
103 | 103 | $ echo x >> x |
|
104 | 104 | $ hg ci -qm 'copy b->x' |
|
105 | 105 | $ hg up -q 1 |
|
106 | 106 | $ touch z |
|
107 | 107 | $ hg ci -Aqm 'add z' |
|
108 | 108 | $ hg log -G -T '{rev} {desc}\n' |
|
109 | 109 | @ 3 add z |
|
110 | 110 | | |
|
111 | 111 | | o 2 copy b->x |
|
112 | 112 | |/ |
|
113 | 113 | o 1 add b, c |
|
114 | 114 | | |
|
115 | 115 | o 0 add a |
|
116 | 116 | |
|
117 | 117 | $ hg rebase -d . -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True |
|
118 | 118 | rebasing 2:6adcf8c12e7d "copy b->x" |
|
119 | 119 | saved backup bundle to $TESTTMP/copydisable/.hg/strip-backup/6adcf8c12e7d-ce4b3e75-backup.hg (glob) |
|
120 | 120 | $ hg up -q 3 |
|
121 | 121 | $ hg log -f x -T '{rev} {desc}\n' |
|
122 | 122 | 3 copy b->x |
|
123 | 123 | 1 add b, c |
|
124 | 124 | |
|
125 | 125 | $ cd ../ |
|
126 | 126 | |
|
127 | 127 | Verify we duplicate existing copies, instead of detecting them |
|
128 | 128 | |
|
129 | 129 | $ hg init copydisable3 |
|
130 | 130 | $ cd copydisable3 |
|
131 | 131 | $ touch a |
|
132 | 132 | $ hg ci -Aqm 'add a' |
|
133 | 133 | $ hg cp a b |
|
134 | 134 | $ hg ci -Aqm 'copy a->b' |
|
135 | 135 | $ hg mv b c |
|
136 | 136 | $ hg ci -Aqm 'move b->c' |
|
137 | 137 | $ hg up -q 0 |
|
138 | 138 | $ hg cp a b |
|
139 | 139 | $ echo b >> b |
|
140 | 140 | $ hg ci -Aqm 'copy a->b (2)' |
|
141 | 141 | $ hg log -G -T '{rev} {desc}\n' |
|
142 | 142 | @ 3 copy a->b (2) |
|
143 | 143 | | |
|
144 | 144 | | o 2 move b->c |
|
145 | 145 | | | |
|
146 | 146 | | o 1 copy a->b |
|
147 | 147 | |/ |
|
148 | 148 | o 0 add a |
|
149 | 149 | |
|
150 | 150 | $ hg rebase -d 2 -s 3 --config extensions.rebase= --config experimental.disablecopytrace=True |
|
151 | 151 | rebasing 3:47e1a9e6273b "copy a->b (2)" (tip) |
|
152 | 152 | saved backup bundle to $TESTTMP/copydisable3/.hg/strip-backup/47e1a9e6273b-2d099c59-backup.hg (glob) |
|
153 | 153 | |
|
154 | 154 | $ hg log -G -f b |
|
155 | 155 | @ changeset: 3:76024fb4b05b |
|
156 | 156 | | tag: tip |
|
157 | 157 | | user: test |
|
158 | 158 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
159 | 159 | | summary: copy a->b (2) |
|
160 | 160 | | |
|
161 | 161 | o changeset: 0:ac82d8b1f7c4 |
|
162 | 162 | user: test |
|
163 | 163 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
164 | 164 | summary: add a |
|
165 | 165 |
@@ -1,65 +1,65 b'' | |||
|
1 | 1 | $ hg init repo |
|
2 | 2 | $ cd repo |
|
3 | 3 | |
|
4 | 4 | $ echo line 1 > foo |
|
5 | 5 | $ hg ci -qAm 'add foo' |
|
6 | 6 | |
|
7 | 7 | copy foo to bar and change both files |
|
8 | 8 | $ hg cp foo bar |
|
9 | 9 | $ echo line 2-1 >> foo |
|
10 | 10 | $ echo line 2-2 >> bar |
|
11 | 11 | $ hg ci -m 'cp foo bar; change both' |
|
12 | 12 | |
|
13 | 13 | in another branch, change foo in a way that doesn't conflict with |
|
14 | 14 | the other changes |
|
15 | 15 | $ hg up -qC 0 |
|
16 | 16 | $ echo line 0 > foo |
|
17 | 17 | $ hg cat foo >> foo |
|
18 | 18 | $ hg ci -m 'change foo' |
|
19 | 19 | created new head |
|
20 | 20 | |
|
21 | 21 | we get conflicts that shouldn't be there |
|
22 | 22 | $ hg merge -P |
|
23 | 23 | changeset: 1:484bf6903104 |
|
24 | 24 | user: test |
|
25 | 25 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
26 | 26 | summary: cp foo bar; change both |
|
27 | 27 | |
|
28 | 28 | $ hg merge --debug |
|
29 | 29 | searching for copies back to rev 1 |
|
30 | 30 | unmatched files in other: |
|
31 | 31 | bar |
|
32 | 32 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
33 | 33 | src: 'foo' -> dst: 'bar' * |
|
34 | 34 | checking for directory renames |
|
35 | 35 | resolving manifests |
|
36 | 36 | branchmerge: True, force: False, partial: False |
|
37 | 37 | ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104 |
|
38 | 38 | preserving foo for resolve of bar |
|
39 | 39 | preserving foo for resolve of foo |
|
40 | bar: remote copied from foo -> m | |
|
40 | bar: remote copied from foo -> m (premerge) | |
|
41 | 41 | picked tool ':merge' for bar (binary False symlink False) |
|
42 | 42 | merging foo and bar to bar |
|
43 | 43 | my bar@6a0df1dad128+ other bar@484bf6903104 ancestor foo@e6dc8efe11cc |
|
44 | 44 | premerge successful |
|
45 | foo: versions differ -> m | |
|
45 | foo: versions differ -> m (premerge) | |
|
46 | 46 | picked tool ':merge' for foo (binary False symlink False) |
|
47 | 47 | merging foo |
|
48 | 48 | my foo@6a0df1dad128+ other foo@484bf6903104 ancestor foo@e6dc8efe11cc |
|
49 | 49 | premerge successful |
|
50 | 50 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
51 | 51 | (branch merge, don't forget to commit) |
|
52 | 52 | |
|
53 | 53 | contents of foo |
|
54 | 54 | $ cat foo |
|
55 | 55 | line 0 |
|
56 | 56 | line 1 |
|
57 | 57 | line 2-1 |
|
58 | 58 | |
|
59 | 59 | contents of bar |
|
60 | 60 | $ cat bar |
|
61 | 61 | line 0 |
|
62 | 62 | line 1 |
|
63 | 63 | line 2-2 |
|
64 | 64 | |
|
65 | 65 | $ cd .. |
@@ -1,817 +1,818 b'' | |||
|
1 | 1 | Create a repo with some stuff in it: |
|
2 | 2 | |
|
3 | 3 | $ hg init a |
|
4 | 4 | $ cd a |
|
5 | 5 | $ echo a > a |
|
6 | 6 | $ echo a > d |
|
7 | 7 | $ echo a > e |
|
8 | 8 | $ hg ci -qAm0 |
|
9 | 9 | $ echo b > a |
|
10 | 10 | $ hg ci -m1 -u bar |
|
11 | 11 | $ hg mv a b |
|
12 | 12 | $ hg ci -m2 |
|
13 | 13 | $ hg cp b c |
|
14 | 14 | $ hg ci -m3 -u baz |
|
15 | 15 | $ echo b > d |
|
16 | 16 | $ echo f > e |
|
17 | 17 | $ hg ci -m4 |
|
18 | 18 | $ hg up -q 3 |
|
19 | 19 | $ echo b > e |
|
20 | 20 | $ hg branch -q stable |
|
21 | 21 | $ hg ci -m5 |
|
22 | 22 | $ hg merge -q default --tool internal:local |
|
23 | 23 | $ hg branch -q default |
|
24 | 24 | $ hg ci -m6 |
|
25 | 25 | $ hg phase --public 3 |
|
26 | 26 | $ hg phase --force --secret 6 |
|
27 | 27 | |
|
28 | 28 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
29 | 29 | @ test@6.secret: 6 |
|
30 | 30 | |\ |
|
31 | 31 | | o test@5.draft: 5 |
|
32 | 32 | | | |
|
33 | 33 | o | test@4.draft: 4 |
|
34 | 34 | |/ |
|
35 | 35 | o baz@3.public: 3 |
|
36 | 36 | | |
|
37 | 37 | o test@2.public: 2 |
|
38 | 38 | | |
|
39 | 39 | o bar@1.public: 1 |
|
40 | 40 | | |
|
41 | 41 | o test@0.public: 0 |
|
42 | 42 | |
|
43 | 43 | |
|
44 | 44 | Need to specify a rev: |
|
45 | 45 | |
|
46 | 46 | $ hg graft |
|
47 | 47 | abort: no revisions specified |
|
48 | 48 | [255] |
|
49 | 49 | |
|
50 | 50 | Can't graft ancestor: |
|
51 | 51 | |
|
52 | 52 | $ hg graft 1 2 |
|
53 | 53 | skipping ancestor revision 1:5d205f8b35b6 |
|
54 | 54 | skipping ancestor revision 2:5c095ad7e90f |
|
55 | 55 | [255] |
|
56 | 56 | |
|
57 | 57 | Specify revisions with -r: |
|
58 | 58 | |
|
59 | 59 | $ hg graft -r 1 -r 2 |
|
60 | 60 | skipping ancestor revision 1:5d205f8b35b6 |
|
61 | 61 | skipping ancestor revision 2:5c095ad7e90f |
|
62 | 62 | [255] |
|
63 | 63 | |
|
64 | 64 | $ hg graft -r 1 2 |
|
65 | 65 | skipping ancestor revision 2:5c095ad7e90f |
|
66 | 66 | skipping ancestor revision 1:5d205f8b35b6 |
|
67 | 67 | [255] |
|
68 | 68 | |
|
69 | 69 | Can't graft with dirty wd: |
|
70 | 70 | |
|
71 | 71 | $ hg up -q 0 |
|
72 | 72 | $ echo foo > a |
|
73 | 73 | $ hg graft 1 |
|
74 | 74 | abort: uncommitted changes |
|
75 | 75 | [255] |
|
76 | 76 | $ hg revert a |
|
77 | 77 | |
|
78 | 78 | Graft a rename: |
|
79 | 79 | (this also tests that editor is invoked if '--edit' is specified) |
|
80 | 80 | |
|
81 | 81 | $ hg status --rev "2^1" --rev 2 |
|
82 | 82 | A b |
|
83 | 83 | R a |
|
84 | 84 | $ HGEDITOR=cat hg graft 2 -u foo --edit |
|
85 | 85 | grafting 2:5c095ad7e90f "2" |
|
86 | 86 | merging a and b to b |
|
87 | 87 | 2 |
|
88 | 88 | |
|
89 | 89 | |
|
90 | 90 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
91 | 91 | HG: Leave message empty to abort commit. |
|
92 | 92 | HG: -- |
|
93 | 93 | HG: user: foo |
|
94 | 94 | HG: branch 'default' |
|
95 | 95 | HG: added b |
|
96 | 96 | HG: removed a |
|
97 | 97 | $ hg export tip --git |
|
98 | 98 | # HG changeset patch |
|
99 | 99 | # User foo |
|
100 | 100 | # Date 0 0 |
|
101 | 101 | # Thu Jan 01 00:00:00 1970 +0000 |
|
102 | 102 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
103 | 103 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
104 | 104 | 2 |
|
105 | 105 | |
|
106 | 106 | diff --git a/a b/b |
|
107 | 107 | rename from a |
|
108 | 108 | rename to b |
|
109 | 109 | |
|
110 | 110 | Look for extra:source |
|
111 | 111 | |
|
112 | 112 | $ hg log --debug -r tip |
|
113 | 113 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
114 | 114 | tag: tip |
|
115 | 115 | phase: draft |
|
116 | 116 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
117 | 117 | parent: -1:0000000000000000000000000000000000000000 |
|
118 | 118 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb |
|
119 | 119 | user: foo |
|
120 | 120 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
121 | 121 | files+: b |
|
122 | 122 | files-: a |
|
123 | 123 | extra: branch=default |
|
124 | 124 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
125 | 125 | description: |
|
126 | 126 | 2 |
|
127 | 127 | |
|
128 | 128 | |
|
129 | 129 | |
|
130 | 130 | Graft out of order, skipping a merge and a duplicate |
|
131 | 131 | (this also tests that editor is not invoked if '--edit' is not specified) |
|
132 | 132 | |
|
133 | 133 | $ hg graft 1 5 4 3 'merge()' 2 -n |
|
134 | 134 | skipping ungraftable merge revision 6 |
|
135 | 135 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
136 | 136 | grafting 1:5d205f8b35b6 "1" |
|
137 | 137 | grafting 5:97f8bfe72746 "5" |
|
138 | 138 | grafting 4:9c233e8e184d "4" |
|
139 | 139 | grafting 3:4c60f11aa304 "3" |
|
140 | 140 | |
|
141 | 141 | $ HGEDITOR=cat hg graft 1 5 4 3 'merge()' 2 --debug |
|
142 | 142 | skipping ungraftable merge revision 6 |
|
143 | 143 | scanning for duplicate grafts |
|
144 | 144 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
145 | 145 | grafting 1:5d205f8b35b6 "1" |
|
146 | 146 | searching for copies back to rev 1 |
|
147 | 147 | unmatched files in local: |
|
148 | 148 | b |
|
149 | 149 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
150 | 150 | src: 'a' -> dst: 'b' * |
|
151 | 151 | checking for directory renames |
|
152 | 152 | resolving manifests |
|
153 | 153 | branchmerge: True, force: True, partial: False |
|
154 | 154 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 |
|
155 | 155 | preserving b for resolve of b |
|
156 | b: local copied/moved from a -> m | |
|
156 | b: local copied/moved from a -> m (premerge) | |
|
157 | 157 | picked tool ':merge' for b (binary False symlink False) |
|
158 | 158 | merging b and a to b |
|
159 | 159 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 |
|
160 | 160 | premerge successful |
|
161 | 161 | committing files: |
|
162 | 162 | b |
|
163 | 163 | committing manifest |
|
164 | 164 | committing changelog |
|
165 | 165 | grafting 5:97f8bfe72746 "5" |
|
166 | 166 | searching for copies back to rev 1 |
|
167 | 167 | resolving manifests |
|
168 | 168 | branchmerge: True, force: True, partial: False |
|
169 | 169 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 |
|
170 | 170 | e: remote is newer -> g |
|
171 | 171 | getting e |
|
172 | 172 | b: remote unchanged -> k |
|
173 | 173 | committing files: |
|
174 | 174 | e |
|
175 | 175 | committing manifest |
|
176 | 176 | committing changelog |
|
177 | 177 | grafting 4:9c233e8e184d "4" |
|
178 | 178 | searching for copies back to rev 1 |
|
179 | 179 | resolving manifests |
|
180 | 180 | branchmerge: True, force: True, partial: False |
|
181 | 181 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d |
|
182 | 182 | preserving e for resolve of e |
|
183 | 183 | d: remote is newer -> g |
|
184 | 184 | getting d |
|
185 | 185 | b: remote unchanged -> k |
|
186 | e: versions differ -> m | |
|
186 | e: versions differ -> m (premerge) | |
|
187 | 187 | picked tool ':merge' for e (binary False symlink False) |
|
188 | 188 | merging e |
|
189 | 189 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 |
|
190 | e: versions differ -> m (merge) | |
|
190 | 191 | picked tool ':merge' for e (binary False symlink False) |
|
191 | 192 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 |
|
192 | 193 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
193 | 194 | abort: unresolved conflicts, can't continue |
|
194 | 195 | (use hg resolve and hg graft --continue) |
|
195 | 196 | [255] |
|
196 | 197 | |
|
197 | 198 | Commit while interrupted should fail: |
|
198 | 199 | |
|
199 | 200 | $ hg ci -m 'commit interrupted graft' |
|
200 | 201 | abort: graft in progress |
|
201 | 202 | (use 'hg graft --continue' or 'hg update' to abort) |
|
202 | 203 | [255] |
|
203 | 204 | |
|
204 | 205 | Abort the graft and try committing: |
|
205 | 206 | |
|
206 | 207 | $ hg up -C . |
|
207 | 208 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
208 | 209 | $ echo c >> e |
|
209 | 210 | $ hg ci -mtest |
|
210 | 211 | |
|
211 | 212 | $ hg strip . --config extensions.strip= |
|
212 | 213 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
213 | 214 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) |
|
214 | 215 | |
|
215 | 216 | Graft again: |
|
216 | 217 | |
|
217 | 218 | $ hg graft 1 5 4 3 'merge()' 2 |
|
218 | 219 | skipping ungraftable merge revision 6 |
|
219 | 220 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
220 | 221 | skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e) |
|
221 | 222 | skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec) |
|
222 | 223 | grafting 4:9c233e8e184d "4" |
|
223 | 224 | merging e |
|
224 | 225 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
225 | 226 | abort: unresolved conflicts, can't continue |
|
226 | 227 | (use hg resolve and hg graft --continue) |
|
227 | 228 | [255] |
|
228 | 229 | |
|
229 | 230 | Continue without resolve should fail: |
|
230 | 231 | |
|
231 | 232 | $ hg graft -c |
|
232 | 233 | grafting 4:9c233e8e184d "4" |
|
233 | 234 | abort: unresolved merge conflicts (see "hg help resolve") |
|
234 | 235 | [255] |
|
235 | 236 | |
|
236 | 237 | Fix up: |
|
237 | 238 | |
|
238 | 239 | $ echo b > e |
|
239 | 240 | $ hg resolve -m e |
|
240 | 241 | (no more unresolved files) |
|
241 | 242 | |
|
242 | 243 | Continue with a revision should fail: |
|
243 | 244 | |
|
244 | 245 | $ hg graft -c 6 |
|
245 | 246 | abort: can't specify --continue and revisions |
|
246 | 247 | [255] |
|
247 | 248 | |
|
248 | 249 | $ hg graft -c -r 6 |
|
249 | 250 | abort: can't specify --continue and revisions |
|
250 | 251 | [255] |
|
251 | 252 | |
|
252 | 253 | Continue for real, clobber usernames |
|
253 | 254 | |
|
254 | 255 | $ hg graft -c -U |
|
255 | 256 | grafting 4:9c233e8e184d "4" |
|
256 | 257 | grafting 3:4c60f11aa304 "3" |
|
257 | 258 | |
|
258 | 259 | Compare with original: |
|
259 | 260 | |
|
260 | 261 | $ hg diff -r 6 |
|
261 | 262 | $ hg status --rev 0:. -C |
|
262 | 263 | M d |
|
263 | 264 | M e |
|
264 | 265 | A b |
|
265 | 266 | a |
|
266 | 267 | A c |
|
267 | 268 | a |
|
268 | 269 | R a |
|
269 | 270 | |
|
270 | 271 | View graph: |
|
271 | 272 | |
|
272 | 273 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
273 | 274 | @ test@11.draft: 3 |
|
274 | 275 | | |
|
275 | 276 | o test@10.draft: 4 |
|
276 | 277 | | |
|
277 | 278 | o test@9.draft: 5 |
|
278 | 279 | | |
|
279 | 280 | o bar@8.draft: 1 |
|
280 | 281 | | |
|
281 | 282 | o foo@7.draft: 2 |
|
282 | 283 | | |
|
283 | 284 | | o test@6.secret: 6 |
|
284 | 285 | | |\ |
|
285 | 286 | | | o test@5.draft: 5 |
|
286 | 287 | | | | |
|
287 | 288 | | o | test@4.draft: 4 |
|
288 | 289 | | |/ |
|
289 | 290 | | o baz@3.public: 3 |
|
290 | 291 | | | |
|
291 | 292 | | o test@2.public: 2 |
|
292 | 293 | | | |
|
293 | 294 | | o bar@1.public: 1 |
|
294 | 295 | |/ |
|
295 | 296 | o test@0.public: 0 |
|
296 | 297 | |
|
297 | 298 | Graft again onto another branch should preserve the original source |
|
298 | 299 | $ hg up -q 0 |
|
299 | 300 | $ echo 'g'>g |
|
300 | 301 | $ hg add g |
|
301 | 302 | $ hg ci -m 7 |
|
302 | 303 | created new head |
|
303 | 304 | $ hg graft 7 |
|
304 | 305 | grafting 7:ef0ef43d49e7 "2" |
|
305 | 306 | |
|
306 | 307 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
307 | 308 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
308 | 309 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
309 | 310 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
310 | 311 | |
|
311 | 312 | $ hg log --debug -r tip |
|
312 | 313 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
313 | 314 | tag: tip |
|
314 | 315 | phase: draft |
|
315 | 316 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
316 | 317 | parent: -1:0000000000000000000000000000000000000000 |
|
317 | 318 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 |
|
318 | 319 | user: foo |
|
319 | 320 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
320 | 321 | files+: b |
|
321 | 322 | files-: a |
|
322 | 323 | extra: branch=default |
|
323 | 324 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
324 | 325 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
325 | 326 | description: |
|
326 | 327 | 2 |
|
327 | 328 | |
|
328 | 329 | |
|
329 | 330 | Disallow grafting an already grafted cset onto its original branch |
|
330 | 331 | $ hg up -q 6 |
|
331 | 332 | $ hg graft 7 |
|
332 | 333 | skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) |
|
333 | 334 | [255] |
|
334 | 335 | |
|
335 | 336 | $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 |
|
336 | 337 | --- */hg-5c095ad7e90f.patch * +0000 (glob) |
|
337 | 338 | +++ */hg-7a4785234d87.patch * +0000 (glob) |
|
338 | 339 | @@ -1,18 +1,18 @@ |
|
339 | 340 | # HG changeset patch |
|
340 | 341 | -# User test |
|
341 | 342 | +# User foo |
|
342 | 343 | # Date 0 0 |
|
343 | 344 | # Thu Jan 01 00:00:00 1970 +0000 |
|
344 | 345 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
345 | 346 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
346 | 347 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
347 | 348 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
348 | 349 | 2 |
|
349 | 350 | |
|
350 | 351 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f a |
|
351 | 352 | +diff -r b592ea63bb0c -r 7a4785234d87 a |
|
352 | 353 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
353 | 354 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
354 | 355 | @@ -1,1 +0,0 @@ |
|
355 | 356 | --b |
|
356 | 357 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f b |
|
357 | 358 | +-a |
|
358 | 359 | +diff -r b592ea63bb0c -r 7a4785234d87 b |
|
359 | 360 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
360 | 361 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
361 | 362 | @@ -0,0 +1,1 @@ |
|
362 | 363 | -+b |
|
363 | 364 | ++a |
|
364 | 365 | [1] |
|
365 | 366 | |
|
366 | 367 | $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . |
|
367 | 368 | --- */hg-5c095ad7e90f.patch * +0000 (glob) |
|
368 | 369 | +++ */hg-7a4785234d87.patch * +0000 (glob) |
|
369 | 370 | @@ -1,8 +1,8 @@ |
|
370 | 371 | # HG changeset patch |
|
371 | 372 | -# User test |
|
372 | 373 | +# User foo |
|
373 | 374 | # Date 0 0 |
|
374 | 375 | # Thu Jan 01 00:00:00 1970 +0000 |
|
375 | 376 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
376 | 377 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
377 | 378 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
378 | 379 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
379 | 380 | 2 |
|
380 | 381 | |
|
381 | 382 | [1] |
|
382 | 383 | |
|
383 | 384 | Disallow grafting already grafted csets with the same origin onto each other |
|
384 | 385 | $ hg up -q 13 |
|
385 | 386 | $ hg graft 2 |
|
386 | 387 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) |
|
387 | 388 | [255] |
|
388 | 389 | $ hg graft 7 |
|
389 | 390 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) |
|
390 | 391 | [255] |
|
391 | 392 | |
|
392 | 393 | $ hg up -q 7 |
|
393 | 394 | $ hg graft 2 |
|
394 | 395 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
395 | 396 | [255] |
|
396 | 397 | $ hg graft tip |
|
397 | 398 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) |
|
398 | 399 | [255] |
|
399 | 400 | |
|
400 | 401 | Graft with --log |
|
401 | 402 | |
|
402 | 403 | $ hg up -Cq 1 |
|
403 | 404 | $ hg graft 3 --log -u foo |
|
404 | 405 | grafting 3:4c60f11aa304 "3" |
|
405 | 406 | warning: can't find ancestor for 'c' copied from 'b'! |
|
406 | 407 | $ hg log --template '{rev} {parents} {desc}\n' -r tip |
|
407 | 408 | 14 1:5d205f8b35b6 3 |
|
408 | 409 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
|
409 | 410 | |
|
410 | 411 | Resolve conflicted graft |
|
411 | 412 | $ hg up -q 0 |
|
412 | 413 | $ echo b > a |
|
413 | 414 | $ hg ci -m 8 |
|
414 | 415 | created new head |
|
415 | 416 | $ echo c > a |
|
416 | 417 | $ hg ci -m 9 |
|
417 | 418 | $ hg graft 1 --tool internal:fail |
|
418 | 419 | grafting 1:5d205f8b35b6 "1" |
|
419 | 420 | abort: unresolved conflicts, can't continue |
|
420 | 421 | (use hg resolve and hg graft --continue) |
|
421 | 422 | [255] |
|
422 | 423 | $ hg resolve --all |
|
423 | 424 | merging a |
|
424 | 425 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
425 | 426 | [1] |
|
426 | 427 | $ cat a |
|
427 | 428 | <<<<<<< local: aaa4406d4f0a - test: 9 |
|
428 | 429 | c |
|
429 | 430 | ======= |
|
430 | 431 | b |
|
431 | 432 | >>>>>>> other: 5d205f8b35b6 - bar: 1 |
|
432 | 433 | $ echo b > a |
|
433 | 434 | $ hg resolve -m a |
|
434 | 435 | (no more unresolved files) |
|
435 | 436 | $ hg graft -c |
|
436 | 437 | grafting 1:5d205f8b35b6 "1" |
|
437 | 438 | $ hg export tip --git |
|
438 | 439 | # HG changeset patch |
|
439 | 440 | # User bar |
|
440 | 441 | # Date 0 0 |
|
441 | 442 | # Thu Jan 01 00:00:00 1970 +0000 |
|
442 | 443 | # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be |
|
443 | 444 | # Parent aaa4406d4f0ae9befd6e58c82ec63706460cbca6 |
|
444 | 445 | 1 |
|
445 | 446 | |
|
446 | 447 | diff --git a/a b/a |
|
447 | 448 | --- a/a |
|
448 | 449 | +++ b/a |
|
449 | 450 | @@ -1,1 +1,1 @@ |
|
450 | 451 | -c |
|
451 | 452 | +b |
|
452 | 453 | |
|
453 | 454 | Resolve conflicted graft with rename |
|
454 | 455 | $ echo c > a |
|
455 | 456 | $ hg ci -m 10 |
|
456 | 457 | $ hg graft 2 --tool internal:fail |
|
457 | 458 | grafting 2:5c095ad7e90f "2" |
|
458 | 459 | abort: unresolved conflicts, can't continue |
|
459 | 460 | (use hg resolve and hg graft --continue) |
|
460 | 461 | [255] |
|
461 | 462 | $ hg resolve --all |
|
462 | 463 | merging a and b to b |
|
463 | 464 | (no more unresolved files) |
|
464 | 465 | $ hg graft -c |
|
465 | 466 | grafting 2:5c095ad7e90f "2" |
|
466 | 467 | $ hg export tip --git |
|
467 | 468 | # HG changeset patch |
|
468 | 469 | # User test |
|
469 | 470 | # Date 0 0 |
|
470 | 471 | # Thu Jan 01 00:00:00 1970 +0000 |
|
471 | 472 | # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc |
|
472 | 473 | # Parent ee295f490a40b97f3d18dd4c4f1c8936c233b612 |
|
473 | 474 | 2 |
|
474 | 475 | |
|
475 | 476 | diff --git a/a b/b |
|
476 | 477 | rename from a |
|
477 | 478 | rename to b |
|
478 | 479 | |
|
479 | 480 | Test simple origin(), with and without args |
|
480 | 481 | $ hg log -r 'origin()' |
|
481 | 482 | changeset: 1:5d205f8b35b6 |
|
482 | 483 | user: bar |
|
483 | 484 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
484 | 485 | summary: 1 |
|
485 | 486 | |
|
486 | 487 | changeset: 2:5c095ad7e90f |
|
487 | 488 | user: test |
|
488 | 489 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
489 | 490 | summary: 2 |
|
490 | 491 | |
|
491 | 492 | changeset: 3:4c60f11aa304 |
|
492 | 493 | user: baz |
|
493 | 494 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
494 | 495 | summary: 3 |
|
495 | 496 | |
|
496 | 497 | changeset: 4:9c233e8e184d |
|
497 | 498 | user: test |
|
498 | 499 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
499 | 500 | summary: 4 |
|
500 | 501 | |
|
501 | 502 | changeset: 5:97f8bfe72746 |
|
502 | 503 | branch: stable |
|
503 | 504 | parent: 3:4c60f11aa304 |
|
504 | 505 | user: test |
|
505 | 506 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
506 | 507 | summary: 5 |
|
507 | 508 | |
|
508 | 509 | $ hg log -r 'origin(7)' |
|
509 | 510 | changeset: 2:5c095ad7e90f |
|
510 | 511 | user: test |
|
511 | 512 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
512 | 513 | summary: 2 |
|
513 | 514 | |
|
514 | 515 | Now transplant a graft to test following through copies |
|
515 | 516 | $ hg up -q 0 |
|
516 | 517 | $ hg branch -q dev |
|
517 | 518 | $ hg ci -qm "dev branch" |
|
518 | 519 | $ hg --config extensions.transplant= transplant -q 7 |
|
519 | 520 | $ hg log -r 'origin(.)' |
|
520 | 521 | changeset: 2:5c095ad7e90f |
|
521 | 522 | user: test |
|
522 | 523 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
523 | 524 | summary: 2 |
|
524 | 525 | |
|
525 | 526 | Test that the graft and transplant markers in extra are converted, allowing |
|
526 | 527 | origin() to still work. Note that these recheck the immediately preceeding two |
|
527 | 528 | tests. |
|
528 | 529 | $ hg --quiet --config extensions.convert= --config convert.hg.saverev=True convert . ../converted |
|
529 | 530 | |
|
530 | 531 | The graft case |
|
531 | 532 | $ hg -R ../converted log -r 7 --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
532 | 533 | 7: 7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
533 | 534 | branch=default |
|
534 | 535 | convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
535 | 536 | source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
536 | 537 | $ hg -R ../converted log -r 'origin(7)' |
|
537 | 538 | changeset: 2:e0213322b2c1 |
|
538 | 539 | user: test |
|
539 | 540 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
540 | 541 | summary: 2 |
|
541 | 542 | |
|
542 | 543 | Test that template correctly expands more than one 'extra' (issue4362), and that |
|
543 | 544 | 'intermediate-source' is converted. |
|
544 | 545 | $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}" |
|
545 | 546 | Extra: branch=default |
|
546 | 547 | Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
547 | 548 | Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
548 | 549 | Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
549 | 550 | |
|
550 | 551 | The transplant case |
|
551 | 552 | $ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
552 | 553 | 21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade |
|
553 | 554 | branch=dev |
|
554 | 555 | convert_revision=7e61b508e709a11d28194a5359bc3532d910af21 |
|
555 | 556 | transplant_source=z\xe8F\xe9\x11\x1f\xc8\xf5wEcBP\xc7\xb9\xac (esc) |
|
556 | 557 | `h\x9b (esc) |
|
557 | 558 | $ hg -R ../converted log -r 'origin(tip)' |
|
558 | 559 | changeset: 2:e0213322b2c1 |
|
559 | 560 | user: test |
|
560 | 561 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
561 | 562 | summary: 2 |
|
562 | 563 | |
|
563 | 564 | |
|
564 | 565 | Test simple destination |
|
565 | 566 | $ hg log -r 'destination()' |
|
566 | 567 | changeset: 7:ef0ef43d49e7 |
|
567 | 568 | parent: 0:68795b066622 |
|
568 | 569 | user: foo |
|
569 | 570 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
570 | 571 | summary: 2 |
|
571 | 572 | |
|
572 | 573 | changeset: 8:6b9e5368ca4e |
|
573 | 574 | user: bar |
|
574 | 575 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
575 | 576 | summary: 1 |
|
576 | 577 | |
|
577 | 578 | changeset: 9:1905859650ec |
|
578 | 579 | user: test |
|
579 | 580 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
580 | 581 | summary: 5 |
|
581 | 582 | |
|
582 | 583 | changeset: 10:52dc0b4c6907 |
|
583 | 584 | user: test |
|
584 | 585 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
585 | 586 | summary: 4 |
|
586 | 587 | |
|
587 | 588 | changeset: 11:882b35362a6b |
|
588 | 589 | user: test |
|
589 | 590 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
590 | 591 | summary: 3 |
|
591 | 592 | |
|
592 | 593 | changeset: 13:7a4785234d87 |
|
593 | 594 | user: foo |
|
594 | 595 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
595 | 596 | summary: 2 |
|
596 | 597 | |
|
597 | 598 | changeset: 14:f64defefacee |
|
598 | 599 | parent: 1:5d205f8b35b6 |
|
599 | 600 | user: foo |
|
600 | 601 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
601 | 602 | summary: 3 |
|
602 | 603 | |
|
603 | 604 | changeset: 17:f67661df0c48 |
|
604 | 605 | user: bar |
|
605 | 606 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
606 | 607 | summary: 1 |
|
607 | 608 | |
|
608 | 609 | changeset: 19:9627f653b421 |
|
609 | 610 | user: test |
|
610 | 611 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
611 | 612 | summary: 2 |
|
612 | 613 | |
|
613 | 614 | changeset: 21:7e61b508e709 |
|
614 | 615 | branch: dev |
|
615 | 616 | tag: tip |
|
616 | 617 | user: foo |
|
617 | 618 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
618 | 619 | summary: 2 |
|
619 | 620 | |
|
620 | 621 | $ hg log -r 'destination(2)' |
|
621 | 622 | changeset: 7:ef0ef43d49e7 |
|
622 | 623 | parent: 0:68795b066622 |
|
623 | 624 | user: foo |
|
624 | 625 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
625 | 626 | summary: 2 |
|
626 | 627 | |
|
627 | 628 | changeset: 13:7a4785234d87 |
|
628 | 629 | user: foo |
|
629 | 630 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
630 | 631 | summary: 2 |
|
631 | 632 | |
|
632 | 633 | changeset: 19:9627f653b421 |
|
633 | 634 | user: test |
|
634 | 635 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
635 | 636 | summary: 2 |
|
636 | 637 | |
|
637 | 638 | changeset: 21:7e61b508e709 |
|
638 | 639 | branch: dev |
|
639 | 640 | tag: tip |
|
640 | 641 | user: foo |
|
641 | 642 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
642 | 643 | summary: 2 |
|
643 | 644 | |
|
644 | 645 | Transplants of grafts can find a destination... |
|
645 | 646 | $ hg log -r 'destination(7)' |
|
646 | 647 | changeset: 21:7e61b508e709 |
|
647 | 648 | branch: dev |
|
648 | 649 | tag: tip |
|
649 | 650 | user: foo |
|
650 | 651 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
651 | 652 | summary: 2 |
|
652 | 653 | |
|
653 | 654 | ... grafts of grafts unfortunately can't |
|
654 | 655 | $ hg graft -q 13 |
|
655 | 656 | warning: can't find ancestor for 'b' copied from 'a'! |
|
656 | 657 | $ hg log -r 'destination(13)' |
|
657 | 658 | All copies of a cset |
|
658 | 659 | $ hg log -r 'origin(13) or destination(origin(13))' |
|
659 | 660 | changeset: 2:5c095ad7e90f |
|
660 | 661 | user: test |
|
661 | 662 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
662 | 663 | summary: 2 |
|
663 | 664 | |
|
664 | 665 | changeset: 7:ef0ef43d49e7 |
|
665 | 666 | parent: 0:68795b066622 |
|
666 | 667 | user: foo |
|
667 | 668 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
668 | 669 | summary: 2 |
|
669 | 670 | |
|
670 | 671 | changeset: 13:7a4785234d87 |
|
671 | 672 | user: foo |
|
672 | 673 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
673 | 674 | summary: 2 |
|
674 | 675 | |
|
675 | 676 | changeset: 19:9627f653b421 |
|
676 | 677 | user: test |
|
677 | 678 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
678 | 679 | summary: 2 |
|
679 | 680 | |
|
680 | 681 | changeset: 21:7e61b508e709 |
|
681 | 682 | branch: dev |
|
682 | 683 | user: foo |
|
683 | 684 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
684 | 685 | summary: 2 |
|
685 | 686 | |
|
686 | 687 | changeset: 22:d1cb6591fa4b |
|
687 | 688 | branch: dev |
|
688 | 689 | tag: tip |
|
689 | 690 | user: foo |
|
690 | 691 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
691 | 692 | summary: 2 |
|
692 | 693 | |
|
693 | 694 | |
|
694 | 695 | graft works on complex revset |
|
695 | 696 | |
|
696 | 697 | $ hg graft 'origin(13) or destination(origin(13))' |
|
697 | 698 | skipping ancestor revision 21:7e61b508e709 |
|
698 | 699 | skipping ancestor revision 22:d1cb6591fa4b |
|
699 | 700 | skipping revision 2:5c095ad7e90f (already grafted to 22:d1cb6591fa4b) |
|
700 | 701 | grafting 7:ef0ef43d49e7 "2" |
|
701 | 702 | warning: can't find ancestor for 'b' copied from 'a'! |
|
702 | 703 | grafting 13:7a4785234d87 "2" |
|
703 | 704 | warning: can't find ancestor for 'b' copied from 'a'! |
|
704 | 705 | grafting 19:9627f653b421 "2" |
|
705 | 706 | merging b |
|
706 | 707 | warning: can't find ancestor for 'b' copied from 'a'! |
|
707 | 708 | |
|
708 | 709 | graft with --force (still doesn't graft merges) |
|
709 | 710 | |
|
710 | 711 | $ hg graft 19 0 6 |
|
711 | 712 | skipping ungraftable merge revision 6 |
|
712 | 713 | skipping ancestor revision 0:68795b066622 |
|
713 | 714 | skipping already grafted revision 19:9627f653b421 (22:d1cb6591fa4b also has origin 2:5c095ad7e90f) |
|
714 | 715 | [255] |
|
715 | 716 | $ hg graft 19 0 6 --force |
|
716 | 717 | skipping ungraftable merge revision 6 |
|
717 | 718 | grafting 19:9627f653b421 "2" |
|
718 | 719 | merging b |
|
719 | 720 | warning: can't find ancestor for 'b' copied from 'a'! |
|
720 | 721 | grafting 0:68795b066622 "0" |
|
721 | 722 | |
|
722 | 723 | graft --force after backout |
|
723 | 724 | |
|
724 | 725 | $ echo abc > a |
|
725 | 726 | $ hg ci -m 28 |
|
726 | 727 | $ hg backout 28 |
|
727 | 728 | reverting a |
|
728 | 729 | changeset 29:53177ba928f6 backs out changeset 28:50a516bb8b57 |
|
729 | 730 | $ hg graft 28 |
|
730 | 731 | skipping ancestor revision 28:50a516bb8b57 |
|
731 | 732 | [255] |
|
732 | 733 | $ hg graft 28 --force |
|
733 | 734 | grafting 28:50a516bb8b57 "28" |
|
734 | 735 | merging a |
|
735 | 736 | $ cat a |
|
736 | 737 | abc |
|
737 | 738 | |
|
738 | 739 | graft --continue after --force |
|
739 | 740 | |
|
740 | 741 | $ echo def > a |
|
741 | 742 | $ hg ci -m 31 |
|
742 | 743 | $ hg graft 28 --force --tool internal:fail |
|
743 | 744 | grafting 28:50a516bb8b57 "28" |
|
744 | 745 | abort: unresolved conflicts, can't continue |
|
745 | 746 | (use hg resolve and hg graft --continue) |
|
746 | 747 | [255] |
|
747 | 748 | $ hg resolve --all |
|
748 | 749 | merging a |
|
749 | 750 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
750 | 751 | [1] |
|
751 | 752 | $ echo abc > a |
|
752 | 753 | $ hg resolve -m a |
|
753 | 754 | (no more unresolved files) |
|
754 | 755 | $ hg graft -c |
|
755 | 756 | grafting 28:50a516bb8b57 "28" |
|
756 | 757 | $ cat a |
|
757 | 758 | abc |
|
758 | 759 | |
|
759 | 760 | Continue testing same origin policy, using revision numbers from test above |
|
760 | 761 | but do some destructive editing of the repo: |
|
761 | 762 | |
|
762 | 763 | $ hg up -qC 7 |
|
763 | 764 | $ hg tag -l -r 13 tmp |
|
764 | 765 | $ hg --config extensions.strip= strip 2 |
|
765 | 766 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg (glob) |
|
766 | 767 | $ hg graft tmp |
|
767 | 768 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) |
|
768 | 769 | [255] |
|
769 | 770 | |
|
770 | 771 | Empty graft |
|
771 | 772 | |
|
772 | 773 | $ hg up -qr 26 |
|
773 | 774 | $ hg tag -f something |
|
774 | 775 | $ hg graft -qr 27 |
|
775 | 776 | $ hg graft -f 27 |
|
776 | 777 | grafting 27:ed6c7e54e319 "28" |
|
777 | 778 | note: graft of 27:ed6c7e54e319 created no changes to commit |
|
778 | 779 | |
|
779 | 780 | $ cd .. |
|
780 | 781 | |
|
781 | 782 | Graft to duplicate a commit |
|
782 | 783 | |
|
783 | 784 | $ hg init graftsibling |
|
784 | 785 | $ cd graftsibling |
|
785 | 786 | $ touch a |
|
786 | 787 | $ hg commit -qAm a |
|
787 | 788 | $ touch b |
|
788 | 789 | $ hg commit -qAm b |
|
789 | 790 | $ hg log -G -T '{rev}\n' |
|
790 | 791 | @ 1 |
|
791 | 792 | | |
|
792 | 793 | o 0 |
|
793 | 794 | |
|
794 | 795 | $ hg up -q 0 |
|
795 | 796 | $ hg graft -r 1 |
|
796 | 797 | grafting 1:0e067c57feba "b" (tip) |
|
797 | 798 | $ hg log -G -T '{rev}\n' |
|
798 | 799 | @ 2 |
|
799 | 800 | | |
|
800 | 801 | | o 1 |
|
801 | 802 | |/ |
|
802 | 803 | o 0 |
|
803 | 804 | |
|
804 | 805 | Graft to duplicate a commit twice |
|
805 | 806 | |
|
806 | 807 | $ hg up -q 0 |
|
807 | 808 | $ hg graft -r 2 |
|
808 | 809 | grafting 2:044ec77f6389 "b" (tip) |
|
809 | 810 | $ hg log -G -T '{rev}\n' |
|
810 | 811 | @ 3 |
|
811 | 812 | | |
|
812 | 813 | | o 2 |
|
813 | 814 | |/ |
|
814 | 815 | | o 1 |
|
815 | 816 | |/ |
|
816 | 817 | o 0 |
|
817 | 818 |
@@ -1,98 +1,98 b'' | |||
|
1 | 1 | https://bz.mercurial-scm.org/672 |
|
2 | 2 | |
|
3 | 3 | # 0-2-4 |
|
4 | 4 | # \ \ \ |
|
5 | 5 | # 1-3-5 |
|
6 | 6 | # |
|
7 | 7 | # rename in #1, content change in #4. |
|
8 | 8 | |
|
9 | 9 | $ hg init |
|
10 | 10 | |
|
11 | 11 | $ touch 1 |
|
12 | 12 | $ touch 2 |
|
13 | 13 | $ hg commit -Am init # 0 |
|
14 | 14 | adding 1 |
|
15 | 15 | adding 2 |
|
16 | 16 | |
|
17 | 17 | $ hg rename 1 1a |
|
18 | 18 | $ hg commit -m rename # 1 |
|
19 | 19 | |
|
20 | 20 | $ hg co -C 0 |
|
21 | 21 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
22 | 22 | |
|
23 | 23 | $ echo unrelated >> 2 |
|
24 | 24 | $ hg ci -m unrelated1 # 2 |
|
25 | 25 | created new head |
|
26 | 26 | |
|
27 | 27 | $ hg merge --debug 1 |
|
28 | 28 | searching for copies back to rev 1 |
|
29 | 29 | unmatched files in other: |
|
30 | 30 | 1a |
|
31 | 31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
32 | 32 | src: '1' -> dst: '1a' |
|
33 | 33 | checking for directory renames |
|
34 | 34 | resolving manifests |
|
35 | 35 | branchmerge: True, force: False, partial: False |
|
36 | 36 | ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a |
|
37 | 37 | 1: other deleted -> r |
|
38 | 38 | removing 1 |
|
39 | 39 | 1a: remote created -> g |
|
40 | 40 | getting 1a |
|
41 | 41 | 2: remote unchanged -> k |
|
42 | 42 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
43 | 43 | (branch merge, don't forget to commit) |
|
44 | 44 | |
|
45 | 45 | $ hg ci -m merge1 # 3 |
|
46 | 46 | |
|
47 | 47 | $ hg co -C 2 |
|
48 | 48 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
49 | 49 | |
|
50 | 50 | $ echo hello >> 1 |
|
51 | 51 | $ hg ci -m unrelated2 # 4 |
|
52 | 52 | created new head |
|
53 | 53 | |
|
54 | 54 | $ hg co -C 3 |
|
55 | 55 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
56 | 56 | |
|
57 | 57 | $ hg merge -y --debug 4 |
|
58 | 58 | searching for copies back to rev 1 |
|
59 | 59 | unmatched files in local: |
|
60 | 60 | 1a |
|
61 | 61 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
62 | 62 | src: '1' -> dst: '1a' * |
|
63 | 63 | checking for directory renames |
|
64 | 64 | resolving manifests |
|
65 | 65 | branchmerge: True, force: False, partial: False |
|
66 | 66 | ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96 |
|
67 | 67 | preserving 1a for resolve of 1a |
|
68 | 1a: local copied/moved from 1 -> m | |
|
68 | 1a: local copied/moved from 1 -> m (premerge) | |
|
69 | 69 | picked tool ':merge' for 1a (binary False symlink False) |
|
70 | 70 | merging 1a and 1 to 1a |
|
71 | 71 | my 1a@e327dca35ac8+ other 1@746e9549ea96 ancestor 1@81f4b099af3d |
|
72 | 72 | premerge successful |
|
73 | 73 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
74 | 74 | (branch merge, don't forget to commit) |
|
75 | 75 | |
|
76 | 76 | $ hg co -C 4 |
|
77 | 77 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
78 | 78 | |
|
79 | 79 | $ hg merge -y --debug 3 |
|
80 | 80 | searching for copies back to rev 1 |
|
81 | 81 | unmatched files in other: |
|
82 | 82 | 1a |
|
83 | 83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
84 | 84 | src: '1' -> dst: '1a' * |
|
85 | 85 | checking for directory renames |
|
86 | 86 | resolving manifests |
|
87 | 87 | branchmerge: True, force: False, partial: False |
|
88 | 88 | ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8 |
|
89 | 89 | preserving 1 for resolve of 1a |
|
90 | 90 | removing 1 |
|
91 | 1a: remote moved from 1 -> m | |
|
91 | 1a: remote moved from 1 -> m (premerge) | |
|
92 | 92 | picked tool ':merge' for 1a (binary False symlink False) |
|
93 | 93 | merging 1 and 1a to 1a |
|
94 | 94 | my 1a@746e9549ea96+ other 1a@e327dca35ac8 ancestor 1@81f4b099af3d |
|
95 | 95 | premerge successful |
|
96 | 96 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
97 | 97 | (branch merge, don't forget to commit) |
|
98 | 98 |
@@ -1,393 +1,393 b'' | |||
|
1 | 1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
2 | 2 | $ mkdir "${USERCACHE}" |
|
3 | 3 | $ cat >> $HGRCPATH <<EOF |
|
4 | 4 | > [extensions] |
|
5 | 5 | > largefiles = |
|
6 | 6 | > share = |
|
7 | 7 | > strip = |
|
8 | 8 | > convert = |
|
9 | 9 | > [largefiles] |
|
10 | 10 | > minsize = 0.5 |
|
11 | 11 | > patterns = **.other |
|
12 | 12 | > **.dat |
|
13 | 13 | > usercache=${USERCACHE} |
|
14 | 14 | > EOF |
|
15 | 15 | |
|
16 | 16 | "lfconvert" works |
|
17 | 17 | $ hg init bigfile-repo |
|
18 | 18 | $ cd bigfile-repo |
|
19 | 19 | $ cat >> .hg/hgrc <<EOF |
|
20 | 20 | > [extensions] |
|
21 | 21 | > largefiles = ! |
|
22 | 22 | > EOF |
|
23 | 23 | $ mkdir sub |
|
24 | 24 | $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null |
|
25 | 25 | $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null |
|
26 | 26 | $ echo normal > normal1 |
|
27 | 27 | $ echo alsonormal > sub/normal2 |
|
28 | 28 | $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null |
|
29 | 29 | $ hg addremove |
|
30 | 30 | adding large |
|
31 | 31 | adding large2 |
|
32 | 32 | adding normal1 |
|
33 | 33 | adding sub/maybelarge.dat |
|
34 | 34 | adding sub/normal2 |
|
35 | 35 | $ hg commit -m"add large, normal1" large normal1 |
|
36 | 36 | $ hg commit -m"add sub/*" sub |
|
37 | 37 | |
|
38 | 38 | Test tag parsing |
|
39 | 39 | $ cat >> .hgtags <<EOF |
|
40 | 40 | > IncorrectlyFormattedTag! |
|
41 | 41 | > invalidhash sometag |
|
42 | 42 | > 0123456789abcdef anothertag |
|
43 | 43 | > EOF |
|
44 | 44 | $ hg add .hgtags |
|
45 | 45 | $ hg commit -m"add large2" large2 .hgtags |
|
46 | 46 | |
|
47 | 47 | Test link+rename largefile codepath |
|
48 | 48 | $ [ -d .hg/largefiles ] && echo fail || echo pass |
|
49 | 49 | pass |
|
50 | 50 | $ cd .. |
|
51 | 51 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
52 | 52 | initializing destination largefiles-repo |
|
53 | 53 | skipping incorrectly formatted tag IncorrectlyFormattedTag! |
|
54 | 54 | skipping incorrectly formatted id invalidhash |
|
55 | 55 | no mapping for id 0123456789abcdef |
|
56 | 56 | #if symlink |
|
57 | 57 | $ hg --cwd bigfile-repo rename large2 large3 |
|
58 | 58 | $ ln -sf large bigfile-repo/large3 |
|
59 | 59 | $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3 |
|
60 | 60 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink |
|
61 | 61 | initializing destination largefiles-repo-symlink |
|
62 | 62 | skipping incorrectly formatted tag IncorrectlyFormattedTag! |
|
63 | 63 | skipping incorrectly formatted id invalidhash |
|
64 | 64 | no mapping for id 0123456789abcdef |
|
65 | 65 | abort: renamed/copied largefile large3 becomes symlink |
|
66 | 66 | [255] |
|
67 | 67 | #endif |
|
68 | 68 | $ cd bigfile-repo |
|
69 | 69 | $ hg strip --no-backup 2 |
|
70 | 70 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
71 | 71 | $ cd .. |
|
72 | 72 | $ rm -rf largefiles-repo largefiles-repo-symlink |
|
73 | 73 | |
|
74 | 74 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
75 | 75 | initializing destination largefiles-repo |
|
76 | 76 | |
|
77 | 77 | "lfconvert" converts content correctly |
|
78 | 78 | $ cd largefiles-repo |
|
79 | 79 | $ hg up |
|
80 | 80 | getting changed largefiles |
|
81 | 81 | 2 largefiles updated, 0 removed |
|
82 | 82 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 83 | $ hg locate |
|
84 | 84 | .hglf/large |
|
85 | 85 | .hglf/sub/maybelarge.dat |
|
86 | 86 | normal1 |
|
87 | 87 | sub/normal2 |
|
88 | 88 | $ cat normal1 |
|
89 | 89 | normal |
|
90 | 90 | $ cat sub/normal2 |
|
91 | 91 | alsonormal |
|
92 | 92 | $ md5sum.py large sub/maybelarge.dat |
|
93 | 93 | ec87a838931d4d5d2e94a04644788a55 large |
|
94 | 94 | 1276481102f218c981e0324180bafd9f sub/maybelarge.dat |
|
95 | 95 | |
|
96 | 96 | "lfconvert" adds 'largefiles' to .hg/requires. |
|
97 | 97 | $ cat .hg/requires |
|
98 | 98 | dotencode |
|
99 | 99 | fncache |
|
100 | 100 | largefiles |
|
101 | 101 | revlogv1 |
|
102 | 102 | store |
|
103 | 103 | |
|
104 | 104 | "lfconvert" includes a newline at the end of the standin files. |
|
105 | 105 | $ cat .hglf/large .hglf/sub/maybelarge.dat |
|
106 | 106 | 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 |
|
107 | 107 | 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c |
|
108 | 108 | $ cd .. |
|
109 | 109 | |
|
110 | 110 | add some changesets to rename/remove/merge |
|
111 | 111 | $ cd bigfile-repo |
|
112 | 112 | $ hg mv -q sub stuff |
|
113 | 113 | $ hg commit -m"rename sub/ to stuff/" |
|
114 | 114 | $ hg update -q 1 |
|
115 | 115 | $ echo blah >> normal3 |
|
116 | 116 | $ echo blah >> sub/normal2 |
|
117 | 117 | $ echo blah >> sub/maybelarge.dat |
|
118 | 118 | $ md5sum.py sub/maybelarge.dat |
|
119 | 119 | 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat |
|
120 | 120 | $ hg commit -A -m"add normal3, modify sub/*" |
|
121 | 121 | adding normal3 |
|
122 | 122 | created new head |
|
123 | 123 | $ hg rm large normal3 |
|
124 | 124 | $ hg commit -q -m"remove large, normal3" |
|
125 | 125 | $ hg merge |
|
126 | 126 | merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat |
|
127 | merging sub/normal2 and stuff/normal2 to stuff/normal2 | |
|
127 | 128 | warning: $TESTTMP/bigfile-repo/stuff/maybelarge.dat looks like a binary file. (glob) |
|
128 | 129 | warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark') |
|
129 | merging sub/normal2 and stuff/normal2 to stuff/normal2 | |
|
130 | 130 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
131 | 131 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
132 | 132 | [1] |
|
133 | 133 | $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat |
|
134 | 134 | $ hg resolve -m stuff/maybelarge.dat |
|
135 | 135 | (no more unresolved files) |
|
136 | 136 | $ hg commit -m"merge" |
|
137 | 137 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
138 | 138 | @ 5:4884f215abda merge |
|
139 | 139 | |\ |
|
140 | 140 | | o 4:7285f817b77e remove large, normal3 |
|
141 | 141 | | | |
|
142 | 142 | | o 3:67e3892e3534 add normal3, modify sub/* |
|
143 | 143 | | | |
|
144 | 144 | o | 2:c96c8beb5d56 rename sub/ to stuff/ |
|
145 | 145 | |/ |
|
146 | 146 | o 1:020c65d24e11 add sub/* |
|
147 | 147 | | |
|
148 | 148 | o 0:117b8328f97a add large, normal1 |
|
149 | 149 | |
|
150 | 150 | $ cd .. |
|
151 | 151 | |
|
152 | 152 | lfconvert with rename, merge, and remove |
|
153 | 153 | $ rm -rf largefiles-repo |
|
154 | 154 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
155 | 155 | initializing destination largefiles-repo |
|
156 | 156 | $ cd largefiles-repo |
|
157 | 157 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
158 | 158 | o 5:8e05f5f2b77e merge |
|
159 | 159 | |\ |
|
160 | 160 | | o 4:a5a02de7a8e4 remove large, normal3 |
|
161 | 161 | | | |
|
162 | 162 | | o 3:55759520c76f add normal3, modify sub/* |
|
163 | 163 | | | |
|
164 | 164 | o | 2:261ad3f3f037 rename sub/ to stuff/ |
|
165 | 165 | |/ |
|
166 | 166 | o 1:334e5237836d add sub/* |
|
167 | 167 | | |
|
168 | 168 | o 0:d4892ec57ce2 add large, normal1 |
|
169 | 169 | |
|
170 | 170 | $ hg locate -r 2 |
|
171 | 171 | .hglf/large |
|
172 | 172 | .hglf/stuff/maybelarge.dat |
|
173 | 173 | normal1 |
|
174 | 174 | stuff/normal2 |
|
175 | 175 | $ hg locate -r 3 |
|
176 | 176 | .hglf/large |
|
177 | 177 | .hglf/sub/maybelarge.dat |
|
178 | 178 | normal1 |
|
179 | 179 | normal3 |
|
180 | 180 | sub/normal2 |
|
181 | 181 | $ hg locate -r 4 |
|
182 | 182 | .hglf/sub/maybelarge.dat |
|
183 | 183 | normal1 |
|
184 | 184 | sub/normal2 |
|
185 | 185 | $ hg locate -r 5 |
|
186 | 186 | .hglf/stuff/maybelarge.dat |
|
187 | 187 | normal1 |
|
188 | 188 | stuff/normal2 |
|
189 | 189 | $ hg update |
|
190 | 190 | getting changed largefiles |
|
191 | 191 | 1 largefiles updated, 0 removed |
|
192 | 192 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
193 | 193 | $ cat stuff/normal2 |
|
194 | 194 | alsonormal |
|
195 | 195 | blah |
|
196 | 196 | $ md5sum.py stuff/maybelarge.dat |
|
197 | 197 | 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat |
|
198 | 198 | $ cat .hglf/stuff/maybelarge.dat |
|
199 | 199 | 76236b6a2c6102826c61af4297dd738fb3b1de38 |
|
200 | 200 | $ cd .. |
|
201 | 201 | |
|
202 | 202 | "lfconvert" error cases |
|
203 | 203 | $ hg lfconvert http://localhost/foo foo |
|
204 | 204 | abort: http://localhost/foo is not a local Mercurial repo |
|
205 | 205 | [255] |
|
206 | 206 | $ hg lfconvert foo ssh://localhost/foo |
|
207 | 207 | abort: ssh://localhost/foo is not a local Mercurial repo |
|
208 | 208 | [255] |
|
209 | 209 | $ hg lfconvert nosuchrepo foo |
|
210 | 210 | abort: repository nosuchrepo not found! |
|
211 | 211 | [255] |
|
212 | 212 | $ hg share -q -U bigfile-repo shared |
|
213 | 213 | $ printf 'bogus' > shared/.hg/sharedpath |
|
214 | 214 | $ hg lfconvert shared foo |
|
215 | 215 | abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob) |
|
216 | 216 | [255] |
|
217 | 217 | $ hg lfconvert bigfile-repo largefiles-repo |
|
218 | 218 | initializing destination largefiles-repo |
|
219 | 219 | abort: repository largefiles-repo already exists! |
|
220 | 220 | [255] |
|
221 | 221 | |
|
222 | 222 | add another largefile to the new largefiles repo |
|
223 | 223 | $ cd largefiles-repo |
|
224 | 224 | $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null |
|
225 | 225 | $ hg add --lfsize=1 anotherlarge |
|
226 | 226 | $ hg commit -m "add anotherlarge (should be a largefile)" |
|
227 | 227 | $ cat .hglf/anotherlarge |
|
228 | 228 | 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 |
|
229 | 229 | $ hg tag mytag |
|
230 | 230 | $ cd .. |
|
231 | 231 | |
|
232 | 232 | round-trip: converting back to a normal (non-largefiles) repo with |
|
233 | 233 | "lfconvert --to-normal" should give the same as ../bigfile-repo |
|
234 | 234 | $ cd largefiles-repo |
|
235 | 235 | $ hg lfconvert --to-normal . ../normal-repo |
|
236 | 236 | initializing destination ../normal-repo |
|
237 | 237 | 0 additional largefiles cached |
|
238 | 238 | scanning source... |
|
239 | 239 | sorting... |
|
240 | 240 | converting... |
|
241 | 241 | 7 add large, normal1 |
|
242 | 242 | 6 add sub/* |
|
243 | 243 | 5 rename sub/ to stuff/ |
|
244 | 244 | 4 add normal3, modify sub/* |
|
245 | 245 | 3 remove large, normal3 |
|
246 | 246 | 2 merge |
|
247 | 247 | 1 add anotherlarge (should be a largefile) |
|
248 | 248 | 0 Added tag mytag for changeset abacddda7028 |
|
249 | 249 | $ cd ../normal-repo |
|
250 | 250 | $ cat >> .hg/hgrc <<EOF |
|
251 | 251 | > [extensions] |
|
252 | 252 | > largefiles = ! |
|
253 | 253 | > EOF |
|
254 | 254 | |
|
255 | 255 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
256 | 256 | o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4 |
|
257 | 257 | | |
|
258 | 258 | o 6:867ab992ecf4 add anotherlarge (should be a largefile) |
|
259 | 259 | | |
|
260 | 260 | o 5:4884f215abda merge |
|
261 | 261 | |\ |
|
262 | 262 | | o 4:7285f817b77e remove large, normal3 |
|
263 | 263 | | | |
|
264 | 264 | | o 3:67e3892e3534 add normal3, modify sub/* |
|
265 | 265 | | | |
|
266 | 266 | o | 2:c96c8beb5d56 rename sub/ to stuff/ |
|
267 | 267 | |/ |
|
268 | 268 | o 1:020c65d24e11 add sub/* |
|
269 | 269 | | |
|
270 | 270 | o 0:117b8328f97a add large, normal1 |
|
271 | 271 | |
|
272 | 272 | $ hg update |
|
273 | 273 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
274 | 274 | $ hg locate |
|
275 | 275 | .hgtags |
|
276 | 276 | anotherlarge |
|
277 | 277 | normal1 |
|
278 | 278 | stuff/maybelarge.dat |
|
279 | 279 | stuff/normal2 |
|
280 | 280 | $ [ -d .hg/largefiles ] && echo fail || echo pass |
|
281 | 281 | pass |
|
282 | 282 | |
|
283 | 283 | $ cd .. |
|
284 | 284 | |
|
285 | 285 | Clearing the usercache ensures that commitctx doesn't try to cache largefiles |
|
286 | 286 | from the working dir on a convert. |
|
287 | 287 | $ rm "${USERCACHE}"/* |
|
288 | 288 | $ hg convert largefiles-repo |
|
289 | 289 | assuming destination largefiles-repo-hg |
|
290 | 290 | initializing destination largefiles-repo-hg repository |
|
291 | 291 | scanning source... |
|
292 | 292 | sorting... |
|
293 | 293 | converting... |
|
294 | 294 | 7 add large, normal1 |
|
295 | 295 | 6 add sub/* |
|
296 | 296 | 5 rename sub/ to stuff/ |
|
297 | 297 | 4 add normal3, modify sub/* |
|
298 | 298 | 3 remove large, normal3 |
|
299 | 299 | 2 merge |
|
300 | 300 | 1 add anotherlarge (should be a largefile) |
|
301 | 301 | 0 Added tag mytag for changeset abacddda7028 |
|
302 | 302 | |
|
303 | 303 | $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
304 | 304 | o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd |
|
305 | 305 | | |
|
306 | 306 | o 6:17126745edfd add anotherlarge (should be a largefile) |
|
307 | 307 | | |
|
308 | 308 | o 5:9cc5aa7204f0 merge |
|
309 | 309 | |\ |
|
310 | 310 | | o 4:a5a02de7a8e4 remove large, normal3 |
|
311 | 311 | | | |
|
312 | 312 | | o 3:55759520c76f add normal3, modify sub/* |
|
313 | 313 | | | |
|
314 | 314 | o | 2:261ad3f3f037 rename sub/ to stuff/ |
|
315 | 315 | |/ |
|
316 | 316 | o 1:334e5237836d add sub/* |
|
317 | 317 | | |
|
318 | 318 | o 0:d4892ec57ce2 add large, normal1 |
|
319 | 319 | |
|
320 | 320 | Verify will fail (for now) if the usercache is purged before converting, since |
|
321 | 321 | largefiles are not cached in the converted repo's local store by the conversion |
|
322 | 322 | process. |
|
323 | 323 | $ cd largefiles-repo-hg |
|
324 | 324 | $ cat >> .hg/hgrc <<EOF |
|
325 | 325 | > [experimental] |
|
326 | 326 | > evolution=createmarkers |
|
327 | 327 | > EOF |
|
328 | 328 | $ hg debugobsolete `hg log -r tip -T "{node}"` |
|
329 | 329 | $ cd .. |
|
330 | 330 | |
|
331 | 331 | $ hg -R largefiles-repo-hg verify --large --lfa |
|
332 | 332 | checking changesets |
|
333 | 333 | checking manifests |
|
334 | 334 | crosschecking files in changesets and manifests |
|
335 | 335 | checking files |
|
336 | 336 | 9 files, 8 changesets, 13 total revisions |
|
337 | 337 | searching 7 changesets for largefiles |
|
338 | 338 | changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob) |
|
339 | 339 | changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
|
340 | 340 | changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob) |
|
341 | 341 | changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
|
342 | 342 | changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob) |
|
343 | 343 | changeset 6:17126745edfd: anotherlarge references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (glob) |
|
344 | 344 | verified existence of 6 revisions of 4 largefiles |
|
345 | 345 | [1] |
|
346 | 346 | $ hg -R largefiles-repo-hg showconfig paths |
|
347 | 347 | [1] |
|
348 | 348 | |
|
349 | 349 | |
|
350 | 350 | Avoid a traceback if a largefile isn't available (issue3519) |
|
351 | 351 | |
|
352 | 352 | Ensure the largefile can be cached in the source if necessary |
|
353 | 353 | $ hg clone -U largefiles-repo issue3519 |
|
354 | 354 | $ rm -f "${USERCACHE}"/* |
|
355 | 355 | $ hg lfconvert --to-normal issue3519 normalized3519 |
|
356 | 356 | initializing destination normalized3519 |
|
357 | 357 | 4 additional largefiles cached |
|
358 | 358 | scanning source... |
|
359 | 359 | sorting... |
|
360 | 360 | converting... |
|
361 | 361 | 7 add large, normal1 |
|
362 | 362 | 6 add sub/* |
|
363 | 363 | 5 rename sub/ to stuff/ |
|
364 | 364 | 4 add normal3, modify sub/* |
|
365 | 365 | 3 remove large, normal3 |
|
366 | 366 | 2 merge |
|
367 | 367 | 1 add anotherlarge (should be a largefile) |
|
368 | 368 | 0 Added tag mytag for changeset abacddda7028 |
|
369 | 369 | |
|
370 | 370 | Ensure the abort message is useful if a largefile is entirely unavailable |
|
371 | 371 | $ rm -rf normalized3519 |
|
372 | 372 | $ rm "${USERCACHE}"/* |
|
373 | 373 | $ rm issue3519/.hg/largefiles/* |
|
374 | 374 | $ rm largefiles-repo/.hg/largefiles/* |
|
375 | 375 | $ hg lfconvert --to-normal issue3519 normalized3519 |
|
376 | 376 | initializing destination normalized3519 |
|
377 | 377 | anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
378 | 378 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
379 | 379 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
380 | 380 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
381 | 381 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
382 | 382 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
383 | 383 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
384 | 384 | stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
385 | 385 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
386 | 386 | sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
387 | 387 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
388 | 388 | 0 additional largefiles cached |
|
389 | 389 | 11 largefiles failed to download |
|
390 | 390 | abort: all largefiles must be present locally |
|
391 | 391 | [255] |
|
392 | 392 | |
|
393 | 393 |
@@ -1,182 +1,182 b'' | |||
|
1 | 1 | Check that renames are correctly saved by a commit after a merge |
|
2 | 2 | |
|
3 | 3 | Test with the merge on 3 having the rename on the local parent |
|
4 | 4 | |
|
5 | 5 | $ hg init a |
|
6 | 6 | $ cd a |
|
7 | 7 | |
|
8 | 8 | $ echo line1 > foo |
|
9 | 9 | $ hg add foo |
|
10 | 10 | $ hg ci -m '0: add foo' |
|
11 | 11 | |
|
12 | 12 | $ echo line2 >> foo |
|
13 | 13 | $ hg ci -m '1: change foo' |
|
14 | 14 | |
|
15 | 15 | $ hg up -C 0 |
|
16 | 16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | $ hg mv foo bar |
|
19 | 19 | $ rm bar |
|
20 | 20 | $ echo line0 > bar |
|
21 | 21 | $ echo line1 >> bar |
|
22 | 22 | $ hg ci -m '2: mv foo bar; change bar' |
|
23 | 23 | created new head |
|
24 | 24 | |
|
25 | 25 | $ hg merge 1 |
|
26 | 26 | merging bar and foo to bar |
|
27 | 27 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | (branch merge, don't forget to commit) |
|
29 | 29 | |
|
30 | 30 | $ cat bar |
|
31 | 31 | line0 |
|
32 | 32 | line1 |
|
33 | 33 | line2 |
|
34 | 34 | |
|
35 | 35 | $ hg ci -m '3: merge with local rename' |
|
36 | 36 | |
|
37 | 37 | $ hg debugindex bar |
|
38 | 38 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
39 | 39 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
40 | 40 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
41 | 41 | |
|
42 | 42 | $ hg debugrename bar |
|
43 | 43 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 |
|
44 | 44 | |
|
45 | 45 | $ hg debugindex foo |
|
46 | 46 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
47 | 47 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) |
|
48 | 48 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | Revert the content change from rev 2: |
|
52 | 52 | |
|
53 | 53 | $ hg up -C 2 |
|
54 | 54 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 55 | $ rm bar |
|
56 | 56 | $ echo line1 > bar |
|
57 | 57 | $ hg ci -m '4: revert content change from rev 2' |
|
58 | 58 | created new head |
|
59 | 59 | |
|
60 | 60 | $ hg log --template '{rev}:{node|short} {parents}\n' |
|
61 | 61 | 4:2263c1be0967 2:0f2ff26688b9 |
|
62 | 62 | 3:0555950ead28 2:0f2ff26688b9 1:5cd961e4045d |
|
63 | 63 | 2:0f2ff26688b9 0:2665aaee66e9 |
|
64 | 64 | 1:5cd961e4045d |
|
65 | 65 | 0:2665aaee66e9 |
|
66 | 66 | |
|
67 | 67 | This should use bar@rev2 as the ancestor: |
|
68 | 68 | |
|
69 | 69 | $ hg --debug merge 3 |
|
70 | 70 | searching for copies back to rev 1 |
|
71 | 71 | resolving manifests |
|
72 | 72 | branchmerge: True, force: False, partial: False |
|
73 | 73 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 0555950ead28 |
|
74 | 74 | preserving bar for resolve of bar |
|
75 | bar: versions differ -> m | |
|
75 | bar: versions differ -> m (premerge) | |
|
76 | 76 | picked tool ':merge' for bar (binary False symlink False) |
|
77 | 77 | merging bar |
|
78 | 78 | my bar@2263c1be0967+ other bar@0555950ead28 ancestor bar@0f2ff26688b9 |
|
79 | 79 | premerge successful |
|
80 | 80 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
81 | 81 | (branch merge, don't forget to commit) |
|
82 | 82 | |
|
83 | 83 | $ cat bar |
|
84 | 84 | line1 |
|
85 | 85 | line2 |
|
86 | 86 | |
|
87 | 87 | $ hg ci -m '5: merge' |
|
88 | 88 | |
|
89 | 89 | $ hg debugindex bar |
|
90 | 90 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
91 | 91 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
92 | 92 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
93 | 93 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) |
|
94 | 94 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) |
|
95 | 95 | |
|
96 | 96 | |
|
97 | 97 | Same thing, but with the merge on 3 having the rename |
|
98 | 98 | on the remote parent: |
|
99 | 99 | |
|
100 | 100 | $ cd .. |
|
101 | 101 | $ hg clone -U -r 1 -r 2 a b |
|
102 | 102 | adding changesets |
|
103 | 103 | adding manifests |
|
104 | 104 | adding file changes |
|
105 | 105 | added 3 changesets with 3 changes to 2 files (+1 heads) |
|
106 | 106 | $ cd b |
|
107 | 107 | |
|
108 | 108 | $ hg up -C 1 |
|
109 | 109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
110 | 110 | |
|
111 | 111 | $ hg merge 2 |
|
112 | 112 | merging foo and bar to bar |
|
113 | 113 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
114 | 114 | (branch merge, don't forget to commit) |
|
115 | 115 | |
|
116 | 116 | $ cat bar |
|
117 | 117 | line0 |
|
118 | 118 | line1 |
|
119 | 119 | line2 |
|
120 | 120 | |
|
121 | 121 | $ hg ci -m '3: merge with remote rename' |
|
122 | 122 | |
|
123 | 123 | $ hg debugindex bar |
|
124 | 124 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
125 | 125 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
126 | 126 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
127 | 127 | |
|
128 | 128 | $ hg debugrename bar |
|
129 | 129 | bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2 |
|
130 | 130 | |
|
131 | 131 | $ hg debugindex foo |
|
132 | 132 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
133 | 133 | 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re) |
|
134 | 134 | 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re) |
|
135 | 135 | |
|
136 | 136 | |
|
137 | 137 | Revert the content change from rev 2: |
|
138 | 138 | |
|
139 | 139 | $ hg up -C 2 |
|
140 | 140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
141 | 141 | $ rm bar |
|
142 | 142 | $ echo line1 > bar |
|
143 | 143 | $ hg ci -m '4: revert content change from rev 2' |
|
144 | 144 | created new head |
|
145 | 145 | |
|
146 | 146 | $ hg log --template '{rev}:{node|short} {parents}\n' |
|
147 | 147 | 4:2263c1be0967 2:0f2ff26688b9 |
|
148 | 148 | 3:3ffa6b9e35f0 1:5cd961e4045d 2:0f2ff26688b9 |
|
149 | 149 | 2:0f2ff26688b9 0:2665aaee66e9 |
|
150 | 150 | 1:5cd961e4045d |
|
151 | 151 | 0:2665aaee66e9 |
|
152 | 152 | |
|
153 | 153 | This should use bar@rev2 as the ancestor: |
|
154 | 154 | |
|
155 | 155 | $ hg --debug merge 3 |
|
156 | 156 | searching for copies back to rev 1 |
|
157 | 157 | resolving manifests |
|
158 | 158 | branchmerge: True, force: False, partial: False |
|
159 | 159 | ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 3ffa6b9e35f0 |
|
160 | 160 | preserving bar for resolve of bar |
|
161 | bar: versions differ -> m | |
|
161 | bar: versions differ -> m (premerge) | |
|
162 | 162 | picked tool ':merge' for bar (binary False symlink False) |
|
163 | 163 | merging bar |
|
164 | 164 | my bar@2263c1be0967+ other bar@3ffa6b9e35f0 ancestor bar@0f2ff26688b9 |
|
165 | 165 | premerge successful |
|
166 | 166 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
167 | 167 | (branch merge, don't forget to commit) |
|
168 | 168 | |
|
169 | 169 | $ cat bar |
|
170 | 170 | line1 |
|
171 | 171 | line2 |
|
172 | 172 | |
|
173 | 173 | $ hg ci -m '5: merge' |
|
174 | 174 | |
|
175 | 175 | $ hg debugindex bar |
|
176 | 176 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
177 | 177 | 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re) |
|
178 | 178 | 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re) |
|
179 | 179 | 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re) |
|
180 | 180 | 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re) |
|
181 | 181 | |
|
182 | 182 | $ cd .. |
@@ -1,351 +1,352 b'' | |||
|
1 | 1 | Criss cross merging |
|
2 | 2 | |
|
3 | 3 | $ hg init criss-cross |
|
4 | 4 | $ cd criss-cross |
|
5 | 5 | $ echo '0 base' > f1 |
|
6 | 6 | $ echo '0 base' > f2 |
|
7 | 7 | $ hg ci -Aqm '0 base' |
|
8 | 8 | |
|
9 | 9 | $ echo '1 first change' > f1 |
|
10 | 10 | $ hg ci -m '1 first change f1' |
|
11 | 11 | |
|
12 | 12 | $ hg up -qr0 |
|
13 | 13 | $ echo '2 first change' > f2 |
|
14 | 14 | $ hg ci -qm '2 first change f2' |
|
15 | 15 | |
|
16 | 16 | $ hg merge -qr 1 |
|
17 | 17 | $ hg ci -m '3 merge' |
|
18 | 18 | |
|
19 | 19 | $ hg up -qr2 |
|
20 | 20 | $ hg merge -qr1 |
|
21 | 21 | $ hg ci -qm '4 merge' |
|
22 | 22 | |
|
23 | 23 | $ echo '5 second change' > f1 |
|
24 | 24 | $ hg ci -m '5 second change f1' |
|
25 | 25 | |
|
26 | 26 | $ hg up -r3 |
|
27 | 27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | $ echo '6 second change' > f2 |
|
29 | 29 | $ hg ci -m '6 second change f2' |
|
30 | 30 | |
|
31 | 31 | $ hg log -G |
|
32 | 32 | @ changeset: 6:3b08d01b0ab5 |
|
33 | 33 | | tag: tip |
|
34 | 34 | | parent: 3:cf89f02107e5 |
|
35 | 35 | | user: test |
|
36 | 36 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
37 | 37 | | summary: 6 second change f2 |
|
38 | 38 | | |
|
39 | 39 | | o changeset: 5:adfe50279922 |
|
40 | 40 | | | user: test |
|
41 | 41 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
42 | 42 | | | summary: 5 second change f1 |
|
43 | 43 | | | |
|
44 | 44 | | o changeset: 4:7d3e55501ae6 |
|
45 | 45 | | |\ parent: 2:40663881a6dd |
|
46 | 46 | | | | parent: 1:0f6b37dbe527 |
|
47 | 47 | | | | user: test |
|
48 | 48 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
49 | 49 | | | | summary: 4 merge |
|
50 | 50 | | | | |
|
51 | 51 | o---+ changeset: 3:cf89f02107e5 |
|
52 | 52 | | | | parent: 2:40663881a6dd |
|
53 | 53 | |/ / parent: 1:0f6b37dbe527 |
|
54 | 54 | | | user: test |
|
55 | 55 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
56 | 56 | | | summary: 3 merge |
|
57 | 57 | | | |
|
58 | 58 | | o changeset: 2:40663881a6dd |
|
59 | 59 | | | parent: 0:40494bf2444c |
|
60 | 60 | | | user: test |
|
61 | 61 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
62 | 62 | | | summary: 2 first change f2 |
|
63 | 63 | | | |
|
64 | 64 | o | changeset: 1:0f6b37dbe527 |
|
65 | 65 | |/ user: test |
|
66 | 66 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
67 | 67 | | summary: 1 first change f1 |
|
68 | 68 | | |
|
69 | 69 | o changeset: 0:40494bf2444c |
|
70 | 70 | user: test |
|
71 | 71 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
72 | 72 | summary: 0 base |
|
73 | 73 | |
|
74 | 74 | |
|
75 | 75 | $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor='!' |
|
76 | 76 | note: using 0f6b37dbe527 as ancestor of 3b08d01b0ab5 and adfe50279922 |
|
77 | 77 | alternatively, use --config merge.preferancestor=40663881a6dd |
|
78 | 78 | searching for copies back to rev 3 |
|
79 | 79 | resolving manifests |
|
80 | 80 | branchmerge: True, force: False, partial: False |
|
81 | 81 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
82 | 82 | preserving f2 for resolve of f2 |
|
83 | 83 | f1: remote is newer -> g |
|
84 | 84 | getting f1 |
|
85 | f2: versions differ -> m | |
|
85 | f2: versions differ -> m (premerge) | |
|
86 | 86 | picked tool ':dump' for f2 (binary False symlink False) |
|
87 | 87 | merging f2 |
|
88 | 88 | my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c |
|
89 | f2: versions differ -> m (merge) | |
|
89 | 90 | picked tool ':dump' for f2 (binary False symlink False) |
|
90 | 91 | my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c |
|
91 | 92 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
92 | 93 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
93 | 94 | [1] |
|
94 | 95 | |
|
95 | 96 | $ head * |
|
96 | 97 | ==> f1 <== |
|
97 | 98 | 5 second change |
|
98 | 99 | |
|
99 | 100 | ==> f2 <== |
|
100 | 101 | 6 second change |
|
101 | 102 | |
|
102 | 103 | ==> f2.base <== |
|
103 | 104 | 0 base |
|
104 | 105 | |
|
105 | 106 | ==> f2.local <== |
|
106 | 107 | 6 second change |
|
107 | 108 | |
|
108 | 109 | ==> f2.orig <== |
|
109 | 110 | 6 second change |
|
110 | 111 | |
|
111 | 112 | ==> f2.other <== |
|
112 | 113 | 2 first change |
|
113 | 114 | |
|
114 | 115 | $ hg up -qC . |
|
115 | 116 | $ hg merge -v --tool internal:dump 5 --config merge.preferancestor="null 40663881 3b08d" |
|
116 | 117 | note: using 40663881a6dd as ancestor of 3b08d01b0ab5 and adfe50279922 |
|
117 | 118 | alternatively, use --config merge.preferancestor=0f6b37dbe527 |
|
118 | 119 | resolving manifests |
|
119 | 120 | merging f1 |
|
120 | 121 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
121 | 122 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
122 | 123 | [1] |
|
123 | 124 | |
|
124 | 125 | Redo merge with merge.preferancestor="*" to enable bid merge |
|
125 | 126 | |
|
126 | 127 | $ rm f* |
|
127 | 128 | $ hg up -qC . |
|
128 | 129 | $ hg merge -v --debug --tool internal:dump 5 --config merge.preferancestor="*" |
|
129 | 130 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
130 | 131 | |
|
131 | 132 | calculating bids for ancestor 0f6b37dbe527 |
|
132 | 133 | searching for copies back to rev 3 |
|
133 | 134 | resolving manifests |
|
134 | 135 | branchmerge: True, force: False, partial: False |
|
135 | 136 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
136 | 137 | f1: remote is newer -> g |
|
137 | 138 | f2: versions differ -> m |
|
138 | 139 | |
|
139 | 140 | calculating bids for ancestor 40663881a6dd |
|
140 | 141 | searching for copies back to rev 3 |
|
141 | 142 | resolving manifests |
|
142 | 143 | branchmerge: True, force: False, partial: False |
|
143 | 144 | ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
144 | 145 | f1: versions differ -> m |
|
145 | 146 | f2: remote unchanged -> k |
|
146 | 147 | |
|
147 | 148 | auction for merging merge bids |
|
148 | 149 | f1: picking 'get' action |
|
149 | 150 | f2: picking 'keep' action |
|
150 | 151 | end of auction |
|
151 | 152 | |
|
152 | 153 | f1: remote is newer -> g |
|
153 | 154 | getting f1 |
|
154 | 155 | f2: remote unchanged -> k |
|
155 | 156 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
156 | 157 | (branch merge, don't forget to commit) |
|
157 | 158 | |
|
158 | 159 | $ head * |
|
159 | 160 | ==> f1 <== |
|
160 | 161 | 5 second change |
|
161 | 162 | |
|
162 | 163 | ==> f2 <== |
|
163 | 164 | 6 second change |
|
164 | 165 | |
|
165 | 166 | |
|
166 | 167 | The other way around: |
|
167 | 168 | |
|
168 | 169 | $ hg up -C -r5 |
|
169 | 170 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
170 | 171 | $ hg merge -v --debug --config merge.preferancestor="*" |
|
171 | 172 | note: merging adfe50279922+ and 3b08d01b0ab5 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
172 | 173 | |
|
173 | 174 | calculating bids for ancestor 0f6b37dbe527 |
|
174 | 175 | searching for copies back to rev 3 |
|
175 | 176 | resolving manifests |
|
176 | 177 | branchmerge: True, force: False, partial: False |
|
177 | 178 | ancestor: 0f6b37dbe527, local: adfe50279922+, remote: 3b08d01b0ab5 |
|
178 | 179 | f1: remote unchanged -> k |
|
179 | 180 | f2: versions differ -> m |
|
180 | 181 | |
|
181 | 182 | calculating bids for ancestor 40663881a6dd |
|
182 | 183 | searching for copies back to rev 3 |
|
183 | 184 | resolving manifests |
|
184 | 185 | branchmerge: True, force: False, partial: False |
|
185 | 186 | ancestor: 40663881a6dd, local: adfe50279922+, remote: 3b08d01b0ab5 |
|
186 | 187 | f1: versions differ -> m |
|
187 | 188 | f2: remote is newer -> g |
|
188 | 189 | |
|
189 | 190 | auction for merging merge bids |
|
190 | 191 | f1: picking 'keep' action |
|
191 | 192 | f2: picking 'get' action |
|
192 | 193 | end of auction |
|
193 | 194 | |
|
194 | 195 | f2: remote is newer -> g |
|
195 | 196 | getting f2 |
|
196 | 197 | f1: remote unchanged -> k |
|
197 | 198 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
198 | 199 | (branch merge, don't forget to commit) |
|
199 | 200 | |
|
200 | 201 | $ head * |
|
201 | 202 | ==> f1 <== |
|
202 | 203 | 5 second change |
|
203 | 204 | |
|
204 | 205 | ==> f2 <== |
|
205 | 206 | 6 second change |
|
206 | 207 | |
|
207 | 208 | Verify how the output looks and and how verbose it is: |
|
208 | 209 | |
|
209 | 210 | $ hg up -qC |
|
210 | 211 | $ hg merge |
|
211 | 212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
212 | 213 | (branch merge, don't forget to commit) |
|
213 | 214 | |
|
214 | 215 | $ hg up -qC |
|
215 | 216 | $ hg merge -v |
|
216 | 217 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
217 | 218 | |
|
218 | 219 | calculating bids for ancestor 0f6b37dbe527 |
|
219 | 220 | resolving manifests |
|
220 | 221 | |
|
221 | 222 | calculating bids for ancestor 40663881a6dd |
|
222 | 223 | resolving manifests |
|
223 | 224 | |
|
224 | 225 | auction for merging merge bids |
|
225 | 226 | f1: picking 'get' action |
|
226 | 227 | f2: picking 'keep' action |
|
227 | 228 | end of auction |
|
228 | 229 | |
|
229 | 230 | getting f1 |
|
230 | 231 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
231 | 232 | (branch merge, don't forget to commit) |
|
232 | 233 | |
|
233 | 234 | $ hg up -qC |
|
234 | 235 | $ hg merge -v --debug --config merge.preferancestor="*" |
|
235 | 236 | note: merging 3b08d01b0ab5+ and adfe50279922 using bids from ancestors 0f6b37dbe527 and 40663881a6dd |
|
236 | 237 | |
|
237 | 238 | calculating bids for ancestor 0f6b37dbe527 |
|
238 | 239 | searching for copies back to rev 3 |
|
239 | 240 | resolving manifests |
|
240 | 241 | branchmerge: True, force: False, partial: False |
|
241 | 242 | ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
242 | 243 | f1: remote is newer -> g |
|
243 | 244 | f2: versions differ -> m |
|
244 | 245 | |
|
245 | 246 | calculating bids for ancestor 40663881a6dd |
|
246 | 247 | searching for copies back to rev 3 |
|
247 | 248 | resolving manifests |
|
248 | 249 | branchmerge: True, force: False, partial: False |
|
249 | 250 | ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922 |
|
250 | 251 | f1: versions differ -> m |
|
251 | 252 | f2: remote unchanged -> k |
|
252 | 253 | |
|
253 | 254 | auction for merging merge bids |
|
254 | 255 | f1: picking 'get' action |
|
255 | 256 | f2: picking 'keep' action |
|
256 | 257 | end of auction |
|
257 | 258 | |
|
258 | 259 | f1: remote is newer -> g |
|
259 | 260 | getting f1 |
|
260 | 261 | f2: remote unchanged -> k |
|
261 | 262 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 263 | (branch merge, don't forget to commit) |
|
263 | 264 | |
|
264 | 265 | $ cd .. |
|
265 | 266 | |
|
266 | 267 | http://stackoverflow.com/questions/9350005/how-do-i-specify-a-merge-base-to-use-in-a-hg-merge/9430810 |
|
267 | 268 | |
|
268 | 269 | $ hg init ancestor-merging |
|
269 | 270 | $ cd ancestor-merging |
|
270 | 271 | $ echo a > x |
|
271 | 272 | $ hg commit -A -m a x |
|
272 | 273 | $ hg update -q 0 |
|
273 | 274 | $ echo b >> x |
|
274 | 275 | $ hg commit -m b |
|
275 | 276 | $ hg update -q 0 |
|
276 | 277 | $ echo c >> x |
|
277 | 278 | $ hg commit -qm c |
|
278 | 279 | $ hg update -q 1 |
|
279 | 280 | $ hg merge -q --tool internal:local 2 |
|
280 | 281 | $ echo c >> x |
|
281 | 282 | $ hg commit -m bc |
|
282 | 283 | $ hg update -q 2 |
|
283 | 284 | $ hg merge -q --tool internal:local 1 |
|
284 | 285 | $ echo b >> x |
|
285 | 286 | $ hg commit -qm cb |
|
286 | 287 | |
|
287 | 288 | $ hg merge --config merge.preferancestor='!' |
|
288 | 289 | note: using 70008a2163f6 as ancestor of 0d355fdef312 and 4b8b546a3eef |
|
289 | 290 | alternatively, use --config merge.preferancestor=b211bbc6eb3c |
|
290 | 291 | merging x |
|
291 | 292 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
292 | 293 | (branch merge, don't forget to commit) |
|
293 | 294 | $ cat x |
|
294 | 295 | a |
|
295 | 296 | c |
|
296 | 297 | b |
|
297 | 298 | c |
|
298 | 299 | |
|
299 | 300 | $ hg up -qC . |
|
300 | 301 | |
|
301 | 302 | $ hg merge --config merge.preferancestor=b211bbc6eb3c |
|
302 | 303 | note: using b211bbc6eb3c as ancestor of 0d355fdef312 and 4b8b546a3eef |
|
303 | 304 | alternatively, use --config merge.preferancestor=70008a2163f6 |
|
304 | 305 | merging x |
|
305 | 306 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
306 | 307 | (branch merge, don't forget to commit) |
|
307 | 308 | $ cat x |
|
308 | 309 | a |
|
309 | 310 | b |
|
310 | 311 | c |
|
311 | 312 | b |
|
312 | 313 | |
|
313 | 314 | $ hg up -qC . |
|
314 | 315 | |
|
315 | 316 | $ hg merge -v --config merge.preferancestor="*" |
|
316 | 317 | note: merging 0d355fdef312+ and 4b8b546a3eef using bids from ancestors 70008a2163f6 and b211bbc6eb3c |
|
317 | 318 | |
|
318 | 319 | calculating bids for ancestor 70008a2163f6 |
|
319 | 320 | resolving manifests |
|
320 | 321 | |
|
321 | 322 | calculating bids for ancestor b211bbc6eb3c |
|
322 | 323 | resolving manifests |
|
323 | 324 | |
|
324 | 325 | auction for merging merge bids |
|
325 | 326 | x: multiple bids for merge action: |
|
326 | 327 | versions differ -> m |
|
327 | 328 | versions differ -> m |
|
328 | 329 | x: ambiguous merge - picked m action |
|
329 | 330 | end of auction |
|
330 | 331 | |
|
331 | 332 | merging x |
|
332 | 333 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
333 | 334 | (branch merge, don't forget to commit) |
|
334 | 335 | $ cat x |
|
335 | 336 | a |
|
336 | 337 | c |
|
337 | 338 | b |
|
338 | 339 | c |
|
339 | 340 | |
|
340 | 341 | Verify that the old context ancestor works with / despite preferancestor: |
|
341 | 342 | |
|
342 | 343 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=1 -T '{rev}\n' |
|
343 | 344 | 1 |
|
344 | 345 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=2 -T '{rev}\n' |
|
345 | 346 | 2 |
|
346 | 347 | $ hg log -r 'ancestor(head())' --config merge.preferancestor=3 -T '{rev}\n' |
|
347 | 348 | 1 |
|
348 | 349 | $ hg log -r 'ancestor(head())' --config merge.preferancestor='1337 * - 2' -T '{rev}\n' |
|
349 | 350 | 2 |
|
350 | 351 | |
|
351 | 352 | $ cd .. |
@@ -1,665 +1,665 b'' | |||
|
1 | 1 | Set up a base, local, and remote changeset, as well as the working copy state. |
|
2 | 2 | Files names are of the form base_remote_local_working-copy. For example, |
|
3 | 3 | content1_content2_content1_content2-untracked represents a |
|
4 | 4 | file that was modified in the remote changeset, left untouched in the |
|
5 | 5 | local changeset, and then modified in the working copy to match the |
|
6 | 6 | remote content, then finally forgotten. |
|
7 | 7 | |
|
8 | 8 | $ hg init |
|
9 | 9 | |
|
10 | 10 | Create base changeset |
|
11 | 11 | |
|
12 | 12 | $ python $TESTDIR/generate-working-copy-states.py state 3 1 |
|
13 | 13 | $ hg addremove -q --similarity 0 |
|
14 | 14 | $ hg commit -qm 'base' |
|
15 | 15 | |
|
16 | 16 | Create remote changeset |
|
17 | 17 | |
|
18 | 18 | $ python $TESTDIR/generate-working-copy-states.py state 3 2 |
|
19 | 19 | $ hg addremove -q --similarity 0 |
|
20 | 20 | $ hg commit -qm 'remote' |
|
21 | 21 | |
|
22 | 22 | Create local changeset |
|
23 | 23 | |
|
24 | 24 | $ hg update -q 0 |
|
25 | 25 | $ python $TESTDIR/generate-working-copy-states.py state 3 3 |
|
26 | 26 | $ hg addremove -q --similarity 0 |
|
27 | 27 | $ hg commit -qm 'local' |
|
28 | 28 | |
|
29 | 29 | Set up working directory |
|
30 | 30 | |
|
31 | 31 | $ python $TESTDIR/generate-working-copy-states.py state 3 wc |
|
32 | 32 | $ hg addremove -q --similarity 0 |
|
33 | 33 | $ hg forget *_*_*_*-untracked |
|
34 | 34 | $ rm *_*_*_missing-* |
|
35 | 35 | |
|
36 | 36 | $ hg status -A |
|
37 | 37 | M content1_content1_content1_content4-tracked |
|
38 | 38 | M content1_content1_content3_content1-tracked |
|
39 | 39 | M content1_content1_content3_content4-tracked |
|
40 | 40 | M content1_content2_content1_content2-tracked |
|
41 | 41 | M content1_content2_content1_content4-tracked |
|
42 | 42 | M content1_content2_content2_content1-tracked |
|
43 | 43 | M content1_content2_content2_content4-tracked |
|
44 | 44 | M content1_content2_content3_content1-tracked |
|
45 | 45 | M content1_content2_content3_content2-tracked |
|
46 | 46 | M content1_content2_content3_content4-tracked |
|
47 | 47 | M content1_missing_content1_content4-tracked |
|
48 | 48 | M content1_missing_content3_content1-tracked |
|
49 | 49 | M content1_missing_content3_content4-tracked |
|
50 | 50 | M missing_content2_content2_content4-tracked |
|
51 | 51 | M missing_content2_content3_content2-tracked |
|
52 | 52 | M missing_content2_content3_content4-tracked |
|
53 | 53 | M missing_missing_content3_content4-tracked |
|
54 | 54 | A content1_content1_missing_content1-tracked |
|
55 | 55 | A content1_content1_missing_content4-tracked |
|
56 | 56 | A content1_content2_missing_content1-tracked |
|
57 | 57 | A content1_content2_missing_content2-tracked |
|
58 | 58 | A content1_content2_missing_content4-tracked |
|
59 | 59 | A content1_missing_missing_content1-tracked |
|
60 | 60 | A content1_missing_missing_content4-tracked |
|
61 | 61 | A missing_content2_missing_content2-tracked |
|
62 | 62 | A missing_content2_missing_content4-tracked |
|
63 | 63 | A missing_missing_missing_content4-tracked |
|
64 | 64 | R content1_content1_content1_content1-untracked |
|
65 | 65 | R content1_content1_content1_content4-untracked |
|
66 | 66 | R content1_content1_content1_missing-untracked |
|
67 | 67 | R content1_content1_content3_content1-untracked |
|
68 | 68 | R content1_content1_content3_content3-untracked |
|
69 | 69 | R content1_content1_content3_content4-untracked |
|
70 | 70 | R content1_content1_content3_missing-untracked |
|
71 | 71 | R content1_content2_content1_content1-untracked |
|
72 | 72 | R content1_content2_content1_content2-untracked |
|
73 | 73 | R content1_content2_content1_content4-untracked |
|
74 | 74 | R content1_content2_content1_missing-untracked |
|
75 | 75 | R content1_content2_content2_content1-untracked |
|
76 | 76 | R content1_content2_content2_content2-untracked |
|
77 | 77 | R content1_content2_content2_content4-untracked |
|
78 | 78 | R content1_content2_content2_missing-untracked |
|
79 | 79 | R content1_content2_content3_content1-untracked |
|
80 | 80 | R content1_content2_content3_content2-untracked |
|
81 | 81 | R content1_content2_content3_content3-untracked |
|
82 | 82 | R content1_content2_content3_content4-untracked |
|
83 | 83 | R content1_content2_content3_missing-untracked |
|
84 | 84 | R content1_missing_content1_content1-untracked |
|
85 | 85 | R content1_missing_content1_content4-untracked |
|
86 | 86 | R content1_missing_content1_missing-untracked |
|
87 | 87 | R content1_missing_content3_content1-untracked |
|
88 | 88 | R content1_missing_content3_content3-untracked |
|
89 | 89 | R content1_missing_content3_content4-untracked |
|
90 | 90 | R content1_missing_content3_missing-untracked |
|
91 | 91 | R missing_content2_content2_content2-untracked |
|
92 | 92 | R missing_content2_content2_content4-untracked |
|
93 | 93 | R missing_content2_content2_missing-untracked |
|
94 | 94 | R missing_content2_content3_content2-untracked |
|
95 | 95 | R missing_content2_content3_content3-untracked |
|
96 | 96 | R missing_content2_content3_content4-untracked |
|
97 | 97 | R missing_content2_content3_missing-untracked |
|
98 | 98 | R missing_missing_content3_content3-untracked |
|
99 | 99 | R missing_missing_content3_content4-untracked |
|
100 | 100 | R missing_missing_content3_missing-untracked |
|
101 | 101 | ! content1_content1_content1_missing-tracked |
|
102 | 102 | ! content1_content1_content3_missing-tracked |
|
103 | 103 | ! content1_content1_missing_missing-tracked |
|
104 | 104 | ! content1_content2_content1_missing-tracked |
|
105 | 105 | ! content1_content2_content2_missing-tracked |
|
106 | 106 | ! content1_content2_content3_missing-tracked |
|
107 | 107 | ! content1_content2_missing_missing-tracked |
|
108 | 108 | ! content1_missing_content1_missing-tracked |
|
109 | 109 | ! content1_missing_content3_missing-tracked |
|
110 | 110 | ! content1_missing_missing_missing-tracked |
|
111 | 111 | ! missing_content2_content2_missing-tracked |
|
112 | 112 | ! missing_content2_content3_missing-tracked |
|
113 | 113 | ! missing_content2_missing_missing-tracked |
|
114 | 114 | ! missing_missing_content3_missing-tracked |
|
115 | 115 | ! missing_missing_missing_missing-tracked |
|
116 | 116 | ? content1_content1_missing_content1-untracked |
|
117 | 117 | ? content1_content1_missing_content4-untracked |
|
118 | 118 | ? content1_content2_missing_content1-untracked |
|
119 | 119 | ? content1_content2_missing_content2-untracked |
|
120 | 120 | ? content1_content2_missing_content4-untracked |
|
121 | 121 | ? content1_missing_missing_content1-untracked |
|
122 | 122 | ? content1_missing_missing_content4-untracked |
|
123 | 123 | ? missing_content2_missing_content2-untracked |
|
124 | 124 | ? missing_content2_missing_content4-untracked |
|
125 | 125 | ? missing_missing_missing_content4-untracked |
|
126 | 126 | C content1_content1_content1_content1-tracked |
|
127 | 127 | C content1_content1_content3_content3-tracked |
|
128 | 128 | C content1_content2_content1_content1-tracked |
|
129 | 129 | C content1_content2_content2_content2-tracked |
|
130 | 130 | C content1_content2_content3_content3-tracked |
|
131 | 131 | C content1_missing_content1_content1-tracked |
|
132 | 132 | C content1_missing_content3_content3-tracked |
|
133 | 133 | C missing_content2_content2_content2-tracked |
|
134 | 134 | C missing_content2_content3_content3-tracked |
|
135 | 135 | C missing_missing_content3_content3-tracked |
|
136 | 136 | |
|
137 | 137 | Merge with remote |
|
138 | 138 | |
|
139 | 139 | # Notes: |
|
140 | 140 | # - local and remote changed content1_content2_*_content2-untracked |
|
141 | 141 | # in the same way, so it could potentially be left alone |
|
142 | 142 | |
|
143 | 143 | $ hg merge -f --tool internal:merge3 'desc("remote")' |
|
144 | 144 | local changed content1_missing_content1_content4-tracked which remote deleted |
|
145 | 145 | use (c)hanged version or (d)elete? c |
|
146 | 146 | local changed content1_missing_content3_content3-tracked which remote deleted |
|
147 | 147 | use (c)hanged version or (d)elete? c |
|
148 | 148 | local changed content1_missing_content3_content4-tracked which remote deleted |
|
149 | 149 | use (c)hanged version or (d)elete? c |
|
150 | 150 | local changed content1_missing_missing_content4-tracked which remote deleted |
|
151 | 151 | use (c)hanged version or (d)elete? c |
|
152 | 152 | remote changed content1_content2_content1_content1-untracked which local deleted |
|
153 | 153 | use (c)hanged version or leave (d)eleted? c |
|
154 | 154 | remote changed content1_content2_content1_content2-untracked which local deleted |
|
155 | 155 | use (c)hanged version or leave (d)eleted? c |
|
156 | 156 | remote changed content1_content2_content1_content4-untracked which local deleted |
|
157 | 157 | use (c)hanged version or leave (d)eleted? c |
|
158 | 158 | remote changed content1_content2_content1_missing-tracked which local deleted |
|
159 | 159 | use (c)hanged version or leave (d)eleted? c |
|
160 | 160 | remote changed content1_content2_content1_missing-untracked which local deleted |
|
161 | 161 | use (c)hanged version or leave (d)eleted? c |
|
162 | 162 | remote changed content1_content2_content2_content1-untracked which local deleted |
|
163 | 163 | use (c)hanged version or leave (d)eleted? c |
|
164 | 164 | remote changed content1_content2_content2_content2-untracked which local deleted |
|
165 | 165 | use (c)hanged version or leave (d)eleted? c |
|
166 | 166 | remote changed content1_content2_content2_content4-untracked which local deleted |
|
167 | 167 | use (c)hanged version or leave (d)eleted? c |
|
168 | 168 | remote changed content1_content2_content2_missing-tracked which local deleted |
|
169 | 169 | use (c)hanged version or leave (d)eleted? c |
|
170 | 170 | remote changed content1_content2_content2_missing-untracked which local deleted |
|
171 | 171 | use (c)hanged version or leave (d)eleted? c |
|
172 | 172 | remote changed content1_content2_content3_content1-untracked which local deleted |
|
173 | 173 | use (c)hanged version or leave (d)eleted? c |
|
174 | 174 | remote changed content1_content2_content3_content2-untracked which local deleted |
|
175 | 175 | use (c)hanged version or leave (d)eleted? c |
|
176 | 176 | remote changed content1_content2_content3_content3-untracked which local deleted |
|
177 | 177 | use (c)hanged version or leave (d)eleted? c |
|
178 | 178 | remote changed content1_content2_content3_content4-untracked which local deleted |
|
179 | 179 | use (c)hanged version or leave (d)eleted? c |
|
180 | 180 | remote changed content1_content2_content3_missing-tracked which local deleted |
|
181 | 181 | use (c)hanged version or leave (d)eleted? c |
|
182 | 182 | remote changed content1_content2_content3_missing-untracked which local deleted |
|
183 | 183 | use (c)hanged version or leave (d)eleted? c |
|
184 | 184 | remote changed content1_content2_missing_content1-untracked which local deleted |
|
185 | 185 | use (c)hanged version or leave (d)eleted? c |
|
186 | 186 | remote changed content1_content2_missing_content2-untracked which local deleted |
|
187 | 187 | use (c)hanged version or leave (d)eleted? c |
|
188 | 188 | remote changed content1_content2_missing_content4-untracked which local deleted |
|
189 | 189 | use (c)hanged version or leave (d)eleted? c |
|
190 | 190 | remote changed content1_content2_missing_missing-tracked which local deleted |
|
191 | 191 | use (c)hanged version or leave (d)eleted? c |
|
192 | 192 | remote changed content1_content2_missing_missing-untracked which local deleted |
|
193 | 193 | use (c)hanged version or leave (d)eleted? c |
|
194 | 194 | merging content1_content2_content1_content4-tracked |
|
195 | warning: conflicts while merging content1_content2_content1_content4-tracked! (edit, then use 'hg resolve --mark') | |
|
196 | 195 | merging content1_content2_content2_content1-tracked |
|
197 | 196 | merging content1_content2_content2_content4-tracked |
|
198 | warning: conflicts while merging content1_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') | |
|
199 | 197 | merging content1_content2_content3_content1-tracked |
|
200 | 198 | merging content1_content2_content3_content3-tracked |
|
201 | warning: conflicts while merging content1_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') | |
|
202 | 199 | merging content1_content2_content3_content4-tracked |
|
203 | warning: conflicts while merging content1_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') | |
|
204 | 200 | merging content1_content2_missing_content1-tracked |
|
205 | 201 | merging content1_content2_missing_content4-tracked |
|
202 | merging missing_content2_content2_content4-tracked | |
|
203 | merging missing_content2_content3_content3-tracked | |
|
204 | merging missing_content2_content3_content4-tracked | |
|
205 | merging missing_content2_missing_content4-tracked | |
|
206 | merging missing_content2_missing_content4-untracked | |
|
207 | warning: conflicts while merging content1_content2_content1_content4-tracked! (edit, then use 'hg resolve --mark') | |
|
208 | warning: conflicts while merging content1_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') | |
|
209 | warning: conflicts while merging content1_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') | |
|
210 | warning: conflicts while merging content1_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') | |
|
206 | 211 | warning: conflicts while merging content1_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') |
|
207 | merging missing_content2_content2_content4-tracked | |
|
208 | 212 | warning: conflicts while merging missing_content2_content2_content4-tracked! (edit, then use 'hg resolve --mark') |
|
209 | merging missing_content2_content3_content3-tracked | |
|
210 | 213 | warning: conflicts while merging missing_content2_content3_content3-tracked! (edit, then use 'hg resolve --mark') |
|
211 | merging missing_content2_content3_content4-tracked | |
|
212 | 214 | warning: conflicts while merging missing_content2_content3_content4-tracked! (edit, then use 'hg resolve --mark') |
|
213 | merging missing_content2_missing_content4-tracked | |
|
214 | 215 | warning: conflicts while merging missing_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark') |
|
215 | merging missing_content2_missing_content4-untracked | |
|
216 | 216 | warning: conflicts while merging missing_content2_missing_content4-untracked! (edit, then use 'hg resolve --mark') |
|
217 | 217 | 39 files updated, 3 files merged, 8 files removed, 10 files unresolved |
|
218 | 218 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
219 | 219 | [1] |
|
220 | 220 | |
|
221 | 221 | Check which files need to be resolved (should correspond to the output above). |
|
222 | 222 | This should be the files for which the base (1st filename segment), the remote |
|
223 | 223 | (2nd segment) and the working copy (4th segment) are all different. |
|
224 | 224 | |
|
225 | 225 | Interestingly, one untracked file got merged and added, which corresponds to the |
|
226 | 226 | odd 'if force and branchmerge and different' case in manifestmerge(). |
|
227 | 227 | |
|
228 | 228 | $ hg resolve -l |
|
229 | 229 | U content1_content2_content1_content4-tracked |
|
230 | 230 | R content1_content2_content2_content1-tracked |
|
231 | 231 | U content1_content2_content2_content4-tracked |
|
232 | 232 | R content1_content2_content3_content1-tracked |
|
233 | 233 | U content1_content2_content3_content3-tracked |
|
234 | 234 | U content1_content2_content3_content4-tracked |
|
235 | 235 | R content1_content2_missing_content1-tracked |
|
236 | 236 | U content1_content2_missing_content4-tracked |
|
237 | 237 | U missing_content2_content2_content4-tracked |
|
238 | 238 | U missing_content2_content3_content3-tracked |
|
239 | 239 | U missing_content2_content3_content4-tracked |
|
240 | 240 | U missing_content2_missing_content4-tracked |
|
241 | 241 | U missing_content2_missing_content4-untracked |
|
242 | 242 | |
|
243 | 243 | Check status and file content |
|
244 | 244 | |
|
245 | 245 | Some files get added (e.g. content1_content2_content1_content1-untracked) |
|
246 | 246 | |
|
247 | 247 | It is not intuitive that content1_content2_content1_content4-tracked gets |
|
248 | 248 | merged while content1_content2_content1_content4-untracked gets overwritten. |
|
249 | 249 | Any *_content2_*-untracked triggers the modified/deleted prompt and then gets |
|
250 | 250 | overwritten. |
|
251 | 251 | |
|
252 | 252 | A lot of untracked files become tracked, for example |
|
253 | 253 | content1_content2_content2_content2-untracked. |
|
254 | 254 | |
|
255 | 255 | *_missing_missing_missing-tracked is reported as removed ('R'), which |
|
256 | 256 | doesn't make sense since the file did not exist in the parent, but on the |
|
257 | 257 | other hand, merged-in additions are reported as modifications, which is |
|
258 | 258 | almost as strange. |
|
259 | 259 | |
|
260 | 260 | missing_missing_content3_missing-tracked becomes removed ('R'), even though |
|
261 | 261 | the remote side did not touch the file |
|
262 | 262 | |
|
263 | 263 | $ for f in `python $TESTDIR/generate-working-copy-states.py filelist 3` |
|
264 | 264 | > do |
|
265 | 265 | > echo |
|
266 | 266 | > hg status -A $f |
|
267 | 267 | > if test -f $f |
|
268 | 268 | > then |
|
269 | 269 | > cat $f |
|
270 | 270 | > else |
|
271 | 271 | > echo '<missing>' |
|
272 | 272 | > fi |
|
273 | 273 | > if test -f ${f}.orig |
|
274 | 274 | > then |
|
275 | 275 | > echo ${f}.orig: |
|
276 | 276 | > cat ${f}.orig |
|
277 | 277 | > fi |
|
278 | 278 | > done |
|
279 | 279 | |
|
280 | 280 | C content1_content1_content1_content1-tracked |
|
281 | 281 | content1 |
|
282 | 282 | |
|
283 | 283 | R content1_content1_content1_content1-untracked |
|
284 | 284 | content1 |
|
285 | 285 | |
|
286 | 286 | M content1_content1_content1_content4-tracked |
|
287 | 287 | content4 |
|
288 | 288 | |
|
289 | 289 | R content1_content1_content1_content4-untracked |
|
290 | 290 | content4 |
|
291 | 291 | |
|
292 | 292 | ! content1_content1_content1_missing-tracked |
|
293 | 293 | <missing> |
|
294 | 294 | |
|
295 | 295 | R content1_content1_content1_missing-untracked |
|
296 | 296 | <missing> |
|
297 | 297 | |
|
298 | 298 | M content1_content1_content3_content1-tracked |
|
299 | 299 | content1 |
|
300 | 300 | |
|
301 | 301 | R content1_content1_content3_content1-untracked |
|
302 | 302 | content1 |
|
303 | 303 | |
|
304 | 304 | C content1_content1_content3_content3-tracked |
|
305 | 305 | content3 |
|
306 | 306 | |
|
307 | 307 | R content1_content1_content3_content3-untracked |
|
308 | 308 | content3 |
|
309 | 309 | |
|
310 | 310 | M content1_content1_content3_content4-tracked |
|
311 | 311 | content4 |
|
312 | 312 | |
|
313 | 313 | R content1_content1_content3_content4-untracked |
|
314 | 314 | content4 |
|
315 | 315 | |
|
316 | 316 | ! content1_content1_content3_missing-tracked |
|
317 | 317 | <missing> |
|
318 | 318 | |
|
319 | 319 | R content1_content1_content3_missing-untracked |
|
320 | 320 | <missing> |
|
321 | 321 | |
|
322 | 322 | A content1_content1_missing_content1-tracked |
|
323 | 323 | content1 |
|
324 | 324 | |
|
325 | 325 | ? content1_content1_missing_content1-untracked |
|
326 | 326 | content1 |
|
327 | 327 | |
|
328 | 328 | A content1_content1_missing_content4-tracked |
|
329 | 329 | content4 |
|
330 | 330 | |
|
331 | 331 | ? content1_content1_missing_content4-untracked |
|
332 | 332 | content4 |
|
333 | 333 | |
|
334 | 334 | ! content1_content1_missing_missing-tracked |
|
335 | 335 | <missing> |
|
336 | 336 | |
|
337 | 337 | content1_content1_missing_missing-untracked: * (glob) |
|
338 | 338 | <missing> |
|
339 | 339 | |
|
340 | 340 | M content1_content2_content1_content1-tracked |
|
341 | 341 | content2 |
|
342 | 342 | |
|
343 | 343 | M content1_content2_content1_content1-untracked |
|
344 | 344 | content2 |
|
345 | 345 | |
|
346 | 346 | M content1_content2_content1_content2-tracked |
|
347 | 347 | content2 |
|
348 | 348 | |
|
349 | 349 | M content1_content2_content1_content2-untracked |
|
350 | 350 | content2 |
|
351 | 351 | |
|
352 | 352 | M content1_content2_content1_content4-tracked |
|
353 | 353 | <<<<<<< local: 0447570f1af6 - test: local |
|
354 | 354 | content4 |
|
355 | 355 | ||||||| base |
|
356 | 356 | content1 |
|
357 | 357 | ======= |
|
358 | 358 | content2 |
|
359 | 359 | >>>>>>> other: 85100b8c675b - test: remote |
|
360 | 360 | content1_content2_content1_content4-tracked.orig: |
|
361 | 361 | content4 |
|
362 | 362 | |
|
363 | 363 | M content1_content2_content1_content4-untracked |
|
364 | 364 | content2 |
|
365 | 365 | |
|
366 | 366 | M content1_content2_content1_missing-tracked |
|
367 | 367 | content2 |
|
368 | 368 | |
|
369 | 369 | M content1_content2_content1_missing-untracked |
|
370 | 370 | content2 |
|
371 | 371 | |
|
372 | 372 | M content1_content2_content2_content1-tracked |
|
373 | 373 | content2 |
|
374 | 374 | |
|
375 | 375 | M content1_content2_content2_content1-untracked |
|
376 | 376 | content2 |
|
377 | 377 | |
|
378 | 378 | C content1_content2_content2_content2-tracked |
|
379 | 379 | content2 |
|
380 | 380 | |
|
381 | 381 | M content1_content2_content2_content2-untracked |
|
382 | 382 | content2 |
|
383 | 383 | |
|
384 | 384 | M content1_content2_content2_content4-tracked |
|
385 | 385 | <<<<<<< local: 0447570f1af6 - test: local |
|
386 | 386 | content4 |
|
387 | 387 | ||||||| base |
|
388 | 388 | content1 |
|
389 | 389 | ======= |
|
390 | 390 | content2 |
|
391 | 391 | >>>>>>> other: 85100b8c675b - test: remote |
|
392 | 392 | content1_content2_content2_content4-tracked.orig: |
|
393 | 393 | content4 |
|
394 | 394 | |
|
395 | 395 | M content1_content2_content2_content4-untracked |
|
396 | 396 | content2 |
|
397 | 397 | |
|
398 | 398 | M content1_content2_content2_missing-tracked |
|
399 | 399 | content2 |
|
400 | 400 | |
|
401 | 401 | M content1_content2_content2_missing-untracked |
|
402 | 402 | content2 |
|
403 | 403 | |
|
404 | 404 | M content1_content2_content3_content1-tracked |
|
405 | 405 | content2 |
|
406 | 406 | |
|
407 | 407 | M content1_content2_content3_content1-untracked |
|
408 | 408 | content2 |
|
409 | 409 | |
|
410 | 410 | M content1_content2_content3_content2-tracked |
|
411 | 411 | content2 |
|
412 | 412 | |
|
413 | 413 | M content1_content2_content3_content2-untracked |
|
414 | 414 | content2 |
|
415 | 415 | |
|
416 | 416 | M content1_content2_content3_content3-tracked |
|
417 | 417 | <<<<<<< local: 0447570f1af6 - test: local |
|
418 | 418 | content3 |
|
419 | 419 | ||||||| base |
|
420 | 420 | content1 |
|
421 | 421 | ======= |
|
422 | 422 | content2 |
|
423 | 423 | >>>>>>> other: 85100b8c675b - test: remote |
|
424 | 424 | content1_content2_content3_content3-tracked.orig: |
|
425 | 425 | content3 |
|
426 | 426 | |
|
427 | 427 | M content1_content2_content3_content3-untracked |
|
428 | 428 | content2 |
|
429 | 429 | |
|
430 | 430 | M content1_content2_content3_content4-tracked |
|
431 | 431 | <<<<<<< local: 0447570f1af6 - test: local |
|
432 | 432 | content4 |
|
433 | 433 | ||||||| base |
|
434 | 434 | content1 |
|
435 | 435 | ======= |
|
436 | 436 | content2 |
|
437 | 437 | >>>>>>> other: 85100b8c675b - test: remote |
|
438 | 438 | content1_content2_content3_content4-tracked.orig: |
|
439 | 439 | content4 |
|
440 | 440 | |
|
441 | 441 | M content1_content2_content3_content4-untracked |
|
442 | 442 | content2 |
|
443 | 443 | |
|
444 | 444 | M content1_content2_content3_missing-tracked |
|
445 | 445 | content2 |
|
446 | 446 | |
|
447 | 447 | M content1_content2_content3_missing-untracked |
|
448 | 448 | content2 |
|
449 | 449 | |
|
450 | 450 | M content1_content2_missing_content1-tracked |
|
451 | 451 | content2 |
|
452 | 452 | |
|
453 | 453 | M content1_content2_missing_content1-untracked |
|
454 | 454 | content2 |
|
455 | 455 | |
|
456 | 456 | M content1_content2_missing_content2-tracked |
|
457 | 457 | content2 |
|
458 | 458 | |
|
459 | 459 | M content1_content2_missing_content2-untracked |
|
460 | 460 | content2 |
|
461 | 461 | |
|
462 | 462 | M content1_content2_missing_content4-tracked |
|
463 | 463 | <<<<<<< local: 0447570f1af6 - test: local |
|
464 | 464 | content4 |
|
465 | 465 | ||||||| base |
|
466 | 466 | content1 |
|
467 | 467 | ======= |
|
468 | 468 | content2 |
|
469 | 469 | >>>>>>> other: 85100b8c675b - test: remote |
|
470 | 470 | content1_content2_missing_content4-tracked.orig: |
|
471 | 471 | content4 |
|
472 | 472 | |
|
473 | 473 | M content1_content2_missing_content4-untracked |
|
474 | 474 | content2 |
|
475 | 475 | |
|
476 | 476 | M content1_content2_missing_missing-tracked |
|
477 | 477 | content2 |
|
478 | 478 | |
|
479 | 479 | M content1_content2_missing_missing-untracked |
|
480 | 480 | content2 |
|
481 | 481 | |
|
482 | 482 | R content1_missing_content1_content1-tracked |
|
483 | 483 | <missing> |
|
484 | 484 | |
|
485 | 485 | R content1_missing_content1_content1-untracked |
|
486 | 486 | content1 |
|
487 | 487 | |
|
488 | 488 | M content1_missing_content1_content4-tracked |
|
489 | 489 | content4 |
|
490 | 490 | |
|
491 | 491 | R content1_missing_content1_content4-untracked |
|
492 | 492 | content4 |
|
493 | 493 | |
|
494 | 494 | R content1_missing_content1_missing-tracked |
|
495 | 495 | <missing> |
|
496 | 496 | |
|
497 | 497 | R content1_missing_content1_missing-untracked |
|
498 | 498 | <missing> |
|
499 | 499 | |
|
500 | 500 | R content1_missing_content3_content1-tracked |
|
501 | 501 | <missing> |
|
502 | 502 | |
|
503 | 503 | R content1_missing_content3_content1-untracked |
|
504 | 504 | content1 |
|
505 | 505 | |
|
506 | 506 | C content1_missing_content3_content3-tracked |
|
507 | 507 | content3 |
|
508 | 508 | |
|
509 | 509 | R content1_missing_content3_content3-untracked |
|
510 | 510 | content3 |
|
511 | 511 | |
|
512 | 512 | M content1_missing_content3_content4-tracked |
|
513 | 513 | content4 |
|
514 | 514 | |
|
515 | 515 | R content1_missing_content3_content4-untracked |
|
516 | 516 | content4 |
|
517 | 517 | |
|
518 | 518 | R content1_missing_content3_missing-tracked |
|
519 | 519 | <missing> |
|
520 | 520 | |
|
521 | 521 | R content1_missing_content3_missing-untracked |
|
522 | 522 | <missing> |
|
523 | 523 | |
|
524 | 524 | R content1_missing_missing_content1-tracked |
|
525 | 525 | <missing> |
|
526 | 526 | |
|
527 | 527 | ? content1_missing_missing_content1-untracked |
|
528 | 528 | content1 |
|
529 | 529 | |
|
530 | 530 | A content1_missing_missing_content4-tracked |
|
531 | 531 | content4 |
|
532 | 532 | |
|
533 | 533 | ? content1_missing_missing_content4-untracked |
|
534 | 534 | content4 |
|
535 | 535 | |
|
536 | 536 | R content1_missing_missing_missing-tracked |
|
537 | 537 | <missing> |
|
538 | 538 | |
|
539 | 539 | content1_missing_missing_missing-untracked: * (glob) |
|
540 | 540 | <missing> |
|
541 | 541 | |
|
542 | 542 | C missing_content2_content2_content2-tracked |
|
543 | 543 | content2 |
|
544 | 544 | |
|
545 | 545 | M missing_content2_content2_content2-untracked |
|
546 | 546 | content2 |
|
547 | 547 | |
|
548 | 548 | M missing_content2_content2_content4-tracked |
|
549 | 549 | <<<<<<< local: 0447570f1af6 - test: local |
|
550 | 550 | content4 |
|
551 | 551 | ||||||| base |
|
552 | 552 | ======= |
|
553 | 553 | content2 |
|
554 | 554 | >>>>>>> other: 85100b8c675b - test: remote |
|
555 | 555 | missing_content2_content2_content4-tracked.orig: |
|
556 | 556 | content4 |
|
557 | 557 | |
|
558 | 558 | M missing_content2_content2_content4-untracked |
|
559 | 559 | content2 |
|
560 | 560 | |
|
561 | 561 | M missing_content2_content2_missing-tracked |
|
562 | 562 | content2 |
|
563 | 563 | |
|
564 | 564 | M missing_content2_content2_missing-untracked |
|
565 | 565 | content2 |
|
566 | 566 | |
|
567 | 567 | M missing_content2_content3_content2-tracked |
|
568 | 568 | content2 |
|
569 | 569 | |
|
570 | 570 | M missing_content2_content3_content2-untracked |
|
571 | 571 | content2 |
|
572 | 572 | |
|
573 | 573 | M missing_content2_content3_content3-tracked |
|
574 | 574 | <<<<<<< local: 0447570f1af6 - test: local |
|
575 | 575 | content3 |
|
576 | 576 | ||||||| base |
|
577 | 577 | ======= |
|
578 | 578 | content2 |
|
579 | 579 | >>>>>>> other: 85100b8c675b - test: remote |
|
580 | 580 | missing_content2_content3_content3-tracked.orig: |
|
581 | 581 | content3 |
|
582 | 582 | |
|
583 | 583 | M missing_content2_content3_content3-untracked |
|
584 | 584 | content2 |
|
585 | 585 | |
|
586 | 586 | M missing_content2_content3_content4-tracked |
|
587 | 587 | <<<<<<< local: 0447570f1af6 - test: local |
|
588 | 588 | content4 |
|
589 | 589 | ||||||| base |
|
590 | 590 | ======= |
|
591 | 591 | content2 |
|
592 | 592 | >>>>>>> other: 85100b8c675b - test: remote |
|
593 | 593 | missing_content2_content3_content4-tracked.orig: |
|
594 | 594 | content4 |
|
595 | 595 | |
|
596 | 596 | M missing_content2_content3_content4-untracked |
|
597 | 597 | content2 |
|
598 | 598 | |
|
599 | 599 | M missing_content2_content3_missing-tracked |
|
600 | 600 | content2 |
|
601 | 601 | |
|
602 | 602 | M missing_content2_content3_missing-untracked |
|
603 | 603 | content2 |
|
604 | 604 | |
|
605 | 605 | M missing_content2_missing_content2-tracked |
|
606 | 606 | content2 |
|
607 | 607 | |
|
608 | 608 | M missing_content2_missing_content2-untracked |
|
609 | 609 | content2 |
|
610 | 610 | |
|
611 | 611 | M missing_content2_missing_content4-tracked |
|
612 | 612 | <<<<<<< local: 0447570f1af6 - test: local |
|
613 | 613 | content4 |
|
614 | 614 | ||||||| base |
|
615 | 615 | ======= |
|
616 | 616 | content2 |
|
617 | 617 | >>>>>>> other: 85100b8c675b - test: remote |
|
618 | 618 | missing_content2_missing_content4-tracked.orig: |
|
619 | 619 | content4 |
|
620 | 620 | |
|
621 | 621 | M missing_content2_missing_content4-untracked |
|
622 | 622 | <<<<<<< local: 0447570f1af6 - test: local |
|
623 | 623 | content4 |
|
624 | 624 | ||||||| base |
|
625 | 625 | ======= |
|
626 | 626 | content2 |
|
627 | 627 | >>>>>>> other: 85100b8c675b - test: remote |
|
628 | 628 | missing_content2_missing_content4-untracked.orig: |
|
629 | 629 | content4 |
|
630 | 630 | |
|
631 | 631 | M missing_content2_missing_missing-tracked |
|
632 | 632 | content2 |
|
633 | 633 | |
|
634 | 634 | M missing_content2_missing_missing-untracked |
|
635 | 635 | content2 |
|
636 | 636 | |
|
637 | 637 | C missing_missing_content3_content3-tracked |
|
638 | 638 | content3 |
|
639 | 639 | |
|
640 | 640 | R missing_missing_content3_content3-untracked |
|
641 | 641 | content3 |
|
642 | 642 | |
|
643 | 643 | M missing_missing_content3_content4-tracked |
|
644 | 644 | content4 |
|
645 | 645 | |
|
646 | 646 | R missing_missing_content3_content4-untracked |
|
647 | 647 | content4 |
|
648 | 648 | |
|
649 | 649 | R missing_missing_content3_missing-tracked |
|
650 | 650 | <missing> |
|
651 | 651 | |
|
652 | 652 | R missing_missing_content3_missing-untracked |
|
653 | 653 | <missing> |
|
654 | 654 | |
|
655 | 655 | A missing_missing_missing_content4-tracked |
|
656 | 656 | content4 |
|
657 | 657 | |
|
658 | 658 | ? missing_missing_missing_content4-untracked |
|
659 | 659 | content4 |
|
660 | 660 | |
|
661 | 661 | R missing_missing_missing_missing-tracked |
|
662 | 662 | <missing> |
|
663 | 663 | |
|
664 | 664 | missing_missing_missing_missing-untracked: * (glob) |
|
665 | 665 | <missing> |
@@ -1,395 +1,395 b'' | |||
|
1 | 1 | #require symlink execbit |
|
2 | 2 | |
|
3 | 3 | $ tellmeabout() { |
|
4 | 4 | > if [ -h $1 ]; then |
|
5 | 5 | > echo $1 is a symlink: |
|
6 | 6 | > $TESTDIR/readlink.py $1 |
|
7 | 7 | > elif [ -x $1 ]; then |
|
8 | 8 | > echo $1 is an executable file with content: |
|
9 | 9 | > cat $1 |
|
10 | 10 | > else |
|
11 | 11 | > echo $1 is a plain file with content: |
|
12 | 12 | > cat $1 |
|
13 | 13 | > fi |
|
14 | 14 | > } |
|
15 | 15 | |
|
16 | 16 | $ hg init test1 |
|
17 | 17 | $ cd test1 |
|
18 | 18 | |
|
19 | 19 | $ echo a > a |
|
20 | 20 | $ hg ci -Aqmadd |
|
21 | 21 | $ chmod +x a |
|
22 | 22 | $ hg ci -mexecutable |
|
23 | 23 | |
|
24 | 24 | $ hg up -q 0 |
|
25 | 25 | $ rm a |
|
26 | 26 | $ ln -s symlink a |
|
27 | 27 | $ hg ci -msymlink |
|
28 | 28 | created new head |
|
29 | 29 | |
|
30 | 30 | Symlink is local parent, executable is other: |
|
31 | 31 | |
|
32 | 32 | $ hg merge --debug |
|
33 | 33 | searching for copies back to rev 1 |
|
34 | 34 | resolving manifests |
|
35 | 35 | branchmerge: True, force: False, partial: False |
|
36 | 36 | ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c |
|
37 | 37 | preserving a for resolve of a |
|
38 | a: versions differ -> m | |
|
38 | a: versions differ -> m (premerge) | |
|
39 | 39 | picked tool ':merge' for a (binary False symlink True) |
|
40 | 40 | merging a |
|
41 | 41 | my a@521a1e40188f+ other a@3574f3e69b1c ancestor a@c334dc3be0da |
|
42 | 42 | warning: internal :merge cannot merge symlinks for a |
|
43 | 43 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
44 | 44 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
45 | 45 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
46 | 46 | [1] |
|
47 | 47 | |
|
48 | 48 | $ tellmeabout a |
|
49 | 49 | a is a symlink: |
|
50 | 50 | a -> symlink |
|
51 | 51 | $ hg resolve a --tool internal:other |
|
52 | 52 | (no more unresolved files) |
|
53 | 53 | $ tellmeabout a |
|
54 | 54 | a is an executable file with content: |
|
55 | 55 | a |
|
56 | 56 | $ hg st |
|
57 | 57 | M a |
|
58 | 58 | ? a.orig |
|
59 | 59 | |
|
60 | 60 | Symlink is other parent, executable is local: |
|
61 | 61 | |
|
62 | 62 | $ hg update -C 1 |
|
63 | 63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 64 | |
|
65 | 65 | $ hg merge --debug --tool :union |
|
66 | 66 | searching for copies back to rev 1 |
|
67 | 67 | resolving manifests |
|
68 | 68 | branchmerge: True, force: False, partial: False |
|
69 | 69 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f |
|
70 | 70 | preserving a for resolve of a |
|
71 | a: versions differ -> m | |
|
71 | a: versions differ -> m (premerge) | |
|
72 | 72 | picked tool ':union' for a (binary False symlink True) |
|
73 | 73 | merging a |
|
74 | 74 | my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da |
|
75 | 75 | warning: internal :union cannot merge symlinks for a |
|
76 | 76 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
77 | 77 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
78 | 78 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
79 | 79 | [1] |
|
80 | 80 | |
|
81 | 81 | $ tellmeabout a |
|
82 | 82 | a is an executable file with content: |
|
83 | 83 | a |
|
84 | 84 | |
|
85 | 85 | $ hg update -C 1 |
|
86 | 86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 | 87 | |
|
88 | 88 | $ hg merge --debug --tool :merge3 |
|
89 | 89 | searching for copies back to rev 1 |
|
90 | 90 | resolving manifests |
|
91 | 91 | branchmerge: True, force: False, partial: False |
|
92 | 92 | ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f |
|
93 | 93 | preserving a for resolve of a |
|
94 | a: versions differ -> m | |
|
94 | a: versions differ -> m (premerge) | |
|
95 | 95 | picked tool ':merge3' for a (binary False symlink True) |
|
96 | 96 | merging a |
|
97 | 97 | my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da |
|
98 | 98 | warning: internal :merge3 cannot merge symlinks for a |
|
99 | 99 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
100 | 100 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
101 | 101 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
102 | 102 | [1] |
|
103 | 103 | |
|
104 | 104 | $ tellmeabout a |
|
105 | 105 | a is an executable file with content: |
|
106 | 106 | a |
|
107 | 107 | |
|
108 | 108 | Update to link without local change should get us a symlink (issue3316): |
|
109 | 109 | |
|
110 | 110 | $ hg up -C 0 |
|
111 | 111 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 112 | $ hg up |
|
113 | 113 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
114 | 114 | $ hg st |
|
115 | 115 | ? a.orig |
|
116 | 116 | |
|
117 | 117 | Update to link with local change should cause a merge prompt (issue3200): |
|
118 | 118 | |
|
119 | 119 | $ hg up -Cq 0 |
|
120 | 120 | $ echo data > a |
|
121 | 121 | $ HGMERGE= hg up -y --debug |
|
122 | 122 | searching for copies back to rev 2 |
|
123 | 123 | resolving manifests |
|
124 | 124 | branchmerge: False, force: False, partial: False |
|
125 | 125 | ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f |
|
126 | 126 | preserving a for resolve of a |
|
127 | a: versions differ -> m | |
|
127 | a: versions differ -> m (premerge) | |
|
128 | 128 | (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re) |
|
129 | 129 | picked tool ':prompt' for a (binary False symlink True) |
|
130 | 130 | no tool found to merge a |
|
131 | 131 | keep (l)ocal or take (o)ther? l |
|
132 | 132 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
133 | 133 | $ hg diff --git |
|
134 | 134 | diff --git a/a b/a |
|
135 | 135 | old mode 120000 |
|
136 | 136 | new mode 100644 |
|
137 | 137 | --- a/a |
|
138 | 138 | +++ b/a |
|
139 | 139 | @@ -1,1 +1,1 @@ |
|
140 | 140 | -symlink |
|
141 | 141 | \ No newline at end of file |
|
142 | 142 | +data |
|
143 | 143 | |
|
144 | 144 | |
|
145 | 145 | Test only 'l' change - happens rarely, except when recovering from situations |
|
146 | 146 | where that was what happened. |
|
147 | 147 | |
|
148 | 148 | $ hg init test2 |
|
149 | 149 | $ cd test2 |
|
150 | 150 | $ printf base > f |
|
151 | 151 | $ hg ci -Aqm0 |
|
152 | 152 | $ echo file > f |
|
153 | 153 | $ echo content >> f |
|
154 | 154 | $ hg ci -qm1 |
|
155 | 155 | $ hg up -qr0 |
|
156 | 156 | $ rm f |
|
157 | 157 | $ ln -s base f |
|
158 | 158 | $ hg ci -qm2 |
|
159 | 159 | $ hg merge |
|
160 | 160 | merging f |
|
161 | 161 | warning: internal :merge cannot merge symlinks for f |
|
162 | 162 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
163 | 163 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
164 | 164 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
165 | 165 | [1] |
|
166 | 166 | $ tellmeabout f |
|
167 | 167 | f is a symlink: |
|
168 | 168 | f -> base |
|
169 | 169 | |
|
170 | 170 | $ hg up -Cqr1 |
|
171 | 171 | $ hg merge |
|
172 | 172 | merging f |
|
173 | 173 | warning: internal :merge cannot merge symlinks for f |
|
174 | 174 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
175 | 175 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
176 | 176 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
177 | 177 | [1] |
|
178 | 178 | $ tellmeabout f |
|
179 | 179 | f is a plain file with content: |
|
180 | 180 | file |
|
181 | 181 | content |
|
182 | 182 | |
|
183 | 183 | $ cd .. |
|
184 | 184 | |
|
185 | 185 | Test removed 'x' flag merged with change to symlink |
|
186 | 186 | |
|
187 | 187 | $ hg init test3 |
|
188 | 188 | $ cd test3 |
|
189 | 189 | $ echo f > f |
|
190 | 190 | $ chmod +x f |
|
191 | 191 | $ hg ci -Aqm0 |
|
192 | 192 | $ chmod -x f |
|
193 | 193 | $ hg ci -qm1 |
|
194 | 194 | $ hg up -qr0 |
|
195 | 195 | $ rm f |
|
196 | 196 | $ ln -s dangling f |
|
197 | 197 | $ hg ci -qm2 |
|
198 | 198 | $ hg merge |
|
199 | 199 | merging f |
|
200 | 200 | warning: internal :merge cannot merge symlinks for f |
|
201 | 201 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
202 | 202 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
203 | 203 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
204 | 204 | [1] |
|
205 | 205 | $ tellmeabout f |
|
206 | 206 | f is a symlink: |
|
207 | 207 | f -> dangling |
|
208 | 208 | |
|
209 | 209 | $ hg up -Cqr1 |
|
210 | 210 | $ hg merge |
|
211 | 211 | merging f |
|
212 | 212 | warning: internal :merge cannot merge symlinks for f |
|
213 | 213 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
214 | 214 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
215 | 215 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
216 | 216 | [1] |
|
217 | 217 | $ tellmeabout f |
|
218 | 218 | f is a plain file with content: |
|
219 | 219 | f |
|
220 | 220 | |
|
221 | 221 | Test removed 'x' flag merged with content change - both ways |
|
222 | 222 | |
|
223 | 223 | $ hg up -Cqr0 |
|
224 | 224 | $ echo change > f |
|
225 | 225 | $ hg ci -qm3 |
|
226 | 226 | $ hg merge -r1 |
|
227 | 227 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
228 | 228 | (branch merge, don't forget to commit) |
|
229 | 229 | $ tellmeabout f |
|
230 | 230 | f is a plain file with content: |
|
231 | 231 | change |
|
232 | 232 | |
|
233 | 233 | $ hg up -qCr1 |
|
234 | 234 | $ hg merge -r3 |
|
235 | 235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
236 | 236 | (branch merge, don't forget to commit) |
|
237 | 237 | $ tellmeabout f |
|
238 | 238 | f is a plain file with content: |
|
239 | 239 | change |
|
240 | 240 | |
|
241 | 241 | $ cd .. |
|
242 | 242 | |
|
243 | 243 | Test merge with no common ancestor: |
|
244 | 244 | a: just different |
|
245 | 245 | b: x vs -, different (cannot calculate x, cannot ask merge tool) |
|
246 | 246 | c: x vs -, same (cannot calculate x, merge tool is no good) |
|
247 | 247 | d: x vs l, different |
|
248 | 248 | e: x vs l, same |
|
249 | 249 | f: - vs l, different |
|
250 | 250 | g: - vs l, same |
|
251 | 251 | h: l vs l, different |
|
252 | 252 | (where same means the filelog entry is shared and there thus is an ancestor!) |
|
253 | 253 | |
|
254 | 254 | $ hg init test4 |
|
255 | 255 | $ cd test4 |
|
256 | 256 | $ echo 0 > 0 |
|
257 | 257 | $ hg ci -Aqm0 |
|
258 | 258 | |
|
259 | 259 | $ echo 1 > a |
|
260 | 260 | $ echo 1 > b |
|
261 | 261 | $ chmod +x b |
|
262 | 262 | $ echo x > c |
|
263 | 263 | $ chmod +x c |
|
264 | 264 | $ echo 1 > d |
|
265 | 265 | $ chmod +x d |
|
266 | 266 | $ printf x > e |
|
267 | 267 | $ chmod +x e |
|
268 | 268 | $ echo 1 > f |
|
269 | 269 | $ printf x > g |
|
270 | 270 | $ ln -s 1 h |
|
271 | 271 | $ hg ci -qAm1 |
|
272 | 272 | |
|
273 | 273 | $ hg up -qr0 |
|
274 | 274 | $ echo 2 > a |
|
275 | 275 | $ echo 2 > b |
|
276 | 276 | $ echo x > c |
|
277 | 277 | $ ln -s 2 d |
|
278 | 278 | $ ln -s x e |
|
279 | 279 | $ ln -s 2 f |
|
280 | 280 | $ ln -s x g |
|
281 | 281 | $ ln -s 2 h |
|
282 | 282 | $ hg ci -Aqm2 |
|
283 | 283 | |
|
284 | 284 | $ hg merge |
|
285 | 285 | merging a |
|
286 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
|
287 | 286 | warning: cannot merge flags for b |
|
288 | 287 | merging b |
|
289 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
|
290 | 288 | warning: cannot merge flags for c |
|
291 | 289 | merging d |
|
292 | 290 | warning: internal :merge cannot merge symlinks for d |
|
293 | 291 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
294 | 292 | merging f |
|
295 | 293 | warning: internal :merge cannot merge symlinks for f |
|
296 | 294 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
297 | 295 | merging h |
|
298 | 296 | warning: internal :merge cannot merge symlinks for h |
|
299 | 297 | warning: conflicts while merging h! (edit, then use 'hg resolve --mark') |
|
298 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
|
299 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
|
300 | 300 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved |
|
301 | 301 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
302 | 302 | [1] |
|
303 | 303 | $ hg resolve -l |
|
304 | 304 | U a |
|
305 | 305 | U b |
|
306 | 306 | U d |
|
307 | 307 | U f |
|
308 | 308 | U h |
|
309 | 309 | $ tellmeabout a |
|
310 | 310 | a is a plain file with content: |
|
311 | 311 | <<<<<<< local: 0139c5610547 - test: 2 |
|
312 | 312 | 2 |
|
313 | 313 | ======= |
|
314 | 314 | 1 |
|
315 | 315 | >>>>>>> other: 97e29675e796 - test: 1 |
|
316 | 316 | $ tellmeabout b |
|
317 | 317 | b is a plain file with content: |
|
318 | 318 | <<<<<<< local: 0139c5610547 - test: 2 |
|
319 | 319 | 2 |
|
320 | 320 | ======= |
|
321 | 321 | 1 |
|
322 | 322 | >>>>>>> other: 97e29675e796 - test: 1 |
|
323 | 323 | $ tellmeabout c |
|
324 | 324 | c is a plain file with content: |
|
325 | 325 | x |
|
326 | 326 | $ tellmeabout d |
|
327 | 327 | d is a symlink: |
|
328 | 328 | d -> 2 |
|
329 | 329 | $ tellmeabout e |
|
330 | 330 | e is a symlink: |
|
331 | 331 | e -> x |
|
332 | 332 | $ tellmeabout f |
|
333 | 333 | f is a symlink: |
|
334 | 334 | f -> 2 |
|
335 | 335 | $ tellmeabout g |
|
336 | 336 | g is a symlink: |
|
337 | 337 | g -> x |
|
338 | 338 | $ tellmeabout h |
|
339 | 339 | h is a symlink: |
|
340 | 340 | h -> 2 |
|
341 | 341 | |
|
342 | 342 | $ hg up -Cqr1 |
|
343 | 343 | $ hg merge |
|
344 | 344 | merging a |
|
345 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
|
346 | 345 | warning: cannot merge flags for b |
|
347 | 346 | merging b |
|
348 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
|
349 | 347 | warning: cannot merge flags for c |
|
350 | 348 | merging d |
|
351 | 349 | warning: internal :merge cannot merge symlinks for d |
|
352 | 350 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
353 | 351 | merging f |
|
354 | 352 | warning: internal :merge cannot merge symlinks for f |
|
355 | 353 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
356 | 354 | merging h |
|
357 | 355 | warning: internal :merge cannot merge symlinks for h |
|
358 | 356 | warning: conflicts while merging h! (edit, then use 'hg resolve --mark') |
|
357 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
|
358 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
|
359 | 359 | 3 files updated, 0 files merged, 0 files removed, 5 files unresolved |
|
360 | 360 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
361 | 361 | [1] |
|
362 | 362 | $ tellmeabout a |
|
363 | 363 | a is a plain file with content: |
|
364 | 364 | <<<<<<< local: 97e29675e796 - test: 1 |
|
365 | 365 | 1 |
|
366 | 366 | ======= |
|
367 | 367 | 2 |
|
368 | 368 | >>>>>>> other: 0139c5610547 - test: 2 |
|
369 | 369 | $ tellmeabout b |
|
370 | 370 | b is an executable file with content: |
|
371 | 371 | <<<<<<< local: 97e29675e796 - test: 1 |
|
372 | 372 | 1 |
|
373 | 373 | ======= |
|
374 | 374 | 2 |
|
375 | 375 | >>>>>>> other: 0139c5610547 - test: 2 |
|
376 | 376 | $ tellmeabout c |
|
377 | 377 | c is an executable file with content: |
|
378 | 378 | x |
|
379 | 379 | $ tellmeabout d |
|
380 | 380 | d is an executable file with content: |
|
381 | 381 | 1 |
|
382 | 382 | $ tellmeabout e |
|
383 | 383 | e is an executable file with content: |
|
384 | 384 | x (no-eol) |
|
385 | 385 | $ tellmeabout f |
|
386 | 386 | f is a plain file with content: |
|
387 | 387 | 1 |
|
388 | 388 | $ tellmeabout g |
|
389 | 389 | g is a plain file with content: |
|
390 | 390 | x (no-eol) |
|
391 | 391 | $ tellmeabout h |
|
392 | 392 | h is a symlink: |
|
393 | 393 | h -> 1 |
|
394 | 394 | |
|
395 | 395 | $ cd .. |
@@ -1,147 +1,148 b'' | |||
|
1 | 1 | initial |
|
2 | 2 | $ hg init test-a |
|
3 | 3 | $ cd test-a |
|
4 | 4 | $ cat >test.txt <<"EOF" |
|
5 | 5 | > 1 |
|
6 | 6 | > 2 |
|
7 | 7 | > 3 |
|
8 | 8 | > EOF |
|
9 | 9 | $ hg add test.txt |
|
10 | 10 | $ hg commit -m "Initial" |
|
11 | 11 | |
|
12 | 12 | clone |
|
13 | 13 | $ cd .. |
|
14 | 14 | $ hg clone test-a test-b |
|
15 | 15 | updating to branch default |
|
16 | 16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | change test-a |
|
19 | 19 | $ cd test-a |
|
20 | 20 | $ cat >test.txt <<"EOF" |
|
21 | 21 | > one |
|
22 | 22 | > two |
|
23 | 23 | > three |
|
24 | 24 | > EOF |
|
25 | 25 | $ hg commit -m "Numbers as words" |
|
26 | 26 | |
|
27 | 27 | change test-b |
|
28 | 28 | $ cd ../test-b |
|
29 | 29 | $ cat >test.txt <<"EOF" |
|
30 | 30 | > 1 |
|
31 | 31 | > 2.5 |
|
32 | 32 | > 3 |
|
33 | 33 | > EOF |
|
34 | 34 | $ hg commit -m "2 -> 2.5" |
|
35 | 35 | |
|
36 | 36 | now pull and merge from test-a |
|
37 | 37 | $ hg pull ../test-a |
|
38 | 38 | pulling from ../test-a |
|
39 | 39 | searching for changes |
|
40 | 40 | adding changesets |
|
41 | 41 | adding manifests |
|
42 | 42 | adding file changes |
|
43 | 43 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
44 | 44 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
45 | 45 | $ hg merge |
|
46 | 46 | merging test.txt |
|
47 | 47 | warning: conflicts while merging test.txt! (edit, then use 'hg resolve --mark') |
|
48 | 48 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
49 | 49 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
50 | 50 | [1] |
|
51 | 51 | resolve conflict |
|
52 | 52 | $ cat >test.txt <<"EOF" |
|
53 | 53 | > one |
|
54 | 54 | > two-point-five |
|
55 | 55 | > three |
|
56 | 56 | > EOF |
|
57 | 57 | $ rm -f *.orig |
|
58 | 58 | $ hg resolve -m test.txt |
|
59 | 59 | (no more unresolved files) |
|
60 | 60 | $ hg commit -m "Merge 1" |
|
61 | 61 | |
|
62 | 62 | change test-a again |
|
63 | 63 | $ cd ../test-a |
|
64 | 64 | $ cat >test.txt <<"EOF" |
|
65 | 65 | > one |
|
66 | 66 | > two-point-one |
|
67 | 67 | > three |
|
68 | 68 | > EOF |
|
69 | 69 | $ hg commit -m "two -> two-point-one" |
|
70 | 70 | |
|
71 | 71 | pull and merge from test-a again |
|
72 | 72 | $ cd ../test-b |
|
73 | 73 | $ hg pull ../test-a |
|
74 | 74 | pulling from ../test-a |
|
75 | 75 | searching for changes |
|
76 | 76 | adding changesets |
|
77 | 77 | adding manifests |
|
78 | 78 | adding file changes |
|
79 | 79 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
80 | 80 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
81 | 81 | $ hg merge --debug |
|
82 | 82 | searching for copies back to rev 1 |
|
83 | 83 | resolving manifests |
|
84 | 84 | branchmerge: True, force: False, partial: False |
|
85 | 85 | ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8 |
|
86 | 86 | preserving test.txt for resolve of test.txt |
|
87 | test.txt: versions differ -> m | |
|
87 | test.txt: versions differ -> m (premerge) | |
|
88 | 88 | picked tool ':merge' for test.txt (binary False symlink False) |
|
89 | 89 | merging test.txt |
|
90 | 90 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 |
|
91 | test.txt: versions differ -> m (merge) | |
|
91 | 92 | picked tool ':merge' for test.txt (binary False symlink False) |
|
92 | 93 | my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 |
|
93 | 94 | warning: conflicts while merging test.txt! (edit, then use 'hg resolve --mark') |
|
94 | 95 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
95 | 96 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
96 | 97 | [1] |
|
97 | 98 | |
|
98 | 99 | $ cat test.txt |
|
99 | 100 | one |
|
100 | 101 | <<<<<<< local: 50c3a7e29886 - test: Merge 1 |
|
101 | 102 | two-point-five |
|
102 | 103 | ======= |
|
103 | 104 | two-point-one |
|
104 | 105 | >>>>>>> other: 40d11a4173a8 - test: two -> two-point-one |
|
105 | 106 | three |
|
106 | 107 | |
|
107 | 108 | $ hg debugindex test.txt |
|
108 | 109 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
109 | 110 | 0 0 7 ..... 0 01365c4cca56 000000000000 000000000000 (re) |
|
110 | 111 | 1 7 9 ..... 1 7b013192566a 01365c4cca56 000000000000 (re) |
|
111 | 112 | 2 16 15 ..... 2 8fe46a3eb557 01365c4cca56 000000000000 (re) |
|
112 | 113 | 3 31 2. ..... 3 fc3148072371 7b013192566a 8fe46a3eb557 (re) |
|
113 | 114 | 4 5. 25 ..... 4 d40249267ae3 8fe46a3eb557 000000000000 (re) |
|
114 | 115 | |
|
115 | 116 | $ hg log |
|
116 | 117 | changeset: 4:40d11a4173a8 |
|
117 | 118 | tag: tip |
|
118 | 119 | parent: 2:96b70246a118 |
|
119 | 120 | user: test |
|
120 | 121 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
121 | 122 | summary: two -> two-point-one |
|
122 | 123 | |
|
123 | 124 | changeset: 3:50c3a7e29886 |
|
124 | 125 | parent: 1:d1e159716d41 |
|
125 | 126 | parent: 2:96b70246a118 |
|
126 | 127 | user: test |
|
127 | 128 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
128 | 129 | summary: Merge 1 |
|
129 | 130 | |
|
130 | 131 | changeset: 2:96b70246a118 |
|
131 | 132 | parent: 0:b1832b9d912a |
|
132 | 133 | user: test |
|
133 | 134 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
134 | 135 | summary: Numbers as words |
|
135 | 136 | |
|
136 | 137 | changeset: 1:d1e159716d41 |
|
137 | 138 | user: test |
|
138 | 139 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
139 | 140 | summary: 2 -> 2.5 |
|
140 | 141 | |
|
141 | 142 | changeset: 0:b1832b9d912a |
|
142 | 143 | user: test |
|
143 | 144 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
144 | 145 | summary: Initial |
|
145 | 146 | |
|
146 | 147 | |
|
147 | 148 | $ cd .. |
@@ -1,94 +1,94 b'' | |||
|
1 | 1 | test that we don't interrupt the merge session if |
|
2 | 2 | a file-level merge failed |
|
3 | 3 | |
|
4 | 4 | $ hg init repo |
|
5 | 5 | $ cd repo |
|
6 | 6 | |
|
7 | 7 | $ echo foo > foo |
|
8 | 8 | $ echo a > bar |
|
9 | 9 | $ hg ci -Am 'add foo' |
|
10 | 10 | adding bar |
|
11 | 11 | adding foo |
|
12 | 12 | |
|
13 | 13 | $ hg mv foo baz |
|
14 | 14 | $ echo b >> bar |
|
15 | 15 | $ echo quux > quux1 |
|
16 | 16 | $ hg ci -Am 'mv foo baz' |
|
17 | 17 | adding quux1 |
|
18 | 18 | |
|
19 | 19 | $ hg up -qC 0 |
|
20 | 20 | $ echo >> foo |
|
21 | 21 | $ echo c >> bar |
|
22 | 22 | $ echo quux > quux2 |
|
23 | 23 | $ hg ci -Am 'change foo' |
|
24 | 24 | adding quux2 |
|
25 | 25 | created new head |
|
26 | 26 | |
|
27 | 27 | test with the rename on the remote side |
|
28 | 28 | $ HGMERGE=false hg merge |
|
29 | 29 | merging bar |
|
30 | merging foo and baz to baz | |
|
30 | 31 | merging bar failed! |
|
31 | merging foo and baz to baz | |
|
32 | 32 | 1 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
33 | 33 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
34 | 34 | [1] |
|
35 | 35 | $ hg resolve -l |
|
36 | 36 | U bar |
|
37 | 37 | R baz |
|
38 | 38 | |
|
39 | 39 | test with the rename on the local side |
|
40 | 40 | $ hg up -C 1 |
|
41 | 41 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
42 | 42 | $ HGMERGE=false hg merge |
|
43 | 43 | merging bar |
|
44 | merging baz and foo to baz | |
|
44 | 45 | merging bar failed! |
|
45 | merging baz and foo to baz | |
|
46 | 46 | 1 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
47 | 47 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
48 | 48 | [1] |
|
49 | 49 | |
|
50 | 50 | show unresolved |
|
51 | 51 | $ hg resolve -l |
|
52 | 52 | U bar |
|
53 | 53 | R baz |
|
54 | 54 | |
|
55 | 55 | unmark baz |
|
56 | 56 | $ hg resolve -u baz |
|
57 | 57 | |
|
58 | 58 | show |
|
59 | 59 | $ hg resolve -l |
|
60 | 60 | U bar |
|
61 | 61 | U baz |
|
62 | 62 | $ hg st |
|
63 | 63 | M bar |
|
64 | 64 | M baz |
|
65 | 65 | M quux2 |
|
66 | 66 | ? bar.orig |
|
67 | 67 | |
|
68 | 68 | re-resolve baz |
|
69 | 69 | $ hg resolve baz |
|
70 | 70 | merging baz and foo to baz |
|
71 | 71 | |
|
72 | 72 | after resolve |
|
73 | 73 | $ hg resolve -l |
|
74 | 74 | U bar |
|
75 | 75 | R baz |
|
76 | 76 | |
|
77 | 77 | resolve all warning |
|
78 | 78 | $ hg resolve |
|
79 | 79 | abort: no files or directories specified |
|
80 | 80 | (use --all to re-merge all unresolved files) |
|
81 | 81 | [255] |
|
82 | 82 | |
|
83 | 83 | resolve all |
|
84 | 84 | $ hg resolve -a |
|
85 | 85 | merging bar |
|
86 | 86 | warning: conflicts while merging bar! (edit, then use 'hg resolve --mark') |
|
87 | 87 | [1] |
|
88 | 88 | |
|
89 | 89 | after |
|
90 | 90 | $ hg resolve -l |
|
91 | 91 | U bar |
|
92 | 92 | R baz |
|
93 | 93 | |
|
94 | 94 | $ cd .. |
@@ -1,188 +1,188 b'' | |||
|
1 | 1 | $ hg init |
|
2 | 2 | |
|
3 | 3 | $ echo "[merge]" >> .hg/hgrc |
|
4 | 4 | $ echo "followcopies = 1" >> .hg/hgrc |
|
5 | 5 | |
|
6 | 6 | $ echo foo > a |
|
7 | 7 | $ echo foo > a2 |
|
8 | 8 | $ hg add a a2 |
|
9 | 9 | $ hg ci -m "start" |
|
10 | 10 | |
|
11 | 11 | $ hg mv a b |
|
12 | 12 | $ hg mv a2 b2 |
|
13 | 13 | $ hg ci -m "rename" |
|
14 | 14 | |
|
15 | 15 | $ hg co 0 |
|
16 | 16 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | $ echo blahblah > a |
|
19 | 19 | $ echo blahblah > a2 |
|
20 | 20 | $ hg mv a2 c2 |
|
21 | 21 | $ hg ci -m "modify" |
|
22 | 22 | created new head |
|
23 | 23 | |
|
24 | 24 | $ hg merge -y --debug |
|
25 | 25 | searching for copies back to rev 1 |
|
26 | 26 | unmatched files in local: |
|
27 | 27 | c2 |
|
28 | 28 | unmatched files in other: |
|
29 | 29 | b |
|
30 | 30 | b2 |
|
31 | 31 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
32 | 32 | src: 'a' -> dst: 'b' * |
|
33 | 33 | src: 'a2' -> dst: 'b2' ! |
|
34 | 34 | src: 'a2' -> dst: 'c2' ! |
|
35 | 35 | checking for directory renames |
|
36 | 36 | resolving manifests |
|
37 | 37 | branchmerge: True, force: False, partial: False |
|
38 | 38 | ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c |
|
39 | 39 | preserving a for resolve of b |
|
40 | 40 | removing a |
|
41 | 41 | b2: remote created -> g |
|
42 | 42 | getting b2 |
|
43 | b: remote moved from a -> m | |
|
43 | b: remote moved from a -> m (premerge) | |
|
44 | 44 | picked tool ':merge' for b (binary False symlink False) |
|
45 | 45 | merging a and b to b |
|
46 | 46 | my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c |
|
47 | 47 | premerge successful |
|
48 | 48 | note: possible conflict - a2 was renamed multiple times to: |
|
49 | 49 | c2 |
|
50 | 50 | b2 |
|
51 | 51 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
52 | 52 | (branch merge, don't forget to commit) |
|
53 | 53 | |
|
54 | 54 | $ hg status -AC |
|
55 | 55 | M b |
|
56 | 56 | a |
|
57 | 57 | M b2 |
|
58 | 58 | R a |
|
59 | 59 | C c2 |
|
60 | 60 | |
|
61 | 61 | $ cat b |
|
62 | 62 | blahblah |
|
63 | 63 | |
|
64 | 64 | $ hg ci -m "merge" |
|
65 | 65 | |
|
66 | 66 | $ hg debugindex b |
|
67 | 67 | rev offset length ..... linkrev nodeid p1 p2 (re) |
|
68 | 68 | 0 0 67 ..... 1 57eacc201a7f 000000000000 000000000000 (re) |
|
69 | 69 | 1 67 72 ..... 3 4727ba907962 000000000000 57eacc201a7f (re) |
|
70 | 70 | |
|
71 | 71 | $ hg debugrename b |
|
72 | 72 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 |
|
73 | 73 | |
|
74 | 74 | This used to trigger a "divergent renames" warning, despite no renames |
|
75 | 75 | |
|
76 | 76 | $ hg cp b b3 |
|
77 | 77 | $ hg cp b b4 |
|
78 | 78 | $ hg ci -A -m 'copy b twice' |
|
79 | 79 | $ hg up eb92d88a9712 |
|
80 | 80 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
81 | 81 | $ hg up |
|
82 | 82 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 83 | $ hg rm b3 b4 |
|
84 | 84 | $ hg ci -m 'clean up a bit of our mess' |
|
85 | 85 | |
|
86 | 86 | We'd rather not warn on divergent renames done in the same changeset (issue2113) |
|
87 | 87 | |
|
88 | 88 | $ hg cp b b3 |
|
89 | 89 | $ hg mv b b4 |
|
90 | 90 | $ hg ci -A -m 'divergent renames in same changeset' |
|
91 | 91 | $ hg up c761c6948de0 |
|
92 | 92 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
93 | 93 | $ hg up |
|
94 | 94 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
95 | 95 | |
|
96 | 96 | Check for issue2642 |
|
97 | 97 | |
|
98 | 98 | $ hg init t |
|
99 | 99 | $ cd t |
|
100 | 100 | |
|
101 | 101 | $ echo c0 > f1 |
|
102 | 102 | $ hg ci -Aqm0 |
|
103 | 103 | |
|
104 | 104 | $ hg up null -q |
|
105 | 105 | $ echo c1 > f1 # backport |
|
106 | 106 | $ hg ci -Aqm1 |
|
107 | 107 | $ hg mv f1 f2 |
|
108 | 108 | $ hg ci -qm2 |
|
109 | 109 | |
|
110 | 110 | $ hg up 0 -q |
|
111 | 111 | $ hg merge 1 -q --tool internal:local |
|
112 | 112 | $ hg ci -qm3 |
|
113 | 113 | |
|
114 | 114 | $ hg merge 2 |
|
115 | 115 | merging f1 and f2 to f2 |
|
116 | 116 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
117 | 117 | (branch merge, don't forget to commit) |
|
118 | 118 | |
|
119 | 119 | $ cat f2 |
|
120 | 120 | c0 |
|
121 | 121 | |
|
122 | 122 | $ cd .. |
|
123 | 123 | |
|
124 | 124 | Check for issue2089 |
|
125 | 125 | |
|
126 | 126 | $ hg init repo2089 |
|
127 | 127 | $ cd repo2089 |
|
128 | 128 | |
|
129 | 129 | $ echo c0 > f1 |
|
130 | 130 | $ hg ci -Aqm0 |
|
131 | 131 | |
|
132 | 132 | $ hg up null -q |
|
133 | 133 | $ echo c1 > f1 |
|
134 | 134 | $ hg ci -Aqm1 |
|
135 | 135 | |
|
136 | 136 | $ hg up 0 -q |
|
137 | 137 | $ hg merge 1 -q --tool internal:local |
|
138 | 138 | $ echo c2 > f1 |
|
139 | 139 | $ hg ci -qm2 |
|
140 | 140 | |
|
141 | 141 | $ hg up 1 -q |
|
142 | 142 | $ hg mv f1 f2 |
|
143 | 143 | $ hg ci -Aqm3 |
|
144 | 144 | |
|
145 | 145 | $ hg up 2 -q |
|
146 | 146 | $ hg merge 3 |
|
147 | 147 | merging f1 and f2 to f2 |
|
148 | 148 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
149 | 149 | (branch merge, don't forget to commit) |
|
150 | 150 | |
|
151 | 151 | $ cat f2 |
|
152 | 152 | c2 |
|
153 | 153 | |
|
154 | 154 | $ cd .. |
|
155 | 155 | |
|
156 | 156 | Check for issue3074 |
|
157 | 157 | |
|
158 | 158 | $ hg init repo3074 |
|
159 | 159 | $ cd repo3074 |
|
160 | 160 | $ echo foo > file |
|
161 | 161 | $ hg add file |
|
162 | 162 | $ hg commit -m "added file" |
|
163 | 163 | $ hg mv file newfile |
|
164 | 164 | $ hg commit -m "renamed file" |
|
165 | 165 | $ hg update 0 |
|
166 | 166 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
167 | 167 | $ hg rm file |
|
168 | 168 | $ hg commit -m "deleted file" |
|
169 | 169 | created new head |
|
170 | 170 | $ hg merge --debug |
|
171 | 171 | searching for copies back to rev 1 |
|
172 | 172 | unmatched files in other: |
|
173 | 173 | newfile |
|
174 | 174 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
175 | 175 | src: 'file' -> dst: 'newfile' % |
|
176 | 176 | checking for directory renames |
|
177 | 177 | resolving manifests |
|
178 | 178 | branchmerge: True, force: False, partial: False |
|
179 | 179 | ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0 |
|
180 | 180 | newfile: remote created -> g |
|
181 | 181 | getting newfile |
|
182 | 182 | note: possible conflict - file was deleted and renamed to: |
|
183 | 183 | newfile |
|
184 | 184 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
185 | 185 | (branch merge, don't forget to commit) |
|
186 | 186 | $ hg status |
|
187 | 187 | M newfile |
|
188 | 188 | $ cd .. |
@@ -1,1039 +1,1071 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ mkdir -p t |
|
3 | 3 | $ cd t |
|
4 | 4 | $ cat <<EOF > merge |
|
5 | 5 | > import sys, os |
|
6 | 6 | > f = open(sys.argv[1], "wb") |
|
7 | 7 | > f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3])) |
|
8 | 8 | > f.close() |
|
9 | 9 | > EOF |
|
10 | 10 | |
|
11 | 11 | perform a test merge with possible renaming |
|
12 | 12 | args: |
|
13 | 13 | $1 = action in local branch |
|
14 | 14 | $2 = action in remote branch |
|
15 | 15 | $3 = action in working dir |
|
16 | 16 | $4 = expected result |
|
17 | 17 | |
|
18 | 18 | $ tm() |
|
19 | 19 | > { |
|
20 | 20 | > hg init t |
|
21 | 21 | > cd t |
|
22 | 22 | > echo "[merge]" >> .hg/hgrc |
|
23 | 23 | > echo "followcopies = 1" >> .hg/hgrc |
|
24 | 24 | > |
|
25 | 25 | > # base |
|
26 | 26 | > echo base > a |
|
27 | 27 | > echo base > rev # used to force commits |
|
28 | 28 | > hg add a rev |
|
29 | 29 | > hg ci -m "base" |
|
30 | 30 | > |
|
31 | 31 | > # remote |
|
32 | 32 | > echo remote > rev |
|
33 | 33 | > if [ "$2" != "" ] ; then $2 ; fi |
|
34 | 34 | > hg ci -m "remote" |
|
35 | 35 | > |
|
36 | 36 | > # local |
|
37 | 37 | > hg co -q 0 |
|
38 | 38 | > echo local > rev |
|
39 | 39 | > if [ "$1" != "" ] ; then $1 ; fi |
|
40 | 40 | > hg ci -m "local" |
|
41 | 41 | > |
|
42 | 42 | > # working dir |
|
43 | 43 | > echo local > rev |
|
44 | 44 | > if [ "$3" != "" ] ; then $3 ; fi |
|
45 | 45 | > |
|
46 | 46 | > # merge |
|
47 | 47 | > echo "--------------" |
|
48 | 48 | > echo "test L:$1 R:$2 W:$3 - $4" |
|
49 | 49 | > echo "--------------" |
|
50 | 50 | > hg merge -y --debug --traceback --tool="python ../merge" |
|
51 | 51 | > |
|
52 | 52 | > echo "--------------" |
|
53 | 53 | > hg status -camC -X rev |
|
54 | 54 | > |
|
55 | 55 | > hg ci -m "merge" |
|
56 | 56 | > |
|
57 | 57 | > echo "--------------" |
|
58 | 58 | > echo |
|
59 | 59 | > |
|
60 | 60 | > cd .. |
|
61 | 61 | > rm -r t |
|
62 | 62 | > } |
|
63 | 63 | $ up() { |
|
64 | 64 | > cp rev $1 |
|
65 | 65 | > hg add $1 2> /dev/null |
|
66 | 66 | > if [ "$2" != "" ] ; then |
|
67 | 67 | > cp rev $2 |
|
68 | 68 | > hg add $2 2> /dev/null |
|
69 | 69 | > fi |
|
70 | 70 | > } |
|
71 | 71 | $ uc() { up $1; hg cp $1 $2; } # update + copy |
|
72 | 72 | $ um() { up $1; hg mv $1 $2; } |
|
73 | 73 | $ nc() { hg cp $1 $2; } # just copy |
|
74 | 74 | $ nm() { hg mv $1 $2; } # just move |
|
75 | 75 | $ tm "up a " "nc a b" " " "1 get local a to b" |
|
76 | 76 | created new head |
|
77 | 77 | -------------- |
|
78 | 78 | test L:up a R:nc a b W: - 1 get local a to b |
|
79 | 79 | -------------- |
|
80 | 80 | searching for copies back to rev 1 |
|
81 | 81 | unmatched files in other: |
|
82 | 82 | b |
|
83 | 83 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
84 | 84 | src: 'a' -> dst: 'b' * |
|
85 | 85 | checking for directory renames |
|
86 | 86 | resolving manifests |
|
87 | 87 | branchmerge: True, force: False, partial: False |
|
88 | 88 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24 |
|
89 | 89 | preserving a for resolve of b |
|
90 | 90 | preserving rev for resolve of rev |
|
91 | 91 | a: remote unchanged -> k |
|
92 | b: remote copied from a -> m | |
|
92 | b: remote copied from a -> m (premerge) | |
|
93 | 93 | picked tool 'python ../merge' for b (binary False symlink False) |
|
94 | 94 | merging a and b to b |
|
95 | 95 | my b@e300d1c794ec+ other b@4ce40f5aca24 ancestor a@924404dff337 |
|
96 | 96 | premerge successful |
|
97 | rev: versions differ -> m | |
|
97 | rev: versions differ -> m (premerge) | |
|
98 | 98 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
99 | 99 | merging rev |
|
100 | 100 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
101 | rev: versions differ -> m (merge) | |
|
101 | 102 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
102 | 103 | my rev@e300d1c794ec+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
103 | 104 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
104 | 105 | merge tool returned: 0 |
|
105 | 106 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
106 | 107 | (branch merge, don't forget to commit) |
|
107 | 108 | -------------- |
|
108 | 109 | M b |
|
109 | 110 | a |
|
110 | 111 | C a |
|
111 | 112 | -------------- |
|
112 | 113 | |
|
113 | 114 | $ tm "nc a b" "up a " " " "2 get rem change to a and b" |
|
114 | 115 | created new head |
|
115 | 116 | -------------- |
|
116 | 117 | test L:nc a b R:up a W: - 2 get rem change to a and b |
|
117 | 118 | -------------- |
|
118 | 119 | searching for copies back to rev 1 |
|
119 | 120 | unmatched files in local: |
|
120 | 121 | b |
|
121 | 122 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
122 | 123 | src: 'a' -> dst: 'b' * |
|
123 | 124 | checking for directory renames |
|
124 | 125 | resolving manifests |
|
125 | 126 | branchmerge: True, force: False, partial: False |
|
126 | 127 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71 |
|
127 | 128 | preserving b for resolve of b |
|
128 | 129 | preserving rev for resolve of rev |
|
129 | 130 | a: remote is newer -> g |
|
130 | 131 | getting a |
|
131 | b: local copied/moved from a -> m | |
|
132 | b: local copied/moved from a -> m (premerge) | |
|
132 | 133 | picked tool 'python ../merge' for b (binary False symlink False) |
|
133 | 134 | merging b and a to b |
|
134 | 135 | my b@86a2aa42fc76+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
135 | 136 | premerge successful |
|
136 | rev: versions differ -> m | |
|
137 | rev: versions differ -> m (premerge) | |
|
137 | 138 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
138 | 139 | merging rev |
|
139 | 140 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
141 | rev: versions differ -> m (merge) | |
|
140 | 142 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
141 | 143 | my rev@86a2aa42fc76+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
142 | 144 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
143 | 145 | merge tool returned: 0 |
|
144 | 146 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
145 | 147 | (branch merge, don't forget to commit) |
|
146 | 148 | -------------- |
|
147 | 149 | M a |
|
148 | 150 | M b |
|
149 | 151 | a |
|
150 | 152 | -------------- |
|
151 | 153 | |
|
152 | 154 | $ tm "up a " "nm a b" " " "3 get local a change to b, remove a" |
|
153 | 155 | created new head |
|
154 | 156 | -------------- |
|
155 | 157 | test L:up a R:nm a b W: - 3 get local a change to b, remove a |
|
156 | 158 | -------------- |
|
157 | 159 | searching for copies back to rev 1 |
|
158 | 160 | unmatched files in other: |
|
159 | 161 | b |
|
160 | 162 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
161 | 163 | src: 'a' -> dst: 'b' * |
|
162 | 164 | checking for directory renames |
|
163 | 165 | resolving manifests |
|
164 | 166 | branchmerge: True, force: False, partial: False |
|
165 | 167 | ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a |
|
166 | 168 | preserving a for resolve of b |
|
167 | 169 | preserving rev for resolve of rev |
|
168 | 170 | removing a |
|
169 | b: remote moved from a -> m | |
|
171 | b: remote moved from a -> m (premerge) | |
|
170 | 172 | picked tool 'python ../merge' for b (binary False symlink False) |
|
171 | 173 | merging a and b to b |
|
172 | 174 | my b@e300d1c794ec+ other b@bdb19105162a ancestor a@924404dff337 |
|
173 | 175 | premerge successful |
|
174 | rev: versions differ -> m | |
|
176 | rev: versions differ -> m (premerge) | |
|
175 | 177 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
176 | 178 | merging rev |
|
177 | 179 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
180 | rev: versions differ -> m (merge) | |
|
178 | 181 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
179 | 182 | my rev@e300d1c794ec+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
180 | 183 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
181 | 184 | merge tool returned: 0 |
|
182 | 185 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
183 | 186 | (branch merge, don't forget to commit) |
|
184 | 187 | -------------- |
|
185 | 188 | M b |
|
186 | 189 | a |
|
187 | 190 | -------------- |
|
188 | 191 | |
|
189 | 192 | $ tm "nm a b" "up a " " " "4 get remote change to b" |
|
190 | 193 | created new head |
|
191 | 194 | -------------- |
|
192 | 195 | test L:nm a b R:up a W: - 4 get remote change to b |
|
193 | 196 | -------------- |
|
194 | 197 | searching for copies back to rev 1 |
|
195 | 198 | unmatched files in local: |
|
196 | 199 | b |
|
197 | 200 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
198 | 201 | src: 'a' -> dst: 'b' * |
|
199 | 202 | checking for directory renames |
|
200 | 203 | resolving manifests |
|
201 | 204 | branchmerge: True, force: False, partial: False |
|
202 | 205 | ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71 |
|
203 | 206 | preserving b for resolve of b |
|
204 | 207 | preserving rev for resolve of rev |
|
205 | b: local copied/moved from a -> m | |
|
208 | b: local copied/moved from a -> m (premerge) | |
|
206 | 209 | picked tool 'python ../merge' for b (binary False symlink False) |
|
207 | 210 | merging b and a to b |
|
208 | 211 | my b@02963e448370+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
209 | 212 | premerge successful |
|
210 | rev: versions differ -> m | |
|
213 | rev: versions differ -> m (premerge) | |
|
211 | 214 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
212 | 215 | merging rev |
|
213 | 216 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
217 | rev: versions differ -> m (merge) | |
|
214 | 218 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
215 | 219 | my rev@02963e448370+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
216 | 220 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
217 | 221 | merge tool returned: 0 |
|
218 | 222 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
219 | 223 | (branch merge, don't forget to commit) |
|
220 | 224 | -------------- |
|
221 | 225 | M b |
|
222 | 226 | a |
|
223 | 227 | -------------- |
|
224 | 228 | |
|
225 | 229 | $ tm " " "nc a b" " " "5 get b" |
|
226 | 230 | created new head |
|
227 | 231 | -------------- |
|
228 | 232 | test L: R:nc a b W: - 5 get b |
|
229 | 233 | -------------- |
|
230 | 234 | searching for copies back to rev 1 |
|
231 | 235 | unmatched files in other: |
|
232 | 236 | b |
|
233 | 237 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
234 | 238 | src: 'a' -> dst: 'b' |
|
235 | 239 | checking for directory renames |
|
236 | 240 | resolving manifests |
|
237 | 241 | branchmerge: True, force: False, partial: False |
|
238 | 242 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24 |
|
239 | 243 | preserving rev for resolve of rev |
|
240 | 244 | b: remote created -> g |
|
241 | 245 | getting b |
|
242 | rev: versions differ -> m | |
|
246 | rev: versions differ -> m (premerge) | |
|
243 | 247 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
244 | 248 | merging rev |
|
245 | 249 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
250 | rev: versions differ -> m (merge) | |
|
246 | 251 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
247 | 252 | my rev@94b33a1b7f2d+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
248 | 253 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
249 | 254 | merge tool returned: 0 |
|
250 | 255 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
251 | 256 | (branch merge, don't forget to commit) |
|
252 | 257 | -------------- |
|
253 | 258 | M b |
|
254 | 259 | C a |
|
255 | 260 | -------------- |
|
256 | 261 | |
|
257 | 262 | $ tm "nc a b" " " " " "6 nothing" |
|
258 | 263 | created new head |
|
259 | 264 | -------------- |
|
260 | 265 | test L:nc a b R: W: - 6 nothing |
|
261 | 266 | -------------- |
|
262 | 267 | searching for copies back to rev 1 |
|
263 | 268 | unmatched files in local: |
|
264 | 269 | b |
|
265 | 270 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
266 | 271 | src: 'a' -> dst: 'b' |
|
267 | 272 | checking for directory renames |
|
268 | 273 | resolving manifests |
|
269 | 274 | branchmerge: True, force: False, partial: False |
|
270 | 275 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336 |
|
271 | 276 | preserving rev for resolve of rev |
|
272 | rev: versions differ -> m | |
|
277 | rev: versions differ -> m (premerge) | |
|
273 | 278 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
274 | 279 | merging rev |
|
275 | 280 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
281 | rev: versions differ -> m (merge) | |
|
276 | 282 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
277 | 283 | my rev@86a2aa42fc76+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
278 | 284 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
279 | 285 | merge tool returned: 0 |
|
280 | 286 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
281 | 287 | (branch merge, don't forget to commit) |
|
282 | 288 | -------------- |
|
283 | 289 | C a |
|
284 | 290 | C b |
|
285 | 291 | -------------- |
|
286 | 292 | |
|
287 | 293 | $ tm " " "nm a b" " " "7 get b" |
|
288 | 294 | created new head |
|
289 | 295 | -------------- |
|
290 | 296 | test L: R:nm a b W: - 7 get b |
|
291 | 297 | -------------- |
|
292 | 298 | searching for copies back to rev 1 |
|
293 | 299 | unmatched files in other: |
|
294 | 300 | b |
|
295 | 301 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
296 | 302 | src: 'a' -> dst: 'b' |
|
297 | 303 | checking for directory renames |
|
298 | 304 | resolving manifests |
|
299 | 305 | branchmerge: True, force: False, partial: False |
|
300 | 306 | ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a |
|
301 | 307 | preserving rev for resolve of rev |
|
302 | 308 | a: other deleted -> r |
|
303 | 309 | removing a |
|
304 | 310 | b: remote created -> g |
|
305 | 311 | getting b |
|
306 | rev: versions differ -> m | |
|
312 | rev: versions differ -> m (premerge) | |
|
307 | 313 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
308 | 314 | merging rev |
|
309 | 315 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
316 | rev: versions differ -> m (merge) | |
|
310 | 317 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
311 | 318 | my rev@94b33a1b7f2d+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
312 | 319 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
313 | 320 | merge tool returned: 0 |
|
314 | 321 | 1 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
315 | 322 | (branch merge, don't forget to commit) |
|
316 | 323 | -------------- |
|
317 | 324 | M b |
|
318 | 325 | -------------- |
|
319 | 326 | |
|
320 | 327 | $ tm "nm a b" " " " " "8 nothing" |
|
321 | 328 | created new head |
|
322 | 329 | -------------- |
|
323 | 330 | test L:nm a b R: W: - 8 nothing |
|
324 | 331 | -------------- |
|
325 | 332 | searching for copies back to rev 1 |
|
326 | 333 | unmatched files in local: |
|
327 | 334 | b |
|
328 | 335 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
329 | 336 | src: 'a' -> dst: 'b' |
|
330 | 337 | checking for directory renames |
|
331 | 338 | resolving manifests |
|
332 | 339 | branchmerge: True, force: False, partial: False |
|
333 | 340 | ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336 |
|
334 | 341 | preserving rev for resolve of rev |
|
335 | rev: versions differ -> m | |
|
342 | rev: versions differ -> m (premerge) | |
|
336 | 343 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
337 | 344 | merging rev |
|
338 | 345 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
346 | rev: versions differ -> m (merge) | |
|
339 | 347 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
340 | 348 | my rev@02963e448370+ other rev@97c705ade336 ancestor rev@924404dff337 |
|
341 | 349 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
342 | 350 | merge tool returned: 0 |
|
343 | 351 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
344 | 352 | (branch merge, don't forget to commit) |
|
345 | 353 | -------------- |
|
346 | 354 | C b |
|
347 | 355 | -------------- |
|
348 | 356 | |
|
349 | 357 | $ tm "um a b" "um a b" " " "9 do merge with ancestor in a" |
|
350 | 358 | created new head |
|
351 | 359 | -------------- |
|
352 | 360 | test L:um a b R:um a b W: - 9 do merge with ancestor in a |
|
353 | 361 | -------------- |
|
354 | 362 | searching for copies back to rev 1 |
|
355 | 363 | unmatched files new in both: |
|
356 | 364 | b |
|
357 | 365 | resolving manifests |
|
358 | 366 | branchmerge: True, force: False, partial: False |
|
359 | 367 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493 |
|
360 | 368 | preserving b for resolve of b |
|
361 | 369 | preserving rev for resolve of rev |
|
362 | b: both renamed from a -> m | |
|
370 | b: both renamed from a -> m (premerge) | |
|
363 | 371 | picked tool 'python ../merge' for b (binary False symlink False) |
|
364 | 372 | merging b |
|
365 | 373 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 |
|
374 | rev: versions differ -> m (premerge) | |
|
375 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
376 | merging rev | |
|
377 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
|
378 | b: both renamed from a -> m (merge) | |
|
366 | 379 | picked tool 'python ../merge' for b (binary False symlink False) |
|
367 | 380 | my b@62e7bf090eba+ other b@49b6d8032493 ancestor a@924404dff337 |
|
368 | 381 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
369 | 382 | merge tool returned: 0 |
|
370 | rev: versions differ -> m | |
|
371 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
372 | merging rev | |
|
373 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
|
383 | rev: versions differ -> m (merge) | |
|
374 | 384 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
375 | 385 | my rev@62e7bf090eba+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
376 | 386 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
377 | 387 | merge tool returned: 0 |
|
378 | 388 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
379 | 389 | (branch merge, don't forget to commit) |
|
380 | 390 | -------------- |
|
381 | 391 | M b |
|
382 | 392 | -------------- |
|
383 | 393 | |
|
384 | 394 | |
|
385 | 395 | m "um a c" "um x c" " " "10 do merge with no ancestor" |
|
386 | 396 | |
|
387 | 397 | $ tm "nm a b" "nm a c" " " "11 get c, keep b" |
|
388 | 398 | created new head |
|
389 | 399 | -------------- |
|
390 | 400 | test L:nm a b R:nm a c W: - 11 get c, keep b |
|
391 | 401 | -------------- |
|
392 | 402 | searching for copies back to rev 1 |
|
393 | 403 | unmatched files in local: |
|
394 | 404 | b |
|
395 | 405 | unmatched files in other: |
|
396 | 406 | c |
|
397 | 407 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
398 | 408 | src: 'a' -> dst: 'b' ! |
|
399 | 409 | src: 'a' -> dst: 'c' ! |
|
400 | 410 | checking for directory renames |
|
401 | 411 | resolving manifests |
|
402 | 412 | branchmerge: True, force: False, partial: False |
|
403 | 413 | ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e |
|
404 | 414 | preserving rev for resolve of rev |
|
405 | 415 | c: remote created -> g |
|
406 | 416 | getting c |
|
407 | rev: versions differ -> m | |
|
417 | rev: versions differ -> m (premerge) | |
|
408 | 418 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
409 | 419 | merging rev |
|
410 | 420 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 |
|
421 | rev: versions differ -> m (merge) | |
|
411 | 422 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
412 | 423 | my rev@02963e448370+ other rev@fe905ef2c33e ancestor rev@924404dff337 |
|
413 | 424 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
414 | 425 | merge tool returned: 0 |
|
415 | 426 | note: possible conflict - a was renamed multiple times to: |
|
416 | 427 | b |
|
417 | 428 | c |
|
418 | 429 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
419 | 430 | (branch merge, don't forget to commit) |
|
420 | 431 | -------------- |
|
421 | 432 | M c |
|
422 | 433 | C b |
|
423 | 434 | -------------- |
|
424 | 435 | |
|
425 | 436 | $ tm "nc a b" "up b " " " "12 merge b no ancestor" |
|
426 | 437 | created new head |
|
427 | 438 | -------------- |
|
428 | 439 | test L:nc a b R:up b W: - 12 merge b no ancestor |
|
429 | 440 | -------------- |
|
430 | 441 | searching for copies back to rev 1 |
|
431 | 442 | unmatched files new in both: |
|
432 | 443 | b |
|
433 | 444 | resolving manifests |
|
434 | 445 | branchmerge: True, force: False, partial: False |
|
435 | 446 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7 |
|
436 | 447 | preserving b for resolve of b |
|
437 | 448 | preserving rev for resolve of rev |
|
438 | b: both created -> m | |
|
449 | b: both created -> m (premerge) | |
|
439 | 450 | picked tool 'python ../merge' for b (binary False symlink False) |
|
440 | 451 | merging b |
|
441 | 452 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 |
|
453 | rev: versions differ -> m (premerge) | |
|
454 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
455 | merging rev | |
|
456 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 | |
|
457 | b: both created -> m (merge) | |
|
442 | 458 | picked tool 'python ../merge' for b (binary False symlink False) |
|
443 | 459 | my b@86a2aa42fc76+ other b@af30c7647fc7 ancestor b@000000000000 |
|
444 | 460 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
445 | 461 | merge tool returned: 0 |
|
446 | rev: versions differ -> m | |
|
447 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
448 | merging rev | |
|
449 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 | |
|
462 | rev: versions differ -> m (merge) | |
|
450 | 463 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
451 | 464 | my rev@86a2aa42fc76+ other rev@af30c7647fc7 ancestor rev@924404dff337 |
|
452 | 465 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
453 | 466 | merge tool returned: 0 |
|
454 | 467 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
455 | 468 | (branch merge, don't forget to commit) |
|
456 | 469 | -------------- |
|
457 | 470 | M b |
|
458 | 471 | C a |
|
459 | 472 | -------------- |
|
460 | 473 | |
|
461 | 474 | $ tm "up b " "nm a b" " " "13 merge b no ancestor" |
|
462 | 475 | created new head |
|
463 | 476 | -------------- |
|
464 | 477 | test L:up b R:nm a b W: - 13 merge b no ancestor |
|
465 | 478 | -------------- |
|
466 | 479 | searching for copies back to rev 1 |
|
467 | 480 | unmatched files new in both: |
|
468 | 481 | b |
|
469 | 482 | resolving manifests |
|
470 | 483 | branchmerge: True, force: False, partial: False |
|
471 | 484 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
472 | 485 | preserving b for resolve of b |
|
473 | 486 | preserving rev for resolve of rev |
|
474 | 487 | a: other deleted -> r |
|
475 | 488 | removing a |
|
476 | b: both created -> m | |
|
489 | b: both created -> m (premerge) | |
|
477 | 490 | picked tool 'python ../merge' for b (binary False symlink False) |
|
478 | 491 | merging b |
|
479 | 492 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
493 | rev: versions differ -> m (premerge) | |
|
494 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
495 | merging rev | |
|
496 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
|
497 | b: both created -> m (merge) | |
|
480 | 498 | picked tool 'python ../merge' for b (binary False symlink False) |
|
481 | 499 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
482 | 500 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
483 | 501 | merge tool returned: 0 |
|
484 | rev: versions differ -> m | |
|
485 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
486 | merging rev | |
|
487 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
|
502 | rev: versions differ -> m (merge) | |
|
488 | 503 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
489 | 504 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
490 | 505 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
491 | 506 | merge tool returned: 0 |
|
492 | 507 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
493 | 508 | (branch merge, don't forget to commit) |
|
494 | 509 | -------------- |
|
495 | 510 | M b |
|
496 | 511 | -------------- |
|
497 | 512 | |
|
498 | 513 | $ tm "nc a b" "up a b" " " "14 merge b no ancestor" |
|
499 | 514 | created new head |
|
500 | 515 | -------------- |
|
501 | 516 | test L:nc a b R:up a b W: - 14 merge b no ancestor |
|
502 | 517 | -------------- |
|
503 | 518 | searching for copies back to rev 1 |
|
504 | 519 | unmatched files new in both: |
|
505 | 520 | b |
|
506 | 521 | resolving manifests |
|
507 | 522 | branchmerge: True, force: False, partial: False |
|
508 | 523 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
509 | 524 | preserving b for resolve of b |
|
510 | 525 | preserving rev for resolve of rev |
|
511 | 526 | a: remote is newer -> g |
|
512 | 527 | getting a |
|
513 | b: both created -> m | |
|
528 | b: both created -> m (premerge) | |
|
514 | 529 | picked tool 'python ../merge' for b (binary False symlink False) |
|
515 | 530 | merging b |
|
516 | 531 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
532 | rev: versions differ -> m (premerge) | |
|
533 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
534 | merging rev | |
|
535 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
|
536 | b: both created -> m (merge) | |
|
517 | 537 | picked tool 'python ../merge' for b (binary False symlink False) |
|
518 | 538 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
519 | 539 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
520 | 540 | merge tool returned: 0 |
|
521 | rev: versions differ -> m | |
|
522 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
523 | merging rev | |
|
524 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
|
541 | rev: versions differ -> m (merge) | |
|
525 | 542 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
526 | 543 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
527 | 544 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
528 | 545 | merge tool returned: 0 |
|
529 | 546 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
530 | 547 | (branch merge, don't forget to commit) |
|
531 | 548 | -------------- |
|
532 | 549 | M a |
|
533 | 550 | M b |
|
534 | 551 | -------------- |
|
535 | 552 | |
|
536 | 553 | $ tm "up b " "nm a b" " " "15 merge b no ancestor, remove a" |
|
537 | 554 | created new head |
|
538 | 555 | -------------- |
|
539 | 556 | test L:up b R:nm a b W: - 15 merge b no ancestor, remove a |
|
540 | 557 | -------------- |
|
541 | 558 | searching for copies back to rev 1 |
|
542 | 559 | unmatched files new in both: |
|
543 | 560 | b |
|
544 | 561 | resolving manifests |
|
545 | 562 | branchmerge: True, force: False, partial: False |
|
546 | 563 | ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a |
|
547 | 564 | preserving b for resolve of b |
|
548 | 565 | preserving rev for resolve of rev |
|
549 | 566 | a: other deleted -> r |
|
550 | 567 | removing a |
|
551 | b: both created -> m | |
|
568 | b: both created -> m (premerge) | |
|
552 | 569 | picked tool 'python ../merge' for b (binary False symlink False) |
|
553 | 570 | merging b |
|
554 | 571 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
572 | rev: versions differ -> m (premerge) | |
|
573 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
574 | merging rev | |
|
575 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
|
576 | b: both created -> m (merge) | |
|
555 | 577 | picked tool 'python ../merge' for b (binary False symlink False) |
|
556 | 578 | my b@59318016310c+ other b@bdb19105162a ancestor b@000000000000 |
|
557 | 579 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
558 | 580 | merge tool returned: 0 |
|
559 | rev: versions differ -> m | |
|
560 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
561 | merging rev | |
|
562 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 | |
|
581 | rev: versions differ -> m (merge) | |
|
563 | 582 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
564 | 583 | my rev@59318016310c+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
565 | 584 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
566 | 585 | merge tool returned: 0 |
|
567 | 586 | 0 files updated, 2 files merged, 1 files removed, 0 files unresolved |
|
568 | 587 | (branch merge, don't forget to commit) |
|
569 | 588 | -------------- |
|
570 | 589 | M b |
|
571 | 590 | -------------- |
|
572 | 591 | |
|
573 | 592 | $ tm "nc a b" "up a b" " " "16 get a, merge b no ancestor" |
|
574 | 593 | created new head |
|
575 | 594 | -------------- |
|
576 | 595 | test L:nc a b R:up a b W: - 16 get a, merge b no ancestor |
|
577 | 596 | -------------- |
|
578 | 597 | searching for copies back to rev 1 |
|
579 | 598 | unmatched files new in both: |
|
580 | 599 | b |
|
581 | 600 | resolving manifests |
|
582 | 601 | branchmerge: True, force: False, partial: False |
|
583 | 602 | ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a |
|
584 | 603 | preserving b for resolve of b |
|
585 | 604 | preserving rev for resolve of rev |
|
586 | 605 | a: remote is newer -> g |
|
587 | 606 | getting a |
|
588 | b: both created -> m | |
|
607 | b: both created -> m (premerge) | |
|
589 | 608 | picked tool 'python ../merge' for b (binary False symlink False) |
|
590 | 609 | merging b |
|
591 | 610 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
611 | rev: versions differ -> m (premerge) | |
|
612 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
613 | merging rev | |
|
614 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
|
615 | b: both created -> m (merge) | |
|
592 | 616 | picked tool 'python ../merge' for b (binary False symlink False) |
|
593 | 617 | my b@86a2aa42fc76+ other b@8dbce441892a ancestor b@000000000000 |
|
594 | 618 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
595 | 619 | merge tool returned: 0 |
|
596 | rev: versions differ -> m | |
|
597 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
598 | merging rev | |
|
599 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 | |
|
620 | rev: versions differ -> m (merge) | |
|
600 | 621 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
601 | 622 | my rev@86a2aa42fc76+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
602 | 623 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
603 | 624 | merge tool returned: 0 |
|
604 | 625 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
605 | 626 | (branch merge, don't forget to commit) |
|
606 | 627 | -------------- |
|
607 | 628 | M a |
|
608 | 629 | M b |
|
609 | 630 | -------------- |
|
610 | 631 | |
|
611 | 632 | $ tm "up a b" "nc a b" " " "17 keep a, merge b no ancestor" |
|
612 | 633 | created new head |
|
613 | 634 | -------------- |
|
614 | 635 | test L:up a b R:nc a b W: - 17 keep a, merge b no ancestor |
|
615 | 636 | -------------- |
|
616 | 637 | searching for copies back to rev 1 |
|
617 | 638 | unmatched files new in both: |
|
618 | 639 | b |
|
619 | 640 | resolving manifests |
|
620 | 641 | branchmerge: True, force: False, partial: False |
|
621 | 642 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24 |
|
622 | 643 | preserving b for resolve of b |
|
623 | 644 | preserving rev for resolve of rev |
|
624 | 645 | a: remote unchanged -> k |
|
625 | b: both created -> m | |
|
646 | b: both created -> m (premerge) | |
|
626 | 647 | picked tool 'python ../merge' for b (binary False symlink False) |
|
627 | 648 | merging b |
|
628 | 649 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 |
|
650 | rev: versions differ -> m (premerge) | |
|
651 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
652 | merging rev | |
|
653 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
|
654 | b: both created -> m (merge) | |
|
629 | 655 | picked tool 'python ../merge' for b (binary False symlink False) |
|
630 | 656 | my b@0b76e65c8289+ other b@4ce40f5aca24 ancestor b@000000000000 |
|
631 | 657 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
632 | 658 | merge tool returned: 0 |
|
633 | rev: versions differ -> m | |
|
634 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
635 | merging rev | |
|
636 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 | |
|
659 | rev: versions differ -> m (merge) | |
|
637 | 660 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
638 | 661 | my rev@0b76e65c8289+ other rev@4ce40f5aca24 ancestor rev@924404dff337 |
|
639 | 662 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
640 | 663 | merge tool returned: 0 |
|
641 | 664 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
642 | 665 | (branch merge, don't forget to commit) |
|
643 | 666 | -------------- |
|
644 | 667 | M b |
|
645 | 668 | C a |
|
646 | 669 | -------------- |
|
647 | 670 | |
|
648 | 671 | $ tm "nm a b" "up a b" " " "18 merge b no ancestor" |
|
649 | 672 | created new head |
|
650 | 673 | -------------- |
|
651 | 674 | test L:nm a b R:up a b W: - 18 merge b no ancestor |
|
652 | 675 | -------------- |
|
653 | 676 | searching for copies back to rev 1 |
|
654 | 677 | unmatched files new in both: |
|
655 | 678 | b |
|
656 | 679 | resolving manifests |
|
657 | 680 | branchmerge: True, force: False, partial: False |
|
658 | 681 | ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a |
|
659 | 682 | remote changed a which local deleted |
|
660 | 683 | use (c)hanged version or leave (d)eleted? c |
|
661 | 684 | preserving b for resolve of b |
|
662 | 685 | preserving rev for resolve of rev |
|
663 | 686 | a: prompt recreating -> g |
|
664 | 687 | getting a |
|
665 | b: both created -> m | |
|
688 | b: both created -> m (premerge) | |
|
666 | 689 | picked tool 'python ../merge' for b (binary False symlink False) |
|
667 | 690 | merging b |
|
668 | 691 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 |
|
692 | rev: versions differ -> m (premerge) | |
|
693 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
694 | merging rev | |
|
695 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 | |
|
696 | b: both created -> m (merge) | |
|
669 | 697 | picked tool 'python ../merge' for b (binary False symlink False) |
|
670 | 698 | my b@02963e448370+ other b@8dbce441892a ancestor b@000000000000 |
|
671 | 699 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
672 | 700 | merge tool returned: 0 |
|
673 | rev: versions differ -> m | |
|
674 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
675 | merging rev | |
|
676 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 | |
|
701 | rev: versions differ -> m (merge) | |
|
677 | 702 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
678 | 703 | my rev@02963e448370+ other rev@8dbce441892a ancestor rev@924404dff337 |
|
679 | 704 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
680 | 705 | merge tool returned: 0 |
|
681 | 706 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
682 | 707 | (branch merge, don't forget to commit) |
|
683 | 708 | -------------- |
|
684 | 709 | M a |
|
685 | 710 | M b |
|
686 | 711 | -------------- |
|
687 | 712 | |
|
688 | 713 | $ tm "up a b" "nm a b" " " "19 merge b no ancestor, prompt remove a" |
|
689 | 714 | created new head |
|
690 | 715 | -------------- |
|
691 | 716 | test L:up a b R:nm a b W: - 19 merge b no ancestor, prompt remove a |
|
692 | 717 | -------------- |
|
693 | 718 | searching for copies back to rev 1 |
|
694 | 719 | unmatched files new in both: |
|
695 | 720 | b |
|
696 | 721 | resolving manifests |
|
697 | 722 | branchmerge: True, force: False, partial: False |
|
698 | 723 | ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a |
|
699 | 724 | local changed a which remote deleted |
|
700 | 725 | use (c)hanged version or (d)elete? c |
|
701 | 726 | preserving b for resolve of b |
|
702 | 727 | preserving rev for resolve of rev |
|
703 | 728 | a: prompt keep -> a |
|
704 | b: both created -> m | |
|
729 | b: both created -> m (premerge) | |
|
705 | 730 | picked tool 'python ../merge' for b (binary False symlink False) |
|
706 | 731 | merging b |
|
707 | 732 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 |
|
733 | rev: versions differ -> m (premerge) | |
|
734 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
735 | merging rev | |
|
736 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 | |
|
737 | b: both created -> m (merge) | |
|
708 | 738 | picked tool 'python ../merge' for b (binary False symlink False) |
|
709 | 739 | my b@0b76e65c8289+ other b@bdb19105162a ancestor b@000000000000 |
|
710 | 740 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
711 | 741 | merge tool returned: 0 |
|
712 | rev: versions differ -> m | |
|
713 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
714 | merging rev | |
|
715 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 | |
|
742 | rev: versions differ -> m (merge) | |
|
716 | 743 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
717 | 744 | my rev@0b76e65c8289+ other rev@bdb19105162a ancestor rev@924404dff337 |
|
718 | 745 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
719 | 746 | merge tool returned: 0 |
|
720 | 747 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
721 | 748 | (branch merge, don't forget to commit) |
|
722 | 749 | -------------- |
|
723 | 750 | M b |
|
724 | 751 | C a |
|
725 | 752 | -------------- |
|
726 | 753 | |
|
727 | 754 | $ tm "up a " "um a b" " " "20 merge a and b to b, remove a" |
|
728 | 755 | created new head |
|
729 | 756 | -------------- |
|
730 | 757 | test L:up a R:um a b W: - 20 merge a and b to b, remove a |
|
731 | 758 | -------------- |
|
732 | 759 | searching for copies back to rev 1 |
|
733 | 760 | unmatched files in other: |
|
734 | 761 | b |
|
735 | 762 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
736 | 763 | src: 'a' -> dst: 'b' * |
|
737 | 764 | checking for directory renames |
|
738 | 765 | resolving manifests |
|
739 | 766 | branchmerge: True, force: False, partial: False |
|
740 | 767 | ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493 |
|
741 | 768 | preserving a for resolve of b |
|
742 | 769 | preserving rev for resolve of rev |
|
743 | 770 | removing a |
|
744 | b: remote moved from a -> m | |
|
771 | b: remote moved from a -> m (premerge) | |
|
745 | 772 | picked tool 'python ../merge' for b (binary False symlink False) |
|
746 | 773 | merging a and b to b |
|
747 | 774 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 |
|
775 | rev: versions differ -> m (premerge) | |
|
776 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
777 | merging rev | |
|
778 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
|
779 | b: remote moved from a -> m (merge) | |
|
748 | 780 | picked tool 'python ../merge' for b (binary False symlink False) |
|
749 | 781 | my b@e300d1c794ec+ other b@49b6d8032493 ancestor a@924404dff337 |
|
750 | 782 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
751 | 783 | merge tool returned: 0 |
|
752 | rev: versions differ -> m | |
|
753 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
754 | merging rev | |
|
755 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 | |
|
784 | rev: versions differ -> m (merge) | |
|
756 | 785 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
757 | 786 | my rev@e300d1c794ec+ other rev@49b6d8032493 ancestor rev@924404dff337 |
|
758 | 787 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
759 | 788 | merge tool returned: 0 |
|
760 | 789 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
761 | 790 | (branch merge, don't forget to commit) |
|
762 | 791 | -------------- |
|
763 | 792 | M b |
|
764 | 793 | a |
|
765 | 794 | -------------- |
|
766 | 795 | |
|
767 | 796 | $ tm "um a b" "up a " " " "21 merge a and b to b" |
|
768 | 797 | created new head |
|
769 | 798 | -------------- |
|
770 | 799 | test L:um a b R:up a W: - 21 merge a and b to b |
|
771 | 800 | -------------- |
|
772 | 801 | searching for copies back to rev 1 |
|
773 | 802 | unmatched files in local: |
|
774 | 803 | b |
|
775 | 804 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
776 | 805 | src: 'a' -> dst: 'b' * |
|
777 | 806 | checking for directory renames |
|
778 | 807 | resolving manifests |
|
779 | 808 | branchmerge: True, force: False, partial: False |
|
780 | 809 | ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71 |
|
781 | 810 | preserving b for resolve of b |
|
782 | 811 | preserving rev for resolve of rev |
|
783 | b: local copied/moved from a -> m | |
|
812 | b: local copied/moved from a -> m (premerge) | |
|
784 | 813 | picked tool 'python ../merge' for b (binary False symlink False) |
|
785 | 814 | merging b and a to b |
|
786 | 815 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
816 | rev: versions differ -> m (premerge) | |
|
817 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
818 | merging rev | |
|
819 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
|
820 | b: local copied/moved from a -> m (merge) | |
|
787 | 821 | picked tool 'python ../merge' for b (binary False symlink False) |
|
788 | 822 | my b@62e7bf090eba+ other a@f4db7e329e71 ancestor a@924404dff337 |
|
789 | 823 | launching merge tool: python ../merge *$TESTTMP/t/t/b* * * (glob) |
|
790 | 824 | merge tool returned: 0 |
|
791 | rev: versions differ -> m | |
|
792 | picked tool 'python ../merge' for rev (binary False symlink False) | |
|
793 | merging rev | |
|
794 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 | |
|
825 | rev: versions differ -> m (merge) | |
|
795 | 826 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
796 | 827 | my rev@62e7bf090eba+ other rev@f4db7e329e71 ancestor rev@924404dff337 |
|
797 | 828 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
798 | 829 | merge tool returned: 0 |
|
799 | 830 | 0 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
800 | 831 | (branch merge, don't forget to commit) |
|
801 | 832 | -------------- |
|
802 | 833 | M b |
|
803 | 834 | a |
|
804 | 835 | -------------- |
|
805 | 836 | |
|
806 | 837 | |
|
807 | 838 | m "nm a b" "um x a" " " "22 get a, keep b" |
|
808 | 839 | |
|
809 | 840 | $ tm "nm a b" "up a c" " " "23 get c, keep b" |
|
810 | 841 | created new head |
|
811 | 842 | -------------- |
|
812 | 843 | test L:nm a b R:up a c W: - 23 get c, keep b |
|
813 | 844 | -------------- |
|
814 | 845 | searching for copies back to rev 1 |
|
815 | 846 | unmatched files in local: |
|
816 | 847 | b |
|
817 | 848 | unmatched files in other: |
|
818 | 849 | c |
|
819 | 850 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
820 | 851 | src: 'a' -> dst: 'b' * |
|
821 | 852 | checking for directory renames |
|
822 | 853 | resolving manifests |
|
823 | 854 | branchmerge: True, force: False, partial: False |
|
824 | 855 | ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f |
|
825 | 856 | preserving b for resolve of b |
|
826 | 857 | preserving rev for resolve of rev |
|
827 | 858 | c: remote created -> g |
|
828 | 859 | getting c |
|
829 | b: local copied/moved from a -> m | |
|
860 | b: local copied/moved from a -> m (premerge) | |
|
830 | 861 | picked tool 'python ../merge' for b (binary False symlink False) |
|
831 | 862 | merging b and a to b |
|
832 | 863 | my b@02963e448370+ other a@2b958612230f ancestor a@924404dff337 |
|
833 | 864 | premerge successful |
|
834 | rev: versions differ -> m | |
|
865 | rev: versions differ -> m (premerge) | |
|
835 | 866 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
836 | 867 | merging rev |
|
837 | 868 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 |
|
869 | rev: versions differ -> m (merge) | |
|
838 | 870 | picked tool 'python ../merge' for rev (binary False symlink False) |
|
839 | 871 | my rev@02963e448370+ other rev@2b958612230f ancestor rev@924404dff337 |
|
840 | 872 | launching merge tool: python ../merge *$TESTTMP/t/t/rev* * * (glob) |
|
841 | 873 | merge tool returned: 0 |
|
842 | 874 | 1 files updated, 2 files merged, 0 files removed, 0 files unresolved |
|
843 | 875 | (branch merge, don't forget to commit) |
|
844 | 876 | -------------- |
|
845 | 877 | M b |
|
846 | 878 | a |
|
847 | 879 | M c |
|
848 | 880 | -------------- |
|
849 | 881 | |
|
850 | 882 | |
|
851 | 883 | $ cd .. |
|
852 | 884 | |
|
853 | 885 | |
|
854 | 886 | Systematic and terse testing of merge merges and ancestor calculation: |
|
855 | 887 | |
|
856 | 888 | Expected result: |
|
857 | 889 | |
|
858 | 890 | \ a m1 m2 dst |
|
859 | 891 | 0 - f f f "versions differ" |
|
860 | 892 | 1 f g g g "versions differ" |
|
861 | 893 | 2 f f f f "versions differ" |
|
862 | 894 | 3 f f g f+g "remote copied to " + f |
|
863 | 895 | 4 f f g g "remote moved to " + f |
|
864 | 896 | 5 f g f f+g "local copied to " + f2 |
|
865 | 897 | 6 f g f g "local moved to " + f2 |
|
866 | 898 | 7 - (f) f f "remote differs from untracked local" |
|
867 | 899 | 8 f (f) f f "remote differs from untracked local" |
|
868 | 900 | |
|
869 | 901 | $ hg init ancestortest |
|
870 | 902 | $ cd ancestortest |
|
871 | 903 | $ for x in 1 2 3 4 5 6 8; do mkdir $x; echo a > $x/f; done |
|
872 | 904 | $ hg ci -Aqm "a" |
|
873 | 905 | $ mkdir 0 |
|
874 | 906 | $ touch 0/f |
|
875 | 907 | $ hg mv 1/f 1/g |
|
876 | 908 | $ hg cp 5/f 5/g |
|
877 | 909 | $ hg mv 6/f 6/g |
|
878 | 910 | $ hg rm 8/f |
|
879 | 911 | $ for x in */*; do echo m1 > $x; done |
|
880 | 912 | $ hg ci -Aqm "m1" |
|
881 | 913 | $ hg up -qr0 |
|
882 | 914 | $ mkdir 0 7 |
|
883 | 915 | $ touch 0/f 7/f |
|
884 | 916 | $ hg mv 1/f 1/g |
|
885 | 917 | $ hg cp 3/f 3/g |
|
886 | 918 | $ hg mv 4/f 4/g |
|
887 | 919 | $ for x in */*; do echo m2 > $x; done |
|
888 | 920 | $ hg ci -Aqm "m2" |
|
889 | 921 | $ hg up -qr1 |
|
890 | 922 | $ mkdir 7 8 |
|
891 | 923 | $ echo m > 7/f |
|
892 | 924 | $ echo m > 8/f |
|
893 | 925 | $ hg merge -f --tool internal:dump -v --debug -r2 | sed '/^ 0\/f: both created -> m/,$d' 2> /dev/null |
|
894 | 926 | searching for copies back to rev 1 |
|
895 | 927 | unmatched files in local: |
|
896 | 928 | 5/g |
|
897 | 929 | 6/g |
|
898 | 930 | unmatched files in other: |
|
899 | 931 | 3/g |
|
900 | 932 | 4/g |
|
901 | 933 | 7/f |
|
902 | 934 | unmatched files new in both: |
|
903 | 935 | 0/f |
|
904 | 936 | 1/g |
|
905 | 937 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
906 | 938 | src: '3/f' -> dst: '3/g' * |
|
907 | 939 | src: '4/f' -> dst: '4/g' * |
|
908 | 940 | src: '5/f' -> dst: '5/g' * |
|
909 | 941 | src: '6/f' -> dst: '6/g' * |
|
910 | 942 | checking for directory renames |
|
911 | 943 | resolving manifests |
|
912 | 944 | branchmerge: True, force: True, partial: False |
|
913 | 945 | ancestor: e6cb3cf11019, local: ec44bf929ab5+, remote: c62e34d0b898 |
|
914 | 946 | remote changed 8/f which local deleted |
|
915 | 947 | use (c)hanged version or leave (d)eleted? c |
|
916 | 948 | preserving 0/f for resolve of 0/f |
|
917 | 949 | preserving 1/g for resolve of 1/g |
|
918 | 950 | preserving 2/f for resolve of 2/f |
|
919 | 951 | preserving 3/f for resolve of 3/f |
|
920 | 952 | preserving 3/f for resolve of 3/g |
|
921 | 953 | preserving 4/f for resolve of 4/g |
|
922 | 954 | preserving 5/f for resolve of 5/f |
|
923 | 955 | preserving 5/g for resolve of 5/g |
|
924 | 956 | preserving 6/g for resolve of 6/g |
|
925 | 957 | preserving 7/f for resolve of 7/f |
|
926 | 958 | removing 4/f |
|
927 | 959 | 8/f: prompt recreating -> g |
|
928 | 960 | getting 8/f |
|
929 | 961 | $ hg mani |
|
930 | 962 | 0/f |
|
931 | 963 | 1/g |
|
932 | 964 | 2/f |
|
933 | 965 | 3/f |
|
934 | 966 | 4/f |
|
935 | 967 | 5/f |
|
936 | 968 | 5/g |
|
937 | 969 | 6/g |
|
938 | 970 | $ for f in */*; do echo $f:; cat $f; done |
|
939 | 971 | 0/f: |
|
940 | 972 | m1 |
|
941 | 973 | 0/f.base: |
|
942 | 974 | 0/f.local: |
|
943 | 975 | m1 |
|
944 | 976 | 0/f.orig: |
|
945 | 977 | m1 |
|
946 | 978 | 0/f.other: |
|
947 | 979 | m2 |
|
948 | 980 | 1/g: |
|
949 | 981 | m1 |
|
950 | 982 | 1/g.base: |
|
951 | 983 | a |
|
952 | 984 | 1/g.local: |
|
953 | 985 | m1 |
|
954 | 986 | 1/g.orig: |
|
955 | 987 | m1 |
|
956 | 988 | 1/g.other: |
|
957 | 989 | m2 |
|
958 | 990 | 2/f: |
|
959 | 991 | m1 |
|
960 | 992 | 2/f.base: |
|
961 | 993 | a |
|
962 | 994 | 2/f.local: |
|
963 | 995 | m1 |
|
964 | 996 | 2/f.orig: |
|
965 | 997 | m1 |
|
966 | 998 | 2/f.other: |
|
967 | 999 | m2 |
|
968 | 1000 | 3/f: |
|
969 | 1001 | m1 |
|
970 | 1002 | 3/f.base: |
|
971 | 1003 | a |
|
972 | 1004 | 3/f.local: |
|
973 | 1005 | m1 |
|
974 | 1006 | 3/f.orig: |
|
975 | 1007 | m1 |
|
976 | 1008 | 3/f.other: |
|
977 | 1009 | m2 |
|
978 | 1010 | 3/g: |
|
979 | 1011 | m1 |
|
980 | 1012 | 3/g.base: |
|
981 | 1013 | a |
|
982 | 1014 | 3/g.local: |
|
983 | 1015 | m1 |
|
984 | 1016 | 3/g.orig: |
|
985 | 1017 | m1 |
|
986 | 1018 | 3/g.other: |
|
987 | 1019 | m2 |
|
988 | 1020 | 4/g: |
|
989 | 1021 | m1 |
|
990 | 1022 | 4/g.base: |
|
991 | 1023 | a |
|
992 | 1024 | 4/g.local: |
|
993 | 1025 | m1 |
|
994 | 1026 | 4/g.orig: |
|
995 | 1027 | m1 |
|
996 | 1028 | 4/g.other: |
|
997 | 1029 | m2 |
|
998 | 1030 | 5/f: |
|
999 | 1031 | m1 |
|
1000 | 1032 | 5/f.base: |
|
1001 | 1033 | a |
|
1002 | 1034 | 5/f.local: |
|
1003 | 1035 | m1 |
|
1004 | 1036 | 5/f.orig: |
|
1005 | 1037 | m1 |
|
1006 | 1038 | 5/f.other: |
|
1007 | 1039 | m2 |
|
1008 | 1040 | 5/g: |
|
1009 | 1041 | m1 |
|
1010 | 1042 | 5/g.base: |
|
1011 | 1043 | a |
|
1012 | 1044 | 5/g.local: |
|
1013 | 1045 | m1 |
|
1014 | 1046 | 5/g.orig: |
|
1015 | 1047 | m1 |
|
1016 | 1048 | 5/g.other: |
|
1017 | 1049 | m2 |
|
1018 | 1050 | 6/g: |
|
1019 | 1051 | m1 |
|
1020 | 1052 | 6/g.base: |
|
1021 | 1053 | a |
|
1022 | 1054 | 6/g.local: |
|
1023 | 1055 | m1 |
|
1024 | 1056 | 6/g.orig: |
|
1025 | 1057 | m1 |
|
1026 | 1058 | 6/g.other: |
|
1027 | 1059 | m2 |
|
1028 | 1060 | 7/f: |
|
1029 | 1061 | m |
|
1030 | 1062 | 7/f.base: |
|
1031 | 1063 | 7/f.local: |
|
1032 | 1064 | m |
|
1033 | 1065 | 7/f.orig: |
|
1034 | 1066 | m |
|
1035 | 1067 | 7/f.other: |
|
1036 | 1068 | m2 |
|
1037 | 1069 | 8/f: |
|
1038 | 1070 | m2 |
|
1039 | 1071 | $ cd .. |
@@ -1,355 +1,355 b'' | |||
|
1 | 1 | $ cat <<EOF >> $HGRCPATH |
|
2 | 2 | > [extensions] |
|
3 | 3 | > color = |
|
4 | 4 | > [color] |
|
5 | 5 | > mode = ansi |
|
6 | 6 | > EOF |
|
7 | 7 | Terminfo codes compatibility fix |
|
8 | 8 | $ echo "color.none=0" >> $HGRCPATH |
|
9 | 9 | |
|
10 | 10 | $ hg init repo1 |
|
11 | 11 | $ cd repo1 |
|
12 | 12 | $ mkdir a b a/1 b/1 b/2 |
|
13 | 13 | $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 |
|
14 | 14 | |
|
15 | 15 | hg status in repo root: |
|
16 | 16 | |
|
17 | 17 | $ hg status --color=always |
|
18 | 18 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
19 | 19 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
20 | 20 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
21 | 21 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
22 | 22 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
23 | 23 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
24 | 24 | |
|
25 | 25 | $ hg status --color=debug |
|
26 | 26 | [status.unknown|? ][status.unknown|a/1/in_a_1] |
|
27 | 27 | [status.unknown|? ][status.unknown|a/in_a] |
|
28 | 28 | [status.unknown|? ][status.unknown|b/1/in_b_1] |
|
29 | 29 | [status.unknown|? ][status.unknown|b/2/in_b_2] |
|
30 | 30 | [status.unknown|? ][status.unknown|b/in_b] |
|
31 | 31 | [status.unknown|? ][status.unknown|in_root] |
|
32 | 32 | |
|
33 | 33 | hg status . in repo root: |
|
34 | 34 | |
|
35 | 35 | $ hg status --color=always . |
|
36 | 36 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
37 | 37 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
38 | 38 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
39 | 39 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
40 | 40 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
41 | 41 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
42 | 42 | |
|
43 | 43 | $ hg status --color=always --cwd a |
|
44 | 44 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
45 | 45 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
46 | 46 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
47 | 47 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
48 | 48 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
49 | 49 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
50 | 50 | $ hg status --color=always --cwd a . |
|
51 | 51 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) |
|
52 | 52 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) |
|
53 | 53 | $ hg status --color=always --cwd a .. |
|
54 | 54 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) |
|
55 | 55 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) |
|
56 | 56 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/1/in_b_1\x1b[0m (esc) |
|
57 | 57 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/2/in_b_2\x1b[0m (esc) |
|
58 | 58 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/in_b\x1b[0m (esc) |
|
59 | 59 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) |
|
60 | 60 | |
|
61 | 61 | $ hg status --color=always --cwd b |
|
62 | 62 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
63 | 63 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
64 | 64 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
65 | 65 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
66 | 66 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
67 | 67 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
68 | 68 | $ hg status --color=always --cwd b . |
|
69 | 69 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) |
|
70 | 70 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) |
|
71 | 71 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) |
|
72 | 72 | $ hg status --color=always --cwd b .. |
|
73 | 73 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/1/in_a_1\x1b[0m (esc) |
|
74 | 74 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/in_a\x1b[0m (esc) |
|
75 | 75 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) |
|
76 | 76 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) |
|
77 | 77 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) |
|
78 | 78 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) |
|
79 | 79 | |
|
80 | 80 | $ hg status --color=always --cwd a/1 |
|
81 | 81 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
82 | 82 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
83 | 83 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
84 | 84 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
85 | 85 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
86 | 86 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
87 | 87 | $ hg status --color=always --cwd a/1 . |
|
88 | 88 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) |
|
89 | 89 | $ hg status --color=always --cwd a/1 .. |
|
90 | 90 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) |
|
91 | 91 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_a\x1b[0m (esc) |
|
92 | 92 | |
|
93 | 93 | $ hg status --color=always --cwd b/1 |
|
94 | 94 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
95 | 95 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
96 | 96 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
97 | 97 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
98 | 98 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
99 | 99 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
100 | 100 | $ hg status --color=always --cwd b/1 . |
|
101 | 101 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) |
|
102 | 102 | $ hg status --color=always --cwd b/1 .. |
|
103 | 103 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) |
|
104 | 104 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../2/in_b_2\x1b[0m (esc) |
|
105 | 105 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) |
|
106 | 106 | |
|
107 | 107 | $ hg status --color=always --cwd b/2 |
|
108 | 108 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
109 | 109 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
110 | 110 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
111 | 111 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
112 | 112 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
113 | 113 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
114 | 114 | $ hg status --color=always --cwd b/2 . |
|
115 | 115 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) |
|
116 | 116 | $ hg status --color=always --cwd b/2 .. |
|
117 | 117 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../1/in_b_1\x1b[0m (esc) |
|
118 | 118 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) |
|
119 | 119 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) |
|
120 | 120 | |
|
121 | 121 | Make sure --color=never works |
|
122 | 122 | $ hg status --color=never |
|
123 | 123 | ? a/1/in_a_1 |
|
124 | 124 | ? a/in_a |
|
125 | 125 | ? b/1/in_b_1 |
|
126 | 126 | ? b/2/in_b_2 |
|
127 | 127 | ? b/in_b |
|
128 | 128 | ? in_root |
|
129 | 129 | |
|
130 | 130 | Make sure ui.formatted=False works |
|
131 | 131 | $ hg status --config ui.formatted=False |
|
132 | 132 | ? a/1/in_a_1 |
|
133 | 133 | ? a/in_a |
|
134 | 134 | ? b/1/in_b_1 |
|
135 | 135 | ? b/2/in_b_2 |
|
136 | 136 | ? b/in_b |
|
137 | 137 | ? in_root |
|
138 | 138 | |
|
139 | 139 | $ cd .. |
|
140 | 140 | |
|
141 | 141 | $ hg init repo2 |
|
142 | 142 | $ cd repo2 |
|
143 | 143 | $ touch modified removed deleted ignored |
|
144 | 144 | $ echo "^ignored$" > .hgignore |
|
145 | 145 | $ hg ci -A -m 'initial checkin' |
|
146 | 146 | adding .hgignore |
|
147 | 147 | adding deleted |
|
148 | 148 | adding modified |
|
149 | 149 | adding removed |
|
150 | 150 | $ hg log --color=debug |
|
151 | 151 | [log.changeset changeset.draft|changeset: 0:389aef86a55e] |
|
152 | 152 | [log.tag|tag: tip] |
|
153 | 153 | [log.user|user: test] |
|
154 | 154 | [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
|
155 | 155 | [log.summary|summary: initial checkin] |
|
156 | 156 | |
|
157 | 157 | Labels on empty strings should not be displayed, labels on custom |
|
158 | 158 | templates should be. |
|
159 | 159 | |
|
160 | 160 | $ hg log --color=debug -T '{label("my.label",author)}\n{label("skipped.label","")}' |
|
161 | 161 | [my.label|test] |
|
162 | 162 | $ touch modified added unknown ignored |
|
163 | 163 | $ hg add added |
|
164 | 164 | $ hg remove removed |
|
165 | 165 | $ rm deleted |
|
166 | 166 | |
|
167 | 167 | hg status: |
|
168 | 168 | |
|
169 | 169 | $ hg status --color=always |
|
170 | 170 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
171 | 171 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
172 | 172 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
173 | 173 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
174 | 174 | |
|
175 | 175 | hg status modified added removed deleted unknown never-existed ignored: |
|
176 | 176 | |
|
177 | 177 | $ hg status --color=always modified added removed deleted unknown never-existed ignored |
|
178 | 178 | never-existed: * (glob) |
|
179 | 179 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
180 | 180 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
181 | 181 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
182 | 182 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
183 | 183 | |
|
184 | 184 | $ hg copy modified copied |
|
185 | 185 | |
|
186 | 186 | hg status -C: |
|
187 | 187 | |
|
188 | 188 | $ hg status --color=always -C |
|
189 | 189 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
190 | 190 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
191 | 191 | \x1b[0;0m modified\x1b[0m (esc) |
|
192 | 192 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
193 | 193 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
194 | 194 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
195 | 195 | |
|
196 | 196 | hg status -A: |
|
197 | 197 | |
|
198 | 198 | $ hg status --color=always -A |
|
199 | 199 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
200 | 200 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
201 | 201 | \x1b[0;0m modified\x1b[0m (esc) |
|
202 | 202 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
203 | 203 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
204 | 204 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
205 | 205 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignored\x1b[0m (esc) |
|
206 | 206 | \x1b[0;0mC \x1b[0m\x1b[0;0m.hgignore\x1b[0m (esc) |
|
207 | 207 | \x1b[0;0mC \x1b[0m\x1b[0;0mmodified\x1b[0m (esc) |
|
208 | 208 | |
|
209 | 209 | |
|
210 | 210 | hg status -A (with terminfo color): |
|
211 | 211 | |
|
212 | 212 | #if tic |
|
213 | 213 | |
|
214 | 214 | $ mkdir "$TESTTMP/terminfo" |
|
215 | 215 | $ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti" |
|
216 | 216 | $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --color=always -A |
|
217 | 217 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1madded\x1b[30m (esc) |
|
218 | 218 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1mcopied\x1b[30m (esc) |
|
219 | 219 | \x1b[30m\x1b[30m modified\x1b[30m (esc) |
|
220 | 220 | \x1b[30m\x1b[31m\x1b[1mR \x1b[30m\x1b[30m\x1b[31m\x1b[1mremoved\x1b[30m (esc) |
|
221 | 221 | \x1b[30m\x1b[36m\x1b[1m\x1b[4m! \x1b[30m\x1b[30m\x1b[36m\x1b[1m\x1b[4mdeleted\x1b[30m (esc) |
|
222 | 222 | \x1b[30m\x1b[35m\x1b[1m\x1b[4m? \x1b[30m\x1b[30m\x1b[35m\x1b[1m\x1b[4munknown\x1b[30m (esc) |
|
223 | 223 | \x1b[30m\x1b[30m\x1b[1mI \x1b[30m\x1b[30m\x1b[30m\x1b[1mignored\x1b[30m (esc) |
|
224 | 224 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30m.hgignore\x1b[30m (esc) |
|
225 | 225 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30mmodified\x1b[30m (esc) |
|
226 | 226 | |
|
227 | 227 | #endif |
|
228 | 228 | |
|
229 | 229 | |
|
230 | 230 | $ echo "^ignoreddir$" > .hgignore |
|
231 | 231 | $ mkdir ignoreddir |
|
232 | 232 | $ touch ignoreddir/file |
|
233 | 233 | |
|
234 | 234 | hg status ignoreddir/file: |
|
235 | 235 | |
|
236 | 236 | $ hg status --color=always ignoreddir/file |
|
237 | 237 | |
|
238 | 238 | hg status -i ignoreddir/file: |
|
239 | 239 | |
|
240 | 240 | $ hg status --color=always -i ignoreddir/file |
|
241 | 241 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignoreddir/file\x1b[0m (esc) |
|
242 | 242 | $ cd .. |
|
243 | 243 | |
|
244 | 244 | check 'status -q' and some combinations |
|
245 | 245 | |
|
246 | 246 | $ hg init repo3 |
|
247 | 247 | $ cd repo3 |
|
248 | 248 | $ touch modified removed deleted ignored |
|
249 | 249 | $ echo "^ignored$" > .hgignore |
|
250 | 250 | $ hg commit -A -m 'initial checkin' |
|
251 | 251 | adding .hgignore |
|
252 | 252 | adding deleted |
|
253 | 253 | adding modified |
|
254 | 254 | adding removed |
|
255 | 255 | $ touch added unknown ignored |
|
256 | 256 | $ hg add added |
|
257 | 257 | $ echo "test" >> modified |
|
258 | 258 | $ hg remove removed |
|
259 | 259 | $ rm deleted |
|
260 | 260 | $ hg copy modified copied |
|
261 | 261 | |
|
262 | 262 | test unknown color |
|
263 | 263 | |
|
264 | 264 | $ hg --config color.status.modified=periwinkle status --color=always |
|
265 | 265 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) |
|
266 | 266 | M modified |
|
267 | 267 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
268 | 268 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
269 | 269 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
270 | 270 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
271 | 271 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
272 | 272 | |
|
273 | 273 | Run status with 2 different flags. |
|
274 | 274 | Check if result is the same or different. |
|
275 | 275 | If result is not as expected, raise error |
|
276 | 276 | |
|
277 | 277 | $ assert() { |
|
278 | 278 | > hg status --color=always $1 > ../a |
|
279 | 279 | > hg status --color=always $2 > ../b |
|
280 | 280 | > if diff ../a ../b > /dev/null; then |
|
281 | 281 | > out=0 |
|
282 | 282 | > else |
|
283 | 283 | > out=1 |
|
284 | 284 | > fi |
|
285 | 285 | > if [ $3 -eq 0 ]; then |
|
286 | 286 | > df="same" |
|
287 | 287 | > else |
|
288 | 288 | > df="different" |
|
289 | 289 | > fi |
|
290 | 290 | > if [ $out -ne $3 ]; then |
|
291 | 291 | > echo "Error on $1 and $2, should be $df." |
|
292 | 292 | > fi |
|
293 | 293 | > } |
|
294 | 294 | |
|
295 | 295 | assert flag1 flag2 [0-same | 1-different] |
|
296 | 296 | |
|
297 | 297 | $ assert "-q" "-mard" 0 |
|
298 | 298 | $ assert "-A" "-marduicC" 0 |
|
299 | 299 | $ assert "-qA" "-mardcC" 0 |
|
300 | 300 | $ assert "-qAui" "-A" 0 |
|
301 | 301 | $ assert "-qAu" "-marducC" 0 |
|
302 | 302 | $ assert "-qAi" "-mardicC" 0 |
|
303 | 303 | $ assert "-qu" "-u" 0 |
|
304 | 304 | $ assert "-q" "-u" 1 |
|
305 | 305 | $ assert "-m" "-a" 1 |
|
306 | 306 | $ assert "-r" "-d" 1 |
|
307 | 307 | $ cd .. |
|
308 | 308 | |
|
309 | 309 | test 'resolve -l' |
|
310 | 310 | |
|
311 | 311 | $ hg init repo4 |
|
312 | 312 | $ cd repo4 |
|
313 | 313 | $ echo "file a" > a |
|
314 | 314 | $ echo "file b" > b |
|
315 | 315 | $ hg add a b |
|
316 | 316 | $ hg commit -m "initial" |
|
317 | 317 | $ echo "file a change 1" > a |
|
318 | 318 | $ echo "file b change 1" > b |
|
319 | 319 | $ hg commit -m "head 1" |
|
320 | 320 | $ hg update 0 |
|
321 | 321 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
322 | 322 | $ echo "file a change 2" > a |
|
323 | 323 | $ echo "file b change 2" > b |
|
324 | 324 | $ hg commit -m "head 2" |
|
325 | 325 | created new head |
|
326 | 326 | $ hg merge |
|
327 | 327 | merging a |
|
328 | merging b | |
|
328 | 329 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
329 | merging b | |
|
330 | 330 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
331 | 331 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
332 | 332 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
333 | 333 | [1] |
|
334 | 334 | $ hg resolve -m b |
|
335 | 335 | |
|
336 | 336 | hg resolve with one unresolved, one resolved: |
|
337 | 337 | |
|
338 | 338 | $ hg resolve --color=always -l |
|
339 | 339 | \x1b[0;31;1mU \x1b[0m\x1b[0;31;1ma\x1b[0m (esc) |
|
340 | 340 | \x1b[0;32;1mR \x1b[0m\x1b[0;32;1mb\x1b[0m (esc) |
|
341 | 341 | |
|
342 | 342 | color coding of error message with current availability of curses |
|
343 | 343 | |
|
344 | 344 | $ hg unknowncommand > /dev/null |
|
345 | 345 | hg: unknown command 'unknowncommand' |
|
346 | 346 | [255] |
|
347 | 347 | |
|
348 | 348 | color coding of error message without curses |
|
349 | 349 | |
|
350 | 350 | $ echo 'raise ImportError' > curses.py |
|
351 | 351 | $ PYTHONPATH=`pwd`:$PYTHONPATH hg unknowncommand > /dev/null |
|
352 | 352 | hg: unknown command 'unknowncommand' |
|
353 | 353 | [255] |
|
354 | 354 | |
|
355 | 355 | $ cd .. |
@@ -1,1758 +1,1759 b'' | |||
|
1 | 1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: |
|
2 | 2 | |
|
3 | 3 | $ echo "[ui]" >> $HGRCPATH |
|
4 | 4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | $ hg init t |
|
7 | 7 | $ cd t |
|
8 | 8 | |
|
9 | 9 | first revision, no sub |
|
10 | 10 | |
|
11 | 11 | $ echo a > a |
|
12 | 12 | $ hg ci -Am0 |
|
13 | 13 | adding a |
|
14 | 14 | |
|
15 | 15 | add first sub |
|
16 | 16 | |
|
17 | 17 | $ echo s = s > .hgsub |
|
18 | 18 | $ hg add .hgsub |
|
19 | 19 | $ hg init s |
|
20 | 20 | $ echo a > s/a |
|
21 | 21 | |
|
22 | 22 | Issue2232: committing a subrepo without .hgsub |
|
23 | 23 | |
|
24 | 24 | $ hg ci -mbad s |
|
25 | 25 | abort: can't commit subrepos without .hgsub |
|
26 | 26 | [255] |
|
27 | 27 | |
|
28 | 28 | $ hg -R s add s/a |
|
29 | 29 | $ hg files -S |
|
30 | 30 | .hgsub |
|
31 | 31 | a |
|
32 | 32 | s/a (glob) |
|
33 | 33 | |
|
34 | 34 | $ hg -R s ci -Ams0 |
|
35 | 35 | $ hg sum |
|
36 | 36 | parent: 0:f7b1eb17ad24 tip |
|
37 | 37 | 0 |
|
38 | 38 | branch: default |
|
39 | 39 | commit: 1 added, 1 subrepos |
|
40 | 40 | update: (current) |
|
41 | 41 | phases: 1 draft |
|
42 | 42 | $ hg ci -m1 |
|
43 | 43 | |
|
44 | 44 | test handling .hgsubstate "added" explicitly. |
|
45 | 45 | |
|
46 | 46 | $ hg parents --template '{node}\n{files}\n' |
|
47 | 47 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
48 | 48 | .hgsub .hgsubstate |
|
49 | 49 | $ hg rollback -q |
|
50 | 50 | $ hg add .hgsubstate |
|
51 | 51 | $ hg ci -m1 |
|
52 | 52 | $ hg parents --template '{node}\n{files}\n' |
|
53 | 53 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
54 | 54 | .hgsub .hgsubstate |
|
55 | 55 | |
|
56 | 56 | Revert subrepo and test subrepo fileset keyword: |
|
57 | 57 | |
|
58 | 58 | $ echo b > s/a |
|
59 | 59 | $ hg revert --dry-run "set:subrepo('glob:s*')" |
|
60 | 60 | reverting subrepo s |
|
61 | 61 | reverting s/a (glob) |
|
62 | 62 | $ cat s/a |
|
63 | 63 | b |
|
64 | 64 | $ hg revert "set:subrepo('glob:s*')" |
|
65 | 65 | reverting subrepo s |
|
66 | 66 | reverting s/a (glob) |
|
67 | 67 | $ cat s/a |
|
68 | 68 | a |
|
69 | 69 | $ rm s/a.orig |
|
70 | 70 | |
|
71 | 71 | Revert subrepo with no backup. The "reverting s/a" line is gone since |
|
72 | 72 | we're really running 'hg update' in the subrepo: |
|
73 | 73 | |
|
74 | 74 | $ echo b > s/a |
|
75 | 75 | $ hg revert --no-backup s |
|
76 | 76 | reverting subrepo s |
|
77 | 77 | |
|
78 | 78 | Issue2022: update -C |
|
79 | 79 | |
|
80 | 80 | $ echo b > s/a |
|
81 | 81 | $ hg sum |
|
82 | 82 | parent: 1:7cf8cfea66e4 tip |
|
83 | 83 | 1 |
|
84 | 84 | branch: default |
|
85 | 85 | commit: 1 subrepos |
|
86 | 86 | update: (current) |
|
87 | 87 | phases: 2 draft |
|
88 | 88 | $ hg co -C 1 |
|
89 | 89 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 90 | $ hg sum |
|
91 | 91 | parent: 1:7cf8cfea66e4 tip |
|
92 | 92 | 1 |
|
93 | 93 | branch: default |
|
94 | 94 | commit: (clean) |
|
95 | 95 | update: (current) |
|
96 | 96 | phases: 2 draft |
|
97 | 97 | |
|
98 | 98 | commands that require a clean repo should respect subrepos |
|
99 | 99 | |
|
100 | 100 | $ echo b >> s/a |
|
101 | 101 | $ hg backout tip |
|
102 | 102 | abort: uncommitted changes in subrepository 's' |
|
103 | 103 | [255] |
|
104 | 104 | $ hg revert -C -R s s/a |
|
105 | 105 | |
|
106 | 106 | add sub sub |
|
107 | 107 | |
|
108 | 108 | $ echo ss = ss > s/.hgsub |
|
109 | 109 | $ hg init s/ss |
|
110 | 110 | $ echo a > s/ss/a |
|
111 | 111 | $ hg -R s add s/.hgsub |
|
112 | 112 | $ hg -R s/ss add s/ss/a |
|
113 | 113 | $ hg sum |
|
114 | 114 | parent: 1:7cf8cfea66e4 tip |
|
115 | 115 | 1 |
|
116 | 116 | branch: default |
|
117 | 117 | commit: 1 subrepos |
|
118 | 118 | update: (current) |
|
119 | 119 | phases: 2 draft |
|
120 | 120 | $ hg ci -m2 |
|
121 | 121 | committing subrepository s |
|
122 | 122 | committing subrepository s/ss (glob) |
|
123 | 123 | $ hg sum |
|
124 | 124 | parent: 2:df30734270ae tip |
|
125 | 125 | 2 |
|
126 | 126 | branch: default |
|
127 | 127 | commit: (clean) |
|
128 | 128 | update: (current) |
|
129 | 129 | phases: 3 draft |
|
130 | 130 | |
|
131 | 131 | test handling .hgsubstate "modified" explicitly. |
|
132 | 132 | |
|
133 | 133 | $ hg parents --template '{node}\n{files}\n' |
|
134 | 134 | df30734270ae757feb35e643b7018e818e78a9aa |
|
135 | 135 | .hgsubstate |
|
136 | 136 | $ hg rollback -q |
|
137 | 137 | $ hg status -A .hgsubstate |
|
138 | 138 | M .hgsubstate |
|
139 | 139 | $ hg ci -m2 |
|
140 | 140 | $ hg parents --template '{node}\n{files}\n' |
|
141 | 141 | df30734270ae757feb35e643b7018e818e78a9aa |
|
142 | 142 | .hgsubstate |
|
143 | 143 | |
|
144 | 144 | bump sub rev (and check it is ignored by ui.commitsubrepos) |
|
145 | 145 | |
|
146 | 146 | $ echo b > s/a |
|
147 | 147 | $ hg -R s ci -ms1 |
|
148 | 148 | $ hg --config ui.commitsubrepos=no ci -m3 |
|
149 | 149 | |
|
150 | 150 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) |
|
151 | 151 | |
|
152 | 152 | $ echo c > s/a |
|
153 | 153 | $ hg --config ui.commitsubrepos=no ci -m4 |
|
154 | 154 | abort: uncommitted changes in subrepository 's' |
|
155 | 155 | (use --subrepos for recursive commit) |
|
156 | 156 | [255] |
|
157 | 157 | $ hg id |
|
158 | 158 | f6affe3fbfaa+ tip |
|
159 | 159 | $ hg -R s ci -mc |
|
160 | 160 | $ hg id |
|
161 | 161 | f6affe3fbfaa+ tip |
|
162 | 162 | $ echo d > s/a |
|
163 | 163 | $ hg ci -m4 |
|
164 | 164 | committing subrepository s |
|
165 | 165 | $ hg tip -R s |
|
166 | 166 | changeset: 4:02dcf1d70411 |
|
167 | 167 | tag: tip |
|
168 | 168 | user: test |
|
169 | 169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
170 | 170 | summary: 4 |
|
171 | 171 | |
|
172 | 172 | |
|
173 | 173 | check caching |
|
174 | 174 | |
|
175 | 175 | $ hg co 0 |
|
176 | 176 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
177 | 177 | $ hg debugsub |
|
178 | 178 | |
|
179 | 179 | restore |
|
180 | 180 | |
|
181 | 181 | $ hg co |
|
182 | 182 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
183 | 183 | $ hg debugsub |
|
184 | 184 | path s |
|
185 | 185 | source s |
|
186 | 186 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef |
|
187 | 187 | |
|
188 | 188 | new branch for merge tests |
|
189 | 189 | |
|
190 | 190 | $ hg co 1 |
|
191 | 191 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
192 | 192 | $ echo t = t >> .hgsub |
|
193 | 193 | $ hg init t |
|
194 | 194 | $ echo t > t/t |
|
195 | 195 | $ hg -R t add t |
|
196 | 196 | adding t/t (glob) |
|
197 | 197 | |
|
198 | 198 | 5 |
|
199 | 199 | |
|
200 | 200 | $ hg ci -m5 # add sub |
|
201 | 201 | committing subrepository t |
|
202 | 202 | created new head |
|
203 | 203 | $ echo t2 > t/t |
|
204 | 204 | |
|
205 | 205 | 6 |
|
206 | 206 | |
|
207 | 207 | $ hg st -R s |
|
208 | 208 | $ hg ci -m6 # change sub |
|
209 | 209 | committing subrepository t |
|
210 | 210 | $ hg debugsub |
|
211 | 211 | path s |
|
212 | 212 | source s |
|
213 | 213 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
214 | 214 | path t |
|
215 | 215 | source t |
|
216 | 216 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
217 | 217 | $ echo t3 > t/t |
|
218 | 218 | |
|
219 | 219 | 7 |
|
220 | 220 | |
|
221 | 221 | $ hg ci -m7 # change sub again for conflict test |
|
222 | 222 | committing subrepository t |
|
223 | 223 | $ hg rm .hgsub |
|
224 | 224 | |
|
225 | 225 | 8 |
|
226 | 226 | |
|
227 | 227 | $ hg ci -m8 # remove sub |
|
228 | 228 | |
|
229 | 229 | test handling .hgsubstate "removed" explicitly. |
|
230 | 230 | |
|
231 | 231 | $ hg parents --template '{node}\n{files}\n' |
|
232 | 232 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e |
|
233 | 233 | .hgsub .hgsubstate |
|
234 | 234 | $ hg rollback -q |
|
235 | 235 | $ hg remove .hgsubstate |
|
236 | 236 | $ hg ci -m8 |
|
237 | 237 | $ hg parents --template '{node}\n{files}\n' |
|
238 | 238 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e |
|
239 | 239 | .hgsub .hgsubstate |
|
240 | 240 | |
|
241 | 241 | merge tests |
|
242 | 242 | |
|
243 | 243 | $ hg co -C 3 |
|
244 | 244 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
245 | 245 | $ hg merge 5 # test adding |
|
246 | 246 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
247 | 247 | (branch merge, don't forget to commit) |
|
248 | 248 | $ hg debugsub |
|
249 | 249 | path s |
|
250 | 250 | source s |
|
251 | 251 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
252 | 252 | path t |
|
253 | 253 | source t |
|
254 | 254 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 |
|
255 | 255 | $ hg ci -m9 |
|
256 | 256 | created new head |
|
257 | 257 | $ hg merge 6 --debug # test change |
|
258 | 258 | searching for copies back to rev 2 |
|
259 | 259 | resolving manifests |
|
260 | 260 | branchmerge: True, force: False, partial: False |
|
261 | 261 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 |
|
262 | .hgsubstate: versions differ -> m | |
|
262 | .hgsubstate: versions differ -> m (premerge) | |
|
263 | 263 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec |
|
264 | 264 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg |
|
265 | 265 | getting subrepo t |
|
266 | 266 | resolving manifests |
|
267 | 267 | branchmerge: False, force: False, partial: False |
|
268 | 268 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a |
|
269 | 269 | t: remote is newer -> g |
|
270 | 270 | getting t |
|
271 | 271 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
272 | 272 | (branch merge, don't forget to commit) |
|
273 | 273 | $ hg debugsub |
|
274 | 274 | path s |
|
275 | 275 | source s |
|
276 | 276 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
277 | 277 | path t |
|
278 | 278 | source t |
|
279 | 279 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
280 | 280 | $ echo conflict > t/t |
|
281 | 281 | $ hg ci -m10 |
|
282 | 282 | committing subrepository t |
|
283 | 283 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict |
|
284 | 284 | searching for copies back to rev 2 |
|
285 | 285 | resolving manifests |
|
286 | 286 | branchmerge: True, force: False, partial: False |
|
287 | 287 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf |
|
288 | .hgsubstate: versions differ -> m | |
|
288 | .hgsubstate: versions differ -> m (premerge) | |
|
289 | 289 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 |
|
290 | 290 | subrepo t: both sides changed |
|
291 | 291 | subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198) |
|
292 | 292 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
293 | 293 | merging subrepo t |
|
294 | 294 | searching for copies back to rev 2 |
|
295 | 295 | resolving manifests |
|
296 | 296 | branchmerge: True, force: False, partial: False |
|
297 | 297 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 |
|
298 | 298 | preserving t for resolve of t |
|
299 | t: versions differ -> m | |
|
299 | t: versions differ -> m (premerge) | |
|
300 | 300 | picked tool ':merge' for t (binary False symlink False) |
|
301 | 301 | merging t |
|
302 | 302 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
303 | t: versions differ -> m (merge) | |
|
303 | 304 | picked tool ':merge' for t (binary False symlink False) |
|
304 | 305 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
305 | 306 | warning: conflicts while merging t! (edit, then use 'hg resolve --mark') |
|
306 | 307 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
307 | 308 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
308 | 309 | subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg |
|
309 | 310 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
310 | 311 | (branch merge, don't forget to commit) |
|
311 | 312 | |
|
312 | 313 | should conflict |
|
313 | 314 | |
|
314 | 315 | $ cat t/t |
|
315 | 316 | <<<<<<< local: 20a0db6fbf6c - test: 10 |
|
316 | 317 | conflict |
|
317 | 318 | ======= |
|
318 | 319 | t3 |
|
319 | 320 | >>>>>>> other: 7af322bc1198 - test: 7 |
|
320 | 321 | |
|
321 | 322 | 11: remove subrepo t |
|
322 | 323 | |
|
323 | 324 | $ hg co -C 5 |
|
324 | 325 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
325 | 326 | $ hg revert -r 4 .hgsub # remove t |
|
326 | 327 | $ hg ci -m11 |
|
327 | 328 | created new head |
|
328 | 329 | $ hg debugsub |
|
329 | 330 | path s |
|
330 | 331 | source s |
|
331 | 332 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
332 | 333 | |
|
333 | 334 | local removed, remote changed, keep changed |
|
334 | 335 | |
|
335 | 336 | $ hg merge 6 |
|
336 | 337 | remote changed subrepository t which local removed |
|
337 | 338 | use (c)hanged version or (d)elete? c |
|
338 | 339 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
339 | 340 | (branch merge, don't forget to commit) |
|
340 | 341 | BROKEN: should include subrepo t |
|
341 | 342 | $ hg debugsub |
|
342 | 343 | path s |
|
343 | 344 | source s |
|
344 | 345 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
345 | 346 | $ cat .hgsubstate |
|
346 | 347 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
347 | 348 | 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t |
|
348 | 349 | $ hg ci -m 'local removed, remote changed, keep changed' |
|
349 | 350 | BROKEN: should include subrepo t |
|
350 | 351 | $ hg debugsub |
|
351 | 352 | path s |
|
352 | 353 | source s |
|
353 | 354 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
354 | 355 | BROKEN: should include subrepo t |
|
355 | 356 | $ cat .hgsubstate |
|
356 | 357 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
357 | 358 | $ cat t/t |
|
358 | 359 | t2 |
|
359 | 360 | |
|
360 | 361 | local removed, remote changed, keep removed |
|
361 | 362 | |
|
362 | 363 | $ hg co -C 11 |
|
363 | 364 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
364 | 365 | $ hg merge --config ui.interactive=true 6 <<EOF |
|
365 | 366 | > d |
|
366 | 367 | > EOF |
|
367 | 368 | remote changed subrepository t which local removed |
|
368 | 369 | use (c)hanged version or (d)elete? d |
|
369 | 370 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
370 | 371 | (branch merge, don't forget to commit) |
|
371 | 372 | $ hg debugsub |
|
372 | 373 | path s |
|
373 | 374 | source s |
|
374 | 375 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
375 | 376 | $ cat .hgsubstate |
|
376 | 377 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
377 | 378 | $ hg ci -m 'local removed, remote changed, keep removed' |
|
378 | 379 | created new head |
|
379 | 380 | $ hg debugsub |
|
380 | 381 | path s |
|
381 | 382 | source s |
|
382 | 383 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
383 | 384 | $ cat .hgsubstate |
|
384 | 385 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
385 | 386 | |
|
386 | 387 | local changed, remote removed, keep changed |
|
387 | 388 | |
|
388 | 389 | $ hg co -C 6 |
|
389 | 390 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
390 | 391 | $ hg merge 11 |
|
391 | 392 | local changed subrepository t which remote removed |
|
392 | 393 | use (c)hanged version or (d)elete? c |
|
393 | 394 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
394 | 395 | (branch merge, don't forget to commit) |
|
395 | 396 | BROKEN: should include subrepo t |
|
396 | 397 | $ hg debugsub |
|
397 | 398 | path s |
|
398 | 399 | source s |
|
399 | 400 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
400 | 401 | BROKEN: should include subrepo t |
|
401 | 402 | $ cat .hgsubstate |
|
402 | 403 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
403 | 404 | $ hg ci -m 'local changed, remote removed, keep changed' |
|
404 | 405 | created new head |
|
405 | 406 | BROKEN: should include subrepo t |
|
406 | 407 | $ hg debugsub |
|
407 | 408 | path s |
|
408 | 409 | source s |
|
409 | 410 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
410 | 411 | BROKEN: should include subrepo t |
|
411 | 412 | $ cat .hgsubstate |
|
412 | 413 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
413 | 414 | $ cat t/t |
|
414 | 415 | t2 |
|
415 | 416 | |
|
416 | 417 | local changed, remote removed, keep removed |
|
417 | 418 | |
|
418 | 419 | $ hg co -C 6 |
|
419 | 420 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
420 | 421 | $ hg merge --config ui.interactive=true 11 <<EOF |
|
421 | 422 | > d |
|
422 | 423 | > EOF |
|
423 | 424 | local changed subrepository t which remote removed |
|
424 | 425 | use (c)hanged version or (d)elete? d |
|
425 | 426 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
426 | 427 | (branch merge, don't forget to commit) |
|
427 | 428 | $ hg debugsub |
|
428 | 429 | path s |
|
429 | 430 | source s |
|
430 | 431 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
431 | 432 | $ cat .hgsubstate |
|
432 | 433 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
433 | 434 | $ hg ci -m 'local changed, remote removed, keep removed' |
|
434 | 435 | created new head |
|
435 | 436 | $ hg debugsub |
|
436 | 437 | path s |
|
437 | 438 | source s |
|
438 | 439 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
439 | 440 | $ cat .hgsubstate |
|
440 | 441 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
441 | 442 | |
|
442 | 443 | clean up to avoid having to fix up the tests below |
|
443 | 444 | |
|
444 | 445 | $ hg co -C 10 |
|
445 | 446 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
446 | 447 | $ cat >> $HGRCPATH <<EOF |
|
447 | 448 | > [extensions] |
|
448 | 449 | > strip= |
|
449 | 450 | > EOF |
|
450 | 451 | $ hg strip -r 11:15 |
|
451 | 452 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob) |
|
452 | 453 | |
|
453 | 454 | clone |
|
454 | 455 | |
|
455 | 456 | $ cd .. |
|
456 | 457 | $ hg clone t tc |
|
457 | 458 | updating to branch default |
|
458 | 459 | cloning subrepo s from $TESTTMP/t/s |
|
459 | 460 | cloning subrepo s/ss from $TESTTMP/t/s/ss (glob) |
|
460 | 461 | cloning subrepo t from $TESTTMP/t/t |
|
461 | 462 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
462 | 463 | $ cd tc |
|
463 | 464 | $ hg debugsub |
|
464 | 465 | path s |
|
465 | 466 | source s |
|
466 | 467 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
467 | 468 | path t |
|
468 | 469 | source t |
|
469 | 470 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e |
|
470 | 471 | |
|
471 | 472 | push |
|
472 | 473 | |
|
473 | 474 | $ echo bah > t/t |
|
474 | 475 | $ hg ci -m11 |
|
475 | 476 | committing subrepository t |
|
476 | 477 | $ hg push |
|
477 | 478 | pushing to $TESTTMP/t (glob) |
|
478 | 479 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
479 | 480 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
480 | 481 | pushing subrepo t to $TESTTMP/t/t |
|
481 | 482 | searching for changes |
|
482 | 483 | adding changesets |
|
483 | 484 | adding manifests |
|
484 | 485 | adding file changes |
|
485 | 486 | added 1 changesets with 1 changes to 1 files |
|
486 | 487 | searching for changes |
|
487 | 488 | adding changesets |
|
488 | 489 | adding manifests |
|
489 | 490 | adding file changes |
|
490 | 491 | added 1 changesets with 1 changes to 1 files |
|
491 | 492 | |
|
492 | 493 | push -f |
|
493 | 494 | |
|
494 | 495 | $ echo bah > s/a |
|
495 | 496 | $ hg ci -m12 |
|
496 | 497 | committing subrepository s |
|
497 | 498 | $ hg push |
|
498 | 499 | pushing to $TESTTMP/t (glob) |
|
499 | 500 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
500 | 501 | pushing subrepo s to $TESTTMP/t/s |
|
501 | 502 | searching for changes |
|
502 | 503 | abort: push creates new remote head 12a213df6fa9! (in subrepo s) |
|
503 | 504 | (merge or see "hg help push" for details about pushing new heads) |
|
504 | 505 | [255] |
|
505 | 506 | $ hg push -f |
|
506 | 507 | pushing to $TESTTMP/t (glob) |
|
507 | 508 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
508 | 509 | searching for changes |
|
509 | 510 | no changes found |
|
510 | 511 | pushing subrepo s to $TESTTMP/t/s |
|
511 | 512 | searching for changes |
|
512 | 513 | adding changesets |
|
513 | 514 | adding manifests |
|
514 | 515 | adding file changes |
|
515 | 516 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
516 | 517 | pushing subrepo t to $TESTTMP/t/t |
|
517 | 518 | searching for changes |
|
518 | 519 | no changes found |
|
519 | 520 | searching for changes |
|
520 | 521 | adding changesets |
|
521 | 522 | adding manifests |
|
522 | 523 | adding file changes |
|
523 | 524 | added 1 changesets with 1 changes to 1 files |
|
524 | 525 | |
|
525 | 526 | check that unmodified subrepos are not pushed |
|
526 | 527 | |
|
527 | 528 | $ hg clone . ../tcc |
|
528 | 529 | updating to branch default |
|
529 | 530 | cloning subrepo s from $TESTTMP/tc/s |
|
530 | 531 | cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob) |
|
531 | 532 | cloning subrepo t from $TESTTMP/tc/t |
|
532 | 533 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
533 | 534 | |
|
534 | 535 | the subrepos on the new clone have nothing to push to its source |
|
535 | 536 | |
|
536 | 537 | $ hg push -R ../tcc . |
|
537 | 538 | pushing to . |
|
538 | 539 | no changes made to subrepo s/ss since last push to s/ss (glob) |
|
539 | 540 | no changes made to subrepo s since last push to s |
|
540 | 541 | no changes made to subrepo t since last push to t |
|
541 | 542 | searching for changes |
|
542 | 543 | no changes found |
|
543 | 544 | [1] |
|
544 | 545 | |
|
545 | 546 | the subrepos on the source do not have a clean store versus the clone target |
|
546 | 547 | because they were never explicitly pushed to the source |
|
547 | 548 | |
|
548 | 549 | $ hg push ../tcc |
|
549 | 550 | pushing to ../tcc |
|
550 | 551 | pushing subrepo s/ss to ../tcc/s/ss (glob) |
|
551 | 552 | searching for changes |
|
552 | 553 | no changes found |
|
553 | 554 | pushing subrepo s to ../tcc/s |
|
554 | 555 | searching for changes |
|
555 | 556 | no changes found |
|
556 | 557 | pushing subrepo t to ../tcc/t |
|
557 | 558 | searching for changes |
|
558 | 559 | no changes found |
|
559 | 560 | searching for changes |
|
560 | 561 | no changes found |
|
561 | 562 | [1] |
|
562 | 563 | |
|
563 | 564 | after push their stores become clean |
|
564 | 565 | |
|
565 | 566 | $ hg push ../tcc |
|
566 | 567 | pushing to ../tcc |
|
567 | 568 | no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob) |
|
568 | 569 | no changes made to subrepo s since last push to ../tcc/s |
|
569 | 570 | no changes made to subrepo t since last push to ../tcc/t |
|
570 | 571 | searching for changes |
|
571 | 572 | no changes found |
|
572 | 573 | [1] |
|
573 | 574 | |
|
574 | 575 | updating a subrepo to a different revision or changing |
|
575 | 576 | its working directory does not make its store dirty |
|
576 | 577 | |
|
577 | 578 | $ hg -R s update '.^' |
|
578 | 579 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
579 | 580 | $ hg push |
|
580 | 581 | pushing to $TESTTMP/t (glob) |
|
581 | 582 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
582 | 583 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
583 | 584 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
584 | 585 | searching for changes |
|
585 | 586 | no changes found |
|
586 | 587 | [1] |
|
587 | 588 | $ echo foo >> s/a |
|
588 | 589 | $ hg push |
|
589 | 590 | pushing to $TESTTMP/t (glob) |
|
590 | 591 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
591 | 592 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
592 | 593 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
593 | 594 | searching for changes |
|
594 | 595 | no changes found |
|
595 | 596 | [1] |
|
596 | 597 | $ hg -R s update -C tip |
|
597 | 598 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
598 | 599 | |
|
599 | 600 | committing into a subrepo makes its store (but not its parent's store) dirty |
|
600 | 601 | |
|
601 | 602 | $ echo foo >> s/ss/a |
|
602 | 603 | $ hg -R s/ss commit -m 'test dirty store detection' |
|
603 | 604 | |
|
604 | 605 | $ hg out -S -r `hg log -r tip -T "{node|short}"` |
|
605 | 606 | comparing with $TESTTMP/t (glob) |
|
606 | 607 | searching for changes |
|
607 | 608 | no changes found |
|
608 | 609 | comparing with $TESTTMP/t/s |
|
609 | 610 | searching for changes |
|
610 | 611 | no changes found |
|
611 | 612 | comparing with $TESTTMP/t/s/ss |
|
612 | 613 | searching for changes |
|
613 | 614 | changeset: 1:79ea5566a333 |
|
614 | 615 | tag: tip |
|
615 | 616 | user: test |
|
616 | 617 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
617 | 618 | summary: test dirty store detection |
|
618 | 619 | |
|
619 | 620 | comparing with $TESTTMP/t/t |
|
620 | 621 | searching for changes |
|
621 | 622 | no changes found |
|
622 | 623 | |
|
623 | 624 | $ hg push |
|
624 | 625 | pushing to $TESTTMP/t (glob) |
|
625 | 626 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
626 | 627 | searching for changes |
|
627 | 628 | adding changesets |
|
628 | 629 | adding manifests |
|
629 | 630 | adding file changes |
|
630 | 631 | added 1 changesets with 1 changes to 1 files |
|
631 | 632 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
632 | 633 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
633 | 634 | searching for changes |
|
634 | 635 | no changes found |
|
635 | 636 | [1] |
|
636 | 637 | |
|
637 | 638 | a subrepo store may be clean versus one repo but not versus another |
|
638 | 639 | |
|
639 | 640 | $ hg push |
|
640 | 641 | pushing to $TESTTMP/t (glob) |
|
641 | 642 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
642 | 643 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
643 | 644 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
644 | 645 | searching for changes |
|
645 | 646 | no changes found |
|
646 | 647 | [1] |
|
647 | 648 | $ hg push ../tcc |
|
648 | 649 | pushing to ../tcc |
|
649 | 650 | pushing subrepo s/ss to ../tcc/s/ss (glob) |
|
650 | 651 | searching for changes |
|
651 | 652 | adding changesets |
|
652 | 653 | adding manifests |
|
653 | 654 | adding file changes |
|
654 | 655 | added 1 changesets with 1 changes to 1 files |
|
655 | 656 | no changes made to subrepo s since last push to ../tcc/s |
|
656 | 657 | no changes made to subrepo t since last push to ../tcc/t |
|
657 | 658 | searching for changes |
|
658 | 659 | no changes found |
|
659 | 660 | [1] |
|
660 | 661 | |
|
661 | 662 | update |
|
662 | 663 | |
|
663 | 664 | $ cd ../t |
|
664 | 665 | $ hg up -C # discard our earlier merge |
|
665 | 666 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
666 | 667 | $ echo blah > t/t |
|
667 | 668 | $ hg ci -m13 |
|
668 | 669 | committing subrepository t |
|
669 | 670 | |
|
670 | 671 | backout calls revert internally with minimal opts, which should not raise |
|
671 | 672 | KeyError |
|
672 | 673 | |
|
673 | 674 | $ hg backout ".^" |
|
674 | 675 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
675 | 676 | changeset c373c8102e68 backed out, don't forget to commit. |
|
676 | 677 | |
|
677 | 678 | $ hg up -C # discard changes |
|
678 | 679 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
679 | 680 | |
|
680 | 681 | pull |
|
681 | 682 | |
|
682 | 683 | $ cd ../tc |
|
683 | 684 | $ hg pull |
|
684 | 685 | pulling from $TESTTMP/t (glob) |
|
685 | 686 | searching for changes |
|
686 | 687 | adding changesets |
|
687 | 688 | adding manifests |
|
688 | 689 | adding file changes |
|
689 | 690 | added 1 changesets with 1 changes to 1 files |
|
690 | 691 | (run 'hg update' to get a working copy) |
|
691 | 692 | |
|
692 | 693 | should pull t |
|
693 | 694 | |
|
694 | 695 | $ hg incoming -S -r `hg log -r tip -T "{node|short}"` |
|
695 | 696 | comparing with $TESTTMP/t (glob) |
|
696 | 697 | no changes found |
|
697 | 698 | comparing with $TESTTMP/t/s |
|
698 | 699 | searching for changes |
|
699 | 700 | no changes found |
|
700 | 701 | comparing with $TESTTMP/t/s/ss |
|
701 | 702 | searching for changes |
|
702 | 703 | no changes found |
|
703 | 704 | comparing with $TESTTMP/t/t |
|
704 | 705 | searching for changes |
|
705 | 706 | changeset: 5:52c0adc0515a |
|
706 | 707 | tag: tip |
|
707 | 708 | user: test |
|
708 | 709 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
709 | 710 | summary: 13 |
|
710 | 711 | |
|
711 | 712 | |
|
712 | 713 | $ hg up |
|
713 | 714 | pulling subrepo t from $TESTTMP/t/t |
|
714 | 715 | searching for changes |
|
715 | 716 | adding changesets |
|
716 | 717 | adding manifests |
|
717 | 718 | adding file changes |
|
718 | 719 | added 1 changesets with 1 changes to 1 files |
|
719 | 720 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
720 | 721 | $ cat t/t |
|
721 | 722 | blah |
|
722 | 723 | |
|
723 | 724 | bogus subrepo path aborts |
|
724 | 725 | |
|
725 | 726 | $ echo 'bogus=[boguspath' >> .hgsub |
|
726 | 727 | $ hg ci -m 'bogus subrepo path' |
|
727 | 728 | abort: missing ] in subrepo source |
|
728 | 729 | [255] |
|
729 | 730 | |
|
730 | 731 | Issue1986: merge aborts when trying to merge a subrepo that |
|
731 | 732 | shouldn't need merging |
|
732 | 733 | |
|
733 | 734 | # subrepo layout |
|
734 | 735 | # |
|
735 | 736 | # o 5 br |
|
736 | 737 | # /| |
|
737 | 738 | # o | 4 default |
|
738 | 739 | # | | |
|
739 | 740 | # | o 3 br |
|
740 | 741 | # |/| |
|
741 | 742 | # o | 2 default |
|
742 | 743 | # | | |
|
743 | 744 | # | o 1 br |
|
744 | 745 | # |/ |
|
745 | 746 | # o 0 default |
|
746 | 747 | |
|
747 | 748 | $ cd .. |
|
748 | 749 | $ rm -rf sub |
|
749 | 750 | $ hg init main |
|
750 | 751 | $ cd main |
|
751 | 752 | $ hg init s |
|
752 | 753 | $ cd s |
|
753 | 754 | $ echo a > a |
|
754 | 755 | $ hg ci -Am1 |
|
755 | 756 | adding a |
|
756 | 757 | $ hg branch br |
|
757 | 758 | marked working directory as branch br |
|
758 | 759 | (branches are permanent and global, did you want a bookmark?) |
|
759 | 760 | $ echo a >> a |
|
760 | 761 | $ hg ci -m1 |
|
761 | 762 | $ hg up default |
|
762 | 763 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
763 | 764 | $ echo b > b |
|
764 | 765 | $ hg ci -Am1 |
|
765 | 766 | adding b |
|
766 | 767 | $ hg up br |
|
767 | 768 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
768 | 769 | $ hg merge tip |
|
769 | 770 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
770 | 771 | (branch merge, don't forget to commit) |
|
771 | 772 | $ hg ci -m1 |
|
772 | 773 | $ hg up 2 |
|
773 | 774 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
774 | 775 | $ echo c > c |
|
775 | 776 | $ hg ci -Am1 |
|
776 | 777 | adding c |
|
777 | 778 | $ hg up 3 |
|
778 | 779 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
779 | 780 | $ hg merge 4 |
|
780 | 781 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
781 | 782 | (branch merge, don't forget to commit) |
|
782 | 783 | $ hg ci -m1 |
|
783 | 784 | |
|
784 | 785 | # main repo layout: |
|
785 | 786 | # |
|
786 | 787 | # * <-- try to merge default into br again |
|
787 | 788 | # .`| |
|
788 | 789 | # . o 5 br --> substate = 5 |
|
789 | 790 | # . | |
|
790 | 791 | # o | 4 default --> substate = 4 |
|
791 | 792 | # | | |
|
792 | 793 | # | o 3 br --> substate = 2 |
|
793 | 794 | # |/| |
|
794 | 795 | # o | 2 default --> substate = 2 |
|
795 | 796 | # | | |
|
796 | 797 | # | o 1 br --> substate = 3 |
|
797 | 798 | # |/ |
|
798 | 799 | # o 0 default --> substate = 2 |
|
799 | 800 | |
|
800 | 801 | $ cd .. |
|
801 | 802 | $ echo 's = s' > .hgsub |
|
802 | 803 | $ hg -R s up 2 |
|
803 | 804 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
804 | 805 | $ hg ci -Am1 |
|
805 | 806 | adding .hgsub |
|
806 | 807 | $ hg branch br |
|
807 | 808 | marked working directory as branch br |
|
808 | 809 | (branches are permanent and global, did you want a bookmark?) |
|
809 | 810 | $ echo b > b |
|
810 | 811 | $ hg -R s up 3 |
|
811 | 812 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
812 | 813 | $ hg ci -Am1 |
|
813 | 814 | adding b |
|
814 | 815 | $ hg up default |
|
815 | 816 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
816 | 817 | $ echo c > c |
|
817 | 818 | $ hg ci -Am1 |
|
818 | 819 | adding c |
|
819 | 820 | $ hg up 1 |
|
820 | 821 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
821 | 822 | $ hg merge 2 |
|
822 | 823 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
823 | 824 | (branch merge, don't forget to commit) |
|
824 | 825 | $ hg ci -m1 |
|
825 | 826 | $ hg up 2 |
|
826 | 827 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
827 | 828 | $ hg -R s up 4 |
|
828 | 829 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
829 | 830 | $ echo d > d |
|
830 | 831 | $ hg ci -Am1 |
|
831 | 832 | adding d |
|
832 | 833 | $ hg up 3 |
|
833 | 834 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
834 | 835 | $ hg -R s up 5 |
|
835 | 836 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
836 | 837 | $ echo e > e |
|
837 | 838 | $ hg ci -Am1 |
|
838 | 839 | adding e |
|
839 | 840 | |
|
840 | 841 | $ hg up 5 |
|
841 | 842 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
842 | 843 | $ hg merge 4 # try to merge default into br again |
|
843 | 844 | subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88) |
|
844 | 845 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
845 | 846 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
846 | 847 | (branch merge, don't forget to commit) |
|
847 | 848 | $ cd .. |
|
848 | 849 | |
|
849 | 850 | test subrepo delete from .hgsubstate |
|
850 | 851 | |
|
851 | 852 | $ hg init testdelete |
|
852 | 853 | $ mkdir testdelete/nested testdelete/nested2 |
|
853 | 854 | $ hg init testdelete/nested |
|
854 | 855 | $ hg init testdelete/nested2 |
|
855 | 856 | $ echo test > testdelete/nested/foo |
|
856 | 857 | $ echo test > testdelete/nested2/foo |
|
857 | 858 | $ hg -R testdelete/nested add |
|
858 | 859 | adding testdelete/nested/foo (glob) |
|
859 | 860 | $ hg -R testdelete/nested2 add |
|
860 | 861 | adding testdelete/nested2/foo (glob) |
|
861 | 862 | $ hg -R testdelete/nested ci -m test |
|
862 | 863 | $ hg -R testdelete/nested2 ci -m test |
|
863 | 864 | $ echo nested = nested > testdelete/.hgsub |
|
864 | 865 | $ echo nested2 = nested2 >> testdelete/.hgsub |
|
865 | 866 | $ hg -R testdelete add |
|
866 | 867 | adding testdelete/.hgsub (glob) |
|
867 | 868 | $ hg -R testdelete ci -m "nested 1 & 2 added" |
|
868 | 869 | $ echo nested = nested > testdelete/.hgsub |
|
869 | 870 | $ hg -R testdelete ci -m "nested 2 deleted" |
|
870 | 871 | $ cat testdelete/.hgsubstate |
|
871 | 872 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
872 | 873 | $ hg -R testdelete remove testdelete/.hgsub |
|
873 | 874 | $ hg -R testdelete ci -m ".hgsub deleted" |
|
874 | 875 | $ cat testdelete/.hgsubstate |
|
875 | 876 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
876 | 877 | |
|
877 | 878 | test repository cloning |
|
878 | 879 | |
|
879 | 880 | $ mkdir mercurial mercurial2 |
|
880 | 881 | $ hg init nested_absolute |
|
881 | 882 | $ echo test > nested_absolute/foo |
|
882 | 883 | $ hg -R nested_absolute add |
|
883 | 884 | adding nested_absolute/foo (glob) |
|
884 | 885 | $ hg -R nested_absolute ci -mtest |
|
885 | 886 | $ cd mercurial |
|
886 | 887 | $ hg init nested_relative |
|
887 | 888 | $ echo test2 > nested_relative/foo2 |
|
888 | 889 | $ hg -R nested_relative add |
|
889 | 890 | adding nested_relative/foo2 (glob) |
|
890 | 891 | $ hg -R nested_relative ci -mtest2 |
|
891 | 892 | $ hg init main |
|
892 | 893 | $ echo "nested_relative = ../nested_relative" > main/.hgsub |
|
893 | 894 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
|
894 | 895 | $ hg -R main add |
|
895 | 896 | adding main/.hgsub (glob) |
|
896 | 897 | $ hg -R main ci -m "add subrepos" |
|
897 | 898 | $ cd .. |
|
898 | 899 | $ hg clone mercurial/main mercurial2/main |
|
899 | 900 | updating to branch default |
|
900 | 901 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
901 | 902 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ |
|
902 | 903 | > mercurial2/main/nested_relative/.hg/hgrc |
|
903 | 904 | [paths] |
|
904 | 905 | default = $TESTTMP/mercurial/nested_absolute |
|
905 | 906 | [paths] |
|
906 | 907 | default = $TESTTMP/mercurial/nested_relative |
|
907 | 908 | $ rm -rf mercurial mercurial2 |
|
908 | 909 | |
|
909 | 910 | Issue1977: multirepo push should fail if subrepo push fails |
|
910 | 911 | |
|
911 | 912 | $ hg init repo |
|
912 | 913 | $ hg init repo/s |
|
913 | 914 | $ echo a > repo/s/a |
|
914 | 915 | $ hg -R repo/s ci -Am0 |
|
915 | 916 | adding a |
|
916 | 917 | $ echo s = s > repo/.hgsub |
|
917 | 918 | $ hg -R repo ci -Am1 |
|
918 | 919 | adding .hgsub |
|
919 | 920 | $ hg clone repo repo2 |
|
920 | 921 | updating to branch default |
|
921 | 922 | cloning subrepo s from $TESTTMP/repo/s |
|
922 | 923 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
923 | 924 | $ hg -q -R repo2 pull -u |
|
924 | 925 | $ echo 1 > repo2/s/a |
|
925 | 926 | $ hg -R repo2/s ci -m2 |
|
926 | 927 | $ hg -q -R repo2/s push |
|
927 | 928 | $ hg -R repo2/s up -C 0 |
|
928 | 929 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
929 | 930 | $ echo 2 > repo2/s/b |
|
930 | 931 | $ hg -R repo2/s ci -m3 -A |
|
931 | 932 | adding b |
|
932 | 933 | created new head |
|
933 | 934 | $ hg -R repo2 ci -m3 |
|
934 | 935 | $ hg -q -R repo2 push |
|
935 | 936 | abort: push creates new remote head cc505f09a8b2! (in subrepo s) |
|
936 | 937 | (merge or see "hg help push" for details about pushing new heads) |
|
937 | 938 | [255] |
|
938 | 939 | $ hg -R repo update |
|
939 | 940 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
940 | 941 | |
|
941 | 942 | test if untracked file is not overwritten |
|
942 | 943 | |
|
943 | 944 | (this also tests that updated .hgsubstate is treated as "modified", |
|
944 | 945 | when 'merge.update()' is aborted before 'merge.recordupdates()', even |
|
945 | 946 | if none of mode, size and timestamp of it isn't changed on the |
|
946 | 947 | filesystem (see also issue4583)) |
|
947 | 948 | |
|
948 | 949 | $ echo issue3276_ok > repo/s/b |
|
949 | 950 | $ hg -R repo2 push -f -q |
|
950 | 951 | $ touch -t 200001010000 repo/.hgsubstate |
|
951 | 952 | |
|
952 | 953 | $ cat >> repo/.hg/hgrc <<EOF |
|
953 | 954 | > [fakedirstatewritetime] |
|
954 | 955 | > # emulate invoking dirstate.write() via repo.status() |
|
955 | 956 | > # at 2000-01-01 00:00 |
|
956 | 957 | > fakenow = 200001010000 |
|
957 | 958 | > |
|
958 | 959 | > [extensions] |
|
959 | 960 | > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py |
|
960 | 961 | > EOF |
|
961 | 962 | $ hg -R repo update |
|
962 | 963 | b: untracked file differs |
|
963 | 964 | abort: untracked files in working directory differ from files in requested revision (in subrepo s) |
|
964 | 965 | [255] |
|
965 | 966 | $ cat >> repo/.hg/hgrc <<EOF |
|
966 | 967 | > [extensions] |
|
967 | 968 | > fakedirstatewritetime = ! |
|
968 | 969 | > EOF |
|
969 | 970 | |
|
970 | 971 | $ cat repo/s/b |
|
971 | 972 | issue3276_ok |
|
972 | 973 | $ rm repo/s/b |
|
973 | 974 | $ touch -t 200001010000 repo/.hgsubstate |
|
974 | 975 | $ hg -R repo revert --all |
|
975 | 976 | reverting repo/.hgsubstate (glob) |
|
976 | 977 | reverting subrepo s |
|
977 | 978 | $ hg -R repo update |
|
978 | 979 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
979 | 980 | $ cat repo/s/b |
|
980 | 981 | 2 |
|
981 | 982 | $ rm -rf repo2 repo |
|
982 | 983 | |
|
983 | 984 | |
|
984 | 985 | Issue1852 subrepos with relative paths always push/pull relative to default |
|
985 | 986 | |
|
986 | 987 | Prepare a repo with subrepo |
|
987 | 988 | |
|
988 | 989 | $ hg init issue1852a |
|
989 | 990 | $ cd issue1852a |
|
990 | 991 | $ hg init sub/repo |
|
991 | 992 | $ echo test > sub/repo/foo |
|
992 | 993 | $ hg -R sub/repo add sub/repo/foo |
|
993 | 994 | $ echo sub/repo = sub/repo > .hgsub |
|
994 | 995 | $ hg add .hgsub |
|
995 | 996 | $ hg ci -mtest |
|
996 | 997 | committing subrepository sub/repo (glob) |
|
997 | 998 | $ echo test >> sub/repo/foo |
|
998 | 999 | $ hg ci -mtest |
|
999 | 1000 | committing subrepository sub/repo (glob) |
|
1000 | 1001 | $ hg cat sub/repo/foo |
|
1001 | 1002 | test |
|
1002 | 1003 | test |
|
1003 | 1004 | $ mkdir -p tmp/sub/repo |
|
1004 | 1005 | $ hg cat -r 0 --output tmp/%p_p sub/repo/foo |
|
1005 | 1006 | $ cat tmp/sub/repo/foo_p |
|
1006 | 1007 | test |
|
1007 | 1008 | $ mv sub/repo sub_ |
|
1008 | 1009 | $ hg cat sub/repo/baz |
|
1009 | 1010 | skipping missing subrepository: sub/repo |
|
1010 | 1011 | [1] |
|
1011 | 1012 | $ rm -rf sub/repo |
|
1012 | 1013 | $ mv sub_ sub/repo |
|
1013 | 1014 | $ cd .. |
|
1014 | 1015 | |
|
1015 | 1016 | Create repo without default path, pull top repo, and see what happens on update |
|
1016 | 1017 | |
|
1017 | 1018 | $ hg init issue1852b |
|
1018 | 1019 | $ hg -R issue1852b pull issue1852a |
|
1019 | 1020 | pulling from issue1852a |
|
1020 | 1021 | requesting all changes |
|
1021 | 1022 | adding changesets |
|
1022 | 1023 | adding manifests |
|
1023 | 1024 | adding file changes |
|
1024 | 1025 | added 2 changesets with 3 changes to 2 files |
|
1025 | 1026 | (run 'hg update' to get a working copy) |
|
1026 | 1027 | $ hg -R issue1852b update |
|
1027 | 1028 | abort: default path for subrepository not found (in subrepo sub/repo) (glob) |
|
1028 | 1029 | [255] |
|
1029 | 1030 | |
|
1030 | 1031 | Ensure a full traceback, not just the SubrepoAbort part |
|
1031 | 1032 | |
|
1032 | 1033 | $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort' |
|
1033 | 1034 | raise error.Abort(_("default path for subrepository not found")) |
|
1034 | 1035 | |
|
1035 | 1036 | Pull -u now doesn't help |
|
1036 | 1037 | |
|
1037 | 1038 | $ hg -R issue1852b pull -u issue1852a |
|
1038 | 1039 | pulling from issue1852a |
|
1039 | 1040 | searching for changes |
|
1040 | 1041 | no changes found |
|
1041 | 1042 | |
|
1042 | 1043 | Try the same, but with pull -u |
|
1043 | 1044 | |
|
1044 | 1045 | $ hg init issue1852c |
|
1045 | 1046 | $ hg -R issue1852c pull -r0 -u issue1852a |
|
1046 | 1047 | pulling from issue1852a |
|
1047 | 1048 | adding changesets |
|
1048 | 1049 | adding manifests |
|
1049 | 1050 | adding file changes |
|
1050 | 1051 | added 1 changesets with 2 changes to 2 files |
|
1051 | 1052 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) |
|
1052 | 1053 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1053 | 1054 | |
|
1054 | 1055 | Try to push from the other side |
|
1055 | 1056 | |
|
1056 | 1057 | $ hg -R issue1852a push `pwd`/issue1852c |
|
1057 | 1058 | pushing to $TESTTMP/issue1852c (glob) |
|
1058 | 1059 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob) |
|
1059 | 1060 | searching for changes |
|
1060 | 1061 | no changes found |
|
1061 | 1062 | searching for changes |
|
1062 | 1063 | adding changesets |
|
1063 | 1064 | adding manifests |
|
1064 | 1065 | adding file changes |
|
1065 | 1066 | added 1 changesets with 1 changes to 1 files |
|
1066 | 1067 | |
|
1067 | 1068 | Incoming and outgoing should not use the default path: |
|
1068 | 1069 | |
|
1069 | 1070 | $ hg clone -q issue1852a issue1852d |
|
1070 | 1071 | $ hg -R issue1852d outgoing --subrepos issue1852c |
|
1071 | 1072 | comparing with issue1852c |
|
1072 | 1073 | searching for changes |
|
1073 | 1074 | no changes found |
|
1074 | 1075 | comparing with issue1852c/sub/repo |
|
1075 | 1076 | searching for changes |
|
1076 | 1077 | no changes found |
|
1077 | 1078 | [1] |
|
1078 | 1079 | $ hg -R issue1852d incoming --subrepos issue1852c |
|
1079 | 1080 | comparing with issue1852c |
|
1080 | 1081 | searching for changes |
|
1081 | 1082 | no changes found |
|
1082 | 1083 | comparing with issue1852c/sub/repo |
|
1083 | 1084 | searching for changes |
|
1084 | 1085 | no changes found |
|
1085 | 1086 | [1] |
|
1086 | 1087 | |
|
1087 | 1088 | Check that merge of a new subrepo doesn't write the uncommitted state to |
|
1088 | 1089 | .hgsubstate (issue4622) |
|
1089 | 1090 | |
|
1090 | 1091 | $ hg init issue1852a/addedsub |
|
1091 | 1092 | $ echo zzz > issue1852a/addedsub/zz.txt |
|
1092 | 1093 | $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ" |
|
1093 | 1094 | |
|
1094 | 1095 | $ hg clone issue1852a/addedsub issue1852d/addedsub |
|
1095 | 1096 | updating to branch default |
|
1096 | 1097 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1097 | 1098 | |
|
1098 | 1099 | $ echo def > issue1852a/sub/repo/foo |
|
1099 | 1100 | $ hg -R issue1852a ci -SAm 'tweaked subrepo' |
|
1100 | 1101 | adding tmp/sub/repo/foo_p |
|
1101 | 1102 | committing subrepository sub/repo (glob) |
|
1102 | 1103 | |
|
1103 | 1104 | $ echo 'addedsub = addedsub' >> issue1852d/.hgsub |
|
1104 | 1105 | $ echo xyz > issue1852d/sub/repo/foo |
|
1105 | 1106 | $ hg -R issue1852d pull -u |
|
1106 | 1107 | pulling from $TESTTMP/issue1852a (glob) |
|
1107 | 1108 | searching for changes |
|
1108 | 1109 | adding changesets |
|
1109 | 1110 | adding manifests |
|
1110 | 1111 | adding file changes |
|
1111 | 1112 | added 1 changesets with 2 changes to 2 files |
|
1112 | 1113 | subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c) |
|
1113 | 1114 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1114 | 1115 | pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob) |
|
1115 | 1116 | searching for changes |
|
1116 | 1117 | adding changesets |
|
1117 | 1118 | adding manifests |
|
1118 | 1119 | adding file changes |
|
1119 | 1120 | added 1 changesets with 1 changes to 1 files |
|
1120 | 1121 | subrepository sources for sub/repo differ (glob) |
|
1121 | 1122 | use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l |
|
1122 | 1123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1123 | 1124 | $ cat issue1852d/.hgsubstate |
|
1124 | 1125 | f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo |
|
1125 | 1126 | |
|
1126 | 1127 | Check status of files when none of them belong to the first |
|
1127 | 1128 | subrepository: |
|
1128 | 1129 | |
|
1129 | 1130 | $ hg init subrepo-status |
|
1130 | 1131 | $ cd subrepo-status |
|
1131 | 1132 | $ hg init subrepo-1 |
|
1132 | 1133 | $ hg init subrepo-2 |
|
1133 | 1134 | $ cd subrepo-2 |
|
1134 | 1135 | $ touch file |
|
1135 | 1136 | $ hg add file |
|
1136 | 1137 | $ cd .. |
|
1137 | 1138 | $ echo subrepo-1 = subrepo-1 > .hgsub |
|
1138 | 1139 | $ echo subrepo-2 = subrepo-2 >> .hgsub |
|
1139 | 1140 | $ hg add .hgsub |
|
1140 | 1141 | $ hg ci -m 'Added subrepos' |
|
1141 | 1142 | committing subrepository subrepo-2 |
|
1142 | 1143 | $ hg st subrepo-2/file |
|
1143 | 1144 | |
|
1144 | 1145 | Check that share works with subrepo |
|
1145 | 1146 | $ hg --config extensions.share= share . ../shared |
|
1146 | 1147 | updating working directory |
|
1147 | 1148 | cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 |
|
1148 | 1149 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1149 | 1150 | $ test -f ../shared/subrepo-1/.hg/sharedpath |
|
1150 | 1151 | [1] |
|
1151 | 1152 | $ hg -R ../shared in |
|
1152 | 1153 | abort: repository default not found! |
|
1153 | 1154 | [255] |
|
1154 | 1155 | $ hg -R ../shared/subrepo-2 showconfig paths |
|
1155 | 1156 | paths.default=$TESTTMP/subrepo-status/subrepo-2 |
|
1156 | 1157 | $ hg -R ../shared/subrepo-1 sum --remote |
|
1157 | 1158 | parent: -1:000000000000 tip (empty repository) |
|
1158 | 1159 | branch: default |
|
1159 | 1160 | commit: (clean) |
|
1160 | 1161 | update: (current) |
|
1161 | 1162 | remote: (synced) |
|
1162 | 1163 | |
|
1163 | 1164 | Check hg update --clean |
|
1164 | 1165 | $ cd $TESTTMP/t |
|
1165 | 1166 | $ rm -r t/t.orig |
|
1166 | 1167 | $ hg status -S --all |
|
1167 | 1168 | C .hgsub |
|
1168 | 1169 | C .hgsubstate |
|
1169 | 1170 | C a |
|
1170 | 1171 | C s/.hgsub |
|
1171 | 1172 | C s/.hgsubstate |
|
1172 | 1173 | C s/a |
|
1173 | 1174 | C s/ss/a |
|
1174 | 1175 | C t/t |
|
1175 | 1176 | $ echo c1 > s/a |
|
1176 | 1177 | $ cd s |
|
1177 | 1178 | $ echo c1 > b |
|
1178 | 1179 | $ echo c1 > c |
|
1179 | 1180 | $ hg add b |
|
1180 | 1181 | $ cd .. |
|
1181 | 1182 | $ hg status -S |
|
1182 | 1183 | M s/a |
|
1183 | 1184 | A s/b |
|
1184 | 1185 | ? s/c |
|
1185 | 1186 | $ hg update -C |
|
1186 | 1187 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1187 | 1188 | $ hg status -S |
|
1188 | 1189 | ? s/b |
|
1189 | 1190 | ? s/c |
|
1190 | 1191 | |
|
1191 | 1192 | Sticky subrepositories, no changes |
|
1192 | 1193 | $ cd $TESTTMP/t |
|
1193 | 1194 | $ hg id |
|
1194 | 1195 | 925c17564ef8 tip |
|
1195 | 1196 | $ hg -R s id |
|
1196 | 1197 | 12a213df6fa9 tip |
|
1197 | 1198 | $ hg -R t id |
|
1198 | 1199 | 52c0adc0515a tip |
|
1199 | 1200 | $ hg update 11 |
|
1200 | 1201 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1201 | 1202 | $ hg id |
|
1202 | 1203 | 365661e5936a |
|
1203 | 1204 | $ hg -R s id |
|
1204 | 1205 | fc627a69481f |
|
1205 | 1206 | $ hg -R t id |
|
1206 | 1207 | e95bcfa18a35 |
|
1207 | 1208 | |
|
1208 | 1209 | Sticky subrepositories, file changes |
|
1209 | 1210 | $ touch s/f1 |
|
1210 | 1211 | $ touch t/f1 |
|
1211 | 1212 | $ hg add -S s/f1 |
|
1212 | 1213 | $ hg add -S t/f1 |
|
1213 | 1214 | $ hg id |
|
1214 | 1215 | 365661e5936a+ |
|
1215 | 1216 | $ hg -R s id |
|
1216 | 1217 | fc627a69481f+ |
|
1217 | 1218 | $ hg -R t id |
|
1218 | 1219 | e95bcfa18a35+ |
|
1219 | 1220 | $ hg update tip |
|
1220 | 1221 | subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9) |
|
1221 | 1222 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1222 | 1223 | subrepository sources for s differ |
|
1223 | 1224 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l |
|
1224 | 1225 | subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a) |
|
1225 | 1226 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1226 | 1227 | subrepository sources for t differ |
|
1227 | 1228 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l |
|
1228 | 1229 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1229 | 1230 | $ hg id |
|
1230 | 1231 | 925c17564ef8+ tip |
|
1231 | 1232 | $ hg -R s id |
|
1232 | 1233 | fc627a69481f+ |
|
1233 | 1234 | $ hg -R t id |
|
1234 | 1235 | e95bcfa18a35+ |
|
1235 | 1236 | $ hg update --clean tip |
|
1236 | 1237 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1237 | 1238 | |
|
1238 | 1239 | Sticky subrepository, revision updates |
|
1239 | 1240 | $ hg id |
|
1240 | 1241 | 925c17564ef8 tip |
|
1241 | 1242 | $ hg -R s id |
|
1242 | 1243 | 12a213df6fa9 tip |
|
1243 | 1244 | $ hg -R t id |
|
1244 | 1245 | 52c0adc0515a tip |
|
1245 | 1246 | $ cd s |
|
1246 | 1247 | $ hg update -r -2 |
|
1247 | 1248 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1248 | 1249 | $ cd ../t |
|
1249 | 1250 | $ hg update -r 2 |
|
1250 | 1251 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1251 | 1252 | $ cd .. |
|
1252 | 1253 | $ hg update 10 |
|
1253 | 1254 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) |
|
1254 | 1255 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1255 | 1256 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c) |
|
1256 | 1257 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1257 | 1258 | subrepository sources for t differ (in checked out version) |
|
1258 | 1259 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l |
|
1259 | 1260 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1260 | 1261 | $ hg id |
|
1261 | 1262 | e45c8b14af55+ |
|
1262 | 1263 | $ hg -R s id |
|
1263 | 1264 | 02dcf1d70411 |
|
1264 | 1265 | $ hg -R t id |
|
1265 | 1266 | 7af322bc1198 |
|
1266 | 1267 | |
|
1267 | 1268 | Sticky subrepository, file changes and revision updates |
|
1268 | 1269 | $ touch s/f1 |
|
1269 | 1270 | $ touch t/f1 |
|
1270 | 1271 | $ hg add -S s/f1 |
|
1271 | 1272 | $ hg add -S t/f1 |
|
1272 | 1273 | $ hg id |
|
1273 | 1274 | e45c8b14af55+ |
|
1274 | 1275 | $ hg -R s id |
|
1275 | 1276 | 02dcf1d70411+ |
|
1276 | 1277 | $ hg -R t id |
|
1277 | 1278 | 7af322bc1198+ |
|
1278 | 1279 | $ hg update tip |
|
1279 | 1280 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9) |
|
1280 | 1281 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1281 | 1282 | subrepository sources for s differ |
|
1282 | 1283 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l |
|
1283 | 1284 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a) |
|
1284 | 1285 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1285 | 1286 | subrepository sources for t differ |
|
1286 | 1287 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l |
|
1287 | 1288 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1288 | 1289 | $ hg id |
|
1289 | 1290 | 925c17564ef8+ tip |
|
1290 | 1291 | $ hg -R s id |
|
1291 | 1292 | 02dcf1d70411+ |
|
1292 | 1293 | $ hg -R t id |
|
1293 | 1294 | 7af322bc1198+ |
|
1294 | 1295 | |
|
1295 | 1296 | Sticky repository, update --clean |
|
1296 | 1297 | $ hg update --clean tip |
|
1297 | 1298 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1298 | 1299 | $ hg id |
|
1299 | 1300 | 925c17564ef8 tip |
|
1300 | 1301 | $ hg -R s id |
|
1301 | 1302 | 12a213df6fa9 tip |
|
1302 | 1303 | $ hg -R t id |
|
1303 | 1304 | 52c0adc0515a tip |
|
1304 | 1305 | |
|
1305 | 1306 | Test subrepo already at intended revision: |
|
1306 | 1307 | $ cd s |
|
1307 | 1308 | $ hg update fc627a69481f |
|
1308 | 1309 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1309 | 1310 | $ cd .. |
|
1310 | 1311 | $ hg update 11 |
|
1311 | 1312 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) |
|
1312 | 1313 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1313 | 1314 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1314 | 1315 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1315 | 1316 | $ hg id -n |
|
1316 | 1317 | 11+ |
|
1317 | 1318 | $ hg -R s id |
|
1318 | 1319 | fc627a69481f |
|
1319 | 1320 | $ hg -R t id |
|
1320 | 1321 | e95bcfa18a35 |
|
1321 | 1322 | |
|
1322 | 1323 | Test that removing .hgsubstate doesn't break anything: |
|
1323 | 1324 | |
|
1324 | 1325 | $ hg rm -f .hgsubstate |
|
1325 | 1326 | $ hg ci -mrm |
|
1326 | 1327 | nothing changed |
|
1327 | 1328 | [1] |
|
1328 | 1329 | $ hg log -vr tip |
|
1329 | 1330 | changeset: 13:925c17564ef8 |
|
1330 | 1331 | tag: tip |
|
1331 | 1332 | user: test |
|
1332 | 1333 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1333 | 1334 | files: .hgsubstate |
|
1334 | 1335 | description: |
|
1335 | 1336 | 13 |
|
1336 | 1337 | |
|
1337 | 1338 | |
|
1338 | 1339 | |
|
1339 | 1340 | Test that removing .hgsub removes .hgsubstate: |
|
1340 | 1341 | |
|
1341 | 1342 | $ hg rm .hgsub |
|
1342 | 1343 | $ hg ci -mrm2 |
|
1343 | 1344 | created new head |
|
1344 | 1345 | $ hg log -vr tip |
|
1345 | 1346 | changeset: 14:2400bccd50af |
|
1346 | 1347 | tag: tip |
|
1347 | 1348 | parent: 11:365661e5936a |
|
1348 | 1349 | user: test |
|
1349 | 1350 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1350 | 1351 | files: .hgsub .hgsubstate |
|
1351 | 1352 | description: |
|
1352 | 1353 | rm2 |
|
1353 | 1354 | |
|
1354 | 1355 | |
|
1355 | 1356 | Test issue3153: diff -S with deleted subrepos |
|
1356 | 1357 | |
|
1357 | 1358 | $ hg diff --nodates -S -c . |
|
1358 | 1359 | diff -r 365661e5936a -r 2400bccd50af .hgsub |
|
1359 | 1360 | --- a/.hgsub |
|
1360 | 1361 | +++ /dev/null |
|
1361 | 1362 | @@ -1,2 +0,0 @@ |
|
1362 | 1363 | -s = s |
|
1363 | 1364 | -t = t |
|
1364 | 1365 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate |
|
1365 | 1366 | --- a/.hgsubstate |
|
1366 | 1367 | +++ /dev/null |
|
1367 | 1368 | @@ -1,2 +0,0 @@ |
|
1368 | 1369 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1369 | 1370 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t |
|
1370 | 1371 | |
|
1371 | 1372 | Test behavior of add for explicit path in subrepo: |
|
1372 | 1373 | $ cd .. |
|
1373 | 1374 | $ hg init explicit |
|
1374 | 1375 | $ cd explicit |
|
1375 | 1376 | $ echo s = s > .hgsub |
|
1376 | 1377 | $ hg add .hgsub |
|
1377 | 1378 | $ hg init s |
|
1378 | 1379 | $ hg ci -m0 |
|
1379 | 1380 | Adding with an explicit path in a subrepo adds the file |
|
1380 | 1381 | $ echo c1 > f1 |
|
1381 | 1382 | $ echo c2 > s/f2 |
|
1382 | 1383 | $ hg st -S |
|
1383 | 1384 | ? f1 |
|
1384 | 1385 | ? s/f2 |
|
1385 | 1386 | $ hg add s/f2 |
|
1386 | 1387 | $ hg st -S |
|
1387 | 1388 | A s/f2 |
|
1388 | 1389 | ? f1 |
|
1389 | 1390 | $ hg ci -R s -m0 |
|
1390 | 1391 | $ hg ci -Am1 |
|
1391 | 1392 | adding f1 |
|
1392 | 1393 | Adding with an explicit path in a subrepo with -S has the same behavior |
|
1393 | 1394 | $ echo c3 > f3 |
|
1394 | 1395 | $ echo c4 > s/f4 |
|
1395 | 1396 | $ hg st -S |
|
1396 | 1397 | ? f3 |
|
1397 | 1398 | ? s/f4 |
|
1398 | 1399 | $ hg add -S s/f4 |
|
1399 | 1400 | $ hg st -S |
|
1400 | 1401 | A s/f4 |
|
1401 | 1402 | ? f3 |
|
1402 | 1403 | $ hg ci -R s -m1 |
|
1403 | 1404 | $ hg ci -Ama2 |
|
1404 | 1405 | adding f3 |
|
1405 | 1406 | Adding without a path or pattern silently ignores subrepos |
|
1406 | 1407 | $ echo c5 > f5 |
|
1407 | 1408 | $ echo c6 > s/f6 |
|
1408 | 1409 | $ echo c7 > s/f7 |
|
1409 | 1410 | $ hg st -S |
|
1410 | 1411 | ? f5 |
|
1411 | 1412 | ? s/f6 |
|
1412 | 1413 | ? s/f7 |
|
1413 | 1414 | $ hg add |
|
1414 | 1415 | adding f5 |
|
1415 | 1416 | $ hg st -S |
|
1416 | 1417 | A f5 |
|
1417 | 1418 | ? s/f6 |
|
1418 | 1419 | ? s/f7 |
|
1419 | 1420 | $ hg ci -R s -Am2 |
|
1420 | 1421 | adding f6 |
|
1421 | 1422 | adding f7 |
|
1422 | 1423 | $ hg ci -m3 |
|
1423 | 1424 | Adding without a path or pattern with -S also adds files in subrepos |
|
1424 | 1425 | $ echo c8 > f8 |
|
1425 | 1426 | $ echo c9 > s/f9 |
|
1426 | 1427 | $ echo c10 > s/f10 |
|
1427 | 1428 | $ hg st -S |
|
1428 | 1429 | ? f8 |
|
1429 | 1430 | ? s/f10 |
|
1430 | 1431 | ? s/f9 |
|
1431 | 1432 | $ hg add -S |
|
1432 | 1433 | adding f8 |
|
1433 | 1434 | adding s/f10 (glob) |
|
1434 | 1435 | adding s/f9 (glob) |
|
1435 | 1436 | $ hg st -S |
|
1436 | 1437 | A f8 |
|
1437 | 1438 | A s/f10 |
|
1438 | 1439 | A s/f9 |
|
1439 | 1440 | $ hg ci -R s -m3 |
|
1440 | 1441 | $ hg ci -m4 |
|
1441 | 1442 | Adding with a pattern silently ignores subrepos |
|
1442 | 1443 | $ echo c11 > fm11 |
|
1443 | 1444 | $ echo c12 > fn12 |
|
1444 | 1445 | $ echo c13 > s/fm13 |
|
1445 | 1446 | $ echo c14 > s/fn14 |
|
1446 | 1447 | $ hg st -S |
|
1447 | 1448 | ? fm11 |
|
1448 | 1449 | ? fn12 |
|
1449 | 1450 | ? s/fm13 |
|
1450 | 1451 | ? s/fn14 |
|
1451 | 1452 | $ hg add 'glob:**fm*' |
|
1452 | 1453 | adding fm11 |
|
1453 | 1454 | $ hg st -S |
|
1454 | 1455 | A fm11 |
|
1455 | 1456 | ? fn12 |
|
1456 | 1457 | ? s/fm13 |
|
1457 | 1458 | ? s/fn14 |
|
1458 | 1459 | $ hg ci -R s -Am4 |
|
1459 | 1460 | adding fm13 |
|
1460 | 1461 | adding fn14 |
|
1461 | 1462 | $ hg ci -Am5 |
|
1462 | 1463 | adding fn12 |
|
1463 | 1464 | Adding with a pattern with -S also adds matches in subrepos |
|
1464 | 1465 | $ echo c15 > fm15 |
|
1465 | 1466 | $ echo c16 > fn16 |
|
1466 | 1467 | $ echo c17 > s/fm17 |
|
1467 | 1468 | $ echo c18 > s/fn18 |
|
1468 | 1469 | $ hg st -S |
|
1469 | 1470 | ? fm15 |
|
1470 | 1471 | ? fn16 |
|
1471 | 1472 | ? s/fm17 |
|
1472 | 1473 | ? s/fn18 |
|
1473 | 1474 | $ hg add -S 'glob:**fm*' |
|
1474 | 1475 | adding fm15 |
|
1475 | 1476 | adding s/fm17 (glob) |
|
1476 | 1477 | $ hg st -S |
|
1477 | 1478 | A fm15 |
|
1478 | 1479 | A s/fm17 |
|
1479 | 1480 | ? fn16 |
|
1480 | 1481 | ? s/fn18 |
|
1481 | 1482 | $ hg ci -R s -Am5 |
|
1482 | 1483 | adding fn18 |
|
1483 | 1484 | $ hg ci -Am6 |
|
1484 | 1485 | adding fn16 |
|
1485 | 1486 | |
|
1486 | 1487 | Test behavior of forget for explicit path in subrepo: |
|
1487 | 1488 | Forgetting an explicit path in a subrepo untracks the file |
|
1488 | 1489 | $ echo c19 > s/f19 |
|
1489 | 1490 | $ hg add s/f19 |
|
1490 | 1491 | $ hg st -S |
|
1491 | 1492 | A s/f19 |
|
1492 | 1493 | $ hg forget s/f19 |
|
1493 | 1494 | $ hg st -S |
|
1494 | 1495 | ? s/f19 |
|
1495 | 1496 | $ rm s/f19 |
|
1496 | 1497 | $ cd .. |
|
1497 | 1498 | |
|
1498 | 1499 | Courtesy phases synchronisation to publishing server does not block the push |
|
1499 | 1500 | (issue3781) |
|
1500 | 1501 | |
|
1501 | 1502 | $ cp -r main issue3781 |
|
1502 | 1503 | $ cp -r main issue3781-dest |
|
1503 | 1504 | $ cd issue3781-dest/s |
|
1504 | 1505 | $ hg phase tip # show we have draft changeset |
|
1505 | 1506 | 5: draft |
|
1506 | 1507 | $ chmod a-w .hg/store/phaseroots # prevent phase push |
|
1507 | 1508 | $ cd ../../issue3781 |
|
1508 | 1509 | $ cat >> .hg/hgrc << EOF |
|
1509 | 1510 | > [paths] |
|
1510 | 1511 | > default=../issue3781-dest/ |
|
1511 | 1512 | > EOF |
|
1512 | 1513 | $ hg push --config experimental.bundle2-exp=False |
|
1513 | 1514 | pushing to $TESTTMP/issue3781-dest (glob) |
|
1514 | 1515 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1515 | 1516 | searching for changes |
|
1516 | 1517 | no changes found |
|
1517 | 1518 | searching for changes |
|
1518 | 1519 | no changes found |
|
1519 | 1520 | [1] |
|
1520 | 1521 | # clean the push cache |
|
1521 | 1522 | $ rm s/.hg/cache/storehash/* |
|
1522 | 1523 | $ hg push --config experimental.bundle2-exp=True |
|
1523 | 1524 | pushing to $TESTTMP/issue3781-dest (glob) |
|
1524 | 1525 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1525 | 1526 | searching for changes |
|
1526 | 1527 | no changes found |
|
1527 | 1528 | searching for changes |
|
1528 | 1529 | no changes found |
|
1529 | 1530 | [1] |
|
1530 | 1531 | $ cd .. |
|
1531 | 1532 | |
|
1532 | 1533 | Test phase choice for newly created commit with "phases.subrepochecks" |
|
1533 | 1534 | configuration |
|
1534 | 1535 | |
|
1535 | 1536 | $ cd t |
|
1536 | 1537 | $ hg update -q -r 12 |
|
1537 | 1538 | |
|
1538 | 1539 | $ cat >> s/ss/.hg/hgrc <<EOF |
|
1539 | 1540 | > [phases] |
|
1540 | 1541 | > new-commit = secret |
|
1541 | 1542 | > EOF |
|
1542 | 1543 | $ cat >> s/.hg/hgrc <<EOF |
|
1543 | 1544 | > [phases] |
|
1544 | 1545 | > new-commit = draft |
|
1545 | 1546 | > EOF |
|
1546 | 1547 | $ echo phasecheck1 >> s/ss/a |
|
1547 | 1548 | $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1 |
|
1548 | 1549 | committing subrepository ss |
|
1549 | 1550 | transaction abort! |
|
1550 | 1551 | rollback completed |
|
1551 | 1552 | abort: can't commit in draft phase conflicting secret from subrepository ss |
|
1552 | 1553 | [255] |
|
1553 | 1554 | $ echo phasecheck2 >> s/ss/a |
|
1554 | 1555 | $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2 |
|
1555 | 1556 | committing subrepository ss |
|
1556 | 1557 | $ hg -R s/ss phase tip |
|
1557 | 1558 | 3: secret |
|
1558 | 1559 | $ hg -R s phase tip |
|
1559 | 1560 | 6: draft |
|
1560 | 1561 | $ echo phasecheck3 >> s/ss/a |
|
1561 | 1562 | $ hg -R s commit -S -m phasecheck3 |
|
1562 | 1563 | committing subrepository ss |
|
1563 | 1564 | warning: changes are committed in secret phase from subrepository ss |
|
1564 | 1565 | $ hg -R s/ss phase tip |
|
1565 | 1566 | 4: secret |
|
1566 | 1567 | $ hg -R s phase tip |
|
1567 | 1568 | 7: secret |
|
1568 | 1569 | |
|
1569 | 1570 | $ cat >> t/.hg/hgrc <<EOF |
|
1570 | 1571 | > [phases] |
|
1571 | 1572 | > new-commit = draft |
|
1572 | 1573 | > EOF |
|
1573 | 1574 | $ cat >> .hg/hgrc <<EOF |
|
1574 | 1575 | > [phases] |
|
1575 | 1576 | > new-commit = public |
|
1576 | 1577 | > EOF |
|
1577 | 1578 | $ echo phasecheck4 >> s/ss/a |
|
1578 | 1579 | $ echo phasecheck4 >> t/t |
|
1579 | 1580 | $ hg commit -S -m phasecheck4 |
|
1580 | 1581 | committing subrepository s |
|
1581 | 1582 | committing subrepository s/ss (glob) |
|
1582 | 1583 | warning: changes are committed in secret phase from subrepository ss |
|
1583 | 1584 | committing subrepository t |
|
1584 | 1585 | warning: changes are committed in secret phase from subrepository s |
|
1585 | 1586 | created new head |
|
1586 | 1587 | $ hg -R s/ss phase tip |
|
1587 | 1588 | 5: secret |
|
1588 | 1589 | $ hg -R s phase tip |
|
1589 | 1590 | 8: secret |
|
1590 | 1591 | $ hg -R t phase tip |
|
1591 | 1592 | 6: draft |
|
1592 | 1593 | $ hg phase tip |
|
1593 | 1594 | 15: secret |
|
1594 | 1595 | |
|
1595 | 1596 | $ cd .. |
|
1596 | 1597 | |
|
1597 | 1598 | |
|
1598 | 1599 | Test that commit --secret works on both repo and subrepo (issue4182) |
|
1599 | 1600 | |
|
1600 | 1601 | $ cd main |
|
1601 | 1602 | $ echo secret >> b |
|
1602 | 1603 | $ echo secret >> s/b |
|
1603 | 1604 | $ hg commit --secret --subrepo -m "secret" |
|
1604 | 1605 | committing subrepository s |
|
1605 | 1606 | $ hg phase -r . |
|
1606 | 1607 | 6: secret |
|
1607 | 1608 | $ cd s |
|
1608 | 1609 | $ hg phase -r . |
|
1609 | 1610 | 6: secret |
|
1610 | 1611 | $ cd ../../ |
|
1611 | 1612 | |
|
1612 | 1613 | Test "subrepos" template keyword |
|
1613 | 1614 | |
|
1614 | 1615 | $ cd t |
|
1615 | 1616 | $ hg update -q 15 |
|
1616 | 1617 | $ cat > .hgsub <<EOF |
|
1617 | 1618 | > s = s |
|
1618 | 1619 | > EOF |
|
1619 | 1620 | $ hg commit -m "16" |
|
1620 | 1621 | warning: changes are committed in secret phase from subrepository s |
|
1621 | 1622 | |
|
1622 | 1623 | (addition of ".hgsub" itself) |
|
1623 | 1624 | |
|
1624 | 1625 | $ hg diff --nodates -c 1 .hgsubstate |
|
1625 | 1626 | diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate |
|
1626 | 1627 | --- /dev/null |
|
1627 | 1628 | +++ b/.hgsubstate |
|
1628 | 1629 | @@ -0,0 +1,1 @@ |
|
1629 | 1630 | +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1630 | 1631 | $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1631 | 1632 | f7b1eb17ad24 000000000000 |
|
1632 | 1633 | s |
|
1633 | 1634 | |
|
1634 | 1635 | (modification of existing entry) |
|
1635 | 1636 | |
|
1636 | 1637 | $ hg diff --nodates -c 2 .hgsubstate |
|
1637 | 1638 | diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate |
|
1638 | 1639 | --- a/.hgsubstate |
|
1639 | 1640 | +++ b/.hgsubstate |
|
1640 | 1641 | @@ -1,1 +1,1 @@ |
|
1641 | 1642 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1642 | 1643 | +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s |
|
1643 | 1644 | $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1644 | 1645 | 7cf8cfea66e4 000000000000 |
|
1645 | 1646 | s |
|
1646 | 1647 | |
|
1647 | 1648 | (addition of entry) |
|
1648 | 1649 | |
|
1649 | 1650 | $ hg diff --nodates -c 5 .hgsubstate |
|
1650 | 1651 | diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate |
|
1651 | 1652 | --- a/.hgsubstate |
|
1652 | 1653 | +++ b/.hgsubstate |
|
1653 | 1654 | @@ -1,1 +1,2 @@ |
|
1654 | 1655 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1655 | 1656 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1656 | 1657 | $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1657 | 1658 | 7cf8cfea66e4 000000000000 |
|
1658 | 1659 | t |
|
1659 | 1660 | |
|
1660 | 1661 | (removal of existing entry) |
|
1661 | 1662 | |
|
1662 | 1663 | $ hg diff --nodates -c 16 .hgsubstate |
|
1663 | 1664 | diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate |
|
1664 | 1665 | --- a/.hgsubstate |
|
1665 | 1666 | +++ b/.hgsubstate |
|
1666 | 1667 | @@ -1,2 +1,1 @@ |
|
1667 | 1668 | 0731af8ca9423976d3743119d0865097c07bdc1b s |
|
1668 | 1669 | -e202dc79b04c88a636ea8913d9182a1346d9b3dc t |
|
1669 | 1670 | $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1670 | 1671 | 8bec38d2bd0b 000000000000 |
|
1671 | 1672 | t |
|
1672 | 1673 | |
|
1673 | 1674 | (merging) |
|
1674 | 1675 | |
|
1675 | 1676 | $ hg diff --nodates -c 9 .hgsubstate |
|
1676 | 1677 | diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate |
|
1677 | 1678 | --- a/.hgsubstate |
|
1678 | 1679 | +++ b/.hgsubstate |
|
1679 | 1680 | @@ -1,1 +1,2 @@ |
|
1680 | 1681 | fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1681 | 1682 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1682 | 1683 | $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1683 | 1684 | f6affe3fbfaa 1f14a2e2d3ec |
|
1684 | 1685 | t |
|
1685 | 1686 | |
|
1686 | 1687 | (removal of ".hgsub" itself) |
|
1687 | 1688 | |
|
1688 | 1689 | $ hg diff --nodates -c 8 .hgsubstate |
|
1689 | 1690 | diff -r f94576341bcf -r 96615c1dad2d .hgsubstate |
|
1690 | 1691 | --- a/.hgsubstate |
|
1691 | 1692 | +++ /dev/null |
|
1692 | 1693 | @@ -1,2 +0,0 @@ |
|
1693 | 1694 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1694 | 1695 | -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t |
|
1695 | 1696 | $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1696 | 1697 | f94576341bcf 000000000000 |
|
1697 | 1698 | |
|
1698 | 1699 | Test that '[paths]' is configured correctly at subrepo creation |
|
1699 | 1700 | |
|
1700 | 1701 | $ cd $TESTTMP/tc |
|
1701 | 1702 | $ cat > .hgsub <<EOF |
|
1702 | 1703 | > # to clear bogus subrepo path 'bogus=[boguspath' |
|
1703 | 1704 | > s = s |
|
1704 | 1705 | > t = t |
|
1705 | 1706 | > EOF |
|
1706 | 1707 | $ hg update -q --clean null |
|
1707 | 1708 | $ rm -rf s t |
|
1708 | 1709 | $ cat >> .hg/hgrc <<EOF |
|
1709 | 1710 | > [paths] |
|
1710 | 1711 | > default-push = /foo/bar |
|
1711 | 1712 | > EOF |
|
1712 | 1713 | $ hg update -q |
|
1713 | 1714 | $ cat s/.hg/hgrc |
|
1714 | 1715 | [paths] |
|
1715 | 1716 | default = $TESTTMP/t/s |
|
1716 | 1717 | default-push = /foo/bar/s |
|
1717 | 1718 | $ cat s/ss/.hg/hgrc |
|
1718 | 1719 | [paths] |
|
1719 | 1720 | default = $TESTTMP/t/s/ss |
|
1720 | 1721 | default-push = /foo/bar/s/ss |
|
1721 | 1722 | $ cat t/.hg/hgrc |
|
1722 | 1723 | [paths] |
|
1723 | 1724 | default = $TESTTMP/t/t |
|
1724 | 1725 | default-push = /foo/bar/t |
|
1725 | 1726 | |
|
1726 | 1727 | $ cd $TESTTMP/t |
|
1727 | 1728 | $ hg up -qC 0 |
|
1728 | 1729 | $ echo 'bar' > bar.txt |
|
1729 | 1730 | $ hg ci -Am 'branch before subrepo add' |
|
1730 | 1731 | adding bar.txt |
|
1731 | 1732 | created new head |
|
1732 | 1733 | $ hg merge -r "first(subrepo('s'))" |
|
1733 | 1734 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1734 | 1735 | (branch merge, don't forget to commit) |
|
1735 | 1736 | $ hg status -S -X '.hgsub*' |
|
1736 | 1737 | A s/a |
|
1737 | 1738 | ? s/b |
|
1738 | 1739 | ? s/c |
|
1739 | 1740 | ? s/f1 |
|
1740 | 1741 | $ hg status -S --rev 'p2()' |
|
1741 | 1742 | A bar.txt |
|
1742 | 1743 | ? s/b |
|
1743 | 1744 | ? s/c |
|
1744 | 1745 | ? s/f1 |
|
1745 | 1746 | $ hg diff -S -X '.hgsub*' --nodates |
|
1746 | 1747 | diff -r 000000000000 s/a |
|
1747 | 1748 | --- /dev/null |
|
1748 | 1749 | +++ b/s/a |
|
1749 | 1750 | @@ -0,0 +1,1 @@ |
|
1750 | 1751 | +a |
|
1751 | 1752 | $ hg diff -S --rev 'p2()' --nodates |
|
1752 | 1753 | diff -r 7cf8cfea66e4 bar.txt |
|
1753 | 1754 | --- /dev/null |
|
1754 | 1755 | +++ b/bar.txt |
|
1755 | 1756 | @@ -0,0 +1,1 @@ |
|
1756 | 1757 | +bar |
|
1757 | 1758 | |
|
1758 | 1759 | $ cd .. |
@@ -1,228 +1,231 b'' | |||
|
1 | 1 | $ HGMERGE=true; export HGMERGE |
|
2 | 2 | |
|
3 | 3 | $ hg init r1 |
|
4 | 4 | $ cd r1 |
|
5 | 5 | $ echo a > a |
|
6 | 6 | $ hg addremove |
|
7 | 7 | adding a |
|
8 | 8 | $ hg commit -m "1" |
|
9 | 9 | |
|
10 | 10 | $ hg clone . ../r2 |
|
11 | 11 | updating to branch default |
|
12 | 12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 13 | $ cd ../r2 |
|
14 | 14 | $ hg up |
|
15 | 15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 16 | $ echo abc > a |
|
17 | 17 | $ hg diff --nodates |
|
18 | 18 | diff -r c19d34741b0a a |
|
19 | 19 | --- a/a |
|
20 | 20 | +++ b/a |
|
21 | 21 | @@ -1,1 +1,1 @@ |
|
22 | 22 | -a |
|
23 | 23 | +abc |
|
24 | 24 | |
|
25 | 25 | $ cd ../r1 |
|
26 | 26 | $ echo b > b |
|
27 | 27 | $ echo a2 > a |
|
28 | 28 | $ hg addremove |
|
29 | 29 | adding b |
|
30 | 30 | $ hg commit -m "2" |
|
31 | 31 | |
|
32 | 32 | $ cd ../r2 |
|
33 | 33 | $ hg -q pull ../r1 |
|
34 | 34 | $ hg status |
|
35 | 35 | M a |
|
36 | 36 | $ hg parents |
|
37 | 37 | changeset: 0:c19d34741b0a |
|
38 | 38 | user: test |
|
39 | 39 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
40 | 40 | summary: 1 |
|
41 | 41 | |
|
42 | 42 | $ hg --debug up |
|
43 | 43 | searching for copies back to rev 1 |
|
44 | 44 | unmatched files in other: |
|
45 | 45 | b |
|
46 | 46 | resolving manifests |
|
47 | 47 | branchmerge: False, force: False, partial: False |
|
48 | 48 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb |
|
49 | 49 | preserving a for resolve of a |
|
50 | 50 | b: remote created -> g |
|
51 | 51 | getting b |
|
52 | a: versions differ -> m | |
|
52 | a: versions differ -> m (premerge) | |
|
53 | 53 | picked tool 'true' for a (binary False symlink False) |
|
54 | 54 | merging a |
|
55 | 55 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
56 | a: versions differ -> m (merge) | |
|
56 | 57 | picked tool 'true' for a (binary False symlink False) |
|
57 | 58 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
58 | 59 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) |
|
59 | 60 | merge tool returned: 0 |
|
60 | 61 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
61 | 62 | $ hg parents |
|
62 | 63 | changeset: 1:1e71731e6fbb |
|
63 | 64 | tag: tip |
|
64 | 65 | user: test |
|
65 | 66 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
66 | 67 | summary: 2 |
|
67 | 68 | |
|
68 | 69 | $ hg --debug up 0 |
|
69 | 70 | resolving manifests |
|
70 | 71 | branchmerge: False, force: False, partial: False |
|
71 | 72 | ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a |
|
72 | 73 | preserving a for resolve of a |
|
73 | 74 | b: other deleted -> r |
|
74 | 75 | removing b |
|
75 | a: versions differ -> m | |
|
76 | a: versions differ -> m (premerge) | |
|
76 | 77 | picked tool 'true' for a (binary False symlink False) |
|
77 | 78 | merging a |
|
78 | 79 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb |
|
80 | a: versions differ -> m (merge) | |
|
79 | 81 | picked tool 'true' for a (binary False symlink False) |
|
80 | 82 | my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb |
|
81 | 83 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) |
|
82 | 84 | merge tool returned: 0 |
|
83 | 85 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved |
|
84 | 86 | $ hg parents |
|
85 | 87 | changeset: 0:c19d34741b0a |
|
86 | 88 | user: test |
|
87 | 89 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
88 | 90 | summary: 1 |
|
89 | 91 | |
|
90 | 92 | $ hg parents |
|
91 | 93 | changeset: 0:c19d34741b0a |
|
92 | 94 | user: test |
|
93 | 95 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
94 | 96 | summary: 1 |
|
95 | 97 | |
|
96 | 98 | $ hg --debug up |
|
97 | 99 | searching for copies back to rev 1 |
|
98 | 100 | unmatched files in other: |
|
99 | 101 | b |
|
100 | 102 | resolving manifests |
|
101 | 103 | branchmerge: False, force: False, partial: False |
|
102 | 104 | ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb |
|
103 | 105 | preserving a for resolve of a |
|
104 | 106 | b: remote created -> g |
|
105 | 107 | getting b |
|
106 | a: versions differ -> m | |
|
108 | a: versions differ -> m (premerge) | |
|
107 | 109 | picked tool 'true' for a (binary False symlink False) |
|
108 | 110 | merging a |
|
109 | 111 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
112 | a: versions differ -> m (merge) | |
|
110 | 113 | picked tool 'true' for a (binary False symlink False) |
|
111 | 114 | my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a |
|
112 | 115 | launching merge tool: true *$TESTTMP/r2/a* * * (glob) |
|
113 | 116 | merge tool returned: 0 |
|
114 | 117 | 1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
115 | 118 | $ hg parents |
|
116 | 119 | changeset: 1:1e71731e6fbb |
|
117 | 120 | tag: tip |
|
118 | 121 | user: test |
|
119 | 122 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
120 | 123 | summary: 2 |
|
121 | 124 | |
|
122 | 125 | $ hg -v history |
|
123 | 126 | changeset: 1:1e71731e6fbb |
|
124 | 127 | tag: tip |
|
125 | 128 | user: test |
|
126 | 129 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
127 | 130 | files: a b |
|
128 | 131 | description: |
|
129 | 132 | 2 |
|
130 | 133 | |
|
131 | 134 | |
|
132 | 135 | changeset: 0:c19d34741b0a |
|
133 | 136 | user: test |
|
134 | 137 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
135 | 138 | files: a |
|
136 | 139 | description: |
|
137 | 140 | 1 |
|
138 | 141 | |
|
139 | 142 | |
|
140 | 143 | $ hg diff --nodates |
|
141 | 144 | diff -r 1e71731e6fbb a |
|
142 | 145 | --- a/a |
|
143 | 146 | +++ b/a |
|
144 | 147 | @@ -1,1 +1,1 @@ |
|
145 | 148 | -a2 |
|
146 | 149 | +abc |
|
147 | 150 | |
|
148 | 151 | |
|
149 | 152 | create a second head |
|
150 | 153 | |
|
151 | 154 | $ cd ../r1 |
|
152 | 155 | $ hg up 0 |
|
153 | 156 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
154 | 157 | $ echo b2 > b |
|
155 | 158 | $ echo a3 > a |
|
156 | 159 | $ hg addremove |
|
157 | 160 | adding b |
|
158 | 161 | $ hg commit -m "3" |
|
159 | 162 | created new head |
|
160 | 163 | |
|
161 | 164 | $ cd ../r2 |
|
162 | 165 | $ hg -q pull ../r1 |
|
163 | 166 | $ hg status |
|
164 | 167 | M a |
|
165 | 168 | $ hg parents |
|
166 | 169 | changeset: 1:1e71731e6fbb |
|
167 | 170 | user: test |
|
168 | 171 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
169 | 172 | summary: 2 |
|
170 | 173 | |
|
171 | 174 | $ hg --debug up |
|
172 | 175 | abort: uncommitted changes |
|
173 | 176 | (commit and merge, or update --clean to discard changes) |
|
174 | 177 | [255] |
|
175 | 178 | |
|
176 | 179 | test conflicting untracked files |
|
177 | 180 | |
|
178 | 181 | $ hg up -qC 0 |
|
179 | 182 | $ echo untracked > b |
|
180 | 183 | $ hg st |
|
181 | 184 | ? b |
|
182 | 185 | $ hg up 1 |
|
183 | 186 | b: untracked file differs |
|
184 | 187 | abort: untracked files in working directory differ from files in requested revision |
|
185 | 188 | [255] |
|
186 | 189 | $ rm b |
|
187 | 190 | |
|
188 | 191 | test conflicting untracked ignored file |
|
189 | 192 | |
|
190 | 193 | $ hg up -qC 0 |
|
191 | 194 | $ echo ignored > .hgignore |
|
192 | 195 | $ hg add .hgignore |
|
193 | 196 | $ hg ci -m 'add .hgignore' |
|
194 | 197 | created new head |
|
195 | 198 | $ echo ignored > ignored |
|
196 | 199 | $ hg add ignored |
|
197 | 200 | $ hg ci -m 'add ignored file' |
|
198 | 201 | |
|
199 | 202 | $ hg up -q 'desc("add .hgignore")' |
|
200 | 203 | $ echo untracked > ignored |
|
201 | 204 | $ hg st |
|
202 | 205 | $ hg up 'desc("add ignored file")' |
|
203 | 206 | ignored: untracked file differs |
|
204 | 207 | abort: untracked files in working directory differ from files in requested revision |
|
205 | 208 | [255] |
|
206 | 209 | |
|
207 | 210 | test a local add |
|
208 | 211 | |
|
209 | 212 | $ cd .. |
|
210 | 213 | $ hg init a |
|
211 | 214 | $ hg init b |
|
212 | 215 | $ echo a > a/a |
|
213 | 216 | $ echo a > b/a |
|
214 | 217 | $ hg --cwd a commit -A -m a |
|
215 | 218 | adding a |
|
216 | 219 | $ cd b |
|
217 | 220 | $ hg add a |
|
218 | 221 | $ hg pull -u ../a |
|
219 | 222 | pulling from ../a |
|
220 | 223 | requesting all changes |
|
221 | 224 | adding changesets |
|
222 | 225 | adding manifests |
|
223 | 226 | adding file changes |
|
224 | 227 | added 1 changesets with 1 changes to 1 files |
|
225 | 228 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
226 | 229 | $ hg st |
|
227 | 230 | |
|
228 | 231 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now