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

RE: Post Commit Code Formatting

From: Mark Phippard <MarkP_at_softlanding.com>
Date: 2005-06-23 02:25:52 CEST

"Jake Robb" <jakerobb@mac.com> wrote on 06/22/2005 05:08:08 PM:

> It seems to me that the Subversion developers have decided to lock a
door
> for reasons which are primarily non-technical, and it seems to me that
those
> whose industries do not prohibit automatic code alteration should be
allowed
> to use that door if they choose to do so.
>
> I am under the impression that a pre-commit hook is not currently
permitted
> to modify the data being committed. This is the locked door to which I
am
> referring, and unlocking this door would solve Bernard's issue. Nobody
is
> forcing anyone else to walk through the unlocked door.

First off there is no door. I do not believe there is anything to prevent
you from altering a transaction from within a hook. There is only a very
stern warning in the hook template. If you choose to ignore the warning,
well ... don't expect any sympathy when things go wrong.

The reason's for this are *entirely* technical. If you alter the content
of the file before it is committed, the WC of the user that committed the
file will not contain the same changes, but the WC will think it is up to
date. An svn up would not bring down any changes, and subsequent commits
to the file would likely fail because the delta's would not line up (I am
only speculating on this part).

To allow the hook to alter the transaction would require significantly
redesigning the commit process so that the changes could be sent back down
from the server to the client. It would be a hefty amount of work for a
feature that is dubious at best, and can be implemented in much saner
ways.

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 23 02:28:46 2005

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.