chiark / gitweb /
dgit-repos-server: tag2upload: Improve a message
[dgit.git] / infra / dgit-repos-server
index 828ab7a14b66ec4cff9a9404e3a3bf4053620198..82b2c438a983968d7586e5cfa2929160c79934fd 100755 (executable)
@@ -1132,7 +1132,7 @@ sub mode_tag2upload () {
 
        # quick and dirty check, will check properly later
        m/^\[dgit[^"]* please-upload(?:\]| )/m or
-           $quit->("tag missing please-upload request $_");
+           $quit->("tag missing please-upload request");
 
        m/^tagger (.*) \d+ [-+]\d+$/m or
            $quit->("failed to fish tagger out of tag");
@@ -1149,7 +1149,6 @@ sub mode_tag2upload () {
 
     # This is for us.  From now on, we will capture errors to
     # be emailed to the tagger.
-    # TODO: failures to git fetch from salsa will burn a version
 
     open H, ">>dgit-tmp/tagupl.email" or die $!;
     print H <<END or die $!;
@@ -1189,14 +1188,15 @@ END
                 -f$ENV{DGIT_DRS_EMAIL_NOREPLY}        \\
                 <tagupl.email
 END
-       exit 0;
+       $quit->("failed, emailed");
     }
 
     open STDERR, ">&L" or die $!;
     open STDOUT, ">&STDERR" or die $!;
     open DEBUG, ">&STDERR" if $debuglevel;
 
-    die "$tagmversion != $version " unless $tagmversion eq $version;
+    reject "version mismatch $tagmversion != $version "
+       unless $tagmversion eq $version;
 
     my %need = map { $_ => 1 } qw(please-upload split);
     my ($upstreamc, $upstreamt);
@@ -1224,7 +1224,7 @@ END
        $distro_ok ||= $gotdistro eq $distro;
     };
 
-    $quit->("other distro") unless $distro_ok;
+    $quit->("not for this distro") unless $distro_ok;
 
     reject "missing \"$_\"" foreach keys %need;