[PATCH 5 of 6] check-code: allow special comment for comparing in pypats

Simon Heimberg simohe at besonet.ch
Sun Sep 11 10:46:25 CDT 2011


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1315755294 -7200
# Node ID 55954d156e189cf5424d44b32905e0eff0c7b8f2
# Parent  f0590f1fc041129c84f3b9a4500ad9fdac4591c2
check-code: allow special comment for comparing in pypats

comment starting with an exclamation point is not replaced

diff -r f0590f1fc041 -r 55954d156e18 contrib/check-code.py
--- a/contrib/check-code.py	Son Sep 11 17:33:55 2011 +0200
+++ b/contrib/check-code.py	Son Sep 11 17:34:54 2011 +0200
@@ -195,7 +195,7 @@
 ]
 
 pyfilters = [
-    (r"""(?msx)(?P<comment>\#.*?$)|
+    (r"""(?msx)(?P<comment>\#(?!!).*?$)|
          ((?P<quote>('''|\"\"\"|(?<!')'(?!')|(?<!")"(?!")))
           (?P<text>(([^\\]|\\.)*?))
           (?P=quote))""", reppython),


More information about the Mercurial-devel mailing list