Mercurial > hg
comparison mercurial/changegroup.py @ 40082:4fd0fac48922
localrepo: allow narrowmatch() to accept matcher to intersect with
It's pretty common that we need to intersect a matcher we already have
(usually from the user) with the narrow matcher. Let's make
repo.narrowmatch() take an optional matcher to intersect with.
Differential Revision: https://phab.mercurial-scm.org/D4896
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 28 Sep 2018 12:29:21 -0700 |
parents | 8e398628a3f2 |
children | 2c5835b4246b |
comparison
equal
deleted
inserted
replaced
40081:a4d62ff9a86d | 40082:4fd0fac48922 |
---|---|
1269 _('ellipsis nodes require at least cg3 on client and server, ' | 1269 _('ellipsis nodes require at least cg3 on client and server, ' |
1270 'but negotiated version %s') % version) | 1270 'but negotiated version %s') % version) |
1271 | 1271 |
1272 # Requested files could include files not in the local store. So | 1272 # Requested files could include files not in the local store. So |
1273 # filter those out. | 1273 # filter those out. |
1274 filematcher = matchmod.intersectmatchers(repo.narrowmatch(), | 1274 filematcher = repo.narrowmatch(filematcher) |
1275 filematcher) | |
1276 | 1275 |
1277 fn = _packermap[version][0] | 1276 fn = _packermap[version][0] |
1278 return fn(repo, filematcher, bundlecaps, ellipses=ellipses, | 1277 return fn(repo, filematcher, bundlecaps, ellipses=ellipses, |
1279 shallow=shallow, ellipsisroots=ellipsisroots, | 1278 shallow=shallow, ellipsisroots=ellipsisroots, |
1280 fullnodes=fullnodes) | 1279 fullnodes=fullnodes) |