Search code examples
javadate-formatcvsparseexception

CVS log date format configuration


I was working on CVS Log reader to do some validations on the formatting. After the CVS migration, I getting below error:

java.text.ParseException: Unparseable date: "2011/05/30 08:27:24"

After investigation, i would that date format in the CVS log file has been changed from YYYY-MM-dd to YYYY/MM/dd. Due to which validation is failed.

Earlier format for CVS log is

RCS file: /opt/cvsrepositories/demo/Demo/source/demo_search/.classpath,v
Working file: source/demo_search/.classpath
head: 1.1
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1
date: 2014-07-14 09:50:57 +0000;  author: Dev.User;  state: Exp;  commitid: 62ee53c3a7d54567;
first version of the search module
=============================================================================

Now, it got changed to :

RCS file: /opt/cvsrepositories/demo/Demo/source/demo_search/.classpath,v
Working file: source/demo_search/.classpath
head: 1.1
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
----------------------------
revision 1.1
date: 2014/07/14 09:50:57 +0000;  author: Dev.User;  state: Exp;  commitid: 62ee53c3a7d54567;
first version of the search module
=============================================================================

I have checked for CVS manual, but there is no way to format the date format in logs.

Migrated machine is having same settings as per old machine.


Solution

  • After investigating some more, i have found that problem was with CVS version. Migrated machine was having version as 1.11.x But, earlier machine was having cvs version as 1.12.x. After updating the version, Problem has been solved.

    As latest version supports date as in ISO8601 format. There is a property DateFormat=iso8601 in CVSROOT\config