Welcome to MSDN Blogs Sign in | Join | Help

Auto generating Code Review Email for TFS

Hyderabad Microsoft Campus

We use a small command line tool called crmail to auto-generate code review email from shelveset. I find the whole process very helpful and thought I'd share the process and the tool (which has some really cool features).

Features

  1. Automatic generation of the email from the shelveset details
  2. Hyperlinks are put to TFS webaccess so that you can review code from machines without any tools installed, even without source enlistment. Yes it's true!!! The only thing you need is your office's intranet access
  3. You can even use a Windows mobile phone :) and even some non MS browsers. Ok I guess I have sold this enuf
  4. This is how the email looks like with all the details pointed out
    crmail
  5. Effectively you can see the file diff, history, blame (annotate), shelveset details, associated bugs, everything from your browser and best thing is that all of these takes one click each.
    This is how the fill diff looks in the browser
    webdiff

Pre-reqs

  1. Team System Web Access (TSWA) 2008 power tool installed on your TFS server. For the shelveset link to work you'd need TSWA SP1 CTP. The other features work with the base TSWA 2008 install...
  2. Outlook installed on the machine on which the email is generated
  3. Enlistment and TFS client installed on the machine on which the email is generated
  4. For reviewers there is no pre-req other than a browser and email reader.

Dev process

  1. The developer creates a shelveset after he is done with his changes. He ensures he fills up all the details including the reviewers email address ; separated
  2. He runs the tool with a simple command
    crmail shelvesetname
  3. Email gets generated and opened he fills in additional information and fires send
  4. Done!!

Reviewers

Ok they just click on the email links. Since mostly these are managers what more do you expect out of them? Real devs will stick with firing up tfpt command line :)

Configuring the tool

  1. Download the binaries from here
  2. Unzip. Open the crmail.exe.config file and modify the values in it to point to your tfsserver and your code review distribution list (if you do not have one then make it empty)
  3. Checkin to some tools folder in your source control so that everyone in your team has access to it

Support

Self help is the best help :), download the sources from here and enjoy. Buck Hodges post on the direct link URLs would help you in case you want to modify the sources to do more.

Published Monday, July 07, 2008 10:42 AM by abhinaba

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Auto generating Code Review Email for TFS

Monday, July 07, 2008 9:02 AM by Ian Ceicys

Very cool tool! Thanks for posting. I'm sure many customers are interested in this functionality.

# VSTS Links - 07/08/2008

Tuesday, July 08, 2008 9:53 AM by Team System News

Martin Hinshelwood on TFS Error: MSB4018: The "BuildShadowTask" task failed unexpectedly and...

# re: Auto generating Code Review Email for TFS

Wednesday, July 09, 2008 9:19 AM by Bertrand Huard

I will be giving this a try.

Thanks

# re: Auto generating Code Review Email for TFS

Thursday, March 12, 2009 5:54 AM by crowleym

We have noticed that a shelveset with a "rename" change in it causes CRMail to crash with the following error.

Failed: Index (zero based) must be greater than or equal to zeor and less than the size of the argument list.

Is this something that can be fixed? We are willing to help out if you like.

Thanks.

# re: Auto generating Code Review Email for TFS

Wednesday, April 01, 2009 12:31 PM by oo

@crowleym: same for me, crmail refuses to work when files have been renamed in the shelveset.

is the source code for crmail available?

# re: Auto generating Code Review Email for TFS

Thursday, April 02, 2009 10:08 AM by abhinaba

Yes the source is linked from this very post. Feel free to download and fix. You can send me the fix back and I'd be happy to upload it again. Hopefully by next couple of weeks I'll be able to get some time to fix it...

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker