[PATCH] tests: make test-check-code.t work with lz4revlog repositories
Laurent Charignon
lcharignon at fb.com
Wed Jan 6 20:59:30 UTC 2016
# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1452113953 28800
# Wed Jan 06 12:59:13 2016 -0800
# Node ID 11457f74b5e9522c2b863b332656c891133202ea
# Parent b8405d739149cdd6d8d9bd5e3dd2ad8487b1f09a
tests: make test-check-code.t work with lz4revlog repositories
Before this patch 'hg locate' would fail on repositories with lz4revlog.
This makes test-check-code.t more reusable for other repositories and make it
work for clones of the repository that use lz4revlog.
diff --git a/tests/test-check-code.t b/tests/test-check-code.t
--- a/tests/test-check-code.t
+++ b/tests/test-check-code.t
@@ -6,7 +6,10 @@
New errors are not allowed. Warnings are strongly discouraged.
(The writing "no-che?k-code" is for not skipping this file when checking.)
- $ hg locate | sed 's-\\-/-g' |
+ $ LZ4REVLOG=""
+ $ ([ -f .hg/requires ] && grep "lz4revlog" .hg/requires &>/dev/null &&
+ > LZ4REVLOG="--config extensions.lz4revlog=") || true
+ $ hg locate $LZ4REVLOG | sed 's-\\-/-g' |
> xargs "$check_code" --warnings --per-file=0 || false
Skipping hgext/zeroconf/Zeroconf.py it has no-che?k-code (glob)
Skipping i18n/polib.py it has no-che?k-code (glob)
More information about the Mercurial-devel
mailing list