Method: Svn#export

Defined in:
lib/version_control/svn.rb

#export(target = "", revision = "") ⇒ Object

Performs an svn export

Attributes

  • revision - revision to export (options - defaults to latest)

Returns

  • command output



93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/version_control/svn.rb', line 93

def export(target = "", revision = "")
  url_items = URI.parse(@url)
  target = url_items.path if target == ""    
  cmd_options = @command_options
  cmd_options += " --no-auth-cache --trust-server-cert --force" if cmd_options == " --non-interactive"
  base_cmd = "#{@svn} export #{@credential} #{@command_options} #{@url}"
  FileUtils.cd(@base_path, :verbose => true)
  if revision == ""
    cmd = "#{base_cmd} ."
  else
    cmd = "#{base_cmd} -r #{revision} ."
  end
  process_cmd(cmd)
end