[PATCH 1 of 3] check-code: extract windows glob warning message

Simon Heimberg simohe at besonet.ch
Wed Mar 6 23:57:52 CST 2013


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1362091551 -3600
# Node ID a320d672282cb5468eaddf3f08499261d43c390c
# Parent  af9ddea2cb99b6e4314a6e79b793b5fc30ea4f19
check-code: extract windows glob warning message

it will be used often

diff -r af9ddea2cb99 -r a320d672282c contrib/check-code.py
--- a/contrib/check-code.py	Don Feb 28 13:11:42 2013 -0800
+++ b/contrib/check-code.py	Don Feb 28 23:45:51 2013 +0100
@@ -89,6 +89,7 @@
     (r"<<(\S+)((.|\n)*?\n\1)", rephere),
 ]
 
+winglobmsg = "use (glob) to match Windows paths too"
 uprefix = r"^  \$ "
 utestpats = [
   [
@@ -101,8 +102,7 @@
      "explicit exit code checks unnecessary"),
     (uprefix + r'set -e', "don't use set -e"),
     (uprefix + r'\s', "don't indent commands, use > for continued lines"),
-    (r'^  saved backup bundle to \$TESTTMP.*\.hg$',
-     "use (glob) to match Windows paths too"),
+    (r'^  saved backup bundle to \$TESTTMP.*\.hg$', winglobmsg),
   ],
   # warnings
   [


More information about the Mercurial-devel mailing list