All Projects → techtonik → Python Patch

techtonik / Python Patch

Library to parse and apply unified diffs

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Python Patch

go-gitdiff
Go library for parsing and applying patches created by Git
Stars: ✭ 41 (-36.92%)
Mutual labels:  diff, patch
Gsync
gSync is an rsync based library for sending delta updates of files to a remote server.
Stars: ✭ 344 (+429.23%)
Mutual labels:  patch, diff
tmux-eaw-fix
tmux 2.6 以降において East Asian Ambiguous Character を全角文字の幅で表示する
Stars: ✭ 16 (-75.38%)
Mutual labels:  diff, patch
dipa
dipa makes it easy to efficiently delta encode large Rust data structures.
Stars: ✭ 243 (+273.85%)
Mutual labels:  diff, patch
Diff Match Patch
Diff Match Patch is a high-performance library in multiple languages that manipulates plain text.
Stars: ✭ 4,910 (+7453.85%)
Mutual labels:  patch, diff
duff
Pure OCaml implementation of libXdiff (Rabin's fingerprint)
Stars: ✭ 20 (-69.23%)
Mutual labels:  diff, patch
Editscript
A library designed to diff and patch Clojure data structures
Stars: ✭ 281 (+332.31%)
Mutual labels:  patch, diff
Apkdiffpatch
a C++ library and command-line tools for Zip(Jar,Apk) file Diff & Patch; create minimal delta/differential; support Jar sign(apk v1 sign) & apk v2,v3 sign .
Stars: ✭ 121 (+86.15%)
Mutual labels:  patch, diff
Similar
A high level diffing library for rust based on diffs
Stars: ✭ 386 (+493.85%)
Mutual labels:  patch, diff
Gojsondiff
Go JSON Diff
Stars: ✭ 371 (+470.77%)
Mutual labels:  patch, diff
intellij-diff-plugin
Syntax highlighting for .diff files and .patch files in IntelliJ IDEs
Stars: ✭ 17 (-73.85%)
Mutual labels:  diff, patch
Patch Package
Fix broken node modules instantly 🏃🏽‍♀️💨
Stars: ✭ 6,062 (+9226.15%)
Mutual labels:  patch, diff
diffy
Tools for finding and manipulating differences between files
Stars: ✭ 47 (-27.69%)
Mutual labels:  diff, patch
deltaq
Fast and portable delta encoding for .NET in 100% safe, managed code.
Stars: ✭ 26 (-60%)
Mutual labels:  diff, patch
Ex audit
Ecto auditing library that transparently tracks changes and can revert them.
Stars: ✭ 214 (+229.23%)
Mutual labels:  patch, diff
Diffson
A scala diff/patch library for Json
Stars: ✭ 258 (+296.92%)
Mutual labels:  patch, diff
Jsondiffpatch
Diff & patch JavaScript objects
Stars: ✭ 3,951 (+5978.46%)
Mutual labels:  patch, diff
Hdiffpatch
a C\C++ library and command-line tools for Diff & Patch between binary files or directories(folder); cross-platform; run fast; create small delta/differential; support large files and limit memory requires when diff & patch.
Stars: ✭ 459 (+606.15%)
Mutual labels:  patch, diff
Git Follow
Follow lifetime changes of a pathspec in Git.
Stars: ✭ 25 (-61.54%)
Mutual labels:  patch, diff
Extract Comments
Extract JavaScript code comments from a string or glob of files.
Stars: ✭ 36 (-44.62%)
Mutual labels:  parse

Library to parse and apply unified diffs.

Build Status PyPI

Features

  • Python 2 and 3 compatible
  • 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.py and run it with Python. It is a self-contained module without external dependencies.

patch.py diff.patch

You can also run the .zip file.

python patch-1.16.zip diff.patch

Installation

patch.py is self sufficient. You can copy it into your repository and use it from here. This setup will always be repeatable. But if you need to add patch module as a dependency, make sure to use strict specifiers to avoid hitting an API break when version 2 is released:

pip install "patch==1.*"

Other stuff

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].