mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
052e7c3877
Summary: Update `contrib/check-code.py` to Python 3. Mostly it was already compatible, however stricter regular expression parsing revealed a case where one of our tests wasn't working, and as a result lots of instances of `open(file).read()` existed that this test should have caught. I have fixed up most of the instances in the code, although there are many in the test suite that I have ignored for now. Reviewed By: quark-zju Differential Revision: D21427212 fbshipit-source-id: 7461a7c391e0ade947f779a2b476ca937fd24a8d
12 lines
314 B
Perl
12 lines
314 B
Perl
#chg-compatible
|
|
|
|
#require test-repo
|
|
|
|
$ . "$TESTDIR/helpers-testrepo.sh"
|
|
$ cd "$TESTDIR"/..
|
|
|
|
$ testrepohg files . > $TESTTMP/filelist
|
|
$ testrepohgenv; PYTHONPATH= ./contrib/fix-code.py --dry-run `cat $TESTTMP/filelist`
|
|
# In case the above list is not empty, run 'contrib/fix-code.py FILE...' to
|
|
# fix them.
|