[MERGE] Test for bug #272444 (symlinks to Unicode file names)
Martin Pool
mbp at canonical.com
Thu Nov 27 05:04:00 GMT 2008
On Wed, Nov 26, 2008 at 9:11 AM, Daniel Clemente <dcl441-bugs at yahoo.com> wrote:
>
> Could someone please check this patch in? Now it's semi-approved.
> http://bundlebuggy.aaronbentley.com/project/bzr/request/<87d4hmvnf1.fsf%40yahoo.com>
>
> That patch applies well against today's trunk.
>
> The tests fail since the bug is still there. There seems to be some UnicodeWarning too, but they come from the failing code, not from the test case, so it's not something the test can change.
> But the test can be checked in -before the bug is corrected- in order to help the fixture of bzrlib's code.
I've just sent it off to pqm for merge. I agree that having a test
that reproduces the problem is a good step towards it.
Now as far as actually fixing the problem: I agree with the approach
specified by John in that bug that we should interpret the symlink as
being in the filesystem encoding, and store it into our inventory as
utf-8.
So the next step I would probably take here would be, after the
commit, to look at the inventory object now stored in the repository
and check it has the right thing as the symlink target, and then do
the right conversions so that the filename is interpreted properly all
the way through commit.
There is a potential hole in testing here that I believe we only test
using the system's actual filesystem encoding, and if that's utf-8 as
it commonly is on Linux, we may not find some bugs in other encodings.
But I wouldn't let that put you off from at least getting it working
in whatever case you have now.
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list