You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Luca Ferrari <fl...@infinito.it> on 2007/10/08 07:01:12 UTC
avoiding empty comments
Hi,
is it possible discard, or better to avoid people committing with messages too
short than x chars? I know it sounds an orrible solution, but I'd like to
avoid people committing with empty messages.....
Thanks,
Luca
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Re: avoiding empty comments
Posted by Giulio Troccoli <Gi...@uk.linedata.com>.
>
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447
-----Original Message-----
> From: Luca Ferrari [mailto:fluca1978@infinito.it]
> Sent: 08 October 2007 14:25
> To: users@subversion.tigris.org
> Subject: Re: avoiding empty comments
>
> On Monday 8 October 2007 Matjaz's cat, walking on the keyboard, wrote:
> > On 10/8/07, Luca Ferrari <fl...@infinito.it> wrote:
> > > Hi,
> > > is it possible discard, or better to avoid people committing with
> > > messages too short than x chars? I know it sounds an orrible
solution,
> > > but I'd like to avoid people committing with empty messages.....
> >
> > http://svn.haxx.se/users/archive-2005-07/1553.shtml
>
> Thank you very much guys, I found that working with hooks is what I
need.
> Just
> another question: how can I return a description string to the client?
> Because when the hook denies the commit the client sees:
>
> svn: 'pre-commit' hook failed with error output:
>
> [luca@fluca:/sviluppo/dataflex/frm]$
>
> with no error output (of course I tried echoing to stdout). Any help?
You need to echo to stderr not stdout :-)
Giulio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: avoiding empty comments
Posted by Luca Ferrari <fl...@infinito.it>.
On Monday 8 October 2007 Matjaz's cat, walking on the keyboard, wrote:
> On 10/8/07, Luca Ferrari <fl...@infinito.it> wrote:
> > Hi,
> > is it possible discard, or better to avoid people committing with
> > messages too short than x chars? I know it sounds an orrible solution,
> > but I'd like to avoid people committing with empty messages.....
>
> http://svn.haxx.se/users/archive-2005-07/1553.shtml
Thank you very much guys, I found that working with hooks is what I need. Just
another question: how can I return a description string to the client?
Because when the hook denies the commit the client sees:
svn: 'pre-commit' hook failed with error output:
[luca@fluca:/sviluppo/dataflex/frm]$
with no error output (of course I tried echoing to stdout). Any help?
Luca
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: avoiding empty comments
Posted by Matjaz <mc...@gmail.com>.
On 10/8/07, Luca Ferrari <fl...@infinito.it> wrote:
> Hi,
> is it possible discard, or better to avoid people committing with messages too
> short than x chars? I know it sounds an orrible solution, but I'd like to
> avoid people committing with empty messages.....
http://svn.haxx.se/users/archive-2005-07/1553.shtml
Matjaz
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Re: avoiding empty comments
Posted by Giulio Troccoli <Gi...@uk.linedata.com>.
Using
svnlook dirs-changed --transaction $TXN $REPOS
will give you the path of all files changed. If you cut it you will get
every single bit of the path, including the project.
>
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447
-----Original Message-----
> From: Luca Ferrari [mailto:fluca1978@infinito.it]
> Sent: 08 October 2007 15:41
> To: users@subversion.tigris.org
> Subject: Re: avoiding empty comments
>
> On Monday 8 October 2007 your cat, walking on the keyboard, wrote:
> > Sure, you can write a pre-commit hook that enforces this
restriction.
> > A quick search on the mailing list shows some methods here you can
> > use if your server is on Windows:
>
>
> About the pre/post commit: is it possible to get the project the
operation
> is
> applying to? I mean, I've got several projects on the same repo and
I'd
> like
> to get only some behaviours depending on the project. I didn't find a
way
> using svnlook to understand the project, any help?
>
> Thanks,
> Luca
>
> ---------------------------------------------------------------------
> 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
Re: avoiding empty comments
Posted by Luca Ferrari <fl...@infinito.it>.
On Monday 8 October 2007 your cat, walking on the keyboard, wrote:
> Sure, you can write a pre-commit hook that enforces this restriction.
> A quick search on the mailing list shows some methods here you can
> use if your server is on Windows:
About the pre/post commit: is it possible to get the project the operation is
applying to? I mean, I've got several projects on the same repo and I'd like
to get only some behaviours depending on the project. I didn't find a way
using svnlook to understand the project, any help?
Thanks,
Luca
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: avoiding empty comments
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 8, 2007, at 02:01, Luca Ferrari wrote:
> is it possible discard, or better to avoid people committing with
> messages too
> short than x chars? I know it sounds an orrible solution, but I'd
> like to
> avoid people committing with empty messages.....
Sure, you can write a pre-commit hook that enforces this restriction.
A quick search on the mailing list shows some methods here you can
use if your server is on Windows:
http://svn.haxx.se/tsvnusers/archive-2006-04/0427.shtml
On Unix-like OSes it's of course easy too. Get the log message of the
incoming transaction with "svnlook" and pipe it through "wc -c" to
count the characters.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org