Mercurial > hg
changeset 3371:8c36b33a27c7
merge: turn followcopies on by default
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 12 Oct 2006 14:49:19 -0500 |
parents | b7fe334ff4fb |
children | ba7c74081861 fef022f9a238 |
files | mercurial/merge.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Oct 12 12:15:56 2006 -0700 +++ b/mercurial/merge.py Thu Oct 12 14:49:19 2006 -0500 @@ -87,12 +87,12 @@ return action -def nonoverlap(d1, d2): - "Return list of elements in d1 not in d2" +def nonoverlap(d1, d2, d3): + "Return list of elements in d1 not in d2 or d3" l = [] for d in d1: - if d not in d2: + if d not in d3 and d not in d2: l.append(d) l.sort() @@ -116,12 +116,12 @@ old.sort() return old -def findcopies(repo, m1, m2, limit): +def findcopies(repo, m1, m2, ma, limit): """ Find moves and copies between m1 and m2 back to limit linkrev """ - if not repo.ui.config("merge", "followcopies"): + if not repo.ui.configbool("merge", "followcopies", True): return {} # avoid silly behavior for update from empty dir @@ -131,8 +131,8 @@ dcopies = repo.dirstate.copies() copy = {} match = {} - u1 = nonoverlap(m1, m2) - u2 = nonoverlap(m2, m1) + u1 = nonoverlap(m1, m2, ma) + u2 = nonoverlap(m2, m1, ma) ctx = util.cachefunc(lambda f,n: repo.filectx(f, fileid=n[:20])) def checkpair(c, f2, man): @@ -194,7 +194,7 @@ action.append((f, m) + args) if not (backwards or overwrite): - copy = findcopies(repo, m1, m2, pa.rev()) + copy = findcopies(repo, m1, m2, ma, pa.rev()) # Compare manifests for f, n in m1.iteritems():