##// END OF EJS Templates
merge: let _resolvetrivial() work on the file->action dict...
Martin von Zweigbergk -
r23639:35c72490 default
parent child Browse files
Show More
@@ -531,25 +531,13 b' def _resolvetrivial(repo, wctx, mctx, an'
531 """Resolves false conflicts where the nodeid changed but the content
531 """Resolves false conflicts where the nodeid changed but the content
532 remained the same."""
532 remained the same."""
533
533
534 cdactions = []
534 for f, (m, args, msg) in actions.items():
535 for action in actions['cd']:
535 if m == 'cd' and f in ancestor and not wctx[f].cmp(ancestor[f]):
536 f = action[0]
537 if f in ancestor and not wctx[f].cmp(ancestor[f]):
538 # local did change but ended up with same content
536 # local did change but ended up with same content
539 actions['r'].append((f, None, "prompt same"))
537 actions[f] = 'r', None, "prompt same"
540 else:
538 elif m == 'dc' and f in ancestor and not mctx[f].cmp(ancestor[f]):
541 cdactions.append(action)
542 actions['cd'] = cdactions
543
544 dcactions = []
545 for action in actions['dc']:
546 f = action[0]
547 if f in ancestor and not mctx[f].cmp(ancestor[f]):
548 # remote did change but ended up with same content
539 # remote did change but ended up with same content
549 pass # don't get = keep local deleted
540 del actions[f] # don't get = keep local deleted
550 else:
551 dcactions.append(action)
552 actions['dc'] = dcactions
553
541
554 def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, partial,
542 def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, partial,
555 acceptremote, followcopies):
543 acceptremote, followcopies):
@@ -627,14 +615,14 b' def calculateupdates(repo, wctx, mctx, a'
627 continue
615 continue
628 repo.ui.note(_('end of auction\n\n'))
616 repo.ui.note(_('end of auction\n\n'))
629
617
618 _resolvetrivial(repo, wctx, mctx, ancestors[0], actions)
619
630 # Convert to dictionary-of-lists format
620 # Convert to dictionary-of-lists format
631 actionbyfile = actions
621 actionbyfile = actions
632 actions = dict((m, []) for m in 'a f g cd dc r dm dg m e k'.split())
622 actions = dict((m, []) for m in 'a f g cd dc r dm dg m e k'.split())
633 for f, (m, args, msg) in actionbyfile.iteritems():
623 for f, (m, args, msg) in actionbyfile.iteritems():
634 actions[m].append((f, args, msg))
624 actions[m].append((f, args, msg))
635
625
636 _resolvetrivial(repo, wctx, mctx, ancestors[0], actions)
637
638 if wctx.rev() is None:
626 if wctx.rev() is None:
639 ractions, factions = _forgetremoved(wctx, mctx, branchmerge)
627 ractions, factions = _forgetremoved(wctx, mctx, branchmerge)
640 actions['r'].extend(ractions)
628 actions['r'].extend(ractions)
General Comments 0
You need to be logged in to leave comments. Login now