X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Fsetup%2Fgbp2gdr;h=ac949dfa0d2f0dfbbd3553340f918cbcaf09ca67;hp=909643b27f19dc21742297dc24b3ec25232e265b;hb=4cffe29436a86c6aa974db00201cabae1448e0c7;hpb=aebf260fa5e34808157bf42f1dd70d3ce85c11aa diff --git a/tests/setup/gbp2gdr b/tests/setup/gbp2gdr index 909643b2..ac949dfa 100755 --- a/tests/setup/gbp2gdr +++ b/tests/setup/gbp2gdr @@ -3,14 +3,12 @@ set -e . tests/lib . $troot/lib-gdr -t-dependencies git-buildpackage +t-dependencies git-buildpackage libfile-fnmatch-perl t-tstunt-parsechangelog - not-gdr-processable () { - t-expect-fail F:'Cannot cope with this commit' \ - t-git-debrebase + t-git-debrebase analyse | grep 'Unknown Unprocessable' } p=example @@ -39,72 +37,64 @@ git commit -m "patch queue update ($0)" not-gdr-processable : 'fake up an upstream 2.0' -git checkout -b make-upstream upstream -echo upstream-v2 >>docs/README -git commit -a -m "an upstream v2 update" -ust=example_2.0.orig.tar.gz -git archive -o ../$ust --prefix=example-2.0/ make-upstream +git branch make-upstream upstream +t-make-new-upstream-tarball 2.0 + +: 'make branch names more conventional' +git branch -D master +git branch -m quilt-tip master + +for b in \ + quilt-tip-2 \ + gitish-only \ + quilt-tip-1.1 \ + patch-queue/quilt-tip \ + indep-arch \ +; do + git branch -D $b +done : 'see what gbp import-orig does' -git checkout quilt-tip -gbp import-orig --debian-branch=quilt-tip --upstream-version=2.0 ../$ust +git checkout master +gbp import-orig --upstream-version=2.0 ../$ust not-gdr-processable -t-git-debrebase --force gbp2debrebase - -: xxx -t-ok -exit 0 - - -git checkout quilt-tip -git merge --no-edit --allow-unrelated-histories -Xtheirs --no-commit upstream -git checkout HEAD -- debian -git commit --no-edit - +t-dch-commit -v 2.0-1 -m 'new upstream (did gbp import-orig)' +t-dch-commit -r sid +t-archive-none $p +t-git-none +t-dgit -wgf --gbp push-source --new -false +t-salsa-add-remote +git push --set-upstream origin master -revision=1 - -push-to () { - t-refs-same-start - t-ref-head - t-dgit build - t-dgit push --new $2 - t-pushed-good $1 $2 - t-archive-process-incoming $2 -} +# OK now this looks like something more normal. +# We have: +# maintainer (gbp) view dgit view +# master +# debian/2.0-1 archive/debian/2.0-1 +# remotes/origin/master remotes/dgit/dgit/sid -echo ancestor >which -git add which -t-commit Ancestor '' stable -push-to master stable +t-git-debrebase -fupstream-has-debian gbp2debrebase -git checkout -b stable - -echo stable >which -git add which -t-commit Stable '' stable -push-to stable stable - -git checkout master +v=2.0-2 +dch -v $v -m 'switch to git-debrebase, no other changes' +dch -r sid +git commit -m changelog debian/changelog -majorv=2 -revision=0 +t-dgit -wgf push-source --new --overwrite +git push -echo sid >which -git add which -t-commit Sid -push-to master sid +cd .. -echo sid-again >>which -git add which -t-commit Sid -push-to master sid +t-archive-process-incoming sid -t-setup-done 'p v suitespecs majorv revision' "aq git mirror $p" +t-setup-done '' "$(echo $p*) git mirror salsa aq" ' + . $troot/lib-gdr + t-tstunt-parsechangelog + p=example +' t-ok