libvcs

Install:

$ pip install libvcs

Open up python:

$ python

# or for nice autocomplete and syntax highlighting
$ pip install ptpython
$ ptpython

Create a Repo object of the project to inspect / checkout / update:

>>> from libvcs.shortcuts import create_repo_from_pip_url, create_repo

# repo is an object representation of a vcs repository.
>>> r = create_repo(url='https://www.github.com/tony/libtmux',
...                 vcs='git',
...                 repo_dir='/tmp/libtmux')

# or via pip-style URL
>>> r = create_repo_from_pip_url(
...         pip_url='git+https://www.github.com/tony/libtmux',
...         repo_dir='/tmp/libtmux')

Update / clone repo:

# it may or may not be checked out/cloned on the system yet
>>> r.update_repo()

Get revision:

>>> r.get_revision()
u'5c227e6ab4aab44bf097da2e088b0ff947370ab8'

Donations

Your donations fund development of new features, testing and support. Your money will go directly to maintenance and development of the project. If you are an individual, feel free to give whatever feels right for the value you get out of the project.

See donation options at https://git-pull.com/support.html.

More information

Python support Python 2.7, >= 3.3, pypy
VCS supported git(1), svn(1), hg(1)
Source https://github.com/tony/libvcs
Docs http://libvcs.git-pull.com
Changelog http://libvcs.git-pull.com/en/latest/history.html
API http://libvcs.git-pull.com/en/latest/api.html
Issues https://github.com/tony/libvcs/issues
Travis http://travis-ci.org/tony/libvcs
Test Coverage https://codecov.io/gh/tony/libvcs
pypi https://pypi.python.org/pypi/libvcs
Open Hub https://www.openhub.net/p/libvcs
License BSD.
git repo
$ git clone https://github.com/tony/libvcs.git
install dev
$ git clone https://github.com/tony/libvcs.git libvcs
$ cd ./libvcs
$ virtualenv .venv
$ source .venv/bin/activate
$ pip install -e .
tests
$ py.test