[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: Durfee, Bernard <Bernard.Durfee_at_suny.edu>
Date: 2005-06-23 16:42:21 CEST

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

From what I understand so far there is something preventing this as the
file to be formatted does not 'exist' on the server until after the
commit.

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

Right, this is the second problem. Even if the post commit file contents
could be modified, those modifications could not be sent back to the
client using the existing protocol.

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

I think this feature is certainly better than dubious. As far as the
most sane way to implement, I feel that a server side implementation,
even if difficult, is more sane that implementing the feature in every
client application ever created.

Bernie

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 23 16:57:07 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.