Submitter | phabricator |
---|---|
Date | July 22, 2019, 5:06 p.m. |
Message ID | <differential-rev-PHID-DREV-kh6fmerk2skczkn7tcok-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/41002/ |
State | Superseded |
Headers | show |
Comments
Patch
diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -3173,10 +3173,13 @@ def __init__(self, map, skip=None): self._dirs = {} addpath = self.addpath - if safehasattr(map, 'iteritems') and skip is not None: + if isinstance(map, dict) and skip is not None: for f, s in map.iteritems(): if s[0] != skip: addpath(f) + elif skip is not None: + raise error.ProgrammingError("skip character is only supported " + "with a dict source") else: for f in map: addpath(f)