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.14.tar.gz
(17.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file merge3-0.0.14.tar.gz.
File metadata
- Download URL: merge3-0.0.14.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30406e99386f4a65280fb9c43e681890fa2a1d839cac2759d156c7cc16030159
|
|
| MD5 |
e20464fec7d124550c3e2c1616c1a0e9
|
|
| BLAKE2b-256 |
af4098be4a5641b0244be5881ff5e00057f8227ff183d8675a697bdfeae43b1a
|
File details
Details for the file merge3-0.0.14-py3-none-any.whl.
File metadata
- Download URL: merge3-0.0.14-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ac0aadbd9ff5bea89ba9bd3796cb26e0df361dc86a381055ce0a45a7b8726ec
|
|
| MD5 |
8546ae3fc037d69070d23ec5a0d8a831
|
|
| BLAKE2b-256 |
17a85e085653871c70d1b139d7888d0f79ba82d130106157cfc16a9e8078d086
|