chiark / gitweb /
Test suite: Provide tests/unapplied-pq2qc
[dgit.git] / tests / unapplied-pq2qc
1 #!/bin/bash
2 set -e
3 fail () { echo >&2 "$0: $*"; exit 1; }
4
5 # does `gbp pq export' (leaving us on BRANCH (eg "quilt-tip"))
6 # commits the resulting debian/patches on  qc/BRANCH
7 # goes back to patch-queue/BRANCH
8 # qc/BRANCH is not fast-forwarding
9
10 gbp pq export
11
12 branch=`git symbolic-ref HEAD`
13 branch=${branch#refs/heads/}
14
15 case "$branch" in
16 */*) fail "unexpected branch $branch" ;;
17 esac
18
19 git branch -f qc/$branch
20 git checkout qc/$branch
21 git add debian/patches
22 git commit -m 'Commit patch queue'
23 git checkout patch-queue/$branch