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

Re: Property values for boolean properties.

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-06-18 16:08:38 CEST

Michael Haggerty wrote:
> Karl Fogel wrote:
>> Subversion has two versioned properties interpreted as booleans --
>> 'svn:executable' and 'svn:needs-lock'. (I'm ignoring 'svn:special'
>> here, since users don't touch it directly.)
>>
>> Their property values are always normalized to "*", no matter what
>> value you actually gave. Thus:
>>
>> [...]
>>
>> But the problem is that the word "off" doesn't turn the property off;
>> instead, "off" turns it on too! You have to use 'svn propdel' to turn
>> the property off.
>
> In general, it's nice to have an explicit value meaning "false".
> Otherwise, one needs to learn two commands to toggle between
> conceptually very similar options:
>
> svn propset svn:executable true filename
>
> vs.
>
> svn propdel svn:executable filename

So Karl: if you write the code to do the client warning when using propset
with values of "off" or "false", maybe make the warning recommend propdel.

   $ svn propset svn:executable false filename
   svn: warning: The value of 'svn:executable' property is ignored by
   Subversion -- the behavior is enabled by the mere existence of the
   property. Your value of "false" looks like one which attempts to
   disable this property's behavior (but will not have that effect).
   If that is what you are trying to do, use 'svn propdel' instead.
   $

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Mon Jun 18 16:08:40 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.