Here is a Post-Commit.bat for generating email on every-commit.
@echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: ARGUMENTS :::::::::::::::::::::::::::::::::::::::
SET REPOS=%1
SET REV=%2
:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: GENERAL INFO ::::::::::::::::::::::::::::::::::::
SET DIR=E:\Repositories\WSBokhari\hooks
SET MESSAGE_FILE=%DIR%/message.txt
:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: SVN INFO ::::::::::::::::::::::::::::::::::::::::
SET DIR=E:\Repositories\WSBokhari\hooks
SET REPO_PATH=file:///E:/Repositories/WSBokhari
::: Get the author ::::::::::::::::::::::::::::::::::
For /F "Tokens=*" %%I in ('svnlook author %REPOS% -r %REV%') Do Set
author=%%I
::: Get the log messsage ::::::::::::::::::::::::::::::::::
For /F "Tokens=*" %%I in ('svnlook log %REPOS% -r %REV%') Do Set log=%%I
::: Set the message body ::::::::::::::::::::::::::::::::::
ECHO Commit - rev %REV% (#%author%): '%log%' - %REPOS% > %MESSAGE_FILE%
:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: EMAIL INFO ::::::::::::::::::::::::::::::::::::::
set to=-to [email protected]
set subj=-s "SVN Commit (Revision %REV%)"
set server=-server mail.netsolpk.com
set auth=-u [email protected] -pw 123
set from=-f [email protected]
:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: SEND THE EMAIL ::::::::::::::::::::::::::::::::::
E:/Repositories/WSBokhari/%MESSAGE_FILE% %server% %to% %from% %subj% %auth%
Error Message:
post-commit hook failed (exit code 1) with output:
The filename, directory name, or volume label syntax is incorrect.
PS:
Even file message.txt is being creating in my Hooks Folder according to
this::
SET MESSAGE_FILE=%DIR%/message.txt
Commit - rev 26 (#Shahzadw): 'w' - E:\Repositories\WSBokhari
Please advice.
I am using Visual SVN Server and TSVN on client side.
Thanks in advance.
Cheers!
cid:[email protected]
Waseem Bokhari I Configurations and Release Management
NetSol Technologies (NasdaqCM: NTWK)
Tel: +92 42 111448800 Ext: 346 Mob: +92 321 4294926
<mailto:[email protected]> [email protected]
<http://www.netsoltech.com/> www.netsoltech.com
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.
<<image001.jpg>>
