Baisc hg support

Don't think hg has necessary facilities for us to implement ahead/diverged/behind indicator, so only basic stuff here.