Ncowley / gource

Automatically exported from code.google.com/p/gource
0 stars 0 forks source link

Failure to parse CVS: date -0600 timezone #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  My CVS log generated with the cvs-exp.pl file have a negative timezone
offset (-0600)
2.  gource unceremoniously exits

What is the expected output? What do you see instead?
Expect proper performance, instead get exception that log can not be read.

What version of the product are you using? On what operating system?
0.24 on MacOSX

Please provide any additional information below.

Here is the proper REGEXP that belongs on line 22 of cvs-exp.cpp

Regex cvsexp_date_regex("^\\(date: ([0-9]{4})[-/]([0-9]{2})[-/]([0-9]{2})
([0-9]{2}):([0-9]{2}):([0-9]{2})(?: \\[+--][0-9]{4})?;(.+)$");

Note that + and - can be handled in the timezone offset.

This will parse entries like:

(date: 2000-01-24 17:01:45 -0600;  author: martink;  state: Exp;)         

Original issue reported on code.google.com by blezek@gmail.com on 17 Feb 2010 at 6:41

GoogleCodeExporter commented 8 years ago
Sorry, the regexp didn't do the job.  Have to dig in a bit more...

Original comment by blezek@gmail.com on 17 Feb 2010 at 6:45

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi.

Thanks for the report. I've changed it to:

Regex cvsexp_date_regex("\\(date: ([0-9]{4})[-/]([0-9]{2})[-/]([0-9]{2})
([0-9]{2}):([0-9]{2}):([0-9]{2})(?: [+-][0-9]{4})?;(.+)$");

Original comment by acaudw...@gmail.com on 17 Feb 2010 at 8:58