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

Re: pre commit trigger

From: Irfan Sayed <irfu.sayed_at_gmail.com>
Date: Thu, 14 May 2009 15:57:40 +0530

Thanks all. Really really appreceiate. it worked now.....

Regards
irf

On Thu, May 14, 2009 at 5:19 AM, Ryan Schmidt <
subversion-2009b_at_ryandesign.com> wrote:

>
> On May 13, 2009, at 11:05, Bob Archer wrote:
>
> Ok but now how should i fix the issue.
>>>
>>
>> If you want it to output the path change your print line?
>>
>> chomp($repo = $ARGV[0]);
>>> chomp($txn = $ARGV[1]);
>>>
>>> $option = "-t";
>>> print STDERR "$txn\n";
>>>
>>
>> Should be
>>
>> print STDERR "$repo\n";
>>
>> ???
>>
>
> $repo is the path to the repository. It is not the path of any of the items
> being changed by the transaction. Those are on the lines of output from
> svnlook, which in the original script is being iterated over in a foreach
> loop and is available as part of the $_ variable within that loop.
>
> Here is a revised partial script that examines all items, not just the
> first one in the transaction, and also prints the name of the thing being
> examined.
>
>
>
> my @cmd = `$svnlook changed $option $txn $repo`;
> foreach(@cmd)
> {
> # trim trailing whitespace from $_
> chomp;
> # copy $_ to $item
> $item = $_;
> # remove first 4 characters from $item
> $item =~ s/^.{4}//;
> print STDERR "now examining $item\n";
> if ($_ =~/^A/)
> {
> print STDERR "it was added\n";
> }
> else{
> print STDERR "something other than add happened to it\n";
> }
> }
> exit 1;
>
>
>
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2254436

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-14 12:28:36 CEST

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.