Mercurial extension for idempotence