Skip to content

Commit

Permalink
Add :checkout option to allow checkinable pod when using --no-clean
Browse files Browse the repository at this point in the history
The svn downloader uses export instead of checkout by default since
CocoaPods/CocoaPods#473.

But having a "checkin-able" pod is still usefull for the Pods developpers even
if it has been aggreed to be a minority-use case.
(from CocoaPods/CocoaPods#245 discussion).
  • Loading branch information
marcc-orange committed Dec 12, 2013
1 parent 9ab9050 commit bd3ea5f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/cocoapods-downloader/subversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Downloader
class Subversion < Base

def self.options
[:revision, :tag, :folder]
[:revision, :tag, :folder, :checkout]
end

def options_specific?
Expand All @@ -23,7 +23,8 @@ def checkout_options
executable :svn

def download!
output = svn!(%|#{export_subcommand} "#{reference_url}" "#{target_path}"|)
subcommand = options[:checkout] ? checkout_subcommand : export_subcommand
output = svn!(%|#{subcommand} "#{reference_url}" "#{target_path}"|)
store_exported_revision(output)
end

Expand All @@ -41,6 +42,10 @@ def export_subcommand
result = 'export --non-interactive --trust-server-cert --force'
end

def checkout_subcommand
result = 'checkout --non-interactive --trust-server-cert --force'
end

def reference_url
result = url.dup
result << '/' << options[:folder] if options[:folder]
Expand Down

0 comments on commit bd3ea5f

Please sign in to comment.