Re: Property values for boolean properties.
From: Talden <talden_at_gmail.com>
Date: 2007-06-18 06:21:53 CEST
"true" and "false" are literals in several programming languages (including
Do "+" and "-" better avoid the language issue? Are people of other spoken
Beyond these I think you are possibly stuck with the status quo of presence
I have to agree though that setting it to "off", "false" or "no" and having
-- Talden On 6/18/07, Karl Fogel <kfogel@red-bean.com> 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: > > $ svn propset svn:needs-lock "StrawberryFieldsForever" artwork.jpg > $ svn proplist -v artwork.jpg > Properties on 'artwork.jpg': > svn:needs-lock : * > $ > > This presents users with the conundrum of what property value to use. > Since you can use anything and it won't matter, what *should* you use? > In practice, we often seem to recommend the word "on", for example: > > $ svn propset svn:executable ON somescript > property 'svn:executable' set on 'somescript' > (from http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.propset.html > ) > > 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. > > I'm not sure what we can do about this. Obviously, "off" doesn't mean > "off" in all languages, and we wouldn't normally want potentially > scripted command-line client behaviors to depend on the locale. On > the other hand, "off" and "no" are widely-known English words, and the > rest of the command-line client interface depends on English words. > So we could have > > svn propset on artwork.jpg --> sets the property > svn propset yes artwork.jpg --> sets the property > > svn propset off artwork.jpg --> deletes the property > svn propset no artwork.jpg --> deletes the property > > ...with the second two being special cases. > > Yes, yes, I realize that's lame. Thoughts? Creative solutions? > Should we just live with it, and try to find another word besides > "on" to use in our examples? > > -Karl > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org > For additional commands, e-mail: dev-help@subversion.tigris.org > >Received on Mon Jun 18 06:21:57 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.