diff options
| author | Colin Hebert | 2011-11-29 10:17:38 +0100 |
|---|---|---|
| committer | Charlie Sharpsteen | 2011-11-29 10:06:58 -0800 |
| commit | 4d395412c25fdd9c86bcb2248d9bdab8032b6c49 (patch) | |
| tree | 0dcfb59fa247cd49e4703a21c69568be3022b2c7 /Library | |
| parent | 22e473de98cae05d9a33b843af7352bcffa83e7b (diff) | |
| download | homebrew-4d395412c25fdd9c86bcb2248d9bdab8032b6c49.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 #8774.
Closes #8863.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 27 |
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 |
