# HG changeset patch # User Augie Fackler # Date 1450144641 18000 # 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 -r 71d0fd3c2e24 -r 2e31a17ad1bf mercurial/merge.py --- a/mercurial/merge.py Thu Dec 17 14:57:20 2015 +0000 +++ b/mercurial/merge.py Mon Dec 14 20:57:21 2015 -0500 @@ -722,12 +722,13 @@ 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)