As I said in an earlier post, at SRMvision, we use feature branches to isolate our work and be able to publish it to our production environment with a clear change history.

One thing we use since the beginning (at the subversion time, pre-git era), is the control of our ticket tracker (Trac) from our commit messages. We have the following verbs to control our tickets (synonyms are available, but we rarely use them) :

  • see #NUM to link to a ticket
  • fix #NUM to close a ticket

Repository references to commits are automatically added into ticket's history in our Trac instance.

To be sure of the quality of our code, we set up a custom workflow in Trac. Once a dev/bugfix is done, we set the corresponding ticket to the "Testing" status. The next step is simple, either the test passes and the ticket is closed, or it does not and it returns to the developer. So, we added another verb to our commit handler : "test" to automatically set a ticket to the "Testing" status.

Our adoption of feature branches has forced us to rethink our workflow. Passing a ticket to "testing" while it is not even merged into our "testable" branch was really polluting Trac. That's why we added the status "Fixed on branch" to allow us to differentiate really testable ticket from not ready ones.

We finally adopted the following mecanism, keeping only our three verbs (see, fix, test) :

  • test on a branch other than master, ticket's status is set to "Fixed on branch"
  • on a branch merge to master, "Fixed on branch" tickets are reopened and set to "Testing"
  • on the branch master, test sets the ticket to "Testing"

On a classic development, we can have 50 "Fixed on branch" tickets that automatically pass to "Testing" once merged onto master. Using this technique allows us to check if every single ticket related to the feature has been correctly handled from development to quality testing.

If you want to deploy a similar technique in your environment, files we are using are available at the following address : https://github.com/CedricGatay/sandbox/tree/master/trac-git-hook

You will find the following files :

  • post-receive : git hook, to copy into the hooks/ directory of your "central" repository (the one connected to Trac), triggers delayed launch (1 minute later) of the next script (avoiding to block the commit),
  • trac-post-commit-hook : Trac hook parsing commit messages to control tickets
  • trac.options.ini : excerpt from Trac configuration file allowing to customize workflow

Please notice il will be necessary for you to edit script settings referring to git repository in Trac (called 'git-clone' for us) and paths corresponding to your environment.

I just read a very interesting blog post on the Github Blog : "How we use Pull Requests to build GitHub" I think their solution to track features is very clever, I will try to mimic their solution using GitlabHQ merge requests.

Some of you might have noticed that since I tried git I don't want to got back to another Version Control System for my work. At my company we now officially all use Git for about nine months without any hickup, we have our own hosted infrastructure using the wonderful gitlabhq.

For my personal projects (mainly Android applications), I only had local git repositories allowing me to really develop without being afraid of losing history. However, these local repositories were not synced anywhere but on my own hard drive (that's not really a secure way of handling things). My first attempt was to do as often as I though tarballs of my repositories and sync them on Dropbox.The problem in the chain was the fact the backup were done at times, which, in practice, means really rarely.

I had looked for free git hosting providing private repositories, but I did not find a free one that satisfies my main prerequisite : unlimited (or large) private repositories count.

A few days ago, I cleaned my whole personal development folder and I began searching another time for a free hosting. I found out that Bitbucket, which at the time I first looked at it was only providing Mercurial hosting, now offers free git hosting with unlimited repositories.

The "one more thing" of this hosting solution (but not only) will only be interesting for Mac users. Atlassian released a free GUI client for Git and Mercurial SourceTree.app, and, although I am not fan of a GUI for Git, but I must say I use it regularly (its branch view is awesome).

While reading Hacker news, I found out this crazy project from the guys of Xamarin. They started to port Android Java code (roughly 1M SLOC) to C# for running with Mono. Read more here.