title: How to use mercurial (Hg) within a Python application?
body: <p>Aloha!</p>
  
  <p>Hg is a fine DVCS that is also a python module. This allows us to do ''import mercurial'' and load hg into our own application. My idea was to use mercurial within a Python application to create a revision controlled storage for my application.</p>
  
  <p>However my google-fu semms to fail me. I can't find any documentation, tutorial or examples of how to use hg as a module in Python providing functionality. help(mercurial) lists the normal commands and dir() provides some hints of methods.</p>
  
  <p>But do you for example create files for backing store, or do you get another type of data structure that works as a Hg repo?</p>
  
  <p>There seems to be great potential for neatness having this functionality. But how?</p>