Class: Gonzui::CVS
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) ⇒ CVS
Returns a new instance of CVS.
53
54
55
56
|
# File 'lib/gonzui/vcs.rb', line 53
def initialize(config, root, mozule)
require_command("cvs")
super(config, root, mozule)
end
|
Instance Method Details
#do_checkout(output_directory) ⇒ Object
58
59
60
61
62
63
64
65
|
# File 'lib/gonzui/vcs.rb', line 58
def do_checkout(output_directory)
Dir.chdir(@config.cache_directory) {
command_line = sprintf("cvs -z3 -d %s co -P %s",
shell_escape(@root),
shell_escape(@mozule))
run_command(command_line, "cvs checkout")
}
end
|
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/gonzui/vcs.rb', line 73
def
File.mkpath(@config.cache_directory)
output_directory = File.join(@config.cache_directory, @mozule)
if File.exist?(output_directory)
run_cvs_update(output_directory)
else
run_cvs_checkout
end
return output_directory
end
|
#do_update(output_directory) ⇒ Object
67
68
69
70
71
|
# File 'lib/gonzui/vcs.rb', line 67
def do_update(output_directory)
Dir.chdir(output_directory) {
run_command("cvs -z3 update -dP", "cvs update")
}
end
|