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

Return code of pre-revprop-change hook ignored in some cases

From: Juanma Barranquero <jmbarranquero_at_wke.es>
Date: 2004-02-13 15:14:04 CET

Using SVN 0.37.0 on a Windows 2K.

I have the following simple .BAT with an embedded perl script:

--------------- example starts here -----------------
@rem = '
@echo off
perl.exe -x -S "%0" %1 %2 %3 %4
goto endofperl
@rem ';
#!perl
exit 1;
__END__
:endofperl
---------------- example ends here ------------------

The intent is to use it as a pre-revprop-change hook (obviously, in real
use it would contain something more useful that "exit 1").

I create a repo, commit a single change, and put this script in hooks/
as pre-revprop-change.bat.

Test 1:

  C:\> svnserve -d -r c:\repo\test

  [In another CMD.EXE window:]
  C:\> svn propset svn:log --revprop -r 1 "Test" svn://localhost/
  Authentication realm: <svn://localhost:3690>
  Password for 'JMBarranquero': *********
  svn: 'pre-revprop-change' hook failed with error output:

  (which seems correct; it's returning 1)

Test 2:

  (No server)

  C:\> svn propset svn:log --revprop -r 1 "Test" file:///C:/repo/test/
  svn: 'pre-revprop-change' hook failed with error output:

  (again, that's right)

Test 3:

    <Location /svn>
        DAV svn
        SVNPath "C:/repo/test"
        Order Allow,Deny
        Allow from all

        AuthType Basic
        AuthName "Subversion"
        AuthUserFile conf/passwd

        <LimitExcept GET PROPFIND OPTIONS REPORT>
            Require valid-user
            Satisfy All
        </LimitExcept>
    </Location>

    C:\> svn propset svn:log --revprop -r 1 "Test" http://localhost/svn/
    property 'svn:log' set on repository revision '1'
    
    Uh?

What's that? An artifact of the way the .BAT hook is executed by the
mod_dav_svn module?
    
                                                            Juanma

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 13 15:14:20 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.