changeset 475:15443c592f7a

Remove the svn+ from svn+https urls before calling the Subversion API. This was already being done for svn+http urls.
author David Stanek <dstanek@dstanek.com>
date Mon, 20 Jul 2009 16:00:37 -0400
parents 63cb630d667d
children 64cc119d8a9e
files hgsubversion/util.py tests/test_urls.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -71,7 +71,7 @@ def version(ui):
 
 
 def normalize_url(url):
-    if url.startswith('svn+http://'):
+    if url.startswith('svn+http://') or url.startswith('svn+https://'):
         url = url[4:]
     url, revs, checkout = hg.parseurl(url)
     url = url.rstrip('/')
--- a/tests/test_urls.py
+++ b/tests/test_urls.py
@@ -56,6 +56,9 @@ class TestSvnRepo(test_util.TestBase):
         repo = svnrepo.svnremoterepo(ui, 'svn+http://joe@foo/bar')
         self.assertEqual(('http://foo/bar', 'bob', None), repo.svnauth)
 
+        repo = svnrepo.svnremoterepo(ui, 'svn+https://joe@foo/bar')
+        self.assertEqual(('https://foo/bar', 'bob', None), repo.svnauth)
+
 def suite():
     all = [unittest.TestLoader().loadTestsFromTestCase(TestSubversionUrls)]
     return unittest.TestSuite(all)