mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
e070132aad
Summary: This requirement was preventing the pyflakes test from running. In development builds our mercurial reports its version as "Mercurial Distributed SCM (version +0-)", which causes this check to fail. Everyone using this repository should be on a version of mercurial greater than 1.0 now, so it seems like it should be fine to drop this check. Test Plan: Ran "arc unit" and confirmed the pyflakes check was not skipped. Reviewers: #sourcecontrol, durham, rmcelroy Reviewed By: rmcelroy Subscribers: net-systems-diffs@, yogeshwer, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4427727 Signature: t1:4427727:1484733735:5bd6359b351df5ada917ccc7bac0fa2fae065cee
24 lines
692 B
Perl
24 lines
692 B
Perl
#require test-repo pyflakes
|
|
|
|
$ . $TESTDIR/require-core-hg.sh tests/filterpyflakes.py
|
|
|
|
This file is backported from mercurial/tests/test-check-pyflakes.t.
|
|
It differs slightly to fix paths.
|
|
|
|
$ . "$RUNTESTDIR/helpers-testrepo.sh"
|
|
$ cd "$TESTDIR"/..
|
|
$ unset HGRCPATH
|
|
|
|
run pyflakes on all tracked files ending in .py or without a file ending
|
|
(skipping binary file random-seed)
|
|
|
|
$ hg locate 'set:**.py or grep("^#!.*python")' > "$TESTTMP/files1"
|
|
$ if [ -n "$LINTFILES" ]; then
|
|
> printf "$LINTFILES" > "$TESTTMP/files2"
|
|
> join "$TESTTMP/files1" "$TESTTMP/files2"
|
|
> else
|
|
> cat "$TESTTMP/files1"
|
|
> fi \
|
|
> | xargs pyflakes 2>/dev/null | "$RUNTESTDIR/filterpyflakes.py"
|
|
|