Update VCS caches when installing
I held off on this as I wasn't sure it made sense. Eg. if you install you'd expect it to install the same version as before? But with HEAD formula you always want the newest, that's the point. Otherwise it should be tagged/revisioned.
This commit is contained in:
parent
edb046bea8
commit
a4ed7ff619
@ -135,8 +135,8 @@ class SubversionDownloadStrategy <AbstractDownloadStrategy
|
|||||||
unless @co.exist?
|
unless @co.exist?
|
||||||
quiet_safe_system svn, 'checkout', @url, @co
|
quiet_safe_system svn, 'checkout', @url, @co
|
||||||
else
|
else
|
||||||
# TODO svn up?
|
puts "Updating #{@co}"
|
||||||
puts "Repository already checked out"
|
quiet_safe_system svn, 'up', @co
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -162,8 +162,8 @@ class GitDownloadStrategy <AbstractDownloadStrategy
|
|||||||
unless @clone.exist?
|
unless @clone.exist?
|
||||||
quiet_safe_system 'git', 'clone', @url, @clone
|
quiet_safe_system 'git', 'clone', @url, @clone
|
||||||
else
|
else
|
||||||
# TODO git pull?
|
puts "Updating #{@clone}"
|
||||||
puts "Repository already cloned to #{@clone}"
|
Dir.chdir(@clone) { quiet_safe_system 'git', 'fetch', @url }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -202,8 +202,9 @@ class CVSDownloadStrategy <AbstractDownloadStrategy
|
|||||||
safe_system '/usr/bin/cvs', '-d', url, 'checkout', '-d', @unique_token, mod
|
safe_system '/usr/bin/cvs', '-d', url, 'checkout', '-d', @unique_token, mod
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
# TODO cvs up?
|
d = HOMEBREW_CACHE+@unique_token
|
||||||
puts "Repository already checked out"
|
puts "Updating #{d}"
|
||||||
|
Dir.chdir(d) { safe_system '/usr/bin/cvs', 'up' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -242,12 +243,10 @@ class MercurialDownloadStrategy <AbstractDownloadStrategy
|
|||||||
url=@url.sub(%r[^hg://], '')
|
url=@url.sub(%r[^hg://], '')
|
||||||
|
|
||||||
unless @clone.exist?
|
unless @clone.exist?
|
||||||
checkout_args = []
|
safe_system 'hg', 'clone', url, @clone
|
||||||
checkout_args << url << @clone
|
|
||||||
safe_system 'hg', 'clone', *checkout_args
|
|
||||||
else
|
else
|
||||||
# TODO hg pull?
|
puts "Updating #{@clone}"
|
||||||
puts "Repository already cloned"
|
Dir.chdir(@clone) { safe_system 'hg', 'update' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user