chiark / gitweb /
Use failedcmd to report errors when ssh psql fails. Closes:#734281.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 38b3364829f8f200a53e33372d623de761184bc0..94454d33170b15546c42f0d42c77f27d0453ba7f 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -465,6 +465,7 @@ our %defcfg = ('dgit.default.distro' => 'debian',
               'dgit-distro.test-dummy.git-path' => "$td/git",
               'dgit-distro.test-dummy.archive-query' => "dummycat:$td/aq",
               'dgit-distro.test-dummy.mirror' => "file://$td/mirror/",
+              'dgit-distro.test-dummy.upload-host' => 'test-dummy',
                );
 
 sub cfg {
@@ -675,7 +676,7 @@ sub sshpsql ($$) {
        printdebug("$debugprefix>|$_|\n");
        push @rows, $_;
     }
-    $!=0; $?=0; close P or die "$! $?";
+    $!=0; $?=0; close P or failedcmd @cmd;
     @rows or die;
     my $nrows = pop @rows;
     $nrows =~ s/^\((\d+) rows?\)$/$1/ or die "$nrows ?";
@@ -1802,7 +1803,7 @@ sub changesopts () {
        my @vsns = archive_query('archive_query');
        if (@vsns) {
            @vsns = map { $_->[0] } @vsns;
-           @vsns = sort { version_compare_string($a, $b) } @vsns;
+           @vsns = sort { -version_compare_string($a, $b) } @vsns;
            $changes_since_version = $vsns[0];
            progress "changelog will contain changes since $vsns[0]";
        } else {