Python wrapper to access Hg, Git and possibly Bazaar repositories?
Question: I'm looking for a Python library that can do basic manipulation of
repositories, but is independent of the backend version control system.

By basic manipulation, I'm referring to: initialize a repo, add files, commit,
pull, push, get current revision number.

Users of the library could do something this:

    
    
    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)
    

Any pointers to something like the above? My Google searches turn up
nothing...

**Update** : for what it's worth, I've started working on something like this:
[code is here](https://github.com/kgdunn/SciPy-
Central/blob/master/scipy_central/filestorage/dvcs_wrapper.py) with [unit
tests](https://github.com/kgdunn/SciPy-
Central/blob/master/scipy_central/filestorage/tests.py) for Hg repositories. I
might get around to Git and Bazaar; contributions welcome.


Answer: There's also the [VCS](http://pypi.python.org/pypi/vcs/0.2.0) module, which
advertises:

> vcs is abstraction layer over various version control systems. It is
> designed as feature-rich Python library with clean API.

