[MERGE] Test for bug #272444 (symlinks to Unicode file names)

Robert Collins robertc at robertcollins.net
Mon Sep 22 00:24:17 BST 2008


On Sun, 2008-09-21 at 12:25 +0200, Daniel Clemente wrote:
> New test for this bug:
> 
> https://bugs.launchpad.net/bzr/+bug/272444
> Support symlinks to non-ascii file names

Thank you for doing this. I have a few comments that would make this
test more useful - mainly to make sure the right code is consistently
tested.

Firstly, we try to put tests in files with related things, related by
the code they run rather than the concept.

So rather than a new test file this should be in e.g.
bzrlib/tests/blackbox/test_branch.py (because its ostensibly testing the
branch comment).

However, the branch command is just a thin wrapper over the library, and
there are multiple implementations of interfaces in there (because we
support working directly with e.g. svn trees, and older disk formats we
no longer create by default but we still support for backward
compatibility).

So the failure you see is in dirstate, which is the working tree disk
format. I'm not sure what exact code path is kicking in , but the
driving function seems to be set_parent_trees.

So - bzrlib/tests/workingtree_implementations (soon to be
per_workingtree)/test_parents.py, which has a TestSetParents class.

Adding a test to that class which constructs a symlink to a unicode path
would catch the failure on both the current disk format, on the wt3
format (which I think will just work), and on any future formats we
make.

Cheers,
Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080922/037c8408/attachment.pgp 


More information about the bazaar mailing list