1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
Metadata-Version: 1.2
Name: patiencediff
Version: 0.2.1
Summary: Python implementation of the patiencediff algorithm.
Home-page: https://www.breezy-vcs.org/
Maintainer: Breezy Developers
Maintainer-email: team@breezy-vcs.org
License: GNU GPLv2 or later
Description: This package contains the implementation of the ``patiencediff`` algorithm, as
`first described <https://bramcohen.livejournal.com/73318.html>`_ by Bram Cohen.
Like Python's ``difflib``, this module provides both a convience ``unified_diff``
function for the generation of unified diffs of text files
as well as a SequenceMatcher that can be used on arbitrary lists.
Patiencediff provides a good balance of performance, nice output for humans,
and implementation simplicity.
The code in this package was extracted from the `Bazaar <https://www.bazaar-vcs.org/>`_
code base.
The package comes with two implementations:
* A Python implementation (_patiencediff_py.py); this implementation only
requires a Python interpreter and is the more readable version of the two
* A C implementation implementation (_patiencediff_c.c); this implementation
is faster, but requires a C compiler and is less readable
Usage
=====
To invoke patiencediff from the command-line::
python -m patiencediff file_a file_b
Or from Python:
>>> import patiencediff
>>> print ''.join(patiencediff.unified_diff(
... ['a\n', 'b\n', 'b\n', 'c\n'],
... ['a\n', 'c\n', 'b\n']))
---
+++
@@ -1,4 +1,3 @@
a
+c
b
-b
-c
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: POSIX
|