[win32][BUG] url to filesystem???

John Arbash Meinel john at arbash-meinel.com
Wed Jun 14 04:32:55 BST 2006


Martin Pool wrote:
> On 10/06/2006, at 10:57 PM, John Arbash Meinel wrote:
> 
>> I tracked down the bug. It is in 'bzrlib.urlutils.split'. It would
>> probably have been caught by the test suite, but since so many other
>> tests fail under win32, it probably isn't obvious.
>>
>> Anyway, the attached patch makes win32 local paths work again.
>>
>> If I get a +1, I'll submit it to the pqm.
> 
> Can you please add a test that will run on all platforms and catch the
> bug?  That may require separating the function into a win32-specific one.
> 
> --Martin

The bug was explicitly in the win32 handling of paths. So there really
isn't a way to catch that on non-win32.

Otherwise we need to create a '_win32_split' function, so that we can
test it. And a very similar '_posix_split'.

Right now in urlutils we have a 'if sys.platform == 'win32' for split
and strip_trailing_slash, and then local_path_to_url and
local_path_from_url are already switched in from _win32_local_path_to_url.

I'm sort of okay with doing multiple functions for 'split()' since
basename and dirname depend directly on it. I'm less okay with doing
that for all the callers up the stack.

How would you like to handle it?

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060613/083eea4b/attachment.pgp 


More information about the bazaar mailing list