Prompt user to use pip for Hg and Bzr

This commit is contained in:
Max Howell 2009-12-05 17:28:01 +00:00
parent a1583d1d3c
commit 54aff61ef6
2 changed files with 25 additions and 0 deletions

View File

@ -24,6 +24,27 @@
FORMULA_META_FILES = %w[README ChangeLog COPYING LICENSE COPYRIGHT AUTHORS] FORMULA_META_FILES = %w[README ChangeLog COPYING LICENSE COPYRIGHT AUTHORS]
PLEASE_REPORT_BUG = "#{Tty.white}Please report this bug at #{Tty.em}http://github.com/mxcl/homebrew/issues#{Tty.reset}" PLEASE_REPORT_BUG = "#{Tty.white}Please report this bug at #{Tty.em}http://github.com/mxcl/homebrew/issues#{Tty.reset}"
def check_for_blacklisted_formula names
return if ARGV.force?
names.each do |name|
case name
when 'bazaar', 'bzr' then abort <<-EOS
Bazaar can be installed thusly:
brew install pip && pip install bzr==2.0.1
EOS
when 'mercurial', 'hg' then abort <<-EOS
Mercurial can be install thusly:
brew install pip && pip install mercurial
EOS
end
end
end
def __make url, name def __make url, name
require 'formula' require 'formula'

View File

@ -100,6 +100,8 @@ begin
end end
when 'search', '-S' when 'search', '-S'
check_for_blacklisted_formula(ARGV.named)
require "formula" require "formula"
formulae = Formulary.names with_aliases=true formulae = Formulary.names with_aliases=true
@ -199,6 +201,8 @@ begin
end end
when 'install' when 'install'
check_for_blacklisted_formula(ARGV.named)
require 'formula_installer' require 'formula_installer'
require 'hardware' require 'hardware'