summaryrefslogtreecommitdiffstats
path: root/python/python3-patch-ng/README
blob: 5f9edb2ff67bd64f1c9c5556fb9378217fffd6e4 (plain)
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
Patch NG (New Generation)

Library to parse and apply unified diffs.
This project is a fork from the original python-patch project.

Features

Automatic correction of Linefeeds according to patched file
Diffs broken by stripping trailing whitespace
a/ and b/ prefixes
Single file, which is a command line tool and a library
No dependencies outside Python stdlib
Patch format detection (SVN, HG, GIT)
Nice diffstat histogram
Linux / Windows / OS X
Test coverage

Things that don't work out of the box:

File renaming, creation and removal
Directory tree operations
Version control specific properties
Non-unified diff formats

Usage

Download patch_ng.py and run it with Python. It is a self-contained
module without external dependencies.

patch_ng.py diff.patch