Size: 1830
Comment:
|
Size: 1925
Comment: Added a link to the Gentoo ebuild.
|
Deletions are marked like this. | Additions are marked like this. |
Line 22: | Line 22: |
For Gentoo-users there is an [[https://bugs.gentoo.org/392387|ebuild in the bugtracker]]. |
python-hglib
A Python library for interfacing with Mercurial's CommandServer
Contents
1. Getting the source
The package can be downloaded as a source tarball or cloned from its primary repository at http://selenic.com/repo/python-hglib.
This library will hopefully soon be packaged by distributors and appear in the usual package pools.
2. License
Unlike Mercurial itself, which requires derived works be licensed with the GPLv2+, python-hglib is available under the less restrictive MIT license.
3. Installing
The package includes a standard distutils setup.py, so should install with:
$ python setup.py install
For Gentoo-users there is an ebuild in the bugtracker.
4. Basic usage
First create an hglib client object:
import hglib client = hglib.open("/path/to/repo")
Now you can perform Mercurial commands with a Python interface:
commit = client.log("tip") print commit.author
For more examples, see the examples/ directory in the source.
5. Compatibility
It should be possible to use any version of python-hglib with all versions of Mercurial that support the command server protocol (Mercurial 1.9 or newer).
6. Reporting bugs
This package is managed by the Mercurial project, so bugs can be reported to the main Mercurial BTS. Please mention 'hglib' in the subject.
7. Contributing code
Similarly, code contribution should (roughly) follow the guidelines from ContributingCode. Please flag patches with 'hglib' (eg via patchbomb's --flag switch).