chiark / gitweb /
Manpages: clarify usual workflow
[dgit.git] / tests / lib
index 30fce38e9d4f06018326c6a0eb9193f5fe669385..055d5fa8f3e0a64334e41088caad10e5e6c0af71 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -362,7 +362,7 @@ t-refs-same () {
 t-refs-notexist () {
        local val
        for g in $*; do
-               val=`t-git-get-ref $g >$tmp/t.refx`
+               val=`t-git-get-ref $g`
                if [ "x$val" != x ]; then
                        fail "ref $g unexpectedly exists ($val)"
                fi
@@ -461,11 +461,11 @@ t-apply-diff () {
 
 t-commit () {
        local msg=$1
-       v=1.$revision
+       v=${2-1.$revision}
        dch -v$v --distribution unstable "$1"
        git add debian/changelog
        debcommit
-       revision=$(( $revision + 1 ))
+       revision=$(( ${revision-0} + 1 ))
 }
 
 t-git-config () {
@@ -516,6 +516,10 @@ t-policy-admin () {
        ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
 }
 
+t-policy-nonexist () {
+       ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
+}
+
 t-policy () {
        local policyhook=$1
        policyhook=${DGIT_INFRA_PFX}$policyhook