Subversion pre-commit hook to clean XML from WebDAV autocommit client

Posted by rjmunro on Stack Overflow See other posts from Stack Overflow or by rjmunro
Published on 2010-05-24T09:15:44Z Indexed on 2010/05/24 9:21 UTC
Read the original article Hit count: 289

Filed under:
|
|

I know that it isn't normally safe to modify a commit from a pre-commit hook in Subversion because SVN clients will not see the version that has been committed, and will cache the wrong thing, but I'd like to clean the code from a versioning-naïve WebDAV client that won't keep a local cached copy. The idea is that when I look at the repository with an SVN client, the diffs are clean.

The client, by the way is MS Word, using 2003 XML format files. We're already using this format in a WebDAV system, but we'd like to add a versioning capability for expert users.

Everywhere I look for documentation on how to modify the code in a pre-commit hook, I get the answer "Don't do this", not the answer "Here's how to do this, but it's reccomeded you don't", so I can't even easily try it to see if it's going to cause me problems.

© Stack Overflow or respective owner

Related posts about svn

Related posts about msword