chiark / gitweb /
dgit, Dgit.pm: Clarify error framing a bit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 20 Jun 2018 23:34:47 +0000 (00:34 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 21 Jun 2018 00:11:11 +0000 (01:11 +0100)
Add a newline and "error:" before most error messages.  Thius makes
the output clearer, by distinguishing informational output (which
might or might not relate to any error which is occurring) from things
which are definitely wrong.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Debian/Dgit.pm
dgit

index c0ee27fc4d3ca22c2e8735069ee97e440f8fb80e..57b79e8a195dfdc35f2c12540ec652935ad81479 100644 (file)
@@ -225,11 +225,11 @@ sub _us () {
 }
 
 sub failmsg {
-    my $s = "@_\n";
+    my $s = "error: @_\n";
     $s =~ s/\n\n$/\n/;
     my $prefix = _us().": ";
     $s =~ s/^/$prefix/gm;
-    return $s;
+    return "\n".$s;
 }
 
 sub fail {
diff --git a/dgit b/dgit
index 05cf90d2818bdd2f7da8cf89ca3a4d0ebc034d66..961d974882fc568ef6b6061af805c0f2e99ab80f 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -5326,7 +5326,7 @@ sub quiltify ($$$$) {
            return $s;
        };
        if ($quilt_mode eq 'linear') {
-           print STDERR "$us: quilt fixup cannot be linear.  Stopped at:\n";
+           print STDERR "\n$us: error: quilt fixup cannot be linear.  Stopped at:\n";
            foreach my $notp (@nots) {
                print STDERR "$us:  ", $reportnot->($notp), "\n";
            }