<p>I'd like to automate TortoiseSVN as part of a commit process.
Specifically I'd like to dynamically create a log entry for the commit dialog.</p>

<p>I know that I can launch the commit dialog either from the commandline or by right clicking on a folder and selecting svncommit.</p>

<p>I'd like to use the start commit hook to setup a log entry.
I thought this worked by passing an entry file name in the MESSAGEFILE variable but when I add a hook script it cannot see this variable (hook launched successfully after right clicking and choosing svncommit).</p>

<p>When I try using the commandline I use the /logmsgfile parameter but it seems to have no effect.</p>

<p>I'm using tortoisesvn 1.5.3.</p>

[{'answer_id': 59349, 'author': 'morechilli', 'author_id': 5427, 'author_profile': 'https://Stackoverflow.com/users/5427', 'pm_score': 3, 'selected': True, 'text': '<p>Looks like it was my own misunderstanding of the the API that caused by a problem.</p>\n\n<p>Solution:<br>\n1)  I\'ve added a start commit hook script to TortoiseSVN using the hooks gui in the settings area of the right click menu.</p>\n\n<p>2) The script receive 3 pieces of information:      PATH  MESSAGEFILE  CWD<br>\n  For details see: <a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-bugtracker.html" rel="nofollow noreferrer" title="Manual">Manual</a><br>\n  These are passed as command line arguements to the script - for some reason I had thought they were set as temporary environmental variables.</p>\n\n<p>My script then simply opens the file specified by the second arguement and adds in the custom text.</p>\n\n<p>When the commit dialog comes up the custom text is there.</p>\n\n<p>3) Best of all if tortoisesvn is launched from a script directly into the commit dialog:<br>\ne.g. [ tortoiseproc /command:commit /path:. /closeonend:1 ]<br>\nThe hooks are still called.</p>\n'}, {'answer_id': 59379, 'author': 'Nathan Jones', 'author_id': 5848, 'author_profile': 'https://Stackoverflow.com/users/5848', 'pm_score': 1, 'selected': False, 'text': '<p>If you just need a static template, set the tsvn:logtemplate property.</p>\n\n<p>For dynamic generation, the /logmsgfile parameter does work, but it seems to need the full path. A batch file that looks like the following might work for you.</p>\n\n<pre><code>GenerateLogMsg.exe &gt; tmp.msg\n"C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe" /command:commit /path:. /logmsgfile:"C:\\Documents and Settings\\User\\My Documents\\Visual Studio Projects\\Project\\tmp.msg"\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/59007', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5427/']