Download:
child 55:da06db1fadcd
parent 53:ed7f35f52927
54:53e3c39fff13
Anton Shestakov <av6@dwimlabs.net>, Thu, 23 Jun 2016 15:06:21 +0800
checker: go back to using hg files with -I and -X Because -X is a bit simpler than a fileset that also excludes some files (to code and just visually). Also rename property to "include" for clarity.

1 файлов изменено, 6 вставок(+), 2 удалений(-) [+]
checker.py file | annotate | diff | comparison | revisions
--- a/checker.py Thu Jun 23 14:58:09 2016 +0800
+++ b/checker.py Thu Jun 23 15:06:21 2016 +0800
@@ -90,10 +90,14 @@
if ok:
print('# C&O task: checks')
for linter in config['linters']:
- if 'cmd' not in linter or 'files' not in linter:
+ if 'include' not in linter:
continue
- cmd = ['hg', 'files', 'set:' + ' or '.join(linter['files'])]
+ cmd = ['hg', 'files']
+ for pat in linter['include']:
+ cmd.extend(('-I', pat))
+ for pat in linter.get('exclude', []):
+ cmd.extend(('-X', pat))
files = run(cmd, silent=True, get_output=True, ignore_codes=(1,))
if files is False:
ok = False