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.3.tar.gz
(16.6 kB
view details)
File details
Details for the file merge3-0.0.3.tar.gz
.
File metadata
- Download URL: merge3-0.0.3.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 891d38e7e03498d5e482e19a701abf8b823b15b86966bd5e5c00da7280500da6 |
|
MD5 | f7eff363c5f9e8b26eff2ff4ee1136da |
|
BLAKE2b-256 | d50e500030c5835802ff4732a6fff92db94de3425e92bd4ed0800d4ec55b78c8 |