Mercurial > hg
comparison mercurial/merge.py @ 26318:d3bd6cefd742
bidmerge: choose shortest list of diverge and rename/delete warnings
Slightly less arbitrary than choosing the first set.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 19 Aug 2015 14:05:42 -0500 |
parents | bca60842e22d |
children | 6b4a0c602bec |
comparison
equal
deleted
inserted
replaced
26317:07ac78ba2e37 | 26318:d3bd6cefd742 |
---|---|
594 repo.ui.note(_('\ncalculating bids for ancestor %s\n') % ancestor) | 594 repo.ui.note(_('\ncalculating bids for ancestor %s\n') % ancestor) |
595 actions, diverge1, renamedelete1 = manifestmerge( | 595 actions, diverge1, renamedelete1 = manifestmerge( |
596 repo, wctx, mctx, ancestor, branchmerge, force, partial, | 596 repo, wctx, mctx, ancestor, branchmerge, force, partial, |
597 acceptremote, followcopies) | 597 acceptremote, followcopies) |
598 _checkunknownfiles(repo, wctx, mctx, force, actions) | 598 _checkunknownfiles(repo, wctx, mctx, force, actions) |
599 if diverge is None: # and renamedelete is None. | 599 |
600 # Arbitrarily pick warnings from first iteration | 600 # Track the shortest set of warning on the theory that bid |
601 # merge will correctly incorporate more information | |
602 if diverge is None or len(diverge1) < len(diverge): | |
601 diverge = diverge1 | 603 diverge = diverge1 |
604 if renamedelete is None or len(renamedelete) < len(renamedelete1): | |
602 renamedelete = renamedelete1 | 605 renamedelete = renamedelete1 |
606 | |
603 for f, a in sorted(actions.iteritems()): | 607 for f, a in sorted(actions.iteritems()): |
604 m, args, msg = a | 608 m, args, msg = a |
605 repo.ui.debug(' %s: %s -> %s\n' % (f, msg, m)) | 609 repo.ui.debug(' %s: %s -> %s\n' % (f, msg, m)) |
606 if f in fbids: | 610 if f in fbids: |
607 d = fbids[f] | 611 d = fbids[f] |