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