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

Getting error messages from Tortoise

From: DePriest Richard 403 <richard.depriest_at_crackerbarrel.com>
Date: Mon, 17 Mar 2008 16:54:49 -0500

We are starting to use subversion with tortoise. There is a pre-commit
hook that fires and calls a perl script that checks to see if a file is
locked and if it is not it will error out and not allow the commit. The
error is getting written to STDERR and we cannot see it through
tortoise. Is there anyway to see the error in tortoise? I am including
the hook and the perl program.
REM Set command line client language to english
set LC_ALL=C
set SVNLOOK="/usr/bin/svnlook"
set REPOS=%1
set TXN=%2
cd /u01/svn/repositories/Crackerbarrel/hooks
perl checklock_nopropcheck.pl %SVNLOOK% %REPOS% %TXN%
$REPOS = $ARGV[1];
$TXN = $ARGV[2];
sub main {
 #Get Author
 open(AUTHOR,"\"$SVNLOOK\" author -t $TXN \"$REPOS\" |");
 $Author = (<AUTHOR> =~ /(\w+\b)/)[0];
 # Get changed files
 open(CHANGED,"\"$SVNLOOK\" changed -t $TXN \"$REPOS\" |");
 @ChangedFiles = <CHANGED>;
 print @ChangedFiles;
 foreach $File (@ChangedFiles){
  if($File =~ /^[UD]/){ #Only updated and deleted
   if($File !~ /(.*)\/\s*$/){ #Is not a directory
    $File = ($File =~ /....(.*)[\n\b]/)[0]; #Get just the file name
    open(LOCKDATA,"\"$SVNLOOK\" lock \"$REPOS\" \"$File\" |");
    $Lockdata = join("",<LOCKDATA>);
    if($Lockdata =~ /Owner: (\w+\b)/){
     return $1
    } else {
     print STDERR "Lock Error: There is a modified file without
     exit 1
exit 0;
Any help will be very much appreciated.
Rick DePriest
Project Manager - Retail Systems
Cracker Barrel Old Country Stores, Inc.
Ph. (615) 443-9845
Email: rdepries_at_crackerbarrel.com
Received on 2008-03-17 22:55:18 CET

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.