# HG changeset patch # User Augie Fackler # Date 2015-12-15 01:57:21 # Node ID 2e31a17ad1bfba63741e9eecaa48ae12daded4c4 # Parent 71d0fd3c2e24c7c10c748e9a9bb1f867a86e1e61 manifestmerge: have manifest do matching before diffing This means that the diff code does less work, potentially significantly less in the case of treemanifests. It also should ease implementation with narrowed clone cases (such as narrowhg) when we don't always have the entire set of treemanifest revlogs locally. As far as I can tell, this codepath is currently only used by record, so it'll probably die in the near future, and then narrowhg won't have to worry about composing with some unknown matching system. diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -722,12 +722,13 @@ def manifestmerge(repo, wctx, p2, pa, br break # Compare manifests + if matcher is not None: + m1 = m1.matches(matcher) + m2 = m2.matches(matcher) diff = m1.diff(m2) actions = {} for f, ((n1, fl1), (n2, fl2)) in diff.iteritems(): - if matcher and not matcher(f): - continue if n1 and n2: # file exists on both local and remote side if f not in ma: fa = copy.get(f, None)