Clone of hgapi, the pure-python API to Mercurial.