# HG changeset patch # User timeless # Date 1462931768 0 # Node ID c07be448028b584c97b43d653fccdb2205d51e88 # Parent ba8999547f81657d8be1ca19cea4f6dc52f54e47 check-code: fix py3 complaint about \NNN being invalid unicode diff -r ba8999547f81 -r c07be448028b contrib/check-code.py --- a/contrib/check-code.py Thu May 05 09:12:26 2016 +0000 +++ b/contrib/check-code.py Wed May 11 01:56:08 2016 +0000 @@ -103,7 +103,7 @@ (r'tail -n', "don't use the '-n' option to tail, just use '-'"), (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"), (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"), - (r'printf.*[^\\]\\([1-9]|0\d)', "don't use 'printf \NNN', use Python"), + (r'printf.*[^\\]\\([1-9]|0\d)', r"don't use 'printf \NNN', use Python"), (r'printf.*[^\\]\\x', "don't use printf \\x, use Python"), (r'\$\(.*\)', "don't use $(expr), use `expr`"), (r'rm -rf \*', "don't use naked rm -rf, target a directory"), diff -r ba8999547f81 -r c07be448028b tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Thu May 05 09:12:26 2016 +0000 +++ b/tests/test-check-py3-compat.t Wed May 11 01:56:08 2016 +0000 @@ -37,7 +37,6 @@ #if py3exe $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py - contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (, line *) (glob) doc/hgmanpage.py: invalid syntax: invalid syntax (, line *) (glob) hgext/automv.py: error importing module: invalid syntax (commands.py, line *) (line *) (glob) hgext/blackbox.py: error importing: 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)