Class: Gonzui::Subversion

Inherits:
AbstractVCS show all
Defined in:
lib/gonzui/vcs.rb

Instance Method Summary collapse

Methods inherited from AbstractVCS

#clean, #extract

Methods included from Util

assert, assert_equal, assert_equal_all, assert_non_nil, assert_not_reached, benchmark, command_exist?, commify, eprintf, format_bytes, program_name, protect_from_signals, require_command, set_verbosity, shell_escape, unix?, vprintf, windows?, wprintf

Constructor Details

#initialize(config, root, mozule) ⇒ Subversion

Returns a new instance of Subversion.



86
87
88
89
# File 'lib/gonzui/vcs.rb', line 86

def initialize(config, root, mozule)
  require_command("svn")
  super(config, root, mozule)
end

Instance Method Details

#do_checkout(output_directory) ⇒ Object



91
92
93
94
95
96
97
98
# File 'lib/gonzui/vcs.rb', line 91

def do_checkout(output_directory)
  Dir.chdir(@config.cache_directory) {
    command_line = sprintf("svn co %s %s", 
                           shell_escape(@root),
                           shell_escape(@mozule))
    run_command(command_line, "svn checkout")
  }
end

#do_update(output_directory) ⇒ Object



100
101
102
103
104
# File 'lib/gonzui/vcs.rb', line 100

def do_update(output_directory)
  Dir.chdir(output_directory) {
    run_command("svn update","svn update")
  }
end