Fix for issue #44
Created originally on Bitbucket by pnathan (Paul Nathan)
Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.
Fixes issue #44 (closed).
This patch has been tested on Python 2.7.(2,3), several editions of hg (2.3.2, 2.4.2, and 2.8+d24ee), OSX 10.8, and a fresh Gentoo.