Class: Vlad::Subversion

Inherits:
Object
  • Object
show all
Defined in:
lib/vlad/subversion.rb

Instance Method Summary collapse

Instance Method Details

#checkout(revision, destination) ⇒ Object

Returns the command that will check out revision from the repository into directory destination



13
14
15
# File 'lib/vlad/subversion.rb', line 13

def checkout(revision, destination)
  "#{svn_cmd} co -r #{revision} #{repository} #{destination}"
end

#export(revision_or_source, destination) ⇒ Object

Returns the command that will export revision from the repository into the directory destination.



21
22
23
24
25
26
27
28
# File 'lib/vlad/subversion.rb', line 21

def export(revision_or_source, destination)
  "#{svn_cmd} #{deploy_via} " +
    if revision_or_source =~ /^(\d+|head)$/i then
      "-r #{revision_or_source} #{repository} #{destination}"
    else
      "#{revision_or_source} #{destination}"
    end
end