Commit d2f30d88 authored by Ben Asher's avatar Ben Asher Committed by GitHub

Merge pull request #6550 from adellibovi/master

Provide progress when updating specs
parents f5d7b5bc bf5ae18c
...@@ -20,6 +20,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -20,6 +20,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Dimitris Koutsogiorgas](https://github.com/dnkoutso) [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6516](https://github.com/CocoaPods/CocoaPods/issues/6516) [#6516](https://github.com/CocoaPods/CocoaPods/issues/6516)
* Support git progress for `pod repo update` and `pod install --repo-update`
[Alfredo Delli Bovi](https://github.com/adellibovi)
[#6525](https://github.com/CocoaPods/CocoaPods/issues/6525)
## 1.2.1.beta.1 (2017-03-08) ## 1.2.1.beta.1 (2017-03-08)
......
...@@ -217,7 +217,7 @@ module Pod ...@@ -217,7 +217,7 @@ module Pod
def update_repositories def update_repositories
sources.each do |source| sources.each do |source|
if source.git? if source.git?
config.sources_manager.update(source.name) config.sources_manager.update(source.name, true)
else else
UI.message "Skipping `#{source.name}` update because the repository is not a git source repository." UI.message "Skipping `#{source.name}` update because the repository is not a git source repository."
end end
......
...@@ -104,7 +104,7 @@ module Pod ...@@ -104,7 +104,7 @@ module Pod
def update_git_repo(show_output = false) def update_git_repo(show_output = false)
Config.instance.with_changes(:verbose => show_output) do Config.instance.with_changes(:verbose => show_output) do
git!(%W(-C #{repo} fetch origin)) git!(%W(-C #{repo} fetch origin #{show_output ? '--progress' : ''}))
current_branch = git!(%W(-C #{repo} rev-parse --abbrev-ref HEAD)).strip current_branch = git!(%W(-C #{repo} rev-parse --abbrev-ref HEAD)).strip
git!(%W(-C #{repo} reset --hard origin/#{current_branch})) git!(%W(-C #{repo} reset --hard origin/#{current_branch}))
end end
......
...@@ -67,7 +67,7 @@ module Pod ...@@ -67,7 +67,7 @@ module Pod
it 'does not update unused sources' do it 'does not update unused sources' do
@analyzer.stubs(:sources).returns(config.sources_manager.master) @analyzer.stubs(:sources).returns(config.sources_manager.master)
config.sources_manager.expects(:update).once.with('master') config.sources_manager.expects(:update).once.with('master', true)
@analyzer.update_repositories @analyzer.update_repositories
end end
...@@ -124,7 +124,7 @@ module Pod ...@@ -124,7 +124,7 @@ module Pod
source.stubs(:repo).returns('/repo/cache/path') source.stubs(:repo).returns('/repo/cache/path')
config.sources_manager.expects(:find_or_create_source_with_url).with(repo_url).returns(source) config.sources_manager.expects(:find_or_create_source_with_url).with(repo_url).returns(source)
source.stubs(:git?).returns(true) source.stubs(:git?).returns(true)
config.sources_manager.expects(:update).once.with(source.name) config.sources_manager.expects(:update).once.with(source.name, true)
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile, nil) analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile, nil)
analyzer.update_repositories analyzer.update_repositories
......
...@@ -94,7 +94,7 @@ module Pod ...@@ -94,7 +94,7 @@ module Pod
repo_update = sequence('repo update') repo_update = sequence('repo update')
MasterSource.any_instance. MasterSource.any_instance.
expects(:git!). expects(:git!).
with(%W(-C #{test_repo_path} fetch origin)). with(%W(-C #{test_repo_path} fetch origin --progress)).
in_sequence(repo_update) in_sequence(repo_update)
MasterSource.any_instance. MasterSource.any_instance.
...@@ -124,7 +124,7 @@ module Pod ...@@ -124,7 +124,7 @@ module Pod
MasterSource.any_instance. MasterSource.any_instance.
expects(:git!). expects(:git!).
with(%W(-C #{test_repo_path} fetch origin)). with(%W(-C #{test_repo_path} fetch origin --progress)).
in_sequence(repo_update) in_sequence(repo_update)
MasterSource.any_instance. MasterSource.any_instance.
...@@ -151,7 +151,7 @@ module Pod ...@@ -151,7 +151,7 @@ module Pod
Source.any_instance.stubs(:git).with do |options| Source.any_instance.stubs(:git).with do |options|
options.join(' ') == %W(-C #{test_repo_path} diff --name-only aabbccd..HEAD).join(' ') options.join(' ') == %W(-C #{test_repo_path} diff --name-only aabbccd..HEAD).join(' ')
end.returns('') end.returns('')
MasterSource.any_instance.expects(:git!).with(%W(-C #{test_repo_path} fetch origin)).raises(<<-EOS) MasterSource.any_instance.expects(:git!).with(%W(-C #{test_repo_path} fetch origin --progress)).raises(<<-EOS)
fatal: '/dev/null' does not appear to be a git repository fatal: '/dev/null' does not appear to be a git repository
fatal: Could not read from remote repository. fatal: Could not read from remote repository.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment