I have an interesting problem with a possibly interesting feature request.
For the project I'm working on, I have a grammar definition file for a
language. For obvious reasons, the grammar file is managed by svn, but
the generated parser is not. The problem is that when the library tree
is checked out, the generated parser file will not be present, since
it's not managed by svn (and I don't want it managed by svn)
I'm wondering if this might not be a feature that would prove useful to
others. Here's what I'm thinking:
svn propset svn:checkoutscript name-of-script-with-optional-args
Then, after svn checks out the directory, it inspects the properties for
the directory and each file contained therin. For each object
containing the 'checkoutscript' property, svn executes the pointed-to
scripts in the directory where the property was configured. In my case,
I have a Makefile which takes care of running the parser generator. So,
I would do something like this:
svn propset svn:checkoutscrript make .
'make' would then be executed in the directory where the property was
set. In this case I set the script to execute at the directory checkout
level since I need both the Makefile *and* the grammar file to both be
present before make executes. You could also set this property at the
file level. Might not make as much sense at the file level tho.
There could be security issues with this solution, since the script
would be executed as yourself - if you're not careful, you could do some
I think in the meantime I'll have to check in the generated code, but it
would be nice to be able to manage the code in a cleaner method.
I don't think this feature already exists - I've looked at the hook
scripts, and current properties don't seem to address my requirements.
I've also done a search of the mailing list archives, but was not
successful in finding any hits. Could have been searching for the wrong
Thoughts? I agree that this is a pretty specific problem that I could
easily solve by checking in the generated file. However, think about
other ways this could be used:
- you have XML-based documentation - check it out, svn automatically
generates your documents for you
- auto-compile libraries on checkout
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Thu Sep 2 00:44:48 2004