[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: Dirk Schenkewitz <schenkewitz_at_docomolab-euro.com>
Date: 2005-06-23 17:10:13 CEST

Mark Phippard wrote:

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

IMHO that's the killer argument against doing any change to committed stuff
without doing another commit. If a post-commit hook would create another
commit (as already described), I guess it wouldn't be much worse than
rejecting the commit and tell the user to fix up the formatting first.

:-) Hmm, I'm getting ideas :-)

If a user-commit would always be followed by an automatic commit that does
nothing but changing the formatting, then both "versions of a commit" are
always available - that means, if a user doesn't like the auto-formatted
style, he/she could checkout or update to HEAD-1 to get the "original
version" and work on that.

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

That would be like forcing a sort of update on the user, isn't it?
I wouldn't like that, at least not without being asked.

> 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

I Agree. But I believe that it's good to discuss it anyway (without the
personal parts of course), to have the pro's and con's thrown in one's
face :-)
Btw, if this comes up over and over, wouldn't that qualify it for a FAQ?
Perhaps a special ML-FAQ, having on top:

"Before you bring up a topic on the ML, please search here for hints about
it - maybe your question is already answered."

and then

"Q328641287: Subversion cannot do Post Commit Code Formatting, why?"
followd by "This Question is a duplicate or similar to Q16538, see there"

:-)

Trying to be constructive ;-)
   Dirk

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