Ply: Git-based Patch Management
Project description
Description
ply is a utility to manage a series of patches against an upstream project. These patches are stored as files in a separate git repositiory so that they can themselves be versioned. These patches can then be applied to create a patched version of the code to be used for packaging and deployment.
Concepts
The upstream project resides in the upstream-repo (UR). Your local checkout of the upstream-repo is called the working-repo and is where you’ll do most of your work: you’ll make changes, commit them, and then run ply save to create a new set of patches, called a patch-series.
The patches are stored in the patch-repo (PR), a separate git repo that is linked to the working-repo using the ply.patchrepo git config.
Usage
Initialize a new patch-repo which initializes the new git repo and commits an empty series file:
ply init .
Link working-repo to a patch-repo:
ply link ../my-patch-repo # from within the working-repo
Unlink working-repo from current patch-repo:
ply unlink
Check that status of a working-repo:
ply status All patches applied
Save set of commits to the patch-repo:
# Without --since, any 'new' patches (patches that follow applied patches) # will be saved ply save # Save only the last commit into the 'foo' subdirectory ply save --since=HEAD^ --prefix=foo HEAD^
Rollback working-repo to match upstream:
ply rollback
Restore patch-series:
ply restore
Resolve a failed merge and continue applying patch-series:
ply resolve
Skip a patch that has already merged upstream. In addition to performing a git am --skip, this will also remove the relevant patch from the patch-repo:
ply skip
Note: If the upstream patch is an exact match of the version in the patch-repo, ply will automatically remove the patch from the patch-repo.
Perform a health-check on the patch-repo. This ensures that all of the patches in the patch-repo are accounted for in the patch-series:
ply check OK
Create a DOT graph representation of patch dependencies:
ply graph
The output of this can be piped into dot to generate a PNG file:
ply graph | dot -Tpng > dependencies.png
ply vs X?
Tools for managing patches have existed for a while, so why create another?
The short answer is:
quilt deals in patch-files which can be versioned but doesn’t understand version-control. This orthogonality, in some respect, is elegant, but is a hassle in day-to-day use. Why checkpoint files in quilt when your version control system already does that for you?
stgit (stacked-git) understands version control but stores patches as commit objects, not as patch files. This means you can’t version your patches, making it impossible to rollback when things go awry.
ply blends these two tools together to create a tool that understands version-control but at the same time stores patches as files which can themselves be versioned.
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
File details
Details for the file plypatch-0.3.6.tar.gz
.
File metadata
- Download URL: plypatch-0.3.6.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f33fa9de9b9d7d9616c48421d8f9e3b5479401448bacb437dc52ea1916e7380 |
|
MD5 | 4b1bea302ada0eea84ac7985958b00e6 |
|
BLAKE2b-256 | 1cdcfb5f7c59dd80652cc3174876e0422ae14c20d67c6de884770cb6f333d1b9 |