[MERGE] bugfix #90847: fix problem with parent location on another logical drive
Alexander Belchenko
bialix at ukr.net
Fri Dec 21 17:34:10 GMT 2007
This patch fixes problem with branch.set_parent() when parent actually
pointed to another logical drive on Windows system.
Under the hood set_parent() uses urlutils.relative_url() call, and
therefore the bug lies in latter function.
relative_url() produce valid relative url over the non-existent '/'
directory on Windows for two different logical drives. It's incorrect
and lead to many errors when local branch moved to another place, and
this relative URL becomes no more valid, because it stops to point
to another drive.
I fix this case in urlutils.relative_url and add 2 tests: for branch and
for urlutils modules.
Also I found that urlutils.relative_url is very fragile and could be
easily fooled by using different form of win32 file:/// URLs. See
code commented with '#~' signs in tests. But it's another story and till
now it was not reported as error, so I'm not willing to fix it right now.
Alexander.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bzr-mail-plw_gg.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20071221/7967b95b/attachment.diff
More information about the bazaar
mailing list