svn update/checkout with system_command
This commit is contained in:
parent
43d53a67b7
commit
c63d8813af
@ -580,17 +580,17 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
|
|||||||
# Use "svn update" when the repository already exists locally.
|
# Use "svn update" when the repository already exists locally.
|
||||||
# This saves on bandwidth and will have a similar effect to verifying the
|
# This saves on bandwidth and will have a similar effect to verifying the
|
||||||
# cache as it will make any changes to get the right revision.
|
# cache as it will make any changes to get the right revision.
|
||||||
args = if target.directory?
|
args = target.directory? ? ["update"] : ["checkout", url, target]
|
||||||
["cd", target.to_s, ";", "svn", "update"]
|
|
||||||
else
|
|
||||||
["svn", "checkout", url, target]
|
|
||||||
end
|
|
||||||
if revision
|
if revision
|
||||||
ohai "Checking out #{@ref}"
|
ohai "Checking out #{@ref}"
|
||||||
args << "-r" << revision
|
args << "-r" << revision
|
||||||
end
|
end
|
||||||
args << "--ignore-externals" if ignore_externals
|
args << "--ignore-externals" if ignore_externals
|
||||||
safe_system(*args)
|
if args[0] == "update"
|
||||||
|
system_command("svn", args: args, chdir: target.to_s)
|
||||||
|
else
|
||||||
|
system_command("svn", args: args)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def cache_tag
|
def cache_tag
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user