Differences between revisions 5 and 6
Revision 5 as of 2011-12-05 13:55:01
Size: 1884
Editor: ArneBab
Comment: updated install instructions for Gentoo.
Revision 6 as of 2012-01-18 09:23:54
Size: 1967
Editor: IdanKamara
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
This library will hopefully soon be packaged by distributors and appear in the usual package pools. It is also available on [[http://pypi.python.org/pypi/python-hglib/|PyPI]].
Line 38: Line 38:
For more examples, see the [[http://www.selenic.com/repo/python-hglib/file/tip/examples/|examples/ directory in the source]]. For more examples, see the [[http://www.selenic.com/repo/python-hglib/file/tip/examples/|examples/]] and [[http://www.selenic.com/repo/python-hglib/file/tip/tests/|tests/]] dirs in the source.
Line 42: Line 42:
Supported Python versions are 2.4-2.7.

python-hglib

A Python library for interfacing with Mercurial's CommandServer

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.

It is also available on PyPI.

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

Gentoo-users can just emerge dev-python/hglib.

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/ and tests/ dirs 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). Supported Python versions are 2.4-2.7.

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).

8. See also


CategoryAudit

PythonHglib (last edited 2017-11-23 05:22:38 by KevinBullock)