##// END OF EJS Templates
merge: add a new 'backup' argument to get actions...
Siddharth Agarwal -
r27655:af13eaf9 default
parent child Browse files
Show More
@@ -483,7 +483,7 def overridecalculateupdates(origfn, rep
483 if sm in ('g', 'dc') and lm != 'r':
483 if sm in ('g', 'dc') and lm != 'r':
484 if sm == 'dc':
484 if sm == 'dc':
485 f1, f2, fa, move, anc = sargs
485 f1, f2, fa, move, anc = sargs
486 sargs = (p2[f2].flags(),)
486 sargs = (p2[f2].flags(), False)
487 # Case 1: normal file in the working copy, largefile in
487 # Case 1: normal file in the working copy, largefile in
488 # the second parent
488 # the second parent
489 usermsg = _('remote turned local normal file %s into a largefile\n'
489 usermsg = _('remote turned local normal file %s into a largefile\n'
@@ -501,7 +501,7 def overridecalculateupdates(origfn, rep
501 elif lm in ('g', 'dc') and sm != 'r':
501 elif lm in ('g', 'dc') and sm != 'r':
502 if lm == 'dc':
502 if lm == 'dc':
503 f1, f2, fa, move, anc = largs
503 f1, f2, fa, move, anc = largs
504 largs = (p2[f2].flags(),)
504 largs = (p2[f2].flags(), False)
505 # Case 2: largefile in the working copy, normal file in
505 # Case 2: largefile in the working copy, normal file in
506 # the second parent
506 # the second parent
507 usermsg = _('remote turned local largefile %s into a normal file\n'
507 usermsg = _('remote turned local largefile %s into a normal file\n'
@@ -588,7 +588,8 def _checkunknownfiles(repo, wctx, mctx,
588
588
589 for f, (m, args, msg) in actions.iteritems():
589 for f, (m, args, msg) in actions.iteritems():
590 if m == 'c':
590 if m == 'c':
591 actions[f] = ('g', args, msg)
591 flags, = args
592 actions[f] = ('g', (flags, False), msg)
592 elif m == 'cm':
593 elif m == 'cm':
593 fl2, anc = args
594 fl2, anc = args
594 different = _checkunknownfile(repo, wctx, mctx, f)
595 different = _checkunknownfile(repo, wctx, mctx, f)
@@ -596,7 +597,7 def _checkunknownfiles(repo, wctx, mctx,
596 actions[f] = ('m', (f, f, None, False, anc),
597 actions[f] = ('m', (f, f, None, False, anc),
597 "remote differs from untracked local")
598 "remote differs from untracked local")
598 else:
599 else:
599 actions[f] = ('g', (fl2,), "remote created")
600 actions[f] = ('g', (fl2, False), "remote created")
600
601
601 def _forgetremoved(wctx, mctx, branchmerge):
602 def _forgetremoved(wctx, mctx, branchmerge):
602 """
603 """
@@ -748,11 +749,11 def manifestmerge(repo, wctx, p2, pa, br
748 if n1 == n2: # optimization: keep local content
749 if n1 == n2: # optimization: keep local content
749 actions[f] = ('e', (fl2,), "update permissions")
750 actions[f] = ('e', (fl2,), "update permissions")
750 else:
751 else:
751 actions[f] = ('g', (fl2,), "remote is newer")
752 actions[f] = ('g', (fl2, False), "remote is newer")
752 elif nol and n2 == a: # remote only changed 'x'
753 elif nol and n2 == a: # remote only changed 'x'
753 actions[f] = ('e', (fl2,), "update permissions")
754 actions[f] = ('e', (fl2,), "update permissions")
754 elif nol and n1 == a: # local only changed 'x'
755 elif nol and n1 == a: # local only changed 'x'
755 actions[f] = ('g', (fl1,), "remote is newer")
756 actions[f] = ('g', (fl1, False), "remote is newer")
756 else: # both changed something
757 else: # both changed something
757 actions[f] = ('m', (f, f, f, False, pa.node()),
758 actions[f] = ('m', (f, f, f, False, pa.node()),
758 "versions differ")
759 "versions differ")
@@ -1459,7 +1460,7 def update(repo, node, branchmerge, forc
1459 _("remote changed %s which local deleted\n"
1460 _("remote changed %s which local deleted\n"
1460 "use (c)hanged version or leave (d)eleted?"
1461 "use (c)hanged version or leave (d)eleted?"
1461 "$$ &Changed $$ &Deleted") % f, 0) == 0:
1462 "$$ &Changed $$ &Deleted") % f, 0) == 0:
1462 actions['g'].append((f, (flags,), "prompt recreating"))
1463 actions['g'].append((f, (flags, False), "prompt recreating"))
1463
1464
1464 # divergent renames
1465 # divergent renames
1465 for f, fl in sorted(diverge.iteritems()):
1466 for f, fl in sorted(diverge.iteritems()):
General Comments 0
You need to be logged in to leave comments. Login now