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

Changeset 8751

Show
Ignore:
Timestamp:
01/30/08 05:39:59 (6 months ago)
Author:
minam
Message:

Support p4sync_flags and p4client_root variables for Perforce SCM (closes #10384)

Files:

Legend:

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

    r7881 r8751  
     1*SVN* 
     2 
     3* Support p4sync_flags and p4client_root variables for Perforce [gseidman] 
     4 
     5* Prepare for Net::SSH v2 by making sure Capistrano only tries to load Net::SSH versions less than 1.99.0 [Jamis Buck] 
     6 
     7 
    18*2.1.0* October 14, 2007 
    29 
  • tools/capistrano/lib/capistrano/recipes/deploy/scm/perforce.rb

    r7030 r8751  
    2626        # the files must be copied from there to their intended resting place. 
    2727        def checkout(revision, destination) 
    28           p4_sync(revision, destination, "-f"
     28          p4_sync(revision, destination, p4sync_flags
    2929        end 
    3030         
     
    3333        # the files must be copied from there to their intended resting place. 
    3434        def sync(revision, destination) 
    35           p4_sync(revision, destination, "-f"
     35          p4_sync(revision, destination, p4sync_flags
    3636        end 
    3737 
     
    4040        # the files must be copied from there to their intended resting place. 
    4141        def export(revision, destination) 
    42           p4_sync(revision, destination, "-f"
     42          p4_sync(revision, destination, p4sync_flags
    4343        end 
    4444                
     
    9090          # intended resting place.           
    9191          def p4_sync(revision, destination, options="") 
    92             p4client_root = "`#{command} #{authentication} client -o | grep ^Root | cut -f2`" 
    9392            scm authentication, :sync, options, "#{rev_no(revision)}", "&& cp -rf #{p4client_root} #{destination}"           
    9493          end 
     
    109108            variable(:p4passwd) || variable(:scm_password) 
    110109          end 
     110 
     111          def p4sync_flags 
     112            variable(:p4sync_flags) || "-f" 
     113          end 
     114 
     115          def p4client_root 
     116            variable(:p4client_root) || "`#{command} #{authentication} client -o | grep ^Root | cut -f2`" 
     117          end 
    111118           
    112119          def rev_no(revision)