NFCFS

NFCFS and Subversion

Subversion seems to partially work with international characters in file names. As the tests below suggests, adding and committing files with international characters in the file name works, but svn status does not give a correct report on the state of the local copy.

As far as I know, svn status is the only Subversion command that has problems with international characters, so if you do not use that particular command a lot you do not need NFCFS.

Issue 2464 in Subversion's bug tracker discusses a similar problem and provides some suggestions for workarounds.

The version of Subversion used in the examples below is version 1.6.5 (r38866) from MacPorts, built using the +unicode_path compiler option as suggested in the bug discussion above.

Subversion without NFCFS

Here's an example of trying to add a file with an international character in the file name to a Subversion repository.

With Subversion, you can have the repository either locally in the file system or remotely. In the examples below I use a remote repository since using a local repository caused a segmentation fault on my machine every time I tried to make a commit.

First, create a working directory and check out the repository:

mkdir /tmp/svn
cd /tmp/svn
svn co svn://remote_host/test .

Subversion should respond with:

Checked out revision 0.

Now, create a file with an international character in the file name, and add it to the Subversion repository:

touch ö.txt
svn add ö.txt

Subversion responds with:

A         ö.txt

So far so good, but when asking Subversion for status using

svn status

Subversion will respond with

?       ö.txt
!       ö.txt

This is not correct, Subversion is confused and sees two versions of the file I wanted to add, one removed and one it does not recognize.

Committing works however, typing

svn commit -m "whatever"

Will result in the expected output:

Adding         ö.txt
Transmitting file data .
Committed revision 1.

Subversion with NFCFS

Doing the same thing in a directory mounted using NFCFS works better:

First, checkout the local working copy:

mkdir /Volumes/nfcfs/svn
cd /Volumes/nfcfs/svn
svn co svn://remote_host/test .
touch ö.txt
svn add ö.txt

When asking for status using

svn status

Subversion will respond with

A       ö.txt

Which seems correct.

Version tested

The version tested is the Subversion built by MacPorts, with the +unicode_path option, installed like this:

sudo port install subversion +unicode_path

This produces the following relevant warning:

Warning: This variant (+unicode_path) implements a hack to deal with composed/decomposed unicode handling on Mac OS X which is different from linux and windows. It is an implementation of solution 1 from http://svn.collab.net/repos/svn/trunk/notes/unicode-composition-for-filenames which _WILL_ break some setups. Please be sure you understand what you are asking for when you install this variant.

Typing svn --version prodcues the following output:

svn, version 1.6.5 (r38866)
   compiled Dec  6 2009, 15:24:09

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).