Mercurial > hg
comparison mercurial/exchange.py @ 50530: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 | 58adcabc295f |
children | f4a540c203d7 |
comparison
equal
deleted
inserted
replaced
50529:027481f19944 | 50530:b361e9da3c3b |
---|---|
1635 if opargs is None: | 1635 if opargs is None: |
1636 opargs = {} | 1636 opargs = {} |
1637 | 1637 |
1638 # We allow the narrow patterns to be passed in explicitly to provide more | 1638 # We allow the narrow patterns to be passed in explicitly to provide more |
1639 # flexibility for API consumers. | 1639 # flexibility for API consumers. |
1640 if includepats or excludepats: | 1640 if includepats is not None or excludepats is not None: |
1641 includepats = includepats or set() | 1641 includepats = includepats or set() |
1642 excludepats = excludepats or set() | 1642 excludepats = excludepats or set() |
1643 else: | 1643 else: |
1644 includepats, excludepats = repo.narrowpats | 1644 includepats, excludepats = repo.narrowpats |
1645 | 1645 |