I am experiencing an issue with Capistrano and cvs.
cvs -d :ext:[email protected]:/cvsroot -Q co -D “2006-10-04 14:30:49” -d
The issue seems to be with -D “2006-10-04 14:30:49”. This is the
latest revision from the cvs log. It seems the problem is that datetimes
stored in the CVS log are UTC although no timezone is specified.
However, when you do a cvs with the -D option, this date seems to be
interpreted using the timezone of the machine from which you run the CVS
command, which is actually ok, but is not working in this case.
The solution is actually very easy, as we know that the datetime
returned by the cvs log command is in UTC (I don’t know if this is true
in all installations …) we just need to specify that the datetime you
are passing to CVS is UTC and not in the local timezone. This results in
a small modification to the capistrano/scm/cvs.rb file:
In the “latest_revision” method, change
Note the Z at the end of the datetime. This means the datetime is UTC.
On the other hand, why does capistrano calculate the latest revision of
the sources? A cvs co always returns the latest revision unless you
specify otherwise. In which case the -D “…” is useless. Does anybody
know the answer?