diff --git a/.github/workflows/Specs.yml b/.github/workflows/Specs.yml index f86469d..d524e58 100644 --- a/.github/workflows/Specs.yml +++ b/.github/workflows/Specs.yml @@ -16,7 +16,6 @@ jobs: - name: Install dependencies run: | - brew install bzr brew install hg brew install svn diff --git a/CHANGELOG.md b/CHANGELOG.md index e7ac964..5e89c65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ * None. +##### Other + +* Drop support for Bazaar (`bzr`) + ## 1.6.3 (2022-04-01) diff --git a/README.markdown b/README.markdown index 78735c9..fb22667 100644 --- a/README.markdown +++ b/README.markdown @@ -34,7 +34,6 @@ The downloader class supports the following option keys: - hg: revision, tag, branch - http: type, flatten - scp: type, flatten -- bzr: revision, tag The downloader also provides hooks which allow to customize its output or the way in which the commands are executed @@ -74,7 +73,7 @@ Follow [@CocoaPods](http://twitter.com/CocoaPods) to get up to date information ## Development -You need to have `svn`, `bzr`, `hg` and `git` installed to run the specs. There are some specs which require `hdiutil` which will only run on macOS. +You need to have `svn`, `hg` and `git` installed to run the specs. There are some specs which require `hdiutil` which will only run on macOS. ## License diff --git a/lib/cocoapods-downloader.rb b/lib/cocoapods-downloader.rb index 0dd759a..aa7a152 100644 --- a/lib/cocoapods-downloader.rb +++ b/lib/cocoapods-downloader.rb @@ -5,7 +5,6 @@ module Downloader require 'cocoapods-downloader/api_exposable' require 'cocoapods-downloader/base' - autoload :Bazaar, 'cocoapods-downloader/bazaar' autoload :Git, 'cocoapods-downloader/git' autoload :Http, 'cocoapods-downloader/http' autoload :Mercurial, 'cocoapods-downloader/mercurial' @@ -21,7 +20,6 @@ class DownloaderError < StandardError; end # def self.downloader_class_by_key { - :bzr => Bazaar, :git => Git, :hg => Mercurial, :http => Http, diff --git a/lib/cocoapods-downloader/bazaar.rb b/lib/cocoapods-downloader/bazaar.rb deleted file mode 100644 index dee53db..0000000 --- a/lib/cocoapods-downloader/bazaar.rb +++ /dev/null @@ -1,60 +0,0 @@ -module Pod - module Downloader - class Bazaar < Base - def self.options - [:revision, :tag] - end - - def options_specific? - !options[:revision].nil? - end - - def checkout_options - Dir.chdir(target_path) do - options = {} - options[:bzr] = url - options[:revision] = `bzr revno`.chomp - options - end - end - - private - - # @group Private Helpers - #-----------------------------------------------------------------------# - - executable :bzr - - def download! - if options[:tag] - download_revision!(options[:tag]) - elsif options[:revision] - download_revision!(options[:revision]) - else - download_head! - end - end - - def download_head! - bzr! 'branch', url, *dir_opts, target_path - end - - def download_revision!(rev) - bzr! 'branch', url, *dir_opts, '-r', rev, @target_path - end - - # @return [String] The command line flags to use according to whether the - # target path exits. - # - def dir_opts - if @target_path.exist? - %w(--use-existing-dir) - else - [] - end - end - - #-----------------------------------------------------------------------# - end - end -end diff --git a/spec/bazaar_spec.rb b/spec/bazaar_spec.rb deleted file mode 100644 index dfde5db..0000000 --- a/spec/bazaar_spec.rb +++ /dev/null @@ -1,90 +0,0 @@ -require File.expand_path('../spec_helper', __FILE__) - -module Pod - module Downloader - describe 'Bazaar' do - before do - tmp_folder.rmtree if tmp_folder.exist? - end - - # Many tests disabled here due to macOS 12.3 no longer including python2. - - xit 'checks out a specific revision' do - options = { :bzr => fixture('bazaar-repo'), :revision => '1' } - downloader = Downloader.for_target(tmp_folder, options) - downloader.download - tmp_folder('README').read.strip.should == 'First Commit' - end - - xit 'checks out a specific tag as a revision' do - options = { :bzr => fixture('bazaar-repo'), :revision => 'my_tag' } - downloader = Downloader.for_target(tmp_folder, options) - downloader.download - tmp_folder('README').read.strip.should == 'Second Commit' - end - - xit 'checks out a specific tag as a tag' do - options = { :bzr => fixture('bazaar-repo'), :tag => 'my_other_tag' } - downloader = Downloader.for_target(tmp_folder, options) - downloader.download - tmp_folder('README').read.strip.should == 'Third Commit' - end - - xit 'checks out the head revision' do - options = { :bzr => fixture('bazaar-repo') } - downloader = Downloader.for_target(tmp_folder, options) - downloader.download - tmp_folder('README').read.strip.should == 'Fourth Commit' - end - - it 'returns whether it supports the download of the head' do - options = { :bzr => fixture('bazaar-repo') } - downloader = Downloader.for_target(tmp_folder('checkout'), options) - downloader.head_supported?.should.be.true - end - - describe 'when the directory name has quotes or spaces' do - xit 'checks out the head revision' do - options = { :bzr => fixture('bazaar-repo') } - downloader = Downloader.for_target(tmp_folder_with_quotes, options) - downloader.download - tmp_folder_with_quotes('README').read.strip.should == 'Fourth Commit' - end - - xit 'checks out a specific revision into a directory with quotes' do - options = { :bzr => fixture('bazaar-repo'), :revision => '1' } - downloader = Downloader.for_target(tmp_folder_with_quotes, options) - downloader.download - tmp_folder_with_quotes('README').read.strip.should == 'First Commit' - end - end - - xit 'returns the checked out revision' do - options = { :bzr => fixture('bazaar-repo') } - downloader = Downloader.for_target(tmp_folder, options) - downloader.download - downloader.checkout_options.should == { - :bzr => fixture('bazaar-repo'), - :revision => '4', - } - end - - it 'returns whether the provided options are specific' do - Downloader.for_target('path', :bzr => 'url').options_specific?.should.be.false - Downloader.for_target('path', :bzr => 'url', :revision => '').options_specific?.should.be.true - end - - it 'raises if it fails to download' do - options = { :bzr => 'missing-repo', :revision => '12' } - downloader = Downloader.for_target(tmp_folder, options) - lambda { downloader.download }.should.raise DownloaderError - end - - it 'has no preprocessing' do - options = { :bzr => fixture('bazaar-repo'), :revision => '1' } - new_options = Downloader.preprocess_options(options) - new_options.should == options - end - end - end -end diff --git a/spec/fixtures/bazaar-repo/.bzr/README b/spec/fixtures/bazaar-repo/.bzr/README deleted file mode 100644 index f82dc1c..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/README +++ /dev/null @@ -1,3 +0,0 @@ -This is a Bazaar control directory. -Do not change any files in this directory. -See http://bazaar.canonical.com/ for more information about Bazaar. diff --git a/spec/fixtures/bazaar-repo/.bzr/branch-format b/spec/fixtures/bazaar-repo/.bzr/branch-format deleted file mode 100644 index 9eb09b7..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/branch-format +++ /dev/null @@ -1 +0,0 @@ -Bazaar-NG meta directory, format 1 diff --git a/spec/fixtures/bazaar-repo/.bzr/branch/branch.conf b/spec/fixtures/bazaar-repo/.bzr/branch/branch.conf deleted file mode 100644 index e69de29..0000000 diff --git a/spec/fixtures/bazaar-repo/.bzr/branch/format b/spec/fixtures/bazaar-repo/.bzr/branch/format deleted file mode 100644 index dc392f4..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/branch/format +++ /dev/null @@ -1 +0,0 @@ -Bazaar Branch Format 7 (needs bzr 1.6) diff --git a/spec/fixtures/bazaar-repo/.bzr/branch/last-revision b/spec/fixtures/bazaar-repo/.bzr/branch/last-revision deleted file mode 100644 index b160a44..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/branch/last-revision +++ /dev/null @@ -1 +0,0 @@ -4 fred@sharpnoodles.com-20130903122427-q62tvv61aw0v4f4m diff --git a/spec/fixtures/bazaar-repo/.bzr/branch/tags b/spec/fixtures/bazaar-repo/.bzr/branch/tags deleted file mode 100644 index dd97f9d..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/branch/tags +++ /dev/null @@ -1 +0,0 @@ -d12:my_other_tag53:fred@sharpnoodles.com-20130903122403-19amncmj76umtisz6:my_tag53:fred@sharpnoodles.com-20130903122345-4ladk888amaey5uxe \ No newline at end of file diff --git a/spec/fixtures/bazaar-repo/.bzr/checkout/conflicts b/spec/fixtures/bazaar-repo/.bzr/checkout/conflicts deleted file mode 100644 index 0dc2d3a..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/checkout/conflicts +++ /dev/null @@ -1 +0,0 @@ -BZR conflict list format 1 diff --git a/spec/fixtures/bazaar-repo/.bzr/checkout/dirstate b/spec/fixtures/bazaar-repo/.bzr/checkout/dirstate deleted file mode 100644 index 2fd044d..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/checkout/dirstate and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/checkout/format b/spec/fixtures/bazaar-repo/.bzr/checkout/format deleted file mode 100644 index e0261c7..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/checkout/format +++ /dev/null @@ -1 +0,0 @@ -Bazaar Working Tree Format 6 (bzr 1.14) diff --git a/spec/fixtures/bazaar-repo/.bzr/checkout/views b/spec/fixtures/bazaar-repo/.bzr/checkout/views deleted file mode 100644 index e69de29..0000000 diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/format b/spec/fixtures/bazaar-repo/.bzr/repository/format deleted file mode 100644 index b200528..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/repository/format +++ /dev/null @@ -1 +0,0 @@ -Bazaar repository format 2a (needs bzr 1.16 or later) diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.cix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.cix deleted file mode 100644 index 37eb0db..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.cix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.iix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.iix deleted file mode 100644 index 8d6b85e..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.iix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.rix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.rix deleted file mode 100644 index 4e3dfac..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.rix +++ /dev/null @@ -1,6 +0,0 @@ -B+Tree Graph Index 2 -node_ref_lists=1 -key_elements=1 -len=1 -row_lengths=1 -xQ@0@=E/@h|H\"A7ܟp*\<i1;jG 2:p_ۺVELI' \ No newline at end of file diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.six b/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.six deleted file mode 100644 index a2afde6..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.six +++ /dev/null @@ -1,5 +0,0 @@ -B+Tree Graph Index 2 -node_ref_lists=0 -key_elements=1 -len=0 -row_lengths= diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.tix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.tix deleted file mode 100644 index f6603e1..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/0eee32389584c19d27fb19f04c01564d.tix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.cix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.cix deleted file mode 100644 index 9f85706..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.cix +++ /dev/null @@ -1,6 +0,0 @@ -B+Tree Graph Index 2 -node_ref_lists=0 -key_elements=1 -len=1 -row_lengths=1 -x 0 ԙ"#3q&[Hа=wwqY"e13\Y̘ڥIurIڢ' \ No newline at end of file diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.iix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.iix deleted file mode 100644 index 70c6756..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.iix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.rix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.rix deleted file mode 100644 index 07702ee..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.rix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.six b/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.six deleted file mode 100644 index a2afde6..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.six +++ /dev/null @@ -1,5 +0,0 @@ -B+Tree Graph Index 2 -node_ref_lists=0 -key_elements=1 -len=0 -row_lengths= diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.tix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.tix deleted file mode 100644 index 22c8e72..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/16b1053ed12916f4f545020352384e52.tix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.cix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.cix deleted file mode 100644 index ec69e75..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.cix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.iix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.iix deleted file mode 100644 index 35af968..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.iix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.rix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.rix deleted file mode 100644 index ef8b2b3..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.rix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.six b/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.six deleted file mode 100644 index a2afde6..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.six +++ /dev/null @@ -1,5 +0,0 @@ -B+Tree Graph Index 2 -node_ref_lists=0 -key_elements=1 -len=0 -row_lengths= diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.tix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.tix deleted file mode 100644 index 8c55dad..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/7ce6129415e312dba7c6ca36ee0f2157.tix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.cix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.cix deleted file mode 100644 index 481b0e8..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.cix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.iix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.iix deleted file mode 100644 index b696a10..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.iix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.rix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.rix deleted file mode 100644 index 576e788..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.rix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.six b/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.six deleted file mode 100644 index a2afde6..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.six +++ /dev/null @@ -1,5 +0,0 @@ -B+Tree Graph Index 2 -node_ref_lists=0 -key_elements=1 -len=0 -row_lengths= diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.tix b/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.tix deleted file mode 100644 index 85189b9..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/indices/f9604713d4ada772a21468a6846344b2.tix and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/pack-names b/spec/fixtures/bazaar-repo/.bzr/repository/pack-names deleted file mode 100644 index f9082e9..0000000 --- a/spec/fixtures/bazaar-repo/.bzr/repository/pack-names +++ /dev/null @@ -1,7 +0,0 @@ -B+Tree Graph Index 2 -node_ref_lists=0 -key_elements=1 -len=4 -row_lengths=1 -xE;1 DQY -Xǖ3PEx>uűO&s],CZpC~Lju1]GZސAGk:GLC6ItއwuQ=ߥND 1 \ No newline at end of file diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/packs/0eee32389584c19d27fb19f04c01564d.pack b/spec/fixtures/bazaar-repo/.bzr/repository/packs/0eee32389584c19d27fb19f04c01564d.pack deleted file mode 100644 index cb005aa..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/packs/0eee32389584c19d27fb19f04c01564d.pack and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/packs/16b1053ed12916f4f545020352384e52.pack b/spec/fixtures/bazaar-repo/.bzr/repository/packs/16b1053ed12916f4f545020352384e52.pack deleted file mode 100644 index 89251b6..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/packs/16b1053ed12916f4f545020352384e52.pack and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/packs/7ce6129415e312dba7c6ca36ee0f2157.pack b/spec/fixtures/bazaar-repo/.bzr/repository/packs/7ce6129415e312dba7c6ca36ee0f2157.pack deleted file mode 100644 index 1715513..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/packs/7ce6129415e312dba7c6ca36ee0f2157.pack and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/.bzr/repository/packs/f9604713d4ada772a21468a6846344b2.pack b/spec/fixtures/bazaar-repo/.bzr/repository/packs/f9604713d4ada772a21468a6846344b2.pack deleted file mode 100644 index ffefa84..0000000 Binary files a/spec/fixtures/bazaar-repo/.bzr/repository/packs/f9604713d4ada772a21468a6846344b2.pack and /dev/null differ diff --git a/spec/fixtures/bazaar-repo/README b/spec/fixtures/bazaar-repo/README deleted file mode 100644 index 95e72da..0000000 --- a/spec/fixtures/bazaar-repo/README +++ /dev/null @@ -1 +0,0 @@ -Fourth Commit \ No newline at end of file diff --git a/spec/fixtures/mercurial-repo/.hg/dirstate b/spec/fixtures/mercurial-repo/.hg/dirstate index 81b6f69..05ba32d 100644 Binary files a/spec/fixtures/mercurial-repo/.hg/dirstate and b/spec/fixtures/mercurial-repo/.hg/dirstate differ