diff mercurial/hg.py @ 39553:130e5df346d5

exchange: support defining narrow file patterns for pull This commit teaches exchange.pull() about the desire to perform a narrow file pull. We simply pass include and exclude patterns to the function. The values are validated and stored on the pulloperation instance. hg.clone() has been taught to pass these arguments to exchange.pull(). If the arguments are not passed to exchange.pull(), the active narrow patterns from the repository will automatically be used. We /could/ always use the narrow patterns from the repo. However, allowing explicit values to be passed in allows us to perform data fetching that doesn't necessarily align with the repo configuration. This provides more flexibility. Differential Revision: https://phab.mercurial-scm.org/D4539
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 11 Sep 2018 17:21:18 -0700
parents 65b5900f30be
children cb675e95a2c2
line wrap: on
line diff
--- a/mercurial/hg.py	Tue Sep 11 17:20:14 2018 -0700
+++ b/mercurial/hg.py	Tue Sep 11 17:21:18 2018 -0700
@@ -749,7 +749,9 @@
                 overrides = {('ui', 'quietbookmarkmove'): True}
                 with local.ui.configoverride(overrides, 'clone'):
                     exchange.pull(local, srcpeer, revs,
-                                  streamclonerequested=stream)
+                                  streamclonerequested=stream,
+                                  includepats=storeincludepats,
+                                  excludepats=storeexcludepats)
             elif srcrepo:
                 # TODO lift restriction once exchange.push() accepts narrow
                 # push.