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

Re: Require comments/messages on commit

From: Gregory Piņero <gregpinero_at_gmail.com>
Date: 2005-05-07 00:09:41 CEST

I'm sorry, that did work. I just tested it by having it write a file
instead. I guess I just can't see the console it launches?

Ok, but now I'm stuck, Here's the actual code in my .bat file so far

SVNLOOK log -t "$TXN" "$REPOS" | C:\SVN_SANDBOX\hooks\CheckLength.py

Here are the questions I have:
1. Does anyone know how I feed TXN and REPOS to SVNLOOK in windows?
2. Is my piping right?
3. Can I avoid this whole .bat thing and just have the python script
called? (I read a .py extension wouldn't work)
4. How do I get a message to the user as the error, such as "A comment
of 20 chars is required" ?

Thanks,

Greg

On 5/6/05, Gregory Piņero <gregpinero@gmail.com> wrote:
> I'm still stuck on this. I renamed pre-commit.tmpl to pre-commit.bat
> and I replaced the contents with the two lines:
>
> echo "pre-commit.bat"
> pause
>
> I just want to see that the batch script is triggered. But when I
> check something in, nothing seems to happen. Any ideas?
>
> Thanks,
>
> Greg
>
> On 5/5/05, Ben Collins-Sussman <sussman@collab.net > wrote:
> > [please keep the users@ list cc'd]
> >
> >
> > On May 5, 2005, at 8:28 PM, Gregory Piņero wrote:
> >
> > > Thanks. That's neat it that the example already does what I want.
> > > Here are my questions after looking at the example:
> > >
> > > I'm running subversion on windows server 2000, these look like unix
> > > commands? Any ideas?
> > >
> > > I'm confused about how the hook works, does it launch svnlook? Why
> > > can svnlook see the log message before it is commited?
> > >
> >
> > The launches svnlook to examine the *transaction* before it's
> > committed, that's the -t argument.
> >
> > As for the rest of the command... I don't know win32 batch language.
> > You'll have to parse the output of svnlook and make sure it's not
> > returning an empty log value.
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat May 7 00:11:56 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.