Show More
@@ -438,10 +438,18 def overridecalculateupdates(origfn, rep | |||
|
438 | 438 | msg = _('remote turned local normal file %s into a largefile\n' |
|
439 | 439 | 'use (l)argefile or keep (n)ormal file?' |
|
440 | 440 | '$$ &Largefile $$ &Normal file') % lfile |
|
441 | if repo.ui.promptchoice(msg, 0) == 0: | |
|
441 | if (# local has unchanged normal file, pick remote largefile | |
|
442 | pas and lfile in pas[0] and | |
|
443 | not pas[0][lfile].cmp(p1[lfile]) or | |
|
444 | # if remote has unchanged largefile, pick local normal file | |
|
445 | not (pas and standin in pas[0] and | |
|
446 | not pas[0][standin].cmp(p2[standin])) and | |
|
447 | # else, prompt | |
|
448 | repo.ui.promptchoice(msg, 0) == 0 | |
|
449 | ): # pick remote largefile | |
|
442 | 450 | actions['r'].append((lfile, None, msg)) |
|
443 | 451 | newglist.append((standin, (p2.flags(standin),), msg)) |
|
444 | else: | |
|
452 | else: # keep local normal file | |
|
445 | 453 | actions['r'].append((standin, None, msg)) |
|
446 | 454 | elif lfutil.standin(f) in p1 and lfutil.standin(f) not in removes: |
|
447 | 455 | # Case 2: largefile in the working copy, normal file in |
@@ -451,7 +459,15 def overridecalculateupdates(origfn, rep | |||
|
451 | 459 | msg = _('remote turned local largefile %s into a normal file\n' |
|
452 | 460 | 'keep (l)argefile or use (n)ormal file?' |
|
453 | 461 | '$$ &Largefile $$ &Normal file') % lfile |
|
454 | if repo.ui.promptchoice(msg, 0) == 0: | |
|
462 | if (# if remote has unchanged normal file, pick local largefile | |
|
463 | pas and f in pas[0] and | |
|
464 | not pas[0][f].cmp(p2[f]) or | |
|
465 | # if local has unchanged largefile, pick remote normal file | |
|
466 | not (pas and standin in pas[0] and | |
|
467 | not pas[0][standin].cmp(p1[standin])) and | |
|
468 | # else, prompt | |
|
469 | repo.ui.promptchoice(msg, 0) == 0 | |
|
470 | ): # keep local largefile | |
|
455 | 471 | if branchmerge: |
|
456 | 472 | # largefile can be restored from standin safely |
|
457 | 473 | actions['r'].append((lfile, None, msg)) |
@@ -462,7 +478,7 def overridecalculateupdates(origfn, rep | |||
|
462 | 478 | |
|
463 | 479 | # linear-merge should treat this largefile as 're-added' |
|
464 | 480 | actions['a'].append((standin, None, msg)) |
|
465 | else: | |
|
481 | else: # pick remote normal file | |
|
466 | 482 | actions['r'].append((standin, None, msg)) |
|
467 | 483 | newglist.append((lfile, (p2.flags(lfile),), msg)) |
|
468 | 484 | else: |
@@ -264,8 +264,6 Ancestor: normal Parent: normal-same P | |||
|
264 | 264 | $ hg merge -r large |
|
265 | 265 | local changed f which remote deleted |
|
266 | 266 | use (c)hanged version or (d)elete? c |
|
267 | remote turned local normal file f into a largefile | |
|
268 | use (l)argefile or keep (n)ormal file? l | |
|
269 | 267 | getting changed largefiles |
|
270 | 268 | 1 largefiles updated, 0 removed |
|
271 | 269 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
@@ -279,8 +277,6 swap | |||
|
279 | 277 | $ hg merge -r normal-same |
|
280 | 278 | remote changed f which local deleted |
|
281 | 279 | use (c)hanged version or leave (d)eleted? c |
|
282 | remote turned local largefile f into a normal file | |
|
283 | keep (l)argefile or use (n)ormal file? l | |
|
284 | 280 | getting changed largefiles |
|
285 | 281 | 1 largefiles updated, 0 removed |
|
286 | 282 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
@@ -393,14 +389,12 Ancestor: large Parent: large-same P | |||
|
393 | 389 | $ hg merge -r normal |
|
394 | 390 | local changed .hglf/f which remote deleted |
|
395 | 391 | use (c)hanged version or (d)elete? c |
|
396 | remote turned local largefile f into a normal file | |
|
397 | keep (l)argefile or use (n)ormal file? l | |
|
398 | 392 | getting changed largefiles |
|
399 |
|
|
|
400 |
|
|
|
393 | 0 largefiles updated, 0 removed | |
|
394 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
401 | 395 | (branch merge, don't forget to commit) |
|
402 | 396 | $ cat f |
|
403 | large | |
|
397 | normal | |
|
404 | 398 | |
|
405 | 399 | swap |
|
406 | 400 | |
@@ -408,14 +402,12 swap | |||
|
408 | 402 | $ hg merge -r large-same |
|
409 | 403 | remote changed .hglf/f which local deleted |
|
410 | 404 | use (c)hanged version or leave (d)eleted? c |
|
411 | remote turned local normal file f into a largefile | |
|
412 | use (l)argefile or keep (n)ormal file? l | |
|
413 | 405 | getting changed largefiles |
|
414 |
|
|
|
415 |
|
|
|
406 | 0 largefiles updated, 0 removed | |
|
407 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
416 | 408 | (branch merge, don't forget to commit) |
|
417 | 409 | $ cat f |
|
418 | large | |
|
410 | normal | |
|
419 | 411 | |
|
420 | 412 | Ancestor: large Parent: large2 Parent: normal result: ? |
|
421 | 413 | (annoying extra prompt ... but it do not do any serious harm) |
General Comments 0
You need to be logged in to leave comments.
Login now