|
| 1 | +`libvcs` - abstraction layer for vcs, powers |
| 2 | +[vcspull](https://www.github.com/vcs-python/vcspull/). |
| 3 | + |
| 4 | +[](http://badge.fury.io/py/libvcs) |
| 5 | +[](https://github.com/vcs-python/libvcs/actions?query=workflow%3A%22Publish+Docs%22) |
| 6 | +[](https://github.com/vcs-python/libvcs/actions?query=workflow%3A%22tests%22) |
| 7 | +[](https://codecov.io/gh/vcs-python/libvcs) |
| 8 | + |
| 9 | + |
| 10 | +# Setup |
| 11 | + |
| 12 | +```sh |
| 13 | +$ pip install libvcs |
| 14 | +``` |
| 15 | + |
| 16 | +Open up python: |
| 17 | + |
| 18 | +```sh |
| 19 | +$ python |
| 20 | + |
| 21 | +# or for nice autocomplete and syntax highlighting |
| 22 | +$ pip install ptpython |
| 23 | +$ ptpython |
| 24 | +``` |
| 25 | + |
| 26 | +# Usage |
| 27 | + |
| 28 | +Create a |
| 29 | +[Repo](https://libvcs.git-pull.com/api.html#creating-a-repo-object) |
| 30 | +object of the project to inspect / checkout / update: |
| 31 | + |
| 32 | +```python |
| 33 | +>>> from libvcs.shortcuts import create_repo_from_pip_url, create_repo |
| 34 | + |
| 35 | +# repo is an object representation of a vcs repository. |
| 36 | +>>> r = create_repo(url='https://www.github.com/vcs-python/libtmux', |
| 37 | +... vcs='git', |
| 38 | +... repo_dir='/tmp/libtmux') |
| 39 | + |
| 40 | +# or via pip-style URL |
| 41 | +>>> r = create_repo_from_pip_url( |
| 42 | +... pip_url='git+https://www.github.com/vcs-python/libtmux', |
| 43 | +... repo_dir='/tmp/libtmux') |
| 44 | +``` |
| 45 | + |
| 46 | +Update / clone repo: |
| 47 | + |
| 48 | +```python |
| 49 | +# it may or may not be checked out/cloned on the system yet |
| 50 | +>>> r.update_repo() |
| 51 | +``` |
| 52 | + |
| 53 | +Get revision: |
| 54 | + |
| 55 | +```python |
| 56 | +>>> r.get_revision() |
| 57 | +u'5c227e6ab4aab44bf097da2e088b0ff947370ab8' |
| 58 | +``` |
| 59 | + |
| 60 | +# Donations |
| 61 | + |
| 62 | +Your donations fund development of new features, testing and support. |
| 63 | +Your money will go directly to maintenance and development of the |
| 64 | +project. If you are an individual, feel free to give whatever feels |
| 65 | +right for the value you get out of the project. |
| 66 | + |
| 67 | +See donation options at <https://www.git-pull.com/support.html>. |
| 68 | + |
| 69 | +# More information |
| 70 | + |
| 71 | +- Python support: Python 2.7, >= 3.4, pypy |
| 72 | +- VCS supported: git(1), svn(1), hg(1) |
| 73 | +- Source: <https://github.com/vcs-python/libvcs> |
| 74 | +- Docs: <https://libvcs.git-pull.com> |
| 75 | +- Changelog: <https://libvcs.git-pull.com/history.html> |
| 76 | +- API: <https://libvcs.git-pull.com/api.html> |
| 77 | +- Issues: <https://github.com/vcs-python/libvcs/issues> |
| 78 | +- Test Coverage: <https://codecov.io/gh/vcs-python/libvcs> |
| 79 | +- pypi: <https://pypi.python.org/pypi/libvcs> |
| 80 | +- Open Hub: <https://www.openhub.net/p/libvcs> |
| 81 | +- License: [MIT](https://opensource.org/licenses/MIT). |
0 commit comments