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
- Automatic generation of the email from the shelveset details
- 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
- You can even use a Windows mobile phone :) and even some non MS browsers. Ok I guess I have sold this enuf
- This is how the email looks like with all the details pointed out
- 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
Pre-reqs
- Team System Web Access (TSWA) 2008 power tool installed on your TFS server
- Outlook installed on the machine on which the email is generated
- Enlistment and TFS client installed on the machine on which the email is generated
- For reviewers there is no pre-req other than a browser and email reader.
Dev process
- 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
- He runs the tool with a simple command
crmail shelvesetname - Email gets generated and opened he fills in additional information and fires send
- 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
- Download the binaries from here
- 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)
- 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.
4 comments:
You might also consider the TeamReview project on CodePlex for a fully IDE integrated code review lifecycle - http://www.codeplex.com/TeamReview
Thanks
Looked really cool. The History and Blame (annotate links work). But the difference links just says "Invalid item id format."
This is what my link looked like:
http://MyTFSServer:8090/UI/Pages/Scc/Difference.aspx?oitem=127283&ocs=-1&mpcid=-216587
Which does not match the info on the page linked to in the article on how to form the links. (all that UI/Pages/Scc is not in the link)
I would assume one of the server pre-reqs are not installed. Can you check them from the pre-req list I have in the post. Please note that the diff relies on the power-toy deployed on the server.
I am able to do diffs on the server. After some digging this was the syntax I needed to use:
http://myTFS:8090/UI/Pages/Scc/Difference.aspx?oitem=127256&ocs=1047&mitem=127256&mcs=1046
so it was oitem={itemid}&ocs={changeset}&mitem={itemid}&mcs={changeset-1}
I changed the code to do that and it works great now.
As a side note, I wanted to put this in my build process as part of the emails for a check-in build. So I changed the code to use Changesets instead of Shelvesets. I am going to have it output to a file and have that file get emailed to the team on every checkin. That way we can know at a glance what changed.
Thanks for posting the source code on this one! Very helpful.
I love your blog. It has great stuff on it.
Post a Comment