On Wed, May 13, 2009 at 11:22, Irfan Sayed <irfu.sayed_at_gmail.com> wrote:
> thanks really for reply.
> Ok.
>
> Now script is executing but it is giving transaction id instead of
> path which is being commited
>
> here is the script
> #!/usr/bin/perl
>
> $svnlook = "/usr/bin/svnlook";
> chomp($repo = $ARGV[0]);
> chomp($txn = $ARGV[1]);
>
> $option = "-t";
> print STDERR "$txn\n";
>
> my @cmd = `$svnlook changed $option $txn $repo`;
> foreach(@cmd)
> {
> if ($_ =~/^A/)
> {
> print STDERR "added\n";
> exit 1;
> }
> else{
> print STDERR "not added\n";
> exit 1;
> }
> }
>
>
> and the output which i got in tortoise svn client is
>
> Commit failed (details follow):
> Commit blocked by pre-commit hook (exit code 1) with output:
> 127-4b
> not added
You're getting exactly what you should be getting. Look at your source:
> chomp($repo = $ARGV[0]);
> chomp($txn = $ARGV[1]);
>
> $option = "-t";
> print STDERR "$txn\n";
> i am modifying existing source code file so in foreach loop first
> condition will fail. now in this output "127-4b" is the transaction id
> but what i am expecting here is the path which is getting commited
You're expecting the path being committed but your code is outputting
the transaction ID.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2239324
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-13 17:29:26 CEST