X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib;h=0b8836266fbfc1746a16a09a2d71c10205a19a06;hp=48bc237347fe00a525110bc5d8f788b2f1dd6ebd;hb=d3606ff36cbf24f80152c5848fefee0c62686486;hpb=041c3de0db5da816fcbe5b8ac560946a058570bd diff --git a/tests/lib b/tests/lib index 48bc2373..0b883626 100644 --- a/tests/lib +++ b/tests/lib @@ -512,6 +512,28 @@ t-apply-diff () { | patch -p1 -u } +t-gbp-unapplied-pq2qc () { + # does `gbp pq export' (leaving us on BRANCH (eg "quilt-tip")) + # commits the resulting debian/patches on qc/BRANCH + # goes back to patch-queue/BRANCH + # qc/BRANCH is not fast-forwarding + + gbp pq export + + branch=`git symbolic-ref HEAD` + branch=${branch#refs/heads/} + + case "$branch" in + */*) fail "unexpected branch $branch" ;; + esac + + git branch -f qc/$branch + git checkout qc/$branch + git add debian/patches + git commit -m 'Commit patch queue' + git checkout patch-queue/$branch +} + t-commit () { local msg=$1 v=${2-1.$revision}