On 10 Aug 2005 16:11:15 -0500, email@example.com <firstname.lastname@example.org>
wrote:> Not quite. > From the pre-commit hook, you can set (or modify
> delete) a revprop on the txn, before that txn becomes a finalized
Can you explain how that's done? I've been trying to do just that for a while.
The "svn prop(get|del|list) -revprop" commands require the "-r"
parameter for the revision. The "svn commit" command doesn't take any
revprop arguments, so it can't set them. In a hook script, you can use
the "svnlook proplist" and "svnlook propget" commands, but they can
only look at a property value, but not set it. You simply can't set
any type of properties via the svnlook command. Even worse, if you use
"svnlook propslist -revprop -t $TXN" to see what a particular revision
property is set to, you'll get an error as it reports that the
transaction number is an invalid "revision".
I have a hook script where I do try to set, or at least examine
revision properties, but no such luck. I even had to write in a kludge
to get it to work with svn:log.
Yes, when you do a commit transaction, you do set three revision
properties: svn:date, svn:author, and svn:log, but you have no control
over two of them, and the third you enter as the -m parameter of the
There is really no mechanism in Subversion to set these properties. I
looked into modifying the svn propset command to set revision
properties on the next commit (much like you can set non-revision
properties on the next commit). The issue started to become more and
more complex the closer I looked. For example, where would you store
Non-revision properties are stored in the .svn directory under the
directory where the file is kept, but since revision properties aren't
associated with a file, you can't do that. When you create a
Subversion working directory tree, every directory has it's own .svn
directory, and each one is capable to do a commit. In which one of
these directories would you store the revision properties? What would
happen if you don't do your commit from that directory?
I also looked into what it would take to set revision properties in
the commit transaction, but realized that the infrastructure wasn't
really there. The three revprops that are set are treated as special
cases and not in a generic way.
There is a defect
on this issue.
Now, you can set revision properties in a POST-commit hook via the
"svn propset --revprop -r $REVISION" command.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Thu Aug 11 02:28:39 2005