tsvn:logtemplate - Enforcing strict format to SVN check-in mails

TortoiseSVN is a free open-source client for the Subversion version control system. Sometimes you want to have a more detailed information about a file/directory than just the icon overlay.

Tortoise SVN provides some very useful properties for this purpose; tsvn:logtemplate is one of them -

tsvn properties

"tsvn:logtemplate is used with projects which have rules about log message formatting. The property holds a multi-line text string which will be inserted in the commit message box when you start a commit. You can then edit it to include the required information."

Tortoise SVN: Enter Log Message

This is the log template we used -

Task Id:<Task ID>

Code Review: <Reviewer's name>

User Impact: <details of the implementation/changes as seen in the application. This is more from the user’s perspective or how the users will feel the implementation or see the changes in application>

Technical Details: <technical details of the task>

Unit tested: <(Yes/NO). Also mention the unit test case id>

Developer Notes: <reference to other developers for any dependency for this check-in>

QA Notes: <it contains impact/effected areas for the fix>

The log template can be customized as per the project requirements and can be used to implement strict log format.

Adding this to your svn repository is easy :

1. Select a SVN folder to which you want to apply this go to Subversion properties( right click -> Properties->Subversion tab.)

2. Select tsvn:logtemplate from the combo properties combo box.

3. Add the above templates(or your own) to text area below combo box.

4. If you want to apply the property to every file and folder in the hierarchy below the current folder, check the Recursive checkbox.

5. Click on Set to add that property to the list.

6. Check-in all the folders and files so that everyone else in your team can use the same template.

image

Check this link to know more about other project settings available in TortoiseSVN  and how to use them - http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-propertypage.html

6 Comments

  • This was really helpful. I was thinking of writing hooks for this but this solved the problem in an easier way.

  • What if I want to one variable to get its info from a file or a string?
    Is there a way?

  • This was very helpful. However, is there a way to enforce the length of each individual line item value specified in the template? I know I can specify the overall minimum length of the comment by using tsvn:logminsize, but I can't seem to find a way to enforce this line by line.

  • @dpizzitola: Thanks, I feel good that it helped you. I haven't looked into restricting the length of individual item and have no idea at this time; Although it is a good idea but personally I don't feel comfortable restricting developers(so much) by doing that. You can't be sure of length of any of these attributes; except, may be for Task Id (but I used to suffix the task name after the id to make it more helpful so that too doesn't work for me)

  • nice !! no need to implement hooks.But want to ask ,is there any way so that no one can leave template blank

  • I tried few things by modifying properties.. and works well. But can anyone suggest me that how can I get this enforcement even for users who do not use tortoise svn but use Linux ?

Add a Comment

As it will appear on the website

Not displayed

Your website