Mercurial - recognize Google Code repos and support revisions.
This commit is contained in:
parent
4731add213
commit
b3c1e0aba2
@ -220,7 +220,12 @@ class MercurialDownloadStrategy <AbstractDownloadStrategy
|
|||||||
url=@url.sub(%r[^hg://], '')
|
url=@url.sub(%r[^hg://], '')
|
||||||
|
|
||||||
unless @clone.exist?
|
unless @clone.exist?
|
||||||
safe_system 'hg', 'clone', url, @clone
|
checkout_args = []
|
||||||
|
if (@spec == :revision) and @ref
|
||||||
|
checkout_args << '-r' << @ref
|
||||||
|
end
|
||||||
|
checkout_args << url << @clone
|
||||||
|
safe_system 'hg', 'clone', *checkout_args
|
||||||
else
|
else
|
||||||
# TODO hg pull?
|
# TODO hg pull?
|
||||||
puts "Repository already cloned"
|
puts "Repository already cloned"
|
||||||
|
|||||||
@ -165,6 +165,7 @@ class Formula
|
|||||||
when %r[^svn://] then SubversionDownloadStrategy
|
when %r[^svn://] then SubversionDownloadStrategy
|
||||||
when %r[^svn+http://] then SubversionDownloadStrategy
|
when %r[^svn+http://] then SubversionDownloadStrategy
|
||||||
when %r[^git://] then GitDownloadStrategy
|
when %r[^git://] then GitDownloadStrategy
|
||||||
|
when %r[^https?://(.+?\.)?googlecode\.com/hg] then MercurialDownloadStrategy
|
||||||
when %r[^http://(.+?\.)?googlecode\.com/svn] then SubversionDownloadStrategy
|
when %r[^http://(.+?\.)?googlecode\.com/svn] then SubversionDownloadStrategy
|
||||||
when %r[^http://(.+?\.)?sourceforge\.net/svnroot/] then SubversionDownloadStrategy
|
when %r[^http://(.+?\.)?sourceforge\.net/svnroot/] then SubversionDownloadStrategy
|
||||||
when %r[^http://svn.apache.org/repos/] then SubversionDownloadStrategy
|
when %r[^http://svn.apache.org/repos/] then SubversionDownloadStrategy
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user