November 5, 2008
Mercurial extensions for git features
I still enjoy work with Mercurial more, although git has grown a lot better in the last few years.
In the last few days I especially noticed that hg is faster for me than git (even after repack of the git repository).
That said, git has some very cool features that are missing in Mercurial.
Two of them are local branches (helpful for feature development or bug isolation) and the stash command that lets you stash away local changes for later (sort of a simplified patch queue).
Fortunately there are two extensions that provide both local branching and stash functionality.
Localbranches extension
- Wiki page
- http://www.selenic.com/mercurial/wiki/index.cgi/LocalBranches
- Repository
- http://hg.kublai.com/mercurial/extensions/localbranch
Shelve extension
- Wiki page
- http://www.selenic.com/mercurial/wiki/index.cgi/ShelveExtension
- Repository
- http://freehg.org/u/tksoh/hgshelve/
Installation
To use an extension just clone the repository and put the following line into the [extensions] section of your hgrc (create file and section if necessary):
EXTNAME=/path/to/EXTNAME.py
Usage examples are on the wiki pages.
Happy hacking!
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_c.png?x-id=9849a907-4ec8-4496-a2be-8e20491bb0ea)