title: How to print arguments in SVN hook
body: <p>I am using windows7 and VisualSVN Server.
  I have wrote simple SVN post-commit hook which looks like</p>
  
  <pre><code>C:\Perl64\bin\perl C:\repositories\secret-project\hooks\myhook.pl %1 %2
  </code></pre>
  
  <p>and myhook.pl script looks like</p>
  
  <pre><code>$svnlook = '"C:\Program Files\VisualSVN Server\bin\svnlook.exe"';
  
  $repos = $ARGV[0];
  $txn = $ARGV[1];
  
  $msg = `$svnlook changed -t "$txn" "$repos"`;
  chomp($msg);
  
  print STDOUT $repos . " " . $txn;
  print STDOUT $msg;
  
  exit(0);
  </code></pre>
  
  <p>so basically I just want for now to print changed files. 
  Commit goes through with no errors, but I am not seeing anything printed when I go through TortoiseSVN or when I commit through cmd. 
  So is it printed at all and if so where is it? 
  I also tried to write it in txt file but with no success, what am I missing here? :(</p>
  
  <p>EDIT:</p>
  
  <p>per ikegami's comment, yes the code is running.</p>
  
  <p>I also wrote other sample of script, where I am trying to write something in txt file and send data to small test service I created.</p>
  
  <pre><code>$svnlook = '"C:\Program Files\VisualSVN Server\bin\svnlook.exe"';
  
  $repos = $ARGV[0];
  $txn = $ARGV[1];
  
  #--------------------------------------------
  use LWP::UserAgent;
  my $ua = LWP::UserAgent-&gt;new;
  my $server_endpoint = "http://localhost:1337/test";
  
  $msg = `$svnlook changed -t "$txn" "$repos"`;
  chomp($msg);
  open(my $fh, '&gt;', 'report.txt');
  print $fh $msg;
  close $fh;
  print STDOUT "done\n";
  
  # set custom HTTP request header fields
  my $req = HTTP::Request-&gt;new(POST =&gt; $server_endpoint);
  $req-&gt;header('content-type' =&gt; 'application/json');
  
  # add POST data to HTTP request body
  my $post_data = '{"$txn":"' . $txn .'"}';
  print STDOUT $post_data;
  $req-&gt;content($post_data);
  
  my $resp = $ua-&gt;request($req);
  if ($resp-&gt;is_success) {
      my $message = $resp-&gt;decoded_content;
      print STDOUT "Received reply: $message\n";
  }
  else {
      print STDERR "HTTP POST error code: ", $resp-&gt;code, "\n";
      print STDERR "HTTP POST error message: ", $resp-&gt;message, "\n";
  }
  
  exit(0);
  </code></pre>
  
  <p>Now I am sending <code>$txn</code> to service I made and I can print it, but when I try to send <code>$repos</code> I get error on my service, <code>Syntax error: unexpected token R</code></p>
  
  <p>How does <code>$repos</code> look like? Maybe I need to parse it somehow before printing or sending to my service?</p>
  
  <p>EDIT 2:</p>
  
  <pre><code>$svnlook = '"C:\Program Files\VisualSVN Server\bin\svnlook.exe"';
  
  $repos = $ARGV[0];
  $txn = $ARGV[1];
  
  print STDOUT "repos:" . $repos . "rev:" . $txn;
  
  #--------------------------------------------
  use LWP::UserAgent;
  my $ua = LWP::UserAgent-&gt;new;
  my $server_endpoint = "http://localhost:1337/test";
  
  $msg = `$svnlook changed -t "$txn" "$repos"`;
  chomp($msg);
  chomp($reply);
  
  if (length($repos) == 0)
  {
  print STDERR "my error, repos = 0";
  exit(1);
  }
  
  if ( length($msg) == 0 )
  {
  print STDERR "my error, msg = 0";
  exit(1);
  }
  
  open(my $fh, '&gt;', 'report.txt');
  print $fh $msg;
  close $fh;
  print STDOUT "done\n";
  
  # set custom HTTP request header fields
  my $req = HTTP::Request-&gt;new(POST =&gt; $server_endpoint);
  $req-&gt;header('content-type' =&gt; 'application/json');
  
  # add POST data to HTTP request body
  my $post_data = '{"$txn":"' . $txn .'"}';
  print $post_data;
  $req-&gt;content($post_data);
  
  my $resp = $ua-&gt;request($req);
  if ($resp-&gt;is_success) {
      my $message = $resp-&gt;decoded_content;
      print "Received reply: $message\n";
  }
  else {
      print ST "HTTP POST error code: ", $resp-&gt;code, "\n";
      print "HTTP POST error message: ", $resp-&gt;message, "\n";
  }
  
  exit(0);
  </code></pre>
  
  <p>So I added printing of arguments at the begining, checking if length of <code>$repos</code> equals 0 and if <code>$msg</code> equals 0</p>
  
  <p>and in console I only get</p>
  
  <pre><code>svnlook: E160007: No such transaction '85'
  my error, msg = 0
  </code></pre>
  
  <p>It is an post-commit hook</p>