Fix issue #26
Added with statement to checkpoint example

Conflicts:

	doc/tutorials/advanced/checkpoint.rst
Changed the way the branch name is retreived

It was old hg command replaced with a git command and a regexp.
Continue fixing #26
Finished fixing all open of issue #26