Use mq and hggit mercurial extensions