366 |
366 |
367 for action in actions: |
367 for action in actions: |
368 if overwrite: |
368 if overwrite: |
369 processed.append(action) |
369 processed.append(action) |
370 continue |
370 continue |
371 f, m = action[:2] |
371 f, m, args = action |
372 |
372 |
373 choices = (_('&Largefile'), _('&Normal file')) |
373 choices = (_('&Largefile'), _('&Normal file')) |
374 if m == "g" and lfutil.splitstandin(f) in p1 and f in p2: |
374 if m == "g" and lfutil.splitstandin(f) in p1 and f in p2: |
375 # Case 1: normal file in the working copy, largefile in |
375 # Case 1: normal file in the working copy, largefile in |
376 # the second parent |
376 # the second parent |
377 lfile = lfutil.splitstandin(f) |
377 lfile = lfutil.splitstandin(f) |
378 standin = f |
378 standin = f |
379 msg = _('%s has been turned into a largefile\n' |
379 msg = _('%s has been turned into a largefile\n' |
380 'use (l)argefile or keep as (n)ormal file?') % lfile |
380 'use (l)argefile or keep as (n)ormal file?') % lfile |
381 if repo.ui.promptchoice(msg, choices, 0) == 0: |
381 if repo.ui.promptchoice(msg, choices, 0) == 0: |
382 processed.append((lfile, "r")) |
382 processed.append((lfile, "r", None)) |
383 processed.append((standin, "g", p2.flags(standin))) |
383 processed.append((standin, "g", (p2.flags(standin),))) |
384 else: |
384 else: |
385 processed.append((standin, "r")) |
385 processed.append((standin, "r", None)) |
386 elif m == "g" and lfutil.standin(f) in p1 and f in p2: |
386 elif m == "g" and lfutil.standin(f) in p1 and f in p2: |
387 # Case 2: largefile in the working copy, normal file in |
387 # Case 2: largefile in the working copy, normal file in |
388 # the second parent |
388 # the second parent |
389 standin = lfutil.standin(f) |
389 standin = lfutil.standin(f) |
390 lfile = f |
390 lfile = f |
391 msg = _('%s has been turned into a normal file\n' |
391 msg = _('%s has been turned into a normal file\n' |
392 'keep as (l)argefile or use (n)ormal file?') % lfile |
392 'keep as (l)argefile or use (n)ormal file?') % lfile |
393 if repo.ui.promptchoice(msg, choices, 0) == 0: |
393 if repo.ui.promptchoice(msg, choices, 0) == 0: |
394 processed.append((lfile, "r")) |
394 processed.append((lfile, "r", None)) |
395 else: |
395 else: |
396 processed.append((standin, "r")) |
396 processed.append((standin, "r", None)) |
397 processed.append((lfile, "g", p2.flags(lfile))) |
397 processed.append((lfile, "g", (p2.flags(lfile),))) |
398 else: |
398 else: |
399 processed.append(action) |
399 processed.append(action) |
400 |
400 |
401 return processed |
401 return processed |
402 |
402 |