Show More
@@ -440,9 +440,9 b' def overridecalculateupdates(origfn, rep' | |||
|
440 | 440 | |
|
441 | 441 | for lfile in lfiles: |
|
442 | 442 | standin = lfutil.standin(lfile) |
|
443 |
lm = actionbyfile.get(lfile, (None, None, None)) |
|
|
444 |
sm = actionbyfile.get(standin, (None, None, None)) |
|
|
445 |
if sm |
|
|
443 | (lm, largs, lmsg) = actionbyfile.get(lfile, (None, None, None)) | |
|
444 | (sm, sargs, smsg) = actionbyfile.get(standin, (None, None, None)) | |
|
445 | if sm in ('g', 'dc') and lm != 'r': | |
|
446 | 446 | # Case 1: normal file in the working copy, largefile in |
|
447 | 447 | # the second parent |
|
448 | 448 | usermsg = _('remote turned local normal file %s into a largefile\n' |
@@ -450,14 +450,16 b' def overridecalculateupdates(origfn, rep' | |||
|
450 | 450 | '$$ &Largefile $$ &Normal file') % lfile |
|
451 | 451 | if repo.ui.promptchoice(usermsg, 0) == 0: # pick remote largefile |
|
452 | 452 | actionbyfile[lfile] = ('r', None, 'replaced by standin') |
|
453 | actionbyfile[standin] = ('g', sargs, 'replaces standin') | |
|
453 | 454 | else: # keep local normal file |
|
455 | actionbyfile[lfile] = ('k', None, 'replaces standin') | |
|
454 | 456 | if branchmerge: |
|
455 | 457 | actionbyfile[standin] = ('k', None, |
|
456 | 458 | 'replaced by non-standin') |
|
457 | 459 | else: |
|
458 | 460 | actionbyfile[standin] = ('r', None, |
|
459 | 461 | 'replaced by non-standin') |
|
460 |
elif lm |
|
|
462 | elif lm in ('g', 'dc') and sm != 'r': | |
|
461 | 463 | # Case 2: largefile in the working copy, normal file in |
|
462 | 464 | # the second parent |
|
463 | 465 | usermsg = _('remote turned local largefile %s into a normal file\n' |
@@ -467,6 +469,7 b' def overridecalculateupdates(origfn, rep' | |||
|
467 | 469 | if branchmerge: |
|
468 | 470 | # largefile can be restored from standin safely |
|
469 | 471 | actionbyfile[lfile] = ('k', None, 'replaced by standin') |
|
472 | actionbyfile[standin] = ('k', None, 'replaces standin') | |
|
470 | 473 | else: |
|
471 | 474 | # "lfile" should be marked as "removed" without |
|
472 | 475 | # removal of itself |
@@ -476,6 +479,7 b' def overridecalculateupdates(origfn, rep' | |||
|
476 | 479 | # linear-merge should treat this largefile as 're-added' |
|
477 | 480 | actionbyfile[standin] = ('a', None, 'keep standin') |
|
478 | 481 | else: # pick remote normal file |
|
482 | actionbyfile[lfile] = ('g', largs, 'replaces standin') | |
|
479 | 483 | actionbyfile[standin] = ('r', None, 'replaced by non-standin') |
|
480 | 484 | |
|
481 | 485 | # Convert back to dictionary-of-lists format |
@@ -640,26 +640,6 b' def calculateupdates(repo, wctx, mctx, a' | |||
|
640 | 640 | |
|
641 | 641 | _resolvetrivial(repo, wctx, mctx, ancestors[0], actions) |
|
642 | 642 | |
|
643 | # Prompt and create actions. TODO: Move this towards resolve phase. | |
|
644 | for f, args, msg in sorted(actions['cd']): | |
|
645 | if repo.ui.promptchoice( | |
|
646 | _("local changed %s which remote deleted\n" | |
|
647 | "use (c)hanged version or (d)elete?" | |
|
648 | "$$ &Changed $$ &Delete") % f, 0): | |
|
649 | actions['r'].append((f, None, "prompt delete")) | |
|
650 | else: | |
|
651 | actions['a'].append((f, None, "prompt keep")) | |
|
652 | del actions['cd'][:] | |
|
653 | ||
|
654 | for f, args, msg in sorted(actions['dc']): | |
|
655 | flags, = args | |
|
656 | if repo.ui.promptchoice( | |
|
657 | _("remote changed %s which local deleted\n" | |
|
658 | "use (c)hanged version or leave (d)eleted?" | |
|
659 | "$$ &Changed $$ &Deleted") % f, 0) == 0: | |
|
660 | actions['g'].append((f, (flags,), "prompt recreating")) | |
|
661 | del actions['dc'][:] | |
|
662 | ||
|
663 | 643 | if wctx.rev() is None: |
|
664 | 644 | ractions, factions = _forgetremoved(wctx, mctx, branchmerge) |
|
665 | 645 | actions['r'].extend(ractions) |
@@ -1111,6 +1091,26 b' def update(repo, node, branchmerge, forc' | |||
|
1111 | 1091 | repo, wc, p2, pas, branchmerge, force, partial, mergeancestor, |
|
1112 | 1092 | followcopies) |
|
1113 | 1093 | |
|
1094 | # Prompt and create actions. TODO: Move this towards resolve phase. | |
|
1095 | for f, args, msg in sorted(actions['cd']): | |
|
1096 | if repo.ui.promptchoice( | |
|
1097 | _("local changed %s which remote deleted\n" | |
|
1098 | "use (c)hanged version or (d)elete?" | |
|
1099 | "$$ &Changed $$ &Delete") % f, 0): | |
|
1100 | actions['r'].append((f, None, "prompt delete")) | |
|
1101 | else: | |
|
1102 | actions['a'].append((f, None, "prompt keep")) | |
|
1103 | del actions['cd'][:] | |
|
1104 | ||
|
1105 | for f, args, msg in sorted(actions['dc']): | |
|
1106 | flags, = args | |
|
1107 | if repo.ui.promptchoice( | |
|
1108 | _("remote changed %s which local deleted\n" | |
|
1109 | "use (c)hanged version or leave (d)eleted?" | |
|
1110 | "$$ &Changed $$ &Deleted") % f, 0) == 0: | |
|
1111 | actions['g'].append((f, (flags,), "prompt recreating")) | |
|
1112 | del actions['dc'][:] | |
|
1113 | ||
|
1114 | 1114 | ### apply phase |
|
1115 | 1115 | if not branchmerge: # just jump to the new rev |
|
1116 | 1116 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' |
@@ -283,8 +283,6 b' Ancestor: normal Parent: normal2 Paren' | |||
|
283 | 283 | |
|
284 | 284 | $ hg up -Cqr normal2 |
|
285 | 285 | $ hg merge -r large |
|
286 | local changed f which remote deleted | |
|
287 | use (c)hanged version or (d)elete? c | |
|
288 | 286 | remote turned local normal file f into a largefile |
|
289 | 287 | use (l)argefile or keep (n)ormal file? l |
|
290 | 288 | getting changed largefiles |
@@ -295,9 +293,7 b' Ancestor: normal Parent: normal2 Paren' | |||
|
295 | 293 | large |
|
296 | 294 | |
|
297 | 295 | $ hg up -Cqr normal2 |
|
298 |
$ |
|
|
299 | local changed f which remote deleted | |
|
300 | use (c)hanged version or (d)elete? c | |
|
296 | $ echo n | hg merge -r large --config ui.interactive=Yes | |
|
301 | 297 | remote turned local normal file f into a largefile |
|
302 | 298 | use (l)argefile or keep (n)ormal file? n |
|
303 | 299 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -305,23 +301,10 b' Ancestor: normal Parent: normal2 Paren' | |||
|
305 | 301 | $ cat f |
|
306 | 302 | normal2 |
|
307 | 303 | |
|
308 | $ hg up -Cqr normal2 | |
|
309 | $ echo d | hg merge -r large --config ui.interactive=Yes | |
|
310 | local changed f which remote deleted | |
|
311 | use (c)hanged version or (d)elete? d | |
|
312 | getting changed largefiles | |
|
313 | 1 largefiles updated, 0 removed | |
|
314 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
315 | (branch merge, don't forget to commit) | |
|
316 | $ cat f | |
|
317 | large | |
|
318 | ||
|
319 | 304 |
|
|
320 | 305 | |
|
321 | 306 | $ hg up -Cqr large |
|
322 | 307 | $ hg merge -r normal2 |
|
323 | remote changed f which local deleted | |
|
324 | use (c)hanged version or leave (d)eleted? c | |
|
325 | 308 | remote turned local largefile f into a normal file |
|
326 | 309 | keep (l)argefile or use (n)ormal file? l |
|
327 | 310 | getting changed largefiles |
@@ -332,9 +315,7 b' swap' | |||
|
332 | 315 | large |
|
333 | 316 | |
|
334 | 317 | $ hg up -Cqr large |
|
335 |
$ |
|
|
336 | remote changed f which local deleted | |
|
337 | use (c)hanged version or leave (d)eleted? c | |
|
318 | $ echo n | hg merge -r normal2 --config ui.interactive=Yes | |
|
338 | 319 | remote turned local largefile f into a normal file |
|
339 | 320 | keep (l)argefile or use (n)ormal file? n |
|
340 | 321 | getting changed largefiles |
@@ -344,17 +325,6 b' swap' | |||
|
344 | 325 | $ cat f |
|
345 | 326 | normal2 |
|
346 | 327 | |
|
347 | $ hg up -Cqr large | |
|
348 | $ echo d | hg merge -r normal2 --config ui.interactive=Yes | |
|
349 | remote changed f which local deleted | |
|
350 | use (c)hanged version or leave (d)eleted? d | |
|
351 | getting changed largefiles | |
|
352 | 0 largefiles updated, 0 removed | |
|
353 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
354 | (branch merge, don't forget to commit) | |
|
355 | $ cat f | |
|
356 | large | |
|
357 | ||
|
358 | 328 | Ancestor: large Parent: large-id Parent: normal result: normal |
|
359 | 329 | |
|
360 | 330 | $ hg up -Cqr large-id |
@@ -400,8 +370,6 b' Ancestor: large Parent: large2 Paren' | |||
|
400 | 370 | |
|
401 | 371 | $ hg up -Cqr large2 |
|
402 | 372 | $ hg merge -r normal |
|
403 | local changed .hglf/f which remote deleted | |
|
404 | use (c)hanged version or (d)elete? c | |
|
405 | 373 | remote turned local largefile f into a normal file |
|
406 | 374 | keep (l)argefile or use (n)ormal file? l |
|
407 | 375 | getting changed largefiles |
@@ -412,9 +380,9 b' Ancestor: large Parent: large2 Paren' | |||
|
412 | 380 | large2 |
|
413 | 381 | |
|
414 | 382 | $ hg up -Cqr large2 |
|
415 |
$ echo |
|
|
416 | local changed .hglf/f which remote deleted | |
|
417 | use (c)hanged version or (d)elete? d | |
|
383 | $ echo n | hg merge -r normal --config ui.interactive=Yes | |
|
384 | remote turned local largefile f into a normal file | |
|
385 | keep (l)argefile or use (n)ormal file? n | |
|
418 | 386 | getting changed largefiles |
|
419 | 387 | 0 largefiles updated, 0 removed |
|
420 | 388 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
@@ -426,8 +394,6 b' swap' | |||
|
426 | 394 | |
|
427 | 395 | $ hg up -Cqr normal |
|
428 | 396 | $ hg merge -r large2 |
|
429 | remote changed .hglf/f which local deleted | |
|
430 | use (c)hanged version or leave (d)eleted? c | |
|
431 | 397 | remote turned local normal file f into a largefile |
|
432 | 398 | use (l)argefile or keep (n)ormal file? l |
|
433 | 399 | getting changed largefiles |
@@ -438,9 +404,9 b' swap' | |||
|
438 | 404 | large2 |
|
439 | 405 | |
|
440 | 406 | $ hg up -Cqr normal |
|
441 |
$ echo |
|
|
442 | remote changed .hglf/f which local deleted | |
|
443 | use (c)hanged version or leave (d)eleted? d | |
|
407 | $ echo n | hg merge -r large2 --config ui.interactive=Yes | |
|
408 | remote turned local normal file f into a largefile | |
|
409 | use (l)argefile or keep (n)ormal file? n | |
|
444 | 410 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
445 | 411 | (branch merge, don't forget to commit) |
|
446 | 412 | $ cat f |
@@ -320,8 +320,6 b' Test a linear merge to a revision contai' | |||
|
320 | 320 | $ hg update -q -C 2 |
|
321 | 321 | $ echo 'modified large2 for linear merge' > large2 |
|
322 | 322 | $ hg update -q 5 |
|
323 | local changed .hglf/large2 which remote deleted | |
|
324 | use (c)hanged version or (d)elete? c | |
|
325 | 323 | remote turned local largefile large2 into a normal file |
|
326 | 324 | keep (l)argefile or use (n)ormal file? l |
|
327 | 325 | $ hg debugdirstate --nodates | grep large2 |
@@ -368,8 +366,6 b' Test that the internal linear merging wo' | |||
|
368 | 366 | adding manifests |
|
369 | 367 | adding file changes |
|
370 | 368 | added 3 changesets with 5 changes to 5 files |
|
371 | local changed .hglf/large2 which remote deleted | |
|
372 | use (c)hanged version or (d)elete? c | |
|
373 | 369 | remote turned local largefile large2 into a normal file |
|
374 | 370 | keep (l)argefile or use (n)ormal file? l |
|
375 | 371 | largefile large1 has a merge conflict |
@@ -403,8 +399,6 b' Test that the internal linear merging wo' | |||
|
403 | 399 | adding manifests |
|
404 | 400 | adding file changes |
|
405 | 401 | added 3 changesets with 5 changes to 5 files |
|
406 | local changed .hglf/large2 which remote deleted | |
|
407 | use (c)hanged version or (d)elete? c | |
|
408 | 402 | remote turned local largefile large2 into a normal file |
|
409 | 403 | keep (l)argefile or use (n)ormal file? l |
|
410 | 404 | largefile large1 has a merge conflict |
@@ -451,7 +445,6 b' Test that the internal linear merging wo' | |||
|
451 | 445 | $ hg update --config ui.interactive=True --config debug.dirstate.delaywrite=2 <<EOF |
|
452 | 446 | > m |
|
453 | 447 | > r |
|
454 | > c | |
|
455 | 448 | > l |
|
456 | 449 | > l |
|
457 | 450 | > EOF |
@@ -459,8 +452,6 b' Test that the internal linear merging wo' | |||
|
459 | 452 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
460 | 453 | subrepository sources for sub differ (in checked out version) |
|
461 | 454 | use (l)ocal source (f74e50bd9e55) or (r)emote source (d65e59e952a9)? r |
|
462 | local changed .hglf/large2 which remote deleted | |
|
463 | use (c)hanged version or (d)elete? c | |
|
464 | 455 | remote turned local largefile large2 into a normal file |
|
465 | 456 | keep (l)argefile or use (n)ormal file? l |
|
466 | 457 | largefile large1 has a merge conflict |
General Comments 0
You need to be logged in to leave comments.
Login now