[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Unversioned files with invalid UTF-8 sequence in name confuse svn

From: Vincent Lefevre <vincent-svn_at_vinc17.net>
Date: Thu, 3 Mar 2016 14:53:04 +0100

On 2016-03-01 17:12:05 +0100, Branko Čibej wrote:
> On 01.03.2016 16:58, Markus Schaber wrote:
> > Hi, Bert,
> >
> > From: Bert Huijben [mailto:bert_at_qqmail.nl]
> >> From: Markus Schaber [mailto:m.schaber_at_codesys.com]
> >>> Hi, Brane and Vincent,
> >>>
> >>> From: Branko Čibej [mailto:brane_at_apache.org]
> >>>>> However Subversion doesn't handle that (BTW it would be much
> >>>>> better to
> >>>>> remember the expected locale by storing it in the .svn directory
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> >>>>> rather than giving obscure error messages: if it did, Subversion
> >>>>> would know that the user was using an incorrect locale without any
> >>>>> ambiguity).
> >>>> And if the user changes the locale for valid reasons, the Subversion
> >>>> working copy would break in a different way.
> >>> I guess we would need some "change locale" operation, which would at
> >>> least update the saved locale in the .svn directory.
> >> There is no saved locale in the .svn directory...
> > Currently, yes, but it was suggested in the discussion, see the line above.
> The major problem with the "saved locale" idea is that it creates yet
> another potential discrepancy. I really can't imagine how we'd be doing
> the majority of our users a service by adding another knob that can
> seriously break things when it's misconfigured, but doesn't do anything
> useful most of the time.

I don't understand what you mean here. As you said, Subversion
expects the user to always use the same locale with a given working


  * If the user always uses the same locale, then everything is fine
    most of the time. But if some tool writes filenames that cannot
    be interpreted in this locale (this was the beginning of this
    thread), the working copy gets unusable until the user removes
    these files manually (which can be tedious).

  * If the user changes his locale, then the working copy is in an
    inconsistent state; it is either unusable, or usable but with
    incorrect information, which could lead to incorrect commits.

If the locale were recorded in .svn:

  * If the user always uses the same locale, then everything would be
    fine all the time. If some tool writes filenames that cannot be
    interpreted in this locale, then svn would know that it is not
    a problem due to the change of the locale, i.e. it would know that
    the file is necessarily unversioned. So, "svn st" would no longer
    have any reason to fail, and svn-clean could work as expected
    without this risk of being wrong.

  * If the user changes his locale, then svn would be able to emit
    a clear error message about the locale mismatch. Then the user
    could easily know what was wrong and change back to the previous
    locale (the one recorded in .svn).

So, this would be a big improvement.

Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Received on 2016-03-03 14:53:27 CET

This is an archived mail posted to the Subversion Dev mailing list.