check-code: better check for overwriting $HGRCPATH
authorMartin Geisler <mg@aragost.com>
Wed, 02 Mar 2011 14:22:50 +0100
changeset 13522 7ac93ec49c2d
parent 13521 c1629963158a
child 13523 644166163116
check-code: better check for overwriting $HGRCPATH Suggested by Mads Kiilerich on IRC.
contrib/check-code.py
--- a/contrib/check-code.py	Wed Mar 02 14:16:11 2011 +0100
+++ b/contrib/check-code.py	Wed Mar 02 14:22:50 2011 +0100
@@ -66,7 +66,7 @@
     (r'^source\b', "don't use 'source', use '.'"),
     (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
     (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"),
-    (r'cat > \$HGRCPATH <<EOF', "append to $HGRCPATH, do not overwrite it"),
+    (r'[^>]>\s*\$HGRCPATH <<EOF', "append to $HGRCPATH, do not overwrite it"),
 ]
 
 testfilters = [