-----BEGIN PGP SIGNED MESSAGE-----
On 2011-03-08 09:46, Waseem Bokhari wrote:
> We are working in Windows Environment. Visual SVN on Server Side as administration Tool and Tortoise SVN of Client. We are using HTTPS as well.
> Repository URL looks as :-
> Thanks in advance
> Muchas gracias!
> Waseem Bokhari
> -----Original Message-----
> From: Michael Diers [mailto:mdiers_at_elego.de]
> Sent: Tuesday, March 08, 2011 2:39 PM
> To: Waseem Bokhari
> Cc: users_at_subversion.apache.org
> Subject: Re: pre-lock.bat Failed in Repo browser
> On 2011-03-08 06:51, Waseem Bokhari wrote:
>> 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.
>> This scenario failed in Repo Browser. Any one can Unlock File/Folder
>> through Repo Browser.
indeed, anyone can _unlock_ the file because the pre-lock hook script is
never triggered for an unlock operation. (The unlock operation is called
"Break lock" in TortoiseSVN's Repository Browser.)
You'd need to provide a pre-unlock hook script to handle this.
- --- snip snip ---
echo === BEGIN pre-unlock >> %trc%
:: Set all parameters
:: Set path to svnlook
echo repository = %repository% >> %trc%
echo repopath = %repopath% >> %trc%
echo user = %user% >> %trc%
echo svnlook = %svnlook% >> %trc%
echo --- >> %trc%
:: Check that the lock exists and has an owner.
echo 1 >> %trc%
"%svnlook%" lock "%repository%" %repopath% >> %trc% 2>&1
echo 2 >> %trc%
"%svnlook%" lock "%repository%" %repopath% | findstr /C:"Owner: %user%"
> nul 2>&1
:: If the person locking matches the lock's owner, allow unlocking.
echo 3 >> %trc%
if %rc% EQU 0 ^ echo "Info: %repopath% OK to unlock by %user%." >> %trc%
echo 4 >> %trc%
if %rc% EQU 0 exit 0
:: Otherwise, print notice to stderr and return failure.
echo 5 >> %trc%
echo "Error: %repopath% is locked by another user." >> %trc%
echo 6 >> %trc%
echo "Error: %repopath% is locked by another user." 1>&2
- --- snip snip ---
Michael Diers, elego Software Solutions GmbH, http://www.elego.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
Received on 2011-03-09 12:47:54 CET