From c562fac9cb4f0e3dd7a1b2cc8b3d8634526841c2 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 26 Mar 2015 20:37:53 +0100 Subject: [PATCH] tox: Use git directly to check for changes (docs). We also remove checking for uncommited changes in misc_checks.py, as this usually just is noise. --- scripts/misc_checks.py | 7 ------- tox.ini | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/misc_checks.py b/scripts/misc_checks.py index 019e61128..537f0b6f1 100644 --- a/scripts/misc_checks.py +++ b/scripts/misc_checks.py @@ -40,24 +40,17 @@ def check_git(): print() return False untracked = [] - changed = [] gitst = subprocess.check_output(['git', 'status', '--porcelain']) gitst = gitst.decode('UTF-8').strip() for line in gitst.splitlines(): s, name = line.split(maxsplit=1) if s == '??' and name != '.venv/': untracked.append(name) - elif s == 'M': - changed.append(name) status = True if untracked: status = False utils.print_col("Untracked files:", 'red') print('\n'.join(untracked)) - if changed: - status = False - utils.print_col("Uncommited changes:", 'red') - print('\n'.join(changed)) print() return status diff --git a/tox.ini b/tox.ini index 0e6b05d0c..ffbc55ed4 100644 --- a/tox.ini +++ b/tox.ini @@ -90,10 +90,11 @@ commands = [testenv:docs] skip_install = true +whitelist_externals = git deps = -rrequirements.txt commands = {[testenv:mkvenv]commands} {envpython} scripts/src2asciidoc.py - {envpython} scripts/misc_checks.py git + git --no-pager diff --exit-code --stat {envpython} scripts/asciidoc2html.py {posargs}