[patch] urlutils.join() should handle trailing slashes better

Wouter van Heyst larstiq at larstiq.dyndns.org
Thu Jun 15 22:36:52 BST 2006


On Thu, Jun 15, 2006 at 04:29:05PM -0500, John Arbash Meinel wrote:
> Wouter van Heyst wrote:
> > On Thu, Jun 15, 2006 at 04:06:24PM -0500, John Arbash Meinel wrote:
> 
> ...
> 
> >> === modified file 'bzrlib/tests/test_urlutils.py'
> >> --- bzrlib/tests/test_urlutils.py	2006-06-15 01:58:02 +0000
> >> +++ bzrlib/tests/test_urlutils.py	2006-06-15 21:04:22 +0000
> >> @@ -209,6 +209,13 @@
> >>          test('http://bar', 'http://foo', 'http://bar')
> >>          test('sftp://bzr/foo', 'http://foo', 'bar', 'sftp://bzr/foo')
> >>          test('file:///bar', 'foo', 'file:///bar')
> >> +
> >> +        # From a base path
> >> +        test('file:///foo', 'file:///', 'foo')
> >> +        test('file:///bar/foo', 'file:///bar/', 'foo')
> >> +        test('http://host/foo', 'http://host/', 'foo')
> > 
> >> +        test('http://host/foo', 'http://host', 'foo')
> > 
> > Isn't this redundant with test('http://foo/bar', 'http://foo', 'bar')
> > earlier on? Otherwise +1.
> > 
> > Wouter van Heyst
> 
> No, because http://host has no path, while 'http://host/foo' has the
> path '/foo'.

I should have been clearer, the bit I pasted was from line 202 in the
relative path joing test section. Unless I'm really missing something.

Wouter van Heyst




More information about the bazaar mailing list