[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Pre-Commit Hook to Manipulate?

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2006-10-05 17:29:01 CEST

On 10/5/06, Steve.Craft@sungard.com <Steve.Craft@sungard.com> wrote:
>
> It looks like a couple of large XML files with binary-looking CDATA
> sections are playing with the emotions of my 1.3.2 server (accessed via
> Apache with SSL and clientside certs). The files commit fine, but they
> can't be initially checked out.
>
> I started to experiment with autoprops, but that's not really a solution
> because it would require everyone who touches the repository to have
> particular settings. So, it's hook time. What is the best way to go about
> re-formatting a file or forcing the MIME type so it can be safely checked
> out?

Technically, it's impossible to modify data in a pre-commit hook. You
can use the 'svnlook' program to look in the on-going transaction to
find file content, tree structure changes and property values. Using
those, you can determine whether or not to accept the commit.

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Oct 5 17:30:33 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.