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

Changeset 7869

Show
Ignore:
Timestamp:
10/14/07 02:38:29 (1 year ago)
Author:
minam
Message:

Fix deploy:pending to query SCM for the subsequent revision so that it does not include the last deployed change (currently only works correctly for Subversion, other SCM's need to be updated)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/capistrano/CHANGELOG

    r7860 r7869  
    11*SVN* 
     2 
     3* Fix deploy:pending to query SCM for the subsequent revision so that it does not include the last deployed change [Jamis Buck] 
    24 
    35* Prefer 'Last Changed Rev' over 'Revision' when querying latest revision via Subversion [Jamis Buck] 
  • tools/capistrano/lib/capistrano/recipes/deploy.rb

    r7385 r7869  
    447447    DESC 
    448448    task :default, :except => { :no_release => true } do 
    449       system(source.local.log(current_revision)) 
     449      from = source.next_revision(current_revision) 
     450      system(source.local.log(from)) 
    450451    end 
    451452  end 
  • tools/capistrano/lib/capistrano/recipes/deploy/scm/base.rb

    r7136 r7869  
    115115        end 
    116116 
     117        # Returns the revision number immediately following revision, if at 
     118        # all possible. A block should always be passed to this method, which 
     119        # accepts a command to invoke and returns the result, although a 
     120        # particular SCM's implementation is not required to invoke the block. 
     121        # 
     122        # By default, this method simply returns the revision itself. If a 
     123        # particular SCM is able to determine a subsequent revision given a 
     124        # revision identifier, it should override this method. 
     125        def next_revision(revision) 
     126          revision 
     127        end 
     128 
    117129        # Should analyze the given text and determine whether or not a 
    118130        # response is expected, and if so, return the appropriate response. 
  • tools/capistrano/lib/capistrano/recipes/deploy/scm/subversion.rb

    r7860 r7869  
    6060        end 
    6161 
     62        # Increments the given revision number and returns it. 
     63        def next_revision(revision) 
     64          revision.to_i + 1 
     65        end 
     66 
    6267        # Determines what the response should be for a particular bit of text 
    6368        # from the SCM. Password prompts, connection requests, passphrases,