views:

2951

answers:

2

I'm using Visual SVN Server and Tortoise SVN (client) for source control. I would like all developers to standardize on a consistent format for checkin notes.

For Example I want their Commit Message to default to...

Synopsis:

Developer Name: (pre-populated)

Reviewed By:

[Bug Id]:

[Change Bug State]:

Known Issues:

Affected Files: (pre-populated)

In the future I'd like [Bug Id] and [Bug State] to supply the information to trigger an automated update to the Bug Tracking system. Also Developer Name and Affected Files should be prepopulated with the svn user and files that the user is commiting.

Please send any links or samples you may have.

Thanks, Justin

+2  A: 

Taken from How to create a Tortoise SVN Checkin Template:

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.

Justin
A: 

A way to do this with the command line is to change the SVN_EDITOR environment variable, described here:

http://svn.haxx.se/dev/archive-2006-02/0487.shtml

SVN_EDITOR="rm svn-commit.tmp && cp $REPOS/hooks/log.tmpl svn-commit.tmp && vi svn-commit.tmp"
purecharger