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

AW: Pre-Commit Hook to Manipulate?

From: Felix Gilcher <gilcher_at_exozet.com>
Date: 2006-10-05 16:16:22 CEST

Steve.Craft@sungard.com <mailto:Steve.Craft@sungard.com> schrieb am Donnerstag, 5. Oktober 2006 16:05:

> 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?
>

The safest way to do this from a precommit hook: Not at all.

While it may technically be possible you're just inviting trouble to come knocking at your door (primary reason: the commit differs from what the client thinks it did commit, leading to trouble on the next update because diffs won't line up etc.).

Instead: go for the autoprops route or write a script that wraps the commandline client (or uses the perl/python api). In addition write a precommit-hook that checks wether the file conforms to the given requirements and if not rejects the commit with a friendly and comprehensive message.
  
>
>
> Thanks.
>
>

felix

-- 
Felix Gilcher
Head of IT Development
Exozet Berlin GmbH
Rotherstraße 20
10245 Berlin
eMail: gilcher@exozet.com
URL: www.exozet.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Oct 5 16:17:28 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.