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

Ticket #9546: bzr.rb-fix-head-revision-query.patch

File bzr.rb-fix-head-revision-query.patch, 0.8 kB (added by michiels, 1 year ago)

Patch to not set -r flag if :revision is set to :head or nil

  • lib/capistrano/recipes/deploy/scm/bzr.rb

    old new  
    6363        # If the 'revision' argument, on the other hand, is not :head, it is 
    6464        # simply returned. 
    6565        def query_revision(revision) 
    66           if revision == head 
    67             yield(scm(:revno, repository)).chomp 
    68           else 
    69             revision 
    70           end 
     66          revision 
    7167        end 
    7268 
    7369        private 
    7470 
    7571          def revswitch(revision) 
    76             if revision == :head 
     72            if revision == :head || revision.nil? 
    7773              nil 
    7874            else 
    7975              "-r #{revision}"