title: Python wrapper to access Hg, Git and possibly Bazaar repositories?
body: <p>I'm looking for a Python library that can do basic manipulation of repositories, but is independent of the backend version control system.</p>
  
  <p>By basic manipulation, I'm referring to: initialize a repo, add files, commit, pull, push, get current revision number.</p>
  
  <p>Users of the library could do something this:</p>
  
  <pre><code>import dvcs_wrapper as dvcs
  dvcs.set_backend('hg')  # could choose 'git', 'bzr'
  
  repo = dvcs.init('/home/me/my_repo')
  repo.add('/home/me/my_repo/*.py')
  repo.commit('Initial commit')
  repo.push('http://bitbucket.org/....')
  print('At revision %d' % repo.revision_num)
  </code></pre>
  
  <p>Any pointers to something like the above? My Google searches turn up nothing...</p>
  
  <p><strong>Update</strong>: for what it's worth, I've started working on something like this: <a href="https://github.com/kgdunn/SciPy-Central/blob/master/scipy_central/filestorage/dvcs_wrapper.py" rel="nofollow">code is here</a> with <a href="https://github.com/kgdunn/SciPy-Central/blob/master/scipy_central/filestorage/tests.py" rel="nofollow">unit tests</a>
  for Hg repositories. I might get around to Git and Bazaar; contributions welcome.</p>