You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Richard Moore <mo...@iinet.net.au> on 2004/04/21 12:59:51 UTC

Pre-commit hook

Hi all

I'm try to get a copy of the log for the transaction that is about to be
committed, but without much success.

In the template provided the eg
LOG=`$SVNLOOK log -t "$TXN" "$REPOS"`
is supplied, but my understanding is that the transaction name and not
number is passes into the hook, and svnlook use the transaction number.

Any help would be greatly appreciated.

Kind regards

Richard Moore



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Pre-commit hook

Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2004-04-22 at 06:20, Richard Moore wrote:

> SVNLOOK log %REPOS-PATH% -t %TXN-NAME% 

(Why don't you show us your entire .bat file?)

Have you actually *set* the %REPOS-PATH% and %TXN-NAME% variables?  The
batch file receives this information as "arguments", not as named
variables:  so I think you want to use %1 and %2 (which are the same as
$1 and $2 in Unix.)



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Pre-commit hook

Posted by Richard Moore <mo...@iinet.net.au>.
Ben

Being the novice that I am with windows bat files I originally had:

SVNLOOK log %REPOS-PATH% -t %TXN-NAME% >> C:\SVNTest\trunk\test.txt in my
pre-commit.cmd file. Once id added the "" around %TXN-NAME%, as below, I
started to get the log message in test.txt

SVNLOOK log %REPOS-PATH% -t "%TXN-NAME%" >> C:\SVNTest\trunk\test.txt

It was your "no diff..." sentence got me thinking "yes there is, ones a
string and ones an int, oh that's right strings need quotes!!!"

Thanks for the help

Kind regards

Richard Moore


-----Original Message-----
From: Ben Collins-Sussman [mailto:sussman@collab.net] 
Sent: Thursday, 22 April 2004 00:01
To: Richard Moore
Cc: users@subversion.tigris.org
Subject: Re: Pre-commit hook

On Wed, 2004-04-21 at 07:59, Richard Moore wrote:
> Hi all
> 
> I'm try to get a copy of the log for the transaction that is about to be
> committed, but without much success.

What's the problem?  You never say what the problem is.

> 
> In the template provided the eg
> LOG=`$SVNLOOK log -t "$TXN" "$REPOS"`
> is supplied, but my understanding is that the transaction name and not
> number is passes into the hook, and svnlook use the transaction number.

There's no difference between a "transaction name" and a "transaction
number".  They're the same thing.  All transactions have names like
"3p8q9a", which are just strings.



---------------------------------------------------------------------
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: Pre-commit hook

Posted by Ben Collins-Sussman <su...@collab.net>.
On Wed, 2004-04-21 at 07:59, Richard Moore wrote:
> Hi all
> 
> I'm try to get a copy of the log for the transaction that is about to be
> committed, but without much success.

What's the problem?  You never say what the problem is.

> 
> In the template provided the eg
> LOG=`$SVNLOOK log -t "$TXN" "$REPOS"`
> is supplied, but my understanding is that the transaction name and not
> number is passes into the hook, and svnlook use the transaction number.

There's no difference between a "transaction name" and a "transaction
number".  They're the same thing.  All transactions have names like
"3p8q9a", which are just strings.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org