subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shahaf <danie...@elego.de>
Subject Re: Let's discuss about unicode compositions for filenames!
Date Wed, 08 Feb 2012 22:30:40 GMT
Hiroaki Nakamura wrote on Thu, Feb 09, 2012 at 07:16:57 +0900:
> 2012/2/9 Stefan Sperling <stsp@elego.de>:
> >  - What happens if NFC/NFD is enabled in repository config, but the
> >   repository contains non-normalised paths (i.e. did not go through
> >   a dump/load cycle to normalise all paths)?
> 
> I think we will provide the check command for finding out:
> - whether a repository contains the same filenames of different unicode
>   normalized/unnormalized forms.
> - all filenames in a repository are NFC.
> - all filenames in a repository are NFD.
> 
> I think of an idea that we can change this config during loading cycle only,
> that is, we can specify this config as an option to load command.
> When load command finishes, the option value is saved in config.
> 
> However, administrators can cheat to change config file without loading,
> as the config file is a plain text file. So we cannot enforce this config must
> be set only by load command.
> 

How about:

- We add an svn_tristate_t bit[1] to the 'db/format' file

- The tristate is 'unknown' for 1.7 repositories

- For repositories created by 1.8, the tristate is set to either 'NFC'
  or 'NFD' at 'svnadmin create' time (before any 'svnadmin load')

- We provide an svn_fs_* API that checks the history and upgrades the
  bit from 'unknown' to either 'NFC' or 'NFD' if possible, or reports
  an error otherwise

Note that administrators aren't allowed to change the 'format' file not
through svnadmin.

> Therefore I think It should be administrators' responsibility to ensure this
> config match a repository.

Mime
View raw message