Should be pretty simple. Just make the special case where we check for git_root more general and figure out the equivalent mercurial repo commands.