[PATCH 2 of 2] tests: test-check-code-hg.t works for all files to check
Simon Heimberg
simohe at besonet.ch
Mon Jul 15 06:31:00 UTC 2013
Simon Heimberg <simohe <at> besonet.ch> writes:
>
> # HG changeset patch
> # User Simon Heimberg <simohe <at> besonet.ch>
> # Date 1373742278 -7200
> # Node ID 3e74d069e4503093d42afbb7cca0467520a0faee
> # Parent 089daf84e6c4088633c39290142694000af25f37
> tests: test-check-code-hg.t works for all files to check
>
> with xargs, backslashes are eaten up. Convert them to slashes therefore.
> This is only a problem with ls (on windows). hg manifest returns slashes.
>
> diff -r 089daf84e6c4 -r 3e74d069e450 tests/test-check-code-hg.t
> --- a/tests/test-check-code-hg.t Sam Jul 13 20:46:57 2013 +0200
> +++ b/tests/test-check-code-hg.t Sam Jul 13 21:04:38 2013 +0200
> <at> <at> -26,6 +26,6 <at> <at>
>
> New errors are not allowed. Warnings are strongly discouraged.
>
> - $ { hg manifest 2>/dev/null; ls "$TESTTMP"/*.py; } \
> + $ { hg manifest 2>/dev/null; ls "$TESTTMP"/*.py | sed 's-\\-/-g'; } \
> > | xargs "$check_code" --warnings --per-file=0 \
> > || false
>
using "sed s" results in a check-code error: "use regex test output patterns
instead of sed"
(from this line:
http://hg.intevation.org/mercurial/crew/file/3af3a165db18/contrib/check-
code.py#l114)
Moving the pipe char one line up should help. I have manually rewritten the
patch below. I can test and resend it properly later (when at a different
computer).
# HG changeset patch
# User Simon Heimberg <simohe <at> besonet.ch>
# Node ID 3e74d069e4503093d42afbb7cca0467520a0faee
# Parent 089daf84e6c4088633c39290142694000af25f37
tests: test-check-code-hg.t works for all files to check
with xargs, backslashes are eaten up. Convert them to slashes therefore.
This is only a problem with ls (on windows). hg manifest returns slashes.
diff -r 089daf84e6c4 -r 3e74d069e450 tests/test-check-code-hg.t
--- a/tests/test-check-code-hg.t Sam Jul 13 20:46:57 2013 +0200
+++ b/tests/test-check-code-hg.t Sam Jul 13 21:04:38 2013 +0200
<at> <at> -26,6 +26,6 <at> <at>
New errors are not allowed. Warnings are strongly discouraged.
- $ { hg manifest 2>/dev/null; ls "$TESTTMP"/*.py; } \
- > | xargs "$check_code" --warnings --per-file=0 \
+ $ { hg manifest 2>/dev/null; ls "$TESTTMP"/*.py | sed 's-\\-/-g'; } |
+ > xargs "$check_code" --warnings --per-file=0 \
> || false
More information about the Mercurial-devel
mailing list