Show More
@@ -426,22 +426,24 b' def overridecalculateupdates(origfn, rep' | |||
|
426 | 426 | return actions, diverge, renamedelete |
|
427 | 427 | |
|
428 | 428 | # Convert to dictionary with filename as key and action as value. |
|
429 | lfiles = set() | |
|
429 | 430 | actionbyfile = {} |
|
430 | 431 | for m, l in actions.iteritems(): |
|
431 | 432 | for f, args, msg in l: |
|
432 | 433 | actionbyfile[f] = m, args, msg |
|
433 | ||
|
434 | removes = set(a[0] for a in actions['r']) | |
|
434 | splitstandin = f and lfutil.splitstandin(f) | |
|
435 | if splitstandin in p1: | |
|
436 | lfiles.add(splitstandin) | |
|
437 | elif lfutil.standin(f) in p1: | |
|
438 | lfiles.add(f) | |
|
435 | 439 | |
|
436 | for action in actions['g']: | |
|
437 | f, args, msg = action | |
|
438 | splitstandin = f and lfutil.splitstandin(f) | |
|
439 | if (splitstandin is not None and | |
|
440 | splitstandin in p1 and splitstandin not in removes): | |
|
440 | for lfile in lfiles: | |
|
441 | standin = lfutil.standin(lfile) | |
|
442 | lm = actionbyfile.get(lfile, (None, None, None))[0] | |
|
443 | sm = actionbyfile.get(standin, (None, None, None))[0] | |
|
444 | if sm == 'g' and lm != 'r': | |
|
441 | 445 | # Case 1: normal file in the working copy, largefile in |
|
442 | 446 | # the second parent |
|
443 | lfile = splitstandin | |
|
444 | standin = f | |
|
445 | 447 | usermsg = _('remote turned local normal file %s into a largefile\n' |
|
446 | 448 | 'use (l)argefile or keep (n)ormal file?' |
|
447 | 449 | '$$ &Largefile $$ &Normal file') % lfile |
@@ -454,11 +456,9 b' def overridecalculateupdates(origfn, rep' | |||
|
454 | 456 | else: |
|
455 | 457 | actionbyfile[standin] = ('r', None, |
|
456 | 458 | 'replaced by non-standin') |
|
457 | elif lfutil.standin(f) in p1 and lfutil.standin(f) not in removes: | |
|
459 | elif lm == 'g' and sm != 'r': | |
|
458 | 460 | # Case 2: largefile in the working copy, normal file in |
|
459 | 461 | # the second parent |
|
460 | standin = lfutil.standin(f) | |
|
461 | lfile = f | |
|
462 | 462 | usermsg = _('remote turned local largefile %s into a normal file\n' |
|
463 | 463 | 'keep (l)argefile or use (n)ormal file?' |
|
464 | 464 | '$$ &Largefile $$ &Normal file') % lfile |
General Comments 0
You need to be logged in to leave comments.
Login now