Rev 3506: Accept user names with @s in URLs (Neil Martinsen-Burrell) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Jun 20 02:09:26 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3506
revision-id:pqm at pqm.ubuntu.com-20080620010918-64z4xylh1ap5hgyf
parent: pqm at pqm.ubuntu.com-20080620002425-fthsmp2t0ftzxp6c
parent: ian.clatworthy at canonical.com-20080620004446-azoacvjesht32u7k
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-06-20 02:09:18 +0100
message:
Accept user names with @s in URLs (Neil Martinsen-Burrell)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_transport.py testtransport.py-20050718175618-e5cdb99f4555ddce
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
------------------------------------------------------------
revno: 3505.1.1
revision-id:ian.clatworthy at canonical.com-20080620004446-azoacvjesht32u7k
parent: pqm at pqm.ubuntu.com-20080620002425-fthsmp2t0ftzxp6c
parent: nmb at wartburg.edu-20080619065722-dboa3ko7ap8dcf2p
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Fri 2008-06-20 10:44:46 +1000
message:
Accept user names with @s in URLs (Neil Martinsen-Burrell)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_transport.py testtransport.py-20050718175618-e5cdb99f4555ddce
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
------------------------------------------------------------
revno: 3498.2.1
revision-id:nmb at wartburg.edu-20080619065722-dboa3ko7ap8dcf2p
parent: pqm at pqm.ubuntu.com-20080617064715-bmm5fdshd3gzgyac
committer: Neil Martinsen-Burrell <nmb at wartburg.edu>
branch nick: user-with-at
timestamp: Thu 2008-06-19 01:57:22 -0500
message:
Fix bug 228058: user names with @ signs should work
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_transport.py testtransport.py-20050718175618-e5cdb99f4555ddce
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
=== modified file 'NEWS'
--- a/NEWS 2008-06-18 05:14:28 +0000
+++ b/NEWS 2008-06-20 00:44:46 +0000
@@ -25,6 +25,10 @@
still in ``.bzr.log`` and can be shown with ``-Derror``.
(Martin Pool, #240161)
+ * Handle urls such as ftp://user@host.com@www.host.com where the user
+ name contains an @.
+ (Neil Martinsen-Burrell, #228058)
+
* ``needs_read_lock`` and ``needs_write_lock`` now suppress an error during
``unlock`` if there was an error in the original function. This helps
most when there is a failure with a smart server action, since often the
=== modified file 'bzrlib/tests/test_transport.py'
--- a/bzrlib/tests/test_transport.py 2007-12-11 14:26:18 +0000
+++ b/bzrlib/tests/test_transport.py 2008-06-19 06:57:22 +0000
@@ -641,6 +641,11 @@
self.assertEquals(t.base, 'http://simple.example.com/home/source/')
+ def test_parse_url_with_at_in_user(self):
+ # Bug 228058
+ t = ConnectedTransport('ftp://user@host.com@www.host.com/')
+ self.assertEquals(t._user, 'user at host.com')
+
def test_parse_quoted_url(self):
t = ConnectedTransport('http://ro%62ey:h%40t@ex%41mple.com:2222/path')
self.assertEquals(t._host, 'exAmple.com')
=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py 2008-06-09 07:20:06 +0000
+++ b/bzrlib/transport/__init__.py 2008-06-19 06:57:22 +0000
@@ -1311,7 +1311,7 @@
query, fragment) = urlparse.urlparse(url, allow_fragments=False)
user = password = host = port = None
if '@' in netloc:
- user, host = netloc.split('@', 1)
+ user, host = netloc.rsplit('@', 1)
if ':' in user:
user, password = user.split(':', 1)
password = urllib.unquote(password)
More information about the bazaar-commits
mailing list