On Thu, Nov 19, 2009 at 15:17,  <cmpil...@apache.org> wrote:
> Author: cmpilato
> Date: Thu Nov 19 20:17:05 2009
> New Revision: 882279
>
> URL: http://svn.apache.org/viewvc?rev=882279&view=rev
> Log:
> * tools/dev/contribulyze.py
>  (field_re): Expect at least one non-whitespace character after the whitespace
>    field separator.
>  (grace): Add a bit of stderr logging for when field parsing goes foul.
>
> Modified:
>    subversion/trunk/tools/dev/contribulyze.py
>
> Modified: subversion/trunk/tools/dev/contribulyze.py
> URL: 
> http://svn.apache.org/viewvc/subversion/trunk/tools/dev/contribulyze.py?rev=882279&r1=882278&r2=882279&view=diff
> ==============================================================================
> --- subversion/trunk/tools/dev/contribulyze.py (original)
> +++ subversion/trunk/tools/dev/contribulyze.py Thu Nov 19 20:17:05 2009
> @@ -510,7 +510,7 @@
>  log_separator = '-' * 72 + '\n'
>  log_header_re = re.compile\
>                 ('^(r[0-9]+) \| ([^|]+) \| ([^|]+) \| ([0-9]+)[^0-9]')
> -field_re = re.compile('^(Patch|Review(ed)?|Suggested|Found) by:\s*(.*)')
> +field_re = re.compile('^(Patch|Review(ed)?|Suggested|Found) by:\s*\S.*$')
>  field_aliases = { 'Reviewed' : 'Review' }
>  parenthetical_aside_re = re.compile('^\s*\(.*\)\s*$')
>
> @@ -565,6 +565,8 @@
>                                          + (field.alias or field.name)
>                                          + ' by:\s+|\s+)([^\s(].*)')
>                 m = in_field_re.match(line)
> +                if m is None:
> +                  sys.stderr.write("Error matching: %s\n" % (line))
>                 user, real, email = Contributor.parse(m.group(2))
>                 if user == 'me':
>                   user = log.committer

How does this work? Looks like you dropped group #2 from the regex.

Cheers,
-g

Reply via email to