On Nov 13, 2006, at 10:46 AM, Alan Conway wrote:

Is it possible to get triggers to actually fix the properties rather
than just abort the commit and tell you to fix them?

Doesn't look that way -- the SVN book says the following.
"Warning

Do not attempt to modify the transaction using hook scripts. A common example of this would be to automatically set properties such as svn:eol-style or svn:mime-type during the commit. While this might seem like a good idea, it causes problems. The main problem is that the client does not know about the change made by the hook script, and there is no way to inform the client that it is out-of-date. This inconsistency can lead to surprising and unexpected behavior.

Instead of attempting to modify the transaction, it is much better to check the transaction in the pre-commit hook and reject the commit if it does not meet the desired requirements."

--steve


On Mon, 2006-11-13 at 10:25 -0500, Daniel Kulp wrote:
On Monday November 13 2006 10:14 am, Robert Greig wrote:
On 13/11/06, Steve Vinoski <[EMAIL PROTECTED]> wrote:
I don't object at all to adding it, but seeing as how we're part of a
much larger repository, could we even make such a change without
getting buy-in across all the other projects sharing this repository?

Yes that could be a problem. What we could do is put in a test at the
stop to do if the path of the commit starts with "qpid" so it only
really applies to our project. Or read a file to check which commit
paths to match on, since that would make it easy to roll out to other
projects.

Before spending much time on it, you probably should send a note to
[EMAIL PROTECTED] asking if it's possible and how to proceed.

Adding hooks into SVN, even if it bails if it's not qpid, would affect ALL
commits as processes would need to be forked to do the validation and
such.   Infrastructure would need to be involved to make sure that's
acceptable.

That all said, I'd love it. It would be great if it could be updated to
handle all the auto_props, but even flagging the eol-style is a huge
help.



Reply via email to