aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorColin Hebert2011-11-29 10:17:38 +0100
committerCharlie Sharpsteen2011-11-29 10:06:58 -0800
commit3b8c98040c2f579186edce30fe1453e0dc8a71c5 (patch)
tree8649e7bf4de546e61ce3f0570e4614926cc97b7f /Library
parentd9c3f19e6a7e13081982c93ba335e23a136c688f (diff)
downloadbrew-3b8c98040c2f579186edce30fe1453e0dc8a71c5.tar.bz2
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>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb27
1 files changed, 16 insertions, 11 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index a3996909e..58221c28f 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -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