checkout: accept wc_path optional argument
This commit is contained in:
parent
d96141f57d
commit
96010f2590
@ -12,10 +12,14 @@ module Svi
|
||||
svn_info(".")
|
||||
end
|
||||
|
||||
def checkout(url)
|
||||
checkout_directory = []
|
||||
if url =~ %r{/([^/]+)/trunk$}
|
||||
checkout_directory << $1
|
||||
def checkout(url, options = {})
|
||||
wc_path =
|
||||
if options[:wc_path]
|
||||
options[:wc_path]
|
||||
elsif url =~ %r{/([^/]+)/trunk$}
|
||||
$1
|
||||
else
|
||||
url.split("/").last
|
||||
end
|
||||
last_checkout_message = ""
|
||||
checked_out_paths = []
|
||||
@ -33,7 +37,7 @@ module Svi
|
||||
end
|
||||
end
|
||||
start_time = Time.new
|
||||
SvnRunner.run_svn("checkout", [url] + checkout_directory, allow_interactive: true) do |line|
|
||||
SvnRunner.run_svn("checkout", [url, wc_path], allow_interactive: true) do |line|
|
||||
if line =~ /^A.{4}(.*)$/
|
||||
path = $1
|
||||
checked_out_paths << path
|
||||
|
@ -64,8 +64,8 @@ EOS
|
||||
$stderr.puts "Error: must specify URL"
|
||||
return 1
|
||||
end
|
||||
url, = args
|
||||
@application.checkout(url)
|
||||
url, wc_path = args
|
||||
@application.checkout(url, wc_path: wc_path)
|
||||
end
|
||||
|
||||
def cmd_status(params)
|
||||
|
Loading…
x
Reference in New Issue
Block a user