Project description

libvcs - abstraction layer for vcs

Install:

$ pip install libvcs

Open up python:

$ python

>>>fromlibvcs.shortcutsimportcreate_repo_from_pip_url,create_repo# repo is an object representation of a vcs repository.>>>r=create_repo(url='https://www.github.com/tony/myrepo',...vcs='git',...repo_dir='/tmp/repo')# or via pip-style URL...r=create_repo_from_pip_url(...pip_url='git+https://www.github.com/tony/myrepo',...repo_dir='/tmp/repo')# it may or may not be checked out/cloned on the system yet>>>r.update_repo()|myrepo|(git)Repodirectoryformyrepo(git)doesnotexist@/tmp/myrepo|myrepo|(git)Cloning.|myrepo|(git)gitclonehttps://www.github.com/tony/myrepo/tmp/myrepoCloninginto'/tmp/myrepo'...Checkingconnectivity...done.|myrepo|(git)gitfetch|myrepo|(git)gitpullAlreadyup-to-date.