chiark / gitweb /
Use failedcmd to report errors when ssh psql fails. Closes:#734281.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 9b895b0350a7bc0cbf8b635b6c60779e648a1b24..94454d33170b15546c42f0d42c77f27d0453ba7f 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -676,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 ?";
@@ -1803,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 {