Mercurial > hg-stable
changeset 3162:a9e75b371315
merge: move partial filtering out of manifest merge
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 26 Sep 2006 16:21:52 -0500 |
parents | 84561ea8711e |
children | 1605e336d229 706277866251 |
files | mercurial/merge.py |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Tue Sep 26 16:04:07 2006 -0500 +++ b/mercurial/merge.py Tue Sep 26 16:21:52 2006 -0500 @@ -171,7 +171,12 @@ return copy -def manifestmerge(ui, m1, m2, ma, overwrite, backwards, partial): +def filtermanifest(man, partial): + if partial: + for k in man.keys(): + if not partial(k): del man[k] + +def manifestmerge(ui, m1, m2, ma, overwrite, backwards): """ Merge manifest m1 with m2 using ancestor ma and generate merge action list """ @@ -187,13 +192,6 @@ ui.debug(" %s: %s -> %s\n" % (f, msg, m)) action.append((f, m) + args) - # Filter manifests - if partial: - for f in m1.keys(): - if not partial(f): del m1[f] - for f in m2.keys(): - if not partial(f): del m2[f] - # Compare manifests for f, n in m1.iteritems(): if f in m2: @@ -363,6 +361,8 @@ copy = {} m1 = workingmanifest(repo, m1, status) + filtermanifest(m1, partial) + filtermanifest(m2, partial) if not force: checkunknown(repo, m2, status) @@ -371,7 +371,7 @@ if not (backwards or overwrite): copy = findcopies(repo, m1, m2, repo.changelog.rev(pa)) - action += manifestmerge(repo.ui, m1, m2, ma, overwrite, backwards, partial) + action += manifestmerge(repo.ui, m1, m2, ma, overwrite, backwards) del m1, m2, ma ### apply phase