+
+t-refs-notexist () {
+ for g in $*; do
+ t-git-get-ref $g >$tmp/t.refx
+ diff /dev/null $tmp/t.refx
+ done
+}
+
+t-pushed-good () {
+ t-ref-dsc-dgit
+ t-refs-same-more \
+ refs/heads/master \
+ refs/tags/debian/$v \
+ refs/remotes/dgit/dgit/sid
+ t-refs-notexist \
+ refs/heads/dgit/unstable \
+ refs/remotes/dgit/dgit/unstable
+ (set -e; cd $tmp/git/$p.git
+ t-refs-same-more \
+ refs/dgit/sid \
+ refs/tags/debian/$v
+ t-refs-notexist \
+ refs/dgit/unstable
+ )
+}
+
+t-ref-dsc-dgit () {
+ perl -e '
+ use Dpkg::Control::Hash;
+ my $h = new Dpkg::Control::Hash allow_pgp=>1;
+ $h->parse(\*STDIN,"dsc");
+ my $ref = $h->{"Dgit"},"\n";
+ die unless $ref =~ m/^\w+\b/;
+ print $ref,"\n";
+ ' <$tmp/incoming/${p}_${v}.dsc >$tmp/t.ref1
+}