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

Re: request for discussion: repos hook system

From: <kfogel_at_collab.net>
Date: 2001-07-22 23:59:11 CEST

Justus Pendleton <subversion@ryoohki.net> writes:
> One thing I've often wanted is a hook to be able to modify the
> incoming check-ins and outgoing check-outs. One use I have forseen
> for this is coding standard formatting. The idea would be that upon
> check-in a project-wide script would normalize the code to the
> standard format. Upon checkout an individual specific script would
> reformat the code to that developer's personal preferences.

For now, we need to concentrate on matching CVS's functionality, which
is why I suggested limiting our goals to those things the CVS hook
system already provides (plus the auth stuff, which I suspect we'll
want soon).

There are a number of complexities to doing what you describe. One of
the reasons CVS keywords are so inflexible is so that they will not be
dangerous. They are known to the client, and the conventions for
expanding or not expanding them are shared among all clients. Even
so, they often cause spurious diffs, much to the annoyance of people
doing merges.

In order for stuff like this to work, the incoming and outgoing
modification schemes have to be known to the client, so it can adjust
appropriately during updates and commits. It's very dangerous to
start changing the data a person *thought* they committed, unless one
guarantees to do the inverse transformation on the way back, or
otherwise compensate. Subversion needs to transmit binary diffs back
and forth, and those diffs need to be based against the right data.

There are ways around this, of course, but it's not a two-week
project. Let's keep it simple for now. :-)

-Karl

 
> I guess there's really two aspects to this. One would be allowing
> individual specific scripts rather than just project-wide scripts.
> Maybe Developer A wants to know some source analysis script on his
> check-ins for personal edification. Requiring SCM admin cooperation
> often presents an insurmountable burden.
>
> The other is the modification of the checked in code. CVS actually
> already does this, it just is opaque and completely non-customizable:
> the use of RCS keyword expansion. Why limit it to that? Why not let
> the user add in whatever keywords they want. Whatever format they
> want. Maybe RCS doesn't cut it for whatever format they are using and
> want to roll their own? Maybe they want to run indent on every
> check-in.
>
> I don't know if this has been talked about much/at all but thoughts
> about how subversion would integrate with defect tracking and project
> planning software would be nice. I imagine that might require various
> hookage as well, but I'm not sure where. Maybe they are already
> covered by the triggers already available.
>
> Justus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:33 2006

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