2

I have a problem with CVS KEYWORD. Let me explain: In my source files (*.c) I have in the header a keyword "$Id" and this after checkout return a string:

read.adb,v 1.1.1.2 2005/02/20 17:57:20 dprice Exp

But my team and another team, use a different version of CVS for the same project. When they make a checkout of the software, the $Id keyword expression return:

read.adb,v 1.1.1.2 2005-02-20 17:57:20 dprice Exp

the string is different for the format of data separation: from "/" to "-". This is a very big problem when I generate a md5. This md5 will be different for each team.

How I can change the string of $Id ?

karmax
  • 171
  • 2
  • 13
  • What have you tried? Have you looked at the cvs source code? http://cvs.savannah.gnu.org/viewvc/cvs/ccvs/src/ – Mort Jul 18 '16 at 21:27
  • I see "sanity.sh" in the src directory. In this file appear `RCSKEYDATE="[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]"`. But I don't have any idea about how I can use this script. – karmax Jul 19 '16 at 06:17

2 Answers2

1

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479752

Looks like the default date format changed in version 1.12.x. As per that bug report, you can add DateFormat=old to $CVSROOT/CVSROOT/config

Burhan Ali
  • 2,258
  • 1
  • 28
  • 38
0

I modify rcs.c source code:

sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday, hour, min, sec);

but I don't understand why I had a different result with the same version of cvs.

karmax
  • 171
  • 2
  • 13