Mercurial > hg
changeset 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 | 07ac78ba2e37 |
children | 4b9bb1616195 |
files | mercurial/merge.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Wed Aug 19 14:04:54 2015 -0500 +++ b/mercurial/merge.py Wed Aug 19 14:05:42 2015 -0500 @@ -596,10 +596,14 @@ repo, wctx, mctx, ancestor, branchmerge, force, partial, acceptremote, followcopies) _checkunknownfiles(repo, wctx, mctx, force, actions) - if diverge is None: # and renamedelete is None. - # Arbitrarily pick warnings from first iteration + + # Track the shortest set of warning on the theory that bid + # merge will correctly incorporate more information + if diverge is None or len(diverge1) < len(diverge): diverge = diverge1 + if renamedelete is None or len(renamedelete) < len(renamedelete1): renamedelete = renamedelete1 + for f, a in sorted(actions.iteritems()): m, args, msg = a repo.ui.debug(' %s: %s -> %s\n' % (f, msg, m))