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

RE: Re: Formating C/C++ code before commit with indent

From: Neulinger, Nathan <nneul_at_umr.edu>
Date: 2005-06-21 17:16:27 CEST

Yes, stderr output from the precommit hook will be sent back to the client.

Have a look at the example pre commit hook that checks for an empty log message to get an idea of where to begin.

-- Nathan

------------------------------------------------------------
Nathan Neulinger EMail: nneul@umr.edu
University of Missouri - Rolla Phone: (573) 341-6679
UMR Information Technology Fax: (573) 341-4216
 

> -----Original Message-----
> From: Servico Tpd Rodrigo Alfonso Menezes Madera
> [mailto:tpd.madera@telefonica.com.br]
> Sent: Tuesday, June 21, 2005 9:51 AM
> To: users@subversion.tigris.org
> Subject: Re: Formating C/C++ code before commit with indent
>
>
>
>
>
> But Russ Brown´s suggestion would work, wouldn´t it? Wewould
> be discarding
> the commiot. Also, could we send an error message?
>
> Rodrigo
>
>
>
>
>
>
> Ulrich Eckhardt
>
>
> <eckhardt@satorl Para:
> users@subversion.tigris.org
>
> aser.com> cc:
>
>
> Assunto: Re:
> Formating C/C++ code before commit with indent
>
> 21/06/2005 10:47
>
>
>
>
>
>
>
>
>
>
>
> Russ Brown wrote:
> > Servico Tpd Rodrigo Alfonso Menezes Madera wrote:
> > > All of our C/C++ projects follow a well defined format
> (wich can be
> > > represented via indent params) and we wish to run indent
> just before
> the
> > > commits. This is important because our programmers very different
> setting
> > > in their editors such as tab spaces and formatting
> styles. The indent
> > > program handles this ok. It just has to be executed
> before the commit.
> [...]
> > You could run the committed files against the formatter in the
> > pre-commit hook, and if they don't match the original file the user
> > didn't run the file through before committing, and you can
> reject the
> > commit. That would force the users to run the files through the
> > formatter first, though it wouldn't do it automatically.
>
> Just for your info, there is no sane way to modify the data that was
> committed. The reason is that if you modified the data that a user
> committed,
> the user's local data would be out of sync with the data on
> the server,
> leading to all kinds of trouble. Yes, there are possible
> solutions, but
> these
> are rather complicated and not in Subversion.
>
> That is the reason why you can only reject malformatted data, but not
> format
> it yourself.
>
> cheers
>
> Uli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jun 21 17:18:04 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.