[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: <Steve.Craft_at_sungard.com>
Date: 2006-10-05 16:40:04 CEST

>>From: "Felix Gilcher" <gilcher@exozet.com> [mailto:"Felix Gilcher"
<gilcher@exozet.com>]

>>Subject: AW: Pre-Commit Hook to Manipulate?

>>

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

>>

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

Clients are Mac OSX (mostly command line, some using the Java SVN client),
Win32 Tortoise, Win32 command line, a smattering of Linux clients. Clients
are in several countries. I was thinking that (en)forcing auto-props on the
client would be impossible, and would run into trouble when someone commits
something "out of bounds" and another user somewhere else on the planet
does a checkout or update and has a problem. I am also not sure that I can
expect clients to have version n of Python or Perl installed/configured a
certain way.

Is there a way in a pre-commit hook to capture "all" of a file's attributes
(including what the server thinks the file "is")? Maybe I can then do my
own tests and just reject the file if it doesn't fit all of my criteria.

---------------------------------------------------------------------
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:42:52 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.