public
Description: Piston is a utility that eases vendor branch management. This repository is a complete reimplementation of Piston to provide different backends, depending on the repositories and working copies you pistonize from.
Homepage: http://piston.rubyforge.org/
Clone URL: git://github.com/francois/piston.git
Piston::Svn::Repository wouldn't attempt to guess if the URI was handled.

Had missed the https scheme.
francois (author)
Mon Mar 24 18:42:52 -0700 2008
commit  fa63f093d00e848ca3efb929f15acca34b199a9c
tree    0455641a204d60995bb882dace715e72970fe03a
parent  0c1f38756d58b3f531f0ea1ae14484219fa1e068
...
18
19
20
 
21
22
23
...
18
19
20
21
22
23
24
0
@@ -18,6 +18,7 @@ module Piston
0
         logger.debug {"Guessing the repository type of #{url.inspect}"}
0
 
0
         handler = handlers.detect do |handler|
0
+ logger.debug {"Asking #{handler}"}
0
           handler.understands_url?(url)
0
         end
0
 
...
14
15
16
17
 
18
19
20
21
 
 
22
23
24
...
14
15
16
 
17
18
19
20
21
22
23
24
25
26
0
@@ -14,11 +14,13 @@ module Piston
0
           case uri.scheme
0
           when "svn", /^svn\+/
0
             true
0
- when "http", "file"
0
+ when "http", "https", "file"
0
             # Have to contact server to know
0
             result = svn(:info, url) rescue :failed
0
             result == :failed ? false : true
0
           else
0
+ # Don't know how to handle this scheme.
0
+ # Let someone else handle it
0
           end
0
         end
0
       end
...
25
26
27
 
 
 
 
 
 
28
29
30
...
25
26
27
28
29
30
31
32
33
34
35
36
0
@@ -25,6 +25,12 @@ class TestSvnRepositoryGuessing < Test::Unit::TestCase
0
     assert Piston::Svn::Repository.understands_url?(url)
0
   end
0
 
0
+ def test_contacts_repository_for_https_protocol
0
+ url = "https://svn.collab.net/repos/svn/trunk"
0
+ Piston::Svn::Repository.expects(:svn).with(:info, url).returns("Repository UUID: abcdef\n")
0
+ assert Piston::Svn::Repository.understands_url?(url)
0
+ end
0
+
0
   def test_says_does_not_understand_when_svn_info_errors_out
0
     url = "http://rubyonrails.org/"
0
     Piston::Svn::Repository.expects(:svn).with(:info, url).raises(Piston::Svn::Client::Failed)

Comments

    No one has commented yet.