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.13.tar.gz
(13.6 kB
view details)
Built Distribution
merge3-0.0.13-py3-none-any.whl
(14.7 kB
view details)
File details
Details for the file merge3-0.0.13.tar.gz
.
File metadata
- Download URL: merge3-0.0.13.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8abda1d2d49776323d23d09bfdd80d943a57d43d28d6152ffd2c87956a9b6b54 |
|
MD5 | 478955e6f5563644e0e62aec0c572aa5 |
|
BLAKE2b-256 | dc91647a2942b6f308c7dce358bec770fe62ee0689cfd1dd218b66e244acde7d |
File details
Details for the file merge3-0.0.13-py3-none-any.whl
.
File metadata
- Download URL: merge3-0.0.13-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f8ee5f8c61823ff7c3ae68e6d0d2966bbf249bb08dc5e6f2abffd8d97c62cf3 |
|
MD5 | da44d9726a6b82c0146b6235d8e465cd |
|
BLAKE2b-256 | 61fc0eb72422b8f64643ca7d9bc2b9076ec550388ff8e1022425fa11e7012e94 |