Adding useful hg functions.

--HG--
extra : rebase_source : 7f80844e02d6c430bf3b7a38a010d961fe95c179