rahulpathakgit / codeswarm

Automatically exported from code.google.com/p/codeswarm
GNU General Public License v3.0
0 stars 0 forks source link

Older CVS version uses different date format (convert_logs.py) #63

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Please attach your config file to help us reproduce the problem.

What steps will reproduce the problem?
1. python convert_logs.py -c activity.log -o activity.xml

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "convert_logs.py", line 408, in ?
    main()
  File "convert_logs.py", line 162, in main
    date = time.strptime(date_without_plus[0].strip(), '%Y-%m-%d %H:%M:%S')
  File "/usr/lib/python2.3/_strptime.py", line 424, in strptime
    raise ValueError("time data did not match format:  data=%s  fmt=%s" %
ValueError: time data did not match format:  data=2009/01/26 21:05:32  
fmt=%Y-%m-%d %H:%M:%S

What version of the product are you using? On what operating system?
codeswarm-0.1
cvs client 1.11.17

Please provide any additional information below.
Not sure if it's this (older) version of CVS or just the settings my admin 
has configured for our repository, but the dates are seperated with slashes 
instead of hyphens.

To fix, I just had to change the date format in convert_logs.py:
$ diff convert_logs.py.orig convert_logs.py
162c162
<                         date = 
time.strptime(date_without_plus[0].strip(), '%Y-%m-%d %H:%M:%S')

---
>                         date = 
time.strptime(date_without_plus[0].strip(), '%Y/%m/%d %H:%M:%S')

I know that a previous issue was opened for a different version of CVS 
(with a different format), Issue 49, so it might not make sense to fix this 
in convert_logs.py for all CVS versions - but I just wanted to open an 
issue so at the least the format needed for my specific version could be 
documented.

Original issue reported on code.google.com by matt.br...@citrixonline.com on 15 Aug 2009 at 5:26