diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2014-10-08 23:27:59 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2014-10-08 23:27:59 +0200 |
commit | 97cc54f6b7c6ce60070712bb2277de25f61da556 (patch) | |
tree | 5f08a320f2aa97e5845b22c439442bb89f73a071 | |
parent | f525050905fb3e39fd18633ed48a2d8cbf5bc11a (diff) | |
download | zsh-97cc54f6b7c6ce60070712bb2277de25f61da556.tar.gz zsh-97cc54f6b7c6ce60070712bb2277de25f61da556.zip |
Drop patch2quilt helper (unused)
As discussed with ft on IRC
-rwxr-xr-x | debian/bin/patch2quilt | 99 | ||||
-rw-r--r-- | debian/pkg-zsh-workflow.md | 32 |
2 files changed, 0 insertions, 131 deletions
diff --git a/debian/bin/patch2quilt b/debian/bin/patch2quilt deleted file mode 100755 index 47c6acf7f..000000000 --- a/debian/bin/patch2quilt +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/sh - -# patch2quilt -# Copyright (c) 2011, Frank Terbeck <ft@bewatermyfriend.org> -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Often, we may want to backport a patch from upstream to our package. If -# that's just a matter of cherry-picking a patch from upstream, this script can -# help. We don't really want to git cherry-pick, but rather add a new patch to -# our quilt series. In short, this script automates doing that. -# -# Call it like this: -# % ./debian/patch2quilt ../0000-git-patch.patch 0010-quilt-patch.diff -# -# Where `../0000-git-patch.patch' is a patch from git; `0010-quilt-patch.diff' -# is the to-be-added quilt patch. The script now does this: -# -# - Reset and clean the repository to a clean state. -# - Push the entire quilt series. -# - Add `0010-quilt-patch.diff' as a new patch in the quilt series. -# - Check which files are touched by `../0000-git-patch.patch' and add those -# to the newly added quilt patch. -# - Apply the git patch. -# - Refresh the quilt patch. -# - Pop the entire quilt series again. -# - Open the new quilt patch in ${VISUAL:-${EDITOR:-vi}} to add annotation. -# -# That's all. -# -# Note: If the patch file is located in the current repository, it will be -# deleted when the repository is cleaned up initially. So don't do that. -# -# Also, if we're just cherry picking stuff from upstream git, there are -# likely changes to ChangeLog, which will not apply cleanly. Just throw -# away all such hunks from the patch beforehand. -# -# `patch2quilt' requires `quilt', `git' and `diffstat' available. -# -# Call this script *only* from the git repository's base directory. - -QUILT_PATCHES=debian/patches -export QUILT_PATCHES - -if [ ! -d "${QUILT_PATCHES}" ]; then - printf 'No such directory: `%s'\''\n' "${QUILT_PATCHES}" - printf 'Quilt patches directory not found. Giving up.\n' - exit 1 -fi - -if [ $# -ne 2 ]; then - printf 'usage: patch2quilt <git-patch> <quilt-patch>\n' - exit 1 -fi - -gitpatch="$1" -quiltpatch="$2" - -git clean -xdf || exit 1 -git reset --hard || exit 1 - -quilt push -a || exit 1 - -quilt new "${quiltpatch}" || exit 1 - -diffstat -l -p1 "${gitpatch}" | while IFS= read -r file; do - quilt add "${file}" || exit 1 -done - -git apply "${gitpatch}" || exit 1 - -quilt refresh || exit 1 - -quilt pop -a || exit 1 - -${VISUAL:-${EDITOR:-vi}} "${QUILT_PATCHES}/${quiltpatch}" - -printf -- '\n---------------------------------------' -printf -- '---------------------------------------\n' -printf '\n New quilt patch `%s'\'' added. You\n' "${quiltpatch}" -printf ' should add it and its series file to git and commit the result.\n' -printf '\n Like this:\n\n' -printf ' %% git add "%s"\n' "${QUILT_PATCHES}/series" -printf ' %% git add "%s"\n' "${QUILT_PATCHES}/${quiltpatch}" -printf ' %% git commit\n' -printf '\n Write a useful commit message.' -printf ' Don'\''t forget `Closes:'\'' mentions!\n\n' - -exit 0 diff --git a/debian/pkg-zsh-workflow.md b/debian/pkg-zsh-workflow.md index 11bfb6b5b..275f4b8f7 100644 --- a/debian/pkg-zsh-workflow.md +++ b/debian/pkg-zsh-workflow.md @@ -155,38 +155,6 @@ Commit the new patch and the changed `series` file to git. That's all. -##### Using the patch2quilt script - -The `debian/bin/patch2quilt` helper script can automate these tasks, -but needs to be run from a _clean_ working tree. It's called like -this: - - % debian/bin/patch2quilt ../existing.diff new-quilt.diff - -Here `../existing.diff` is the file containing the existing patch and -`new-quilt.diff` is the name of the to-be-added quilt series patch -(make sure its nameing is in line with the established conventions). - -The exact operation of the script is described at the top of the -script file. There are a few things to keep in mind: - -* At the end of successful operation you are dropped into an editor - which gives you the opportunity to add annotations at the top of the - patch file (like if the patch in question is included upstream - already). - -* Never *ever* run the script when you got uncommitted changes in the - worktree, which you don't plan on losing. The worktree will be - cleaned and reset first thing in the script. - -* As an extension of the previous point, don't put the existing - patch you're planing to import into the git working tree. It - would be wiped away, too. - -* When the script finishes (after you exit your editor), it will - suggest how to commit the newly intoduced patch. Season to taste. - - ### Releases When a change justifies the release of a new package version, the |