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

Re: svn commit: rev 1784 - trunk trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-04-26 03:52:29 CEST

Ben Collins-Sussman <sussman@collab.net> writes:
> > use #include apr_general, and then use strcasecmp().
> Yikes! I naively copied that function from other places in the same C
> file, being used for the same purpose.
> I better go fix them both! Thanks.

Oops -- sorry, didn't mean to take the wind out of your sails. I
remembered some of the history of this, from discussions with
cmpilato, and wanted the log message to reflect that.

> I wanted the function to return *three* states of the executable
> property: on, off, or non-existent. They correspond to the actions of
> "do a +x", "do a -x", or "do nothing".
> I could have returned the actual property value, but I thought it was
> simpler to either return NULL, or return an *allocated* TRUE or FALSE.
> You don't think that's simpler for a caller to parse? I did. Simpler
> than having a caller parse an svn_string_t value, I think.

What about an enum?

By the way, I have a UI design question:

Are there circumstances where it's useful to say "this should never be
executable"? That is, such a file would get `chmod -x' when you do an
update, if you had accidentally +x'd it.

At first, I was imagining that we'd have a single property,
"svn:executable", and if it were set at all, then Subversion would
keep that file executable. That is, after every checkout/update, svn
checks to see if the property is set, and if it is, it makes sure the
file is executable. Simple, idempotent, who could ask for more?

When the property gets removed, the receipt of that prop change would
turn off the file's executableness; but other than that, *absence* of
the property would not toggle the execute bit off on every update.
Instead, absence of the property would normally mean that Subversion
doesn't do anything with the execute bit.

(One immediate question with this plan, of course, is what value
should people set for the property? Handling boolean parameters in a
key/value universe is annoying :-). I guess it would be "yes" or "on"
or something.)

Anyway. Then I saw the way you actually implemented it, and thought
to myself, "Hmmm, how interesting, Ben came up with a completely
different way!" And I can't see anything wrong with it. I'm just not
sure when one would want to force a file not-executable. I can see
wanting to enforce executablenss, and wanting to ignore
executableness, but not wanting to enforce *non*-executableness. :-)

FWIW, note that neither of these ways is the way described in the
issue. But that's okay, I think the initial plan in the issue was the
worst of the lot, heh.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 26 03:50:46 2002

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.