chiark / gitweb /
dgit: quilt fixup: @failsuggestion: Include a machine-readable reason
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 42813f1f8f026c00ef79e463a4fda1401e18a822..2a3d9ac45cbb7909002bccd1750ad7d8b4b4a1c2 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -5371,10 +5371,9 @@ sub quiltify ($$$$) {
            foreach my $notp (@nots) {
                print STDERR "$us:  ", $reportnot->($notp), "\n";
            }
-           print STDERR "$us: $_\n" foreach @$failsuggestion;
+           print STDERR "$us: $_->[1]\n" foreach @$failsuggestion;
            fail
- "quilt history linearisation failed.  Search \`quilt fixup' in dgit(7).\n".
- "Use dpkg-source --commit by hand; or, --quilt=smash for one ugly patch";
+ "quilt history linearisation failed.  Search \`quilt fixup' in dgit(7).\n";
        } elsif ($quilt_mode eq 'smash') {
        } elsif ($quilt_mode eq 'auto') {
            progress "quilt fixup cannot be linear, smashing...";
@@ -5915,12 +5914,16 @@ END
 
     my @failsuggestion;
     if (!($diffbits->{O2H} & $diffbits->{O2A})) {
-        push @failsuggestion, "This might be a patches-unapplied branch.";
+        push @failsuggestion, [ 'unapplied',
+                              "This might be a patches-unapplied branch." ];
     } elsif (!($diffbits->{H2A} & $diffbits->{O2A})) {
-        push @failsuggestion, "This might be a patches-applied branch.";
+        push @failsuggestion, [ 'applied',
+                               "This might be a patches-applied branch." ];
     }
-    push @failsuggestion, "Maybe you need to specify one of".
-        " --[quilt=]gbp --[quilt=]dpm --quilt=unapplied ?";
+    push @failsuggestion, [ 'quilt-mode', "Maybe you need to specify one of".
+        " --[quilt=]gbp --[quilt=]dpm --quilt=unapplied ?" ],
+           [ 'origs',
+ "Or, maybe orig tarball(s) are not identical to git representation?" ];
 
     if (quiltmode_splitbrain()) {
        quiltify_splitbrain($clogp, $unapplied, $headref, $oldtiptree,