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

Re: Enforcing Code Style

From: David Weintraub <qazwart_at_gmail.com>
Date: Fri, 22 Aug 2008 11:27:17 -0400

On Fri, Aug 22, 2008 at 9:24 AM, John Peacock
<john.peacock_at_havurah-software.org> wrote:
> Tom Browder wrote:
>>
>> That sounds like a good idea. Am I correct that the script would have
>> to be run on the user's host?
>
> No, all hook scripts run on the server; the Subversion project itself has
> shied away from client-side scripting (from a security standpoint). You are
> free to make any sort of wrapper around svn that you like, to run any sort
> of cleanup and validation you want, but that is something you need to manage
> all on your own.

I worked with ClearCase which used Client side hooks. The advantage:
You could make changes in the code, comments, file properties, etc.
before a commit took place.

The disadvantage: You could make changes in the code, comments, file
properties, etc. before a commit took place. That meant what the
developer THINKS he checked in isn't what actually got checked in. If
the developer is using a static working directory, the files on the
developer's machine would be different from what was just checked in.

The other disadvantage is attempting to get the hook working on every
single possible client configuration out there. Wrote a hook in Perl
or Python? That has to be installed on the developer's system. Or
maybe it's an incompatible version. Or, maybe a module you use isn't
installed on the developer's machine.

Is that netshare you reference in your script available? Is the "H"
drive mapped to the correct share? Is the developer on a Windows
machine, or a Linux or Mac?

Imagine working with a couple hundred developers and knowing about 25%
each year will get a new machine. Now, you spend most of your days
configuring new machines in order for your hooks to work.

Yes, developers hate it when a commit fails because they forgot to put
some sort of property on a newly created file (like the svn:eol-style
property on shell scripts), but I'll live with a little developer
grumbling if it means I don't have to worry about whether a
developer's system is correctly configured in order to run the hook.

--
David Weintraub
qazwart_at_gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-22 17:27:40 CEST

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.