SVNLook in Perl Script - Help!

View: New views
3 Messages — Rating Filter:   Alert me  

SVNLook in Perl Script - Help!

by Tyler-54 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am very new to both Subversion and Perl, but I need to write a post-commit hook script in Perl to copy changes made in commits to another directory. What I'm stuck on is calling svnlook in my perl script to discover any changes. This is the code I have to do this specific part:

############################
($repos, $txn) = @ARGV;
print $repos . " " . $txn;
$txn = "-t $txn";
 
$svn_output = '$svnlook changed $txn $repos';
print $svn_output;
############################

I have $svnlook defined to the full path of svnlook.exe, and there are no errors. When I execute the script, nothing seems to happen with svn, and '$svnlook changed $txn $repos' is literally printed to the command line.

What I really need is some beginner help with calling svnlook changed in a perl script, I can't seem to figure this out.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].

Re: SVNLook in Perl Script - Help!

by Tyler Roscoe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 29, 2009 at 01:37:48PM -0700, Tyler wrote:
> ############################
> ($repos, $txn) = @ARGV;
> print $repos . " " . $txn;
> $txn = "-t $txn";
>  
> $svn_output = '$svnlook changed $txn $repos';

You probably mean for these to be backticks (`) instead of single
quotes (').

tyler

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].

RE: Re: SVNLook in Perl Script - Help!

by Tyler-54 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ah, that was it, thanks.

> On Thu, Oct 29, 2009 at 01:37:48PM -0700, Tyler wrote:
> > ############################
> > ($repos, $txn) = @ARGV;
> > print $repos . " " . $txn;
> > $txn = "-t $txn";
> >  
> > $svn_output = '$svnlook changed $txn $repos';
>
> You probably mean for these to be backticks (`) instead of single
> quotes (').
>
> tyler

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].