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

login
register
mail settings
Submitter Simon Heimberg
Date March 7, 2013, 5:57 a.m.
Message ID <a320d672282cb5468ead.1362635872@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/1082/
State Accepted
Commit a911e5dc2b0052466fbfc89b127c1f8e0ef65b96
Headers show

Comments

Simon Heimberg - March 7, 2013, 5:57 a.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1362091551 -3600
# Node ID a320d672282cb5468eaddf3f08499261d43c390c
# Parent  af9ddea2cb99b6e4314a6e79b793b5fc30ea4f19
check-code: extract windows glob warning message

it will be used often

Patch

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
   [