]> granicus.if.org Git - python/commitdiff
Fix closes issue12683 - urljoin to work with relative join of svn scheme.
authorSenthil Kumaran <senthil@uthcode.com>
Wed, 3 Aug 2011 10:31:59 +0000 (18:31 +0800)
committerSenthil Kumaran <senthil@uthcode.com>
Wed, 3 Aug 2011 10:31:59 +0000 (18:31 +0800)
Lib/test/test_urlparse.py
Lib/urlparse.py
Misc/NEWS

index 127409e0419f04db818936c245e4a1a1c77c8871..e9763492c0b284048691fb41157d19e6c1ef64fa 100644 (file)
@@ -339,6 +339,7 @@ class UrlParseTestCase(unittest.TestCase):
         self.checkJoin('http:///', '..','http:///')
         self.checkJoin('', 'http://a/b/c/g?y/./x','http://a/b/c/g?y/./x')
         self.checkJoin('', 'http://a/./g', 'http://a/./g')
+        self.checkJoin('svn://pathtorepo/dir1','dir2','svn://pathtorepo/dir2')
 
     def test_RFC2732(self):
         for url, hostname, port in [
index e5528face6fcb6a1a0d4da02dd29865b81f9c871..2d53603c8982715d22949b2e60af303c11b4bfa4 100644 (file)
@@ -34,7 +34,8 @@ __all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag",
 # A classification of schemes ('' means apply by default)
 uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
                  'wais', 'file', 'https', 'shttp', 'mms',
-                 'prospero', 'rtsp', 'rtspu', '', 'sftp']
+                 'prospero', 'rtsp', 'rtspu', '', 'sftp',
+                 'svn']
 uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
                'imap', 'wais', 'file', 'mms', 'https', 'shttp',
                'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '',
index e824332157394975a041b4f141dc55e4cd2bbdec..585a56c75d6dfad7bd9d3929840855b02cd3a6f6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #12683: urlparse updated to include svn as schemes that uses relative
+  paths. (svn from 1.5 onwards support relative path).
+
 - Issue #11933: Fix incorrect mtime comparison in distutils.
 
 - Issues #11104, #8688: Fix the behavior of distutils' sdist command with