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

pre-revprop-change.bat

From: Waseem Bokhari <waseem.bokhari_at_netsoltech.com>
Date: Fri, 8 Apr 2011 16:03:06 +0500

@ECHO OFF
:: Set all parameters. Even though most are not used, in case you want to
add
:: changes that allow, for example, editing of the author or addition of log
messages.
set repository=%1
set revision=%2
set userName=%3
set propertyName=%4
set action=%5

:: Only allow the log message to be changed, but not author, etc.
if /I not "%propertyName%" == "svn:log" goto ERROR_PROPNAME

:: Only allow modification of a log message, not addition or deletion.
if /I not "%action%" == "M" goto ERROR_ACTION

:: Make sure that the new svn:log message is not empty.
set bIsEmpty=true
for /f "tokens=*" %%g in ('find /V ""') do (
set bIsEmpty=false
)
if "%bIsEmpty%" == "true" goto ERROR_EMPTY

goto :eof

:ERROR_EMPTY
echo Empty svn:log messages are not allowed. >&2
goto ERROR_EXIT

:ERROR_PROPNAME
echo Only changes to svn:log messages are allowed. >&2
goto ERROR_EXIT

:ERROR_ACTION
echo Only modifications to svn:log revision properties are allowed. >&2
goto ERROR_EXIT

:ERROR_EXIT
exit /b 1

Above script allow to edit comments. Can we edit it in such a way that It
ONLY ALLOW Commit to specific level of repository

˜ Developer workspace
˜ Integration workspace
˜ Release Workspace
 I only want to apply this hook on Release Workspace.

Thanks in advance.

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.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2718090

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-04-08 13:04:53 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.