[Python-checkins] cpython (2.7): Fix closes issue12683 - urljoin to work with relative join of svn scheme.

senthil.kumaran python-checkins at python.org
Wed Aug 3 12:47:22 CEST 2011


http://hg.python.org/cpython/rev/5278aa2d9d9a
changeset: 71729:5278aa2d9d9a
branch: 2.7
parent: 71716:1e8dc34ece30
user: Senthil Kumaran <senthil at uthcode.com>
date: Wed Aug 03 18:31:59 2011 +0800
summary:
 Fix closes issue12683 - urljoin to work with relative join of svn scheme.
files:
 Lib/test/test_urlparse.py | 1 +
 Lib/urlparse.py | 3 ++-
 Misc/NEWS | 3 +++
 3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -339,6 +339,7 @@
 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 [
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -34,7 +34,8 @@
 # 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', '',
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@
 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
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /