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

Re: Changeing the commited file in a hook?

From: Juanma Barranquero <jmbarranquero_at_wke.es>
Date: 2004-04-22 11:28:31 CEST

On Thu, 22 Apr 2004 11:16:18 +0200
"Christoph Graf" <christoph.graf@chello.at> wrote:

> I want to write a hook that calls/uses a
> source-code beautifier (depending on the files MIME-type eg.
> C,c++,java to astyle and xml a xml-indenter) and then
> actually commits the beautified file.

This has been FA, although I'm not sure it's in a FAQ somewhere.

Short: no, you can't. You'll have to write a wrapper script for "svn" to
beautify the source code *before* commiting (i.e., before sending it to
the server).

Long: The current clients maintain copies of data, to make certain
operations (like diff) possible without contacting the server. Currently
there's no protocol that would allow the server to inform the client
that the data really commited *is not* the same data the client sent;
that would wreak havoc for the client. So it's not allowed.

At least, that's what I've understood the previous times the question
was asked :)

                                                                Juanma

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 22 11:28:59 2004

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.