I am experiencing an issue with Capistrano and cvs. cvs -d :ext:user@host:/cvsroot -Q co -D \"2006-10-04 14:30:49\" -d 20061004145126 mymodule 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 Time.parse($1).strftime("%Y-%m-%d %H:%M:%S") to Time.parse($1).strftime("%Y-%m-%d %H:%M:%SZ") 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? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Tom Mornini
2006-Oct-04 17:15 UTC
Re: Capistrano 1.2 not checking out latest version from cvs
On Oct 4, 2006, at 8:25 AM, Ramon Ramon wrote:> 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? >Since Capistrano can deploy code to multiple servers, using an explicit revision is essential to make certain all servers retrieve the same revision, otherwise someone committing during deployment could cause different versions to be distributed to different nodes. -- -- Tom Mornini --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---