X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib-gdr;h=acbfa92d29cc5b8653e1ba4ab025474da2611ab3;hp=9d9fcb461a09025a173f8dc8d23af0b5ee2a8fc5;hb=4f8b1a2d11988e1b793149b3c7058e50b7d96f69;hpb=d5a58eb3a50f0df4a764d9aa301f3f130c4b2465 diff --git a/tests/lib-gdr b/tests/lib-gdr index 9d9fcb46..acbfa92d 100644 --- a/tests/lib-gdr +++ b/tests/lib-gdr @@ -21,14 +21,20 @@ t-gdr-good () { # stitched # pushed + case $state in + pushed*) + t-gdr-made-patches + ;; + esac + git diff --quiet ${beforetag-t.before} -- ':.' ':!debian/patches' LC_MESSAGES=C t-git-debrebase status >../status.check case $state in - laundered) + laundered*) egrep '^ *branch is laundered' ../status.check ;; - stitched|pushed) + stitched*|pushed*) egrep \ '^ *branch contains furniture|^ *branch is unlaundered|^ *branch needs laundering' ../status.check egrep '^ stitched$' ../status.check @@ -57,6 +63,7 @@ t-gdr-good-analyse () { pushed) etypes=AddPatches-Pseudomerge-Upstream ;; pushed-interop) etypes=Pseudomerge-AddPatchesInterop-Upstream ;; breakwater) etypes=Packaging ;; + *) fail-unknown-state-$state ;; esac anal=../anal$wsfx @@ -329,3 +336,38 @@ t-gdr-prep-new-upstream () { git checkout master t-git-next-date } + +t-gdr-gbp-import-core () { + p=example + t-worktree 1.1 + + cd example + + : 'fake up some kind of upstream' + git checkout -b upstream quilt-tip + rm -rf debian + mkdir debian + echo junk >debian/rules + git add debian + git commit -m "an upstream retcon ($0)" + git tag v1.0 + + : 'fake up that our quilt-tip was descended from upstream' + git checkout quilt-tip + git merge --no-edit -s ours upstream + + : 'fake up that our quilt-tip had the patch queue in it' + git checkout patch-queue/quilt-tip + gbp pq export + git add debian/patches + git commit -m "patch queue update ($0)" + + : 'make branch names more conventional' + git branch -D master + git branch -m quilt-tip master +} + +t-gdr-made-patches () { + git log -n1 --'pretty=format:%B' \ + | egrep '^\[git-debrebase' +}