RFR (XS): jcheck: Enforce lower-case author names

Iris Clark iris.clark at oracle.com
Wed Jul 3 11:30:49 PDT 2013


There are currently no openjdk users with digits in their usernames [1].

I don't know if that's because coincidentally nobody has wanted one of that form or they're not allowed.

iris

[1]: http://openjdk.java.net/census

-----Original Message-----
From: Wang Weijun 
Sent: Saturday, June 29, 2013 1:59 AM
To: Iris Clark
Cc: Mark Reinhold; hg-tools-dev at openjdk.java.net
Subject: Re: RFR (XS): jcheck: Enforce lower-case author names

Does this mean no digit is allowed in openjdk author names?

--Max


在 Jun 29, 2013,4:04 AM,Iris Clark <iris.clark at oracle.com> 写道:

> Hi, Mark.
> 
> Looks like I forgot to reply.
> 
> I think this looks fine.
> 
> iris
> 
> -----Original Message-----
> From: Mark Reinhold 
> Sent: Monday, June 24, 2013 2:06 PM
> To: hg-tools-dev at openjdk.java.net
> Subject: RFR (XS): jcheck: Enforce lower-case author names
> 
> It turns out that jcheck never enforced lower-case author names, and the db.ojn server incorrectly accepts mixed-case names.  I'll fix that on the server, but it makes sense to enforce it locally as well in jcheck.
> 
> I ran this revised jcheck over the current JDK 8 and JDK 7 Updates forests, found two changesets with capital letters in the author name, and added the hashes of those changesets to the whitelist in the patch below.
> 
> Thanks,
> - Mark
> 
> 
> diff --git a/jcheck.py b/jcheck.py
> --- a/jcheck.py
> +++ b/jcheck.py
> @@ -100,8 +100,11 @@
> # Author validation
> 
> author_cache = { }                      ## Should really cache more permanently
> +author_re = re.compile("[a-z]+")
> 
> def validate_author(an, pn):
> +  if not author_re.match(an):
> +    return False
>   if author_cache.has_key(an):
>     return True
>   u = ("http://db.openjdk.java.net/people/%s/projects/%s"
> @@ -252,7 +255,9 @@
>     'd77434402021cebc4c25b452db18bbfd2d7ccda1', # jdk6/jdk6/jdk  bad comment
>     '931e5f39e365a0d550d79148ff87a7f9e864d2e1', # hotspot dup bug id 7147064
>     'd8abc90163a4b58db407a60cba331ab21c9977e7', # hotspot dup bug id 7147064
> -    '45849c62c298aa8426c9e67599e4e35793d8db13'  # pubs executable files
> +    '45849c62c298aa8426c9e67599e4e35793d8db13', # pubs executable files
> +    '9b5c596a2920af10bde905d5fdece110204ebdaa', # all-caps author name
> +    '1785f8335f4dd2a6a2c47e348bb588c9e7fcd374'  # all-caps author name
>     ]
> 
> # Bad changesets that should never be allowed in diff --git a/runtests.sh b/runtests.sh
> --- a/runtests.sh
> +++ b/runtests.sh
> @@ -332,6 +332,13 @@
> if [ $? -eq 0 ]; then fail; fi
> r=$(expr $r + 1)
> 
> +echo "-- $r lower-case author names"
> +touch z/foo2
> +hg add -R z z/foo2
> +if $HG ci -R z -u Robilad -m '1111112: Foo!
> +Reviewed-by: duke' -d '0 0'; then fail; fi r=$(expr $r + 1)
> +
> # Summary
> 
> if [ $failures -gt 0 ]; then


More information about the hg-tools-dev mailing list