Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10411 (closed defect: invalid)

Opened 7 months ago

Last modified 5 months ago

Capistrano problem when deployment switched to another branch

Reported by: laurynas Assigned to: minam
Priority: normal Milestone: 2.x
Component: Capistrano Version: edge
Severity: normal Keywords:
Cc:

Description

Capistrano worked fine when deploying things from trunk. Then I created a branch and switched repository location in deploy.rb to deploy from the branch. Actually I'm deploying one subfolder of that branch. Capistrano was guessing latest revision incorrectly for that subfolder and svn was resulting with NOT FOUND.

I managed to fix this changing one line in Capistrano code (patch attached).

Attachments

capistrano-svn-revision.patch (0.8 kB) - added by laurynas on 12/07/07 13:25:05.
capistrano-svn-revision.2.patch (0.8 kB) - added by laurynas on 12/07/07 13:25:14.

Change History

12/07/07 13:25:05 changed by laurynas

  • attachment capistrano-svn-revision.patch added.

12/07/07 13:25:14 changed by laurynas

  • attachment capistrano-svn-revision.2.patch added.

12/07/07 13:26:44 changed by laurynas

Hmm, strange issue with this trac - I was getting an error after uploading an attachment, but file upload worked (therefore I resulted two patches attached).

12/07/07 13:29:15 changed by laurynas

Weird, I can't open my attached patch, so I'll add it as the comment, just in case:

Index: /home/laurynas/workspace/Capistrano/lib/capistrano/recipes/deploy/scm/subversion.rb
===================================================================
--- /home/laurynas/workspace/Capistrano/lib/capistrano/recipes/deploy/scm/subversion.rb	(revision 8328)
+++ /home/laurynas/workspace/Capistrano/lib/capistrano/recipes/deploy/scm/subversion.rb	(working copy)
@@ -56,7 +56,8 @@
           result = yield(command)
           yaml = YAML.load(result)
           raise "tried to run `#{command}' and got unexpected result #{result.inspect}" unless Hash === yaml
-          yaml['Last Changed Rev'] || yaml['Revision']
+          #yaml['Last Changed Rev'] || yaml['Revision']
+          yaml['Revision']
         end
 
         # Increments the given revision number and returns it.

01/31/08 04:35:44 changed by minam

Funny you should mention this... the reason capistrano uses yamlLast Changed Rev? is because it was incorrectly guessing the revision number on branches when it used to use yamlRevision?.

Are you sure it is guessing the revision number incorrectly in your case? Can you post more details about what you were seeing?

01/31/08 07:27:28 changed by laurynas

Hmm, now it's a bit hard to reproduce the situation. I think it was exceptional case related with the sequence of commits and creating branch. It works ok for me with my fix, I will comment here if it would happen again.

02/22/08 01:41:19 changed by minam

  • status changed from new to closed.
  • resolution set to invalid.

Closing ticket for now to keep things clean. If this comes up again, please do reopen.