aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAndrew Janke2015-10-16 03:59:19 -0400
committerMike McQuaid2015-10-16 09:54:47 +0100
commit017a5014715d21b8fc8b8aa2d0f42fec1d47f933 (patch)
treef4867de7ea59deee7b70d210384b6c6f87967220 /Library
parenta9b3c9200e3e43d024c067920688a0a429ca022a (diff)
downloadbrew-017a5014715d21b8fc8b8aa2d0f42fec1d47f933.tar.bz2
downloads: Fix checkout on initial clone
Moves the "Checking out" output to where checkouts actually happen, to avoid spurious checkout announcements. Closes Homebrew/homebrew#45019. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 29509305f..7fc562642 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -135,10 +135,6 @@ class VCSDownloadStrategy < AbstractDownloadStrategy
end
end
- def stage
- ohai "Checking out #{@ref_type} #{@ref}" if @ref_type && @ref
- end
-
def cached_location
@clone
end
@@ -503,7 +499,10 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
args = ["svn", svncommand]
args << url unless target.directory?
args << target
- args << "-r" << revision if revision
+ if revision
+ ohai "Checking out #{ref}"
+ args << "-r" << revision
+ end
args << "--ignore-externals" if ignore_externals
quiet_safe_system(*args)
end
@@ -645,11 +644,13 @@ class GitDownloadStrategy < VCSDownloadStrategy
safe_system "git", *clone_args
cached_location.cd do
safe_system "git", "config", "homebrew.cacheversion", cache_version
+ checkout
update_submodules if submodules?
end
end
def checkout
+ ohai "Checking out #{@ref_type} #{@ref}" if @ref_type && @ref
quiet_safe_system "git", "checkout", "-f", @ref, "--"
end
@@ -732,6 +733,7 @@ class MercurialDownloadStrategy < VCSDownloadStrategy
dst = Dir.getwd
cached_location.cd do
if @ref_type && @ref
+ ohai "Checking out #{@ref_type} #{@ref}" if @ref_type && @ref
safe_system hgpath, "archive", "--subrepos", "-y", "-r", @ref, "-t", "files", dst
else
safe_system hgpath, "archive", "--subrepos", "-y", "-t", "files", dst