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

Re: [PATCH] Re: "Revision" case-sensitive in svn:keywords

From: John Peacock <jpeacock_at_rowman.com>
Date: 2005-02-08 13:36:57 CET

Max Bowsher wrote:
> I'd be happy with just canonicalizing the input - for example, you can
> set svn:executable to any value, and it is silently canonicalized. I
> would apply the same logic to svn:keywords, and fully canonicalize the
> values - including the whitespace, particular alias, and order, too.
> Essentially, parse the keywords value (permissively) and then rewrite
> the string from the parsed set of booleans.

This seems doable in svn_wc_prop_set2 and it would deal with both of our
concerns I think. You're happy because we aren't relying on inconsistent case
and I'm happy because the capitalization matches usage in the file. We still
can't twilight the case-insensitive matching code until a dump/load cycle (where
we could normalize all svn:keywords values), since we are only fixing up the
input, not any existing values.

I wish I could say I could do this (since keywords seem to be my obsession), but
my son (4 1/2) has stopped going to bed easily. The amount of brainpower I have
to deal with programming issues is vastly reduced these days, and I still have
the keywords-as-hash patch to finish up.

Anyone wanting to do this [bite-sized task] should look at the following section
of code (from subversion/libsvn_wc/props.c:1108):

   if (kind == svn_node_file && strcmp (name, SVN_PROP_KEYWORDS) == 0)
     SVN_ERR (svn_wc__get_keywords (&old_keywords, path, adm_access, NULL,

and extend that if into a block which parses the value into tokens and then
matches the tokens against the legal keyword values (found in
subversion/include/svn_types.h starting at 216). See the above block dealing
with SVN_PROP_EXECUTABLE for hints on rewriting the string.

My personal preference would be to expand the tokens to be the LONG variants,
stored in alphabetical order, but that's just me (and I'm taking medication to
help these impulses, really I am ;)...


John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 8 13:37:49 2005

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.