Mercurial > kallithea
view pytest.ini @ 8087:ba6418fde72f stable
git: more elegant handling of installed pre/post-receive hook failing on direct repo access
The hook would fail with a long backtrace when get_hook_environment raise an error exception.
Instead, as first thing in the entry point from the hook, catch that situation
and report it nicely before "quietly" skipping the hook:
[mk@here myrepo]$ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 204 bytes | 204.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Skipping Kallithea Git post-recieve hook 'hooks/post-receive'.
remote: Git was apparently not invoked by Kallithea: Environment variable KALLITHEA_EXTRAS not found
To /tmp/somerepo
* [new branch] master -> master
[mk@here myrepo]$
We could be paranoid and let it (and the pre hook) fail ... but that doesn't
seem helpful.
Reported by Edmund Wong at [1].
[1] https://lists.sfconservancy.org/pipermail/kallithea-general/2019q4/003071.html
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 29 Dec 2019 01:41:47 +0100 |
parents | afa5e0bdb76f |
children |
line wrap: on
line source
[pytest] # only look for tests in kallithea/tests python_files = kallithea/tests/**/test_*.py addopts = # --verbose # show extra test summary info as specified by chars (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (w)warnings. -rfEsxXw # Shorter scrollbacks; less stuff to scroll through --tb=short # --doctest-modules --doctest-ignore-import-errors