remote-hg: trivial fixes and cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Merge branch 'fc/remote/hg' into fc/master