changeset 114:a7e9f1f19140

Allow multiple digits in the non-initial numerals of version numbers in tags
author mr
date Thu, 18 Jan 2018 09:53:05 -0800
parents aa8aede0b585
children d9df5f1d98c8
files jcheck.py runtests.sh
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jcheck.py	Wed Sep 13 17:12:31 2017 -0700
+++ b/jcheck.py	Thu Jan 18 09:53:05 2018 -0800
@@ -144,7 +144,7 @@
 normext_re = re.compile(".*\.(java|c|h|cpp|hpp)$")
 
 tag_desc_re = re.compile("Added tag [^ ]+ for changeset [0-9a-f]{12}")
-tag_re = re.compile("tip$|jdk-([1-9]([0-9]*)(\.[0-9]){0,3})\+([0-9]+)$|jdk[4-9](u\d{1,3})?-b\d{2,3}$|hs\d\d(\.\d{1,2})?-b\d\d$")
+tag_re = re.compile("tip$|jdk-([1-9]([0-9]*)(\.(0|[1-9][0-9]*)){0,3})\+([0-9]+)$|jdk[4-9](u\d{1,3})?-b\d{2,3}$|hs\d\d(\.\d{1,2})?-b\d\d$")
 
 def badwhite_what(m):
     if m.group(1):
--- a/runtests.sh	Wed Sep 13 17:12:31 2017 -0700
+++ b/runtests.sh	Thu Jan 18 09:53:05 2018 -0800
@@ -121,10 +121,11 @@
 sys.exit(1)'
 [ $? -eq 0 ] && whitespace_tag=jdk7-b2 # a tag that should be rejected
 
+# Bad tags
 HG='hg --config hooks.pretxncommit.jcheck=python:jcheck.hook'
 for t in foo tiptoe jdk7 jdk7-b1 "$whitespace_tag" \
          hs1-b02 hs11-b3 hs12-b004 hs13.001-b05 \
-         jdk- jdk-9u1 jdk-9-1 \
+         jdk- jdk-9u1 jdk-9-1 jdk-9.01 \
         jdk6u22 jdk6u-b01 jdk6u11-b1 jdk6u1000-b01 ; do
   echo "-- $r tag $t"
   if HGUSER=$setup_author $HG tag -r 1 "$t"; then hg rollback; fail $r; fi
@@ -132,13 +133,14 @@
   r=$(expr $r + 1)
 done
 
+# Good tags
 HG='hg --config hooks.pretxncommit.jcheck=python:jcheck.hook'
 for t in jdk4-b01 jdk5-b01 jdk6-b01 jdk7-b01 jdk8-b01 jdk9-b01 \
         jdk-9+1 jdk-10+1 \
         jdk4-b100 jdk8-b800 \
         jdk4u4-b04 jdk5u5-b05 jdk6u6-b06 jdk7u7-b07 jdk8u8-b08 jdk9u9-b09 \
         jdk8u80-b08 jdk8u100-b100 \
-        jdk-9+100 jdk-9.1.2.1+3 jdk-9.0.1+42 \
+        jdk-9+100 jdk-9.1.2.1+3 jdk-9.0.1+42 jdk-9.0.1.19+43 \
         hs11-b02 hs12.1-b11 hs13.10-b12 ; do
   echo "-- $r tag $t"
   if ! HGUSER=$setup_author $HG tag -r 1 "$t"; then fail $r; fi