Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion (TortoiseSVN) - Default check in message?

Is there a way I can set up a client-side script/hook/setting/whatever to have a default message in the TortoiseSVN Commit dialog?

(I want to put some text there to remind me to note bug number when I check in code.)

like image 333
Ryan Lundy Avatar asked Dec 10 '09 15:12

Ryan Lundy


People also ask

What does red exclamation mark mean in TortoiseSVN?

That means the Subversion status is normal. As soon as you start editing a file, the status changes to modified and the icon overlay then changes to a red exclamation mark. That way you can easily see which files were changed since you last updated your working copy and need to be committed.

Does TortoiseSVN include Subversion?

TortoiseSVN is a really easy to use Revision control / version control / source control software for Windows. It is based on Apache™ Subversion (SVN)®; TortoiseSVN provides a nice and easy user interface for Subversion.

What is the difference between svn and TortoiseSVN?

The main difference between SVN and TortoiseSVN is that the SVN is a distributed version control system while TortoiseSVN is an SVN client implemented as a Microsoft Windows shell extension. In brief, SVN is a version control system. On the other hand, TortoiseSVN is a Subversion client.


1 Answers

You can set the bugtraq:url and bugtraq:warnifnoissue properties on your repository, so that a gentle warning is shown when no bug number provided.

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-bugtracker.html


Edit

Ok... here's another way. You can create a Start-commit hook within TSVN:

Save this as a .vbs file locally:

'Get the arguments - (     PATH  MESSAGEFILE  CWD  )
'http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks
Set ArgObj = WScript.Arguments
dim file
file = ArgObj(1)
'OPen the log message
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(file, 2, 1)
'Write in the warning
objFile.Write("Don't forget to add a bug case!!!")
objFile.Close

Add the hook using TSVN -> Settings -> Hook Scripts -> Add Set the working copy path to the path you wish it to apply for (or e.g. c:\ if you want it to apply for everything on your c drive) Set the command line to execute to:

wscript c:\[Path to script]\message.vbs

Tick the two check boxes.

Now when you click commit, the vbs will get passed the location of the temporary message file, it appends your message and then gets displayed in the commit dialog.

like image 181
David Henderson Avatar answered Sep 23 '22 10:09

David Henderson