At $work, we use mercurial, but we had a quite old mercurial version (0.9.5). At that time, mercurial wasn't able to close named branches, so when you opened a new branch, you had to carry that branch with you forever. It was not really suited for a-branch-per-feature workflow.
Since mercurial 1.2 though, we can close branches with a --close-branch flag when commiting.
First things first. Upgrading mercurial is not that easy (at least in Ubuntu 8.04)
There's a launchpad user that seems to upload mercurial builds, but I never figured out how to use launchpad. My damn ubuntu can't manage the gpg key or whatever.
Installing from source requires python-dev and python-setuptools. apt-get install them .
Then, you can easy_install Mercurial, and hopefully it'll work.......OOOOOPS, no :)
you see some warnings there, right?
ok, as root, go to /etc/mercurial/hgrc.d/hgext.rc and comment the line with
***** failed to import extension hgext.hbisect: No module named hbisect**
After that, you'll have a working updated mercurial, but probably, your hg view command will disappear.
you can find hgk in the source mercurial package, in the contrib directory.
Just untargz, and move mercurial-1.3.1/contrib/hgk to anywhere in your path.
Now with mercurial 1.3.1, my workflow can follow a-branch-per-feature without problems.
That's what I did the first time, but well, I thought if I could close a branch when commiting real stuff. It only makes sense if later, we plan on merging.
hg branch checkSinglePond
echo "say 'hey! I'm a new feature' ; " >> foo.pl
hg commit -m "fin de feature"
hg up default
hg merge myNewFeature
hg up myNewFeature
hg commit --close-branch -m "closed"
hg branch BarFeatureHere's a screenshot of the mess :)
echo "say 'bar' "; >> foo.pl
hg commit --close-branch -m "added and closed"
hg branches # only shows 'default'
hg up default
hg merge BarFeature
hg commit -m "I'm Tip, with BarFeature Merged after closing"
I'll keep posting my findings about version control and how I keep modifying my workflow to fit its 'best practices' ¬¬ .