You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2004/03/07 14:58:19 UTC

Custom keywords - issue 890 [was: Re: Question on writing test for property/keyword patch - issue 780]

(I have changed the Subject line: it is issue 890, not 780.)

John Peacock wrote:
> I have almost got all the pieces in place (just need to rewrite the log 
> entry to match what my version does differently).  To remind people, I 
> have extended plasma's keyword-as-hash patch to support user defined 
> keywords which take a file property and expand it as a keyword.  I know, 
> not the useful now, but much more useful with inheritable properties.

It sounds like a good idea.  I would very much like to read the exact description of it, such as you might put in the Subversion book, that says how to use the feature and what happens if the specified property does not exist, etc.  This probably only requires a few lines added to the existing section on properties; it would be really nice if you could include this in your patch if you haven't already done so.  After reading what it is supposed to do, I could then review the patch to see that it does do what it is supposed to do.

> One thing I did was to add a configure option to enable the feature 
> (thinking that some folks might not approve ;~).  But I don't see a way 
> to test for that in prop_tests.py.  Is there a way to check for the 
> feature at the python test level (so I can permit it to XFAIL)???  I 
> suppose I could write a short C program which could have the #ifdef in 
> it; is that acceptable?

It is better not to have a compile-time configure option, unless there is some strong reason for needing one.  We should be able to agree, as a community, on whether we want the feature and whether the implementation is right.

I assume it uses the exising svn:keywords property, or something closely related, for run-time configuration.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Custom keywords - issue 890 [was: Re: Question on writing test for property/keyword patch - issue 780]

Posted by John Peacock <jp...@rowman.com>.
Julian Foad wrote:
> It sounds like a good idea.  I would very much like to read the exact 
> description of it, such as you might put in the Subversion book, that 
> says how to use the feature and what happens if the specified property 
> does not exist, etc.

Good point, I had not updated the book text.  I would think that the meat of the 
docs should be in the keywords section, with a short mention in the properties 
section.  I'll try and do that tonight (if I am still conscious; I'm building a 
shed ;~)...


> It is better not to have a compile-time configure option, unless there 
> is some strong reason for needing one.  We should be able to agree, as a 
> community, on whether we want the feature and whether the implementation 
> is right.

Well, for now, I'll strip it out and we can tussel over whether it should be a 
compile-time option later.

> 
> I assume it uses the exising svn:keywords property, or something closely 
> related, for run-time configuration.

Short answer is that the only time the code kicks in is if both of the following 
statements are true:

1) The file has an svn:keywords which includes the name of a property (i.e. not 
one of the normal keywords);

2) The file also has the property named in #1 set with a value (not to exceed a 
single line).

Actually, I just added some more tests and I need to do a little more work; if 
the property is delete (but the svn:keywords is still set), I would expect the 
keyword in the file to be unexpanded.  I just realized that currently, it just 
remains expanded with the last set value, and I'm not sure I like that...

John

-- 
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