[Pkg-ocaml-maint-commits] [dh-ocaml] 02/05: Use gbp pq now that it exists (also, in stable)
Mehdi Dogguy
mehdi at moszumanska.debian.org
Sun Jan 3 11:59:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
mehdi pushed a commit to branch master
in repository dh-ocaml.
commit 29e05b3df27841951c9f9463284fca8aa4ea4965
Author: Mehdi Dogguy <mehdi at debian.org>
Date: Sun Jan 3 11:49:05 2016 +0100
Use gbp pq now that it exists (also, in stable)
---
tools/dom-apply-patches | 38 +---------------------------------
tools/dom-save-patches | 55 +------------------------------------------------
2 files changed, 2 insertions(+), 91 deletions(-)
diff --git a/tools/dom-apply-patches b/tools/dom-apply-patches
index 1a5e406..e665820 100755
--- a/tools/dom-apply-patches
+++ b/tools/dom-apply-patches
@@ -1,39 +1,3 @@
#!/bin/sh
-set -e
-PATCH_BRANCH="${PATCH_BRANCH:-patch-queue}"
-GBP_CONF="${GBP_CONF:-debian/gbp.conf}"
-
-if [ -z "$MASTER_BRANCH" ]; then
- if [ -f "$GBP_CONF" ]; then
- MASTER_BRANCH=`awk -F' *= *' '/debian-branch/{print $2}' "$GBP_CONF"`
- fi
- MASTER_BRANCH="${MASTER_BRANCH:-master}"
-fi
-
-if [ -z "$UPSTREAM_BRANCH" ]; then
- if [ -f "$GBP_CONF" ]; then
- UPSTREAM_BRANCH=`awk -F' *= *' '/upstream-branch/{print $2}' "$GBP_CONF"`
- fi
- UPSTREAM_BRANCH="${UPSTREAM_BRANCH:-upstream}"
-fi
-
-echo "Debian branch is $MASTER_BRANCH"
-echo "Upstream branch is $UPSTREAM_BRANCH"
-
-error () {
- echo "E: $1"
- exit 1
-}
-
-if [ -n "`git branch | grep $PATCH_BRANCH`" ]; then
- error "There is already a branch $PATCH_BRANCH"
-else
- git checkout -b "$PATCH_BRANCH" "$UPSTREAM_BRANCH"
-
- ## When $MASTER_BRANCH:debian/patches/series doesn't exist, git cat-file
- ## will produce an empty output (along with an error on stderr).
- for patch in `git cat-file -p "$MASTER_BRANCH":debian/patches/series 2>/dev/null`; do
- git cat-file -p "$MASTER_BRANCH":debian/patches/$patch | git am;
- done
-fi
+exec gbp pq import --force
diff --git a/tools/dom-save-patches b/tools/dom-save-patches
index 2811046..38e108b 100755
--- a/tools/dom-save-patches
+++ b/tools/dom-save-patches
@@ -1,56 +1,3 @@
#!/bin/sh
-set -e
-PATCH_BRANCH="${PATCH_BRANCH:-patch-queue}"
-GBP_CONF="${GBP_CONF:-debian/gbp.conf}"
-
-if [ -z "$MASTER_BRANCH" ]; then
- if [ -f "$GBP_CONF" ]; then
- MASTER_BRANCH=`awk -F' *= *' '/debian-branch/{print $2}' "$GBP_CONF"`
- fi
- MASTER_BRANCH="${MASTER_BRANCH:-master}"
-fi
-
-if [ -z "$UPSTREAM_BRANCH" ]; then
- if [ -f "$GBP_CONF" ]; then
- UPSTREAM_BRANCH=`awk -F' *= *' '/upstream-branch/{print $2}' "$GBP_CONF"`
- fi
- UPSTREAM_BRANCH="${UPSTREAM_BRANCH:-upstream}"
-fi
-
-echo "Debian branch is $MASTER_BRANCH"
-echo "Upstream branch is $UPSTREAM_BRANCH"
-
-error () {
- echo "E: $1"
- exit 1
-}
-
-clean_patch () {
- mv $1 $1~
- ## Assertion: There is at least one line that matches "^-- "
- head -n `grep -n '^-- $' $1~ | tail -n1 | cut -d: -f1` $1~ > $1
- rm -f $1~
-}
-
-if [ -z "`git branch | grep -e "$PATCH_BRANCH"`" ]; then
- error "There is no branch $PATCH_BRANCH…"
-else
- git checkout "$MASTER_BRANCH"
-
- echo "Saving patches in $MASTER_BRANCH:debian/patches/"
- mkdir -p debian/patches/
- rm -f debian/patches/*
- git format-patch -k -N -o debian/patches "$UPSTREAM_BRANCH"..."$PATCH_BRANCH" | \
- sed -e 's%debian/patches/%%' > debian/patches/series
-
- git branch -D "$PATCH_BRANCH"
-
- echo "Cleaning patches…"
- sed -i 1d debian/patches/*.patch 2>/dev/null
- ## Hackish: Remove 2 last lines
- # sed -i -n -e :a -e '1,2!{P;N;D;};N;ba' debian/patches/*.patch
- for patch in `ls -1 debian/patches/*.patch 2>/dev/null`; do
- clean_patch $patch
- done
-fi
+exec gbp pq export --drop
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/dh-ocaml.git
More information about the Pkg-ocaml-maint-commits
mailing list