Mercurial > hg-stable
changeset 3379:fef022f9a238
Merge with mpm
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Fri, 13 Oct 2006 00:26:46 -0700 |
parents | 1106e00e6847 (current diff) 8c36b33a27c7 (diff) |
children | bb9852b3bf06 |
files | |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Oct 12 16:34:32 2006 -0700 +++ b/mercurial/merge.py Fri Oct 13 00:26:46 2006 -0700 @@ -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():