Rev 2160: Fix another bug in urlutils.join. in sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/

Andrew Bennetts andrew.bennetts at canonical.com
Tue Mar 6 11:27:38 GMT 2007


At sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/

------------------------------------------------------------
revno: 2160
revision-id: andrew.bennetts at canonical.com-20070306112113-9pow71l4euaiftth
parent: andrew.bennetts at canonical.com-20070306080144-frjogke5hvc7a2t7
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss
timestamp: Tue 2007-03-06 22:21:13 +1100
message:
  Fix another bug in urlutils.join.
modified:
  bzrlib/tests/test_urlutils.py  test_urlutils.py-20060502192900-46b1f9579987cf9c
  bzrlib/urlutils.py             urlutils.py-20060502195429-e8a161ecf8fac004
=== modified file 'bzrlib/tests/test_urlutils.py'
--- a/bzrlib/tests/test_urlutils.py	2007-03-06 08:01:44 +0000
+++ b/bzrlib/tests/test_urlutils.py	2007-03-06 11:21:13 +0000
@@ -207,6 +207,7 @@
         test('http://foo/baz', 'http://foo', 'bar', '../baz')
         test('http://foo/bar/baz', 'http://foo', 'bar/baz')
         test('http://foo/baz', 'http://foo', 'bar/../baz')
+        test('http://foo/baz', 'http://foo/bar/', '../baz')
 
         # Absolute paths
         test('http://bar', 'http://foo', 'http://bar')

=== modified file 'bzrlib/urlutils.py'
--- a/bzrlib/urlutils.py	2007-03-06 08:01:44 +0000
+++ b/bzrlib/urlutils.py	2007-03-06 11:21:13 +0000
@@ -131,8 +131,8 @@
         path = base.split('/')
 
     if scheme is not None and len(path) >= 1:
-        host = path[:2]
-        path = path[2:]
+        host = path[:1]
+        path = path[1:]
     else:
         host = []
     for arg in args:




More information about the bazaar-commits mailing list