changeset 50564:b361e9da3c3b

exchange: allow passing no includes/excludes to `pull()` I would expect that `exchange.pull(includepats=[])` results in an empty list of include patterns to be passed to the remote, but it doesn't currently because we check for any truthy value instead of checking specifically for `not None`.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 18 May 2023 17:07:43 -0700
parents 027481f19944
children 9d1c56a79bb8
files mercurial/exchange.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Tue May 16 12:31:07 2023 +0200
+++ b/mercurial/exchange.py	Thu May 18 17:07:43 2023 -0700
@@ -1637,7 +1637,7 @@
 
     # We allow the narrow patterns to be passed in explicitly to provide more
     # flexibility for API consumers.
-    if includepats or excludepats:
+    if includepats is not None or excludepats is not None:
         includepats = includepats or set()
         excludepats = excludepats or set()
     else: