Export the revision, checkout HEAD
This commit is contained in:
parent
5ff55b1739
commit
3eac79f905
@ -111,16 +111,9 @@ class SubversionDownloadStrategy <AbstractDownloadStrategy
|
|||||||
ohai "Checking out #{@url}"
|
ohai "Checking out #{@url}"
|
||||||
@co=HOMEBREW_CACHE+@unique_token
|
@co=HOMEBREW_CACHE+@unique_token
|
||||||
unless @co.exist?
|
unless @co.exist?
|
||||||
checkout_args = ['/usr/bin/svn', 'checkout', @url]
|
args = [svn, 'checkout', @url, @co]
|
||||||
|
args << '-q' unless ARGV.verbose?
|
||||||
if (@spec == :revision) and @ref
|
safe_system *args
|
||||||
checkout_args << '-r'
|
|
||||||
checkout_args << @ref
|
|
||||||
end
|
|
||||||
|
|
||||||
checkout_args << @co
|
|
||||||
|
|
||||||
safe_system *checkout_args
|
|
||||||
else
|
else
|
||||||
# TODO svn up?
|
# TODO svn up?
|
||||||
puts "Repository already checked out"
|
puts "Repository already checked out"
|
||||||
@ -128,7 +121,10 @@ class SubversionDownloadStrategy <AbstractDownloadStrategy
|
|||||||
end
|
end
|
||||||
def stage
|
def stage
|
||||||
# Force the export, since the target directory will already exist
|
# Force the export, since the target directory will already exist
|
||||||
safe_system '/usr/bin/svn', 'export', '--force', @co, Dir.pwd
|
args = [svn, 'export', '--force', @co, Dir.pwd]
|
||||||
|
args << '-r' << @ref if @spec == :revision and @ref
|
||||||
|
args << '-q' unless ARGV.verbose?
|
||||||
|
safe_system *args
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user