diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -68,8 +68,8 @@ testpats = [ (r'head -c', "don't use 'head -c', use 'dd'"), (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.*\\x', "don't use printf \\x, use Python"), + (r'printf.*[^\\]\\([1-9]|0\d)', "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"), (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w', diff --git a/tests/test-subrepo-paths.t b/tests/test-subrepo-paths.t --- a/tests/test-subrepo-paths.t +++ b/tests/test-subrepo-paths.t @@ -17,7 +17,7 @@ hg debugsub with no remapping hg debugsub with remapping $ echo '[subpaths]' >> .hg/hgrc - $ printf 'http://example.net/lib(.*) = C:\\libs\\\\1-lib\\\n' >> .hg/hgrc # no-check-code + $ printf 'http://example.net/lib(.*) = C:\\libs\\\\1-lib\\\n' >> .hg/hgrc $ hg debugsub path sub