Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 111:d5165f72b0f0
Can not combine styles in the [patterns] section of .hgkwarchive
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Thu, 16 Aug 2018 18:39:56 +0200 |
| parents | 5a86171fab62 |
| children | 1744b36c39b7 |
| files | extensions/kwarchive.py |
| diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/kwarchive.py Thu Aug 16 17:53:37 2018 +0200 +++ b/extensions/kwarchive.py Thu Aug 16 18:39:56 2018 +0200 @@ -321,16 +321,16 @@ patterns = [] patterns_rst = [] if cfg.items("patterns"): - for pattern, style in cfg.items("patterns"): - style = style.upper() - if style in ("YES", "INCLUDE",): + for pattern, styles in cfg.items("patterns"): + styles = [s.strip() for s in styles.upper().split(",")] + if "YES" in styles or "INCLUDE" in styles: include.append(pattern) - if style in ("NO", "EXCLUDE",): + elif "NO" in styles or "EXCLUDE" in styles: exclude.append(pattern) else: patterns.append(pattern) - if style in ("REST", "RST",): - patterns_rst.append(pattern) + if "REST" in styles or "RST" in styles: + patterns_rst.append(pattern) matcher = match.match(repo.root, '', patterns=patterns, include=include, exclude=exclude) else:
