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

RE: pre-lock.bat Failed in Repo browser

From: Tony Sweeney <tsweeney_at_omnifone.com>
Date: Tue, 8 Mar 2011 15:27:45 -0000

 

________________________________

        From: Waseem Bokhari [mailto:waseem.bokhari_at_netsoltech.com]
        Sent: 08 March 2011 14:24
        To: 'Bert Huijben'; users_at_subversion.apache.org
        Subject: RE: pre-lock.bat Failed in Repo browser
        
        

        I don't think %VISUALSVN_SERVER% is set in your lock script.

         

        What is meant by this?

         

        The hook scripts are deliberately run with as few environment
variables set as possible (same as with cron on Unix) to mitigate
security risks. So if you knnow exactly where svnlook.exe is on your
server machine, you should set this explicitly:

         

         VISUALSVN_SERVER="C:\Program FIles\Virtual SVN"

         

        or whatever, right at the start.

         

        How can I found "svnlook.exe" ??

         

        Can you please re-edit this script for me.

         

        Thanks in advance

         

         

         

        From: Bert Huijben [mailto:bert_at_qqmail.nl]
        Sent: Tuesday, March 08, 2011 7:04 PM
        To: 'Waseem Bokhari'; users_at_subversion.apache.org
        Subject: RE: pre-lock.bat Failed in Repo browser

         

        I don't think %VISUALSVN_SERVER% is set in your lock script.
Subversion explicitly clears most environment variables before calling
hook scripts.

         

        Most likely your script can't find svnlook.exe

         

                        Bert

         

        From: Waseem Bokhari [mailto:waseem.bokhari_at_netsoltech.com]
        Sent: dinsdag 8 maart 2011 7:52
        To: users_at_subversion.apache.org
        Subject: pre-lock.bat Failed in Repo browser

         

        Hi Experts!
                           Below is the "pre-lock.bat " Script ....
        
        Only User who lock the file can unlock the file. Other users are
forbidden to Unlock file.
        
        @echo off
        
        :: Set all parameters
        set repository=%1
        set repopath=%2
        set user=%3
        
        :: Set path to svnlook
        set svnlook=%VISUALSVN_SERVER%bin\svnlook.exe
        
        :: First check that the lock exists already.
        :: In that case svnlook prints the lock description.
        "%svnlook%" lock "%repository%" %repopath% | findstr /B /L "UUID
Token:" > NUL 2>&1
        
        :: If the lock does not exist, allow locking
        if ERRORLEVEL 1 exit 0
        
        :: Now check the lock's owner
        "%svnlook%" lock "%repository%" %repopath% | findstr /C:"Owner:
%user%" > NUL 2>&1
        
        :: If the person locking matches the lock's owner, allow locking
        if %ERRORLEVEL% EQU 0 exit 0
        
        :: Otherwise, return failure
        echo "Error: %repopath% is locked already." >&2
        exit 1
        
        
        Issue/Problem!!
        
        This scenario failed in Repo Browser. Any one can Unlock
File/Folder through Repo Browser.
        
        Please advice me accordingly.
        
        Thanks

         

        
        DISCLAIMER: This e-mail and any file transmitted with it are
confidential and intended solely for the use of the addressee. If you
are not the intended recipient, you are hereby advised that any
dissemination, distribution or copy of this email or its attachments is
strictly prohibited. If you have received this email in error, please
immediately notify us by return email and destroy this email message and
its attachments. This communication may contain forward-looking
statements relating to the development of NetSol Technologies' products
and services and future operations. The words "believe," "expect,"
"anticipate," "intend," variations of such words, and similar
expressions, identify forward looking statements, but their absence does
not mean that the statement is not forward-looking. Views and opinions
contained herein are those of the author of this email and do not
necessarily represent those of NetSol Technologies. Statements contained
herein are not guarantees of future performance and are subject to
certain risks, uncertainties and assumptions that are difficult to
predict. The company will not undertake to update any statements
contained herein.
        
        WARNING: The recipient should check this email and any
attachment for the presence of viruses. Although the company has taken
reasonable precautions to ensure no viruses are present in this email,
the company does not accept responsibility for any loss or damage
arising from the use of this email or attachment. Note: Please consider
the environment before printing this e-mail.

        DISCLAIMER: This e-mail and any file transmitted with it are
confidential and intended solely for the use of the addressee. If you
are not the intended recipient, you are hereby advised that any
dissemination, distribution or copy of this email or its attachments is
strictly prohibited. If you have received this email in error, please
immediately notify us by return email and destroy this email message and
its attachments. This communication may contain forward-looking
statements relating to the development of NetSol Technologies' products
and services and future operations. The words "believe," "expect,"
"anticipate," "intend," variations of such words, and similar
expressions, identify forward looking statements, but their absence does
not mean that the statement is not forward-looking. Views and opinions
contained herein are those of the author of this email and do not
necessarily represent those of NetSol Technologies. Statements contained
herein are not guarantees of future performance and are subject to
certain risks, uncertainties and assumptions that are difficult to
predict. The company will not undertake to update any statements
contained herein.
        
        WARNING: The recipient should check this email and any
attachment for the presence of viruses. Although the company has taken
reasonable precautions to ensure no viruses are present in this email,
the company does not accept responsibility for any loss or damage
arising from the use of this email or attachment. Note: Please consider
the environment before printing this e-mail.
        
        
______________________________________________________________________
        This email has been scanned by the MessageLabs Email Security
System.
        For more information please visit
http://www.messagelabs.com/email
        
______________________________________________________________________
        
Received on 2011-03-08 16:28:22 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.