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