download_strategy.ry: Improve Bazaar efficiency
Bazaar download strategy tried to re-download everything on "export" as a checkout is used. See: https://answers.launchpad.net/bzr/+question/180269 https://bugs.launchpad.net/bzr/+bug/897511 Related to issue Homebrew/homebrew#8774. Closes Homebrew/homebrew#8863. Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
This commit is contained in:
parent
d9c3f19e6a
commit
3b8c98040c
@ -498,17 +498,22 @@ class BazaarDownloadStrategy < AbstractDownloadStrategy
|
||||
end
|
||||
|
||||
def stage
|
||||
dst=Dir.getwd
|
||||
Dir.chdir @clone do
|
||||
if @spec and @ref
|
||||
ohai "Checking out #{@spec} #{@ref}"
|
||||
Dir.chdir @clone do
|
||||
safe_system 'bzr', 'export', '-r', @ref, dst
|
||||
end
|
||||
else
|
||||
safe_system 'bzr', 'export', dst
|
||||
end
|
||||
end
|
||||
# FIXME: The export command doesn't work on checkouts
|
||||
# See https://bugs.launchpad.net/bzr/+bug/897511
|
||||
FileUtils.cp_r Dir[@clone+"{.}"], Dir.pwd
|
||||
FileUtils.rm_r Dir[Dir.pwd+"/.bzr"]
|
||||
|
||||
#dst=Dir.getwd
|
||||
#Dir.chdir @clone do
|
||||
# if @spec and @ref
|
||||
# ohai "Checking out #{@spec} #{@ref}"
|
||||
# Dir.chdir @clone do
|
||||
# safe_system 'bzr', 'export', '-r', @ref, dst
|
||||
# end
|
||||
# else
|
||||
# safe_system 'bzr', 'export', dst
|
||||
# end
|
||||
#end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user