I’m using google code for one of my open source project. And I think it is definitively a good code site.
All open source community code site have its pros and cons (I’ve tried a lot of them sourceforge, github, jboss.org, google code etc), and every one have some beautiful unique feature. But one of my most loved feature is definitively google code’s integration of issue tracker and version control. In a nutshell it permit to create, update and close issues just adding some keyword on your commit.
It’s great in general, but it’s really amazing if you are using a distributed Version Control. And I’m using git for local repository and git-svn to synchronize it with central subversion repository.
Imagine this situation: you are working with your laptop off-line (i.e into an air plane where also GSM connection isn’t available) and you find a bug or you have an idea for an enhancement. What do you do in this case? Of course take care of the bugged code, fix it, write a test for that and then commit it into your git local repository. What is the missing step in this work flow? Of course create an issue into your issue tracker system to keep community up to date, and don’t forget it if you can’t completely finish it now. At this point come very useful the google code feature permitting you to create, update, or fix an issue when you are committing a change.
There is only one problem with this integration: remember the structure the commit message have to fit and all (or at least the most useful) values you can assign to various fields. I’ve solved this problem creating 3 template for the commit messages and I use them with git. Using template during a git commit is very easy: just make a commit like this
git commit -a -t tempalteFile
Git will Use the contents of the given file as the initial version of the commit message. The editor is invoked and you can make subsequent changes. If a message is specified using the -m or -F options, this option has no effect.
Here you have my 3 template file:
NewIssue.tmpl
#commit comment here
#next line doesn't need any number. ssue number will be automaticaly assigned after commit
New issue
#A summary is always needed. Please complete next line
Summary:
#Uncomment the rigt Status
#Status: Accepted
#Status: Fixed
#Status: New
#Uncommet right Labels and/or add labels to the list (comma or space separate)
#Labels: Type-Defect Priority-Medium
#Labels: Type-Defect Priority-High
#Labels: Type-Defect Priority-Critical
#Labels: Type-Enhancement Priority-Medium
#Labels: Type-Enhancement Priority-Low
#Labels: Type-Enhancement Priority-High
#Comment text for the issue tracker goes here
UpdateIssue.tmpl
#commit comment here
#Complete next line with issue number
Update issue
#summary is rarely updated. If you need that uncomment and complete next line
#Summary:
#Uncomment the new Status you would get your issue. No uncomment status will keep the previous status
#Status: Accepted
#Status: Fixed
#Status: New
#Uncommet Labels and/or add labels to the list (comma or space separate) if you want update/add Labels
#Labels: Type-Defect Priority-Medium
#Labels: Type-Defect Priority-High
#Labels: Type-Defect Priority-Critical
#Labels: Type-Enhancement Priority-Medium
#Labels: Type-Enhancement Priority-Low
#Labels: Type-Enhancement Priority-High
#Comment text for the issue tracker goes here
FixIssue.tmpl
#commit comment here
#Complete next line with issue number
Fixes issue
#Comment text for the issue tracker goes here
The same thing should be possible also with svn and other SCM.
Hoping it could help some other people enjoying this google code feature developing open source code during their trips
Have fun!