Python implementation of 3-way merge
Project description
A Python implementation of 3-way merge of texts.
Given BASE, OTHER, THIS, tries to produce a combined text incorporating the changes from both BASE->OTHER and BASE->THIS. All three will typically be sequences of lines.
Usage
From the command-line:
$ echo foo > mine $ echo bar > base $ echo blah > other $ python -m merge3 mine base other > merged $ cat merged
Or from Python:
>>> import merge3 >>> m3 = merge3.Merge3( ... ['common\n', 'base\n'], ... ['common\n', 'a\n'], ... ['common\n', 'b\n']) >>> list(m3.merge_annotated()) ['u | common\n', '<<<<\n', 'A | a\n', '----\n', 'B | b\n', '>>>>\n']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
merge3-0.0.15.tar.gz
(14.1 kB
view details)
Built Distribution
merge3-0.0.15-py3-none-any.whl
(15.0 kB
view details)
File details
Details for the file merge3-0.0.15.tar.gz
.
File metadata
- Download URL: merge3-0.0.15.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3eac213d84d56dfc9e39552ac8246c7860a940964ebeed8a8be4422f6492baf |
|
MD5 | 26b5483e68cc6c13f0d86edbb6daa72a |
|
BLAKE2b-256 | 91e1fe09c161f80b5a8d8ede3270eadedac7e59a64ea1c313b97c386234480c1 |
File details
Details for the file merge3-0.0.15-py3-none-any.whl
.
File metadata
- Download URL: merge3-0.0.15-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b5f54a17181be261fde03a10cf55f34f910b19fe81e21cbd5fe87a3395c4a6 |
|
MD5 | 0672769e1ac41c6490c68d9d64d142e2 |
|
BLAKE2b-256 | d2cd67e3bd2bba4bdc22aee41b27aa865500254c87ab48631ff64008b6ecc1a8 |