A small change in the TFS history parser to support checked in on behalf of in TFS

38 views
Skip to first unread message

Arve

unread,
Apr 3, 2011, 7:53:09 AM4/3/11
to ccnet-devel
I would like to suggest a small change, and I don't know if this is
the way to do it, but I'll try:

Sometimes the changes in Team Foundation Server is checked in on
behalf of someone else (using the tf checkin /author option). When
this happens the ccnet 1.6 (and 1.5) gets an error
"System.FormatException: String was not recognized as a valid
DateTime" when parsing the change log from TFS.

The actual output from the log looks like this and it is not parsed by
the regular expression below:

-------------------------------------------------------------------------------
Changeset: 123456
User: SSmith
Checked in by: DOMAIN\proxy
Date: 1. april 2011 18:25:42


A fix would be to change the regular expression on line 79 in
VSTSHistoryParser.cs

Old version:

Regex parser = new Regex(@"Changeset:[ \t](?<changenumber>[0-9]*)\r
\nUser:[ \t](?<author>.*)\r\nDate:[ \t](?<date>.*)\r\n\r\nComment:(?
<comment>(?:\r\n.*)*)\r\n\r\nItems:(?<items>(?:\r\n.*)*)\r\n\r\n");

New version:
Regex parser = new Regex(@"Changeset:[ \t](?<changenumber>[0-9]*)\r
\nUser:[ \t](?<author>.*)\r\n(Checked in by.*\r\n)?Date:[ \t](?
<date>.*)\r\n\r\nComment:(?<comment>(?:\r\n.*)*)\r\n\r\nItems:(?
<items>(?:\r\n.*)*)\r\n\r\n");


Ruben Willems

unread,
Apr 10, 2011, 3:15:40 PM4/10/11
to ccnet...@googlegroups.com, Arve
Hi

patch has been applied.


with kind regards
Ruben Willems

Anton Volkov

unread,
Oct 22, 2013, 3:27:57 AM10/22/13
to ccnet...@googlegroups.com, Arve
Hi!

I have such an error on 1.8.4
"System.FormatException: String was not recognized as a valid DateTime".

I got this error, when trying to get sources for the first time after the latest check-in. If I try the second time immediately after that, I do not get any errors.

Unfortunatelly, I do not have any chance to build ccnet from sources for debug. 

Could you, please, give me a piece of advice, hoew to deal with this trouble?

воскресенье, 10 апреля 2011 г., 23:15:40 UTC+4 пользователь Williams написал:
Reply all
Reply to author
Forward
0 new messages