chiark / gitweb /
dgit: baredebian: Note upstream version and commitish source
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 02cf97d846cd695f158245e6b3a4057dd4ab7958..c8a8d8d56afdf8902816df6b5b7f41ce93f7633e 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -80,6 +80,7 @@ our $rmchanges;
 our $overwrite_version; # undef: not specified; '': check changelog
 our $quilt_mode;
 our $quilt_upstream_commitish;
+our $quilt_upstream_commitish_used;
 our $quilt_modes_re = 'linear|smash|auto|nofix|nocheck|gbp|dpm|unapplied|baredebian';
 our $splitview_mode;
 our $splitview_modes_re = qr{auto|always|never};
@@ -5409,13 +5410,14 @@ END
        # upstream and debian/ files from HEAD.
 
        read_tree_upstream $quilt_upstream_commitish, 1, $headref;
-       my $upsversion = upstreamversion getfield $clogp, 'Version';
+       my $version = getfield $clogp, 'Version';
+       my $upsversion = upstreamversion $version;
        my $merge = make_commit
            [ $headref, $quilt_upstream_commitish ],
            [ +(f_ <<ENDT, $upsversion), <<ENDU ];
 Combine debian/ with upstream source for %s
 ENDT
-[dgit ($our_version) baredebian-merge]
+[dgit ($our_version) baredebian-merge $version $quilt_upstream_commitish_used]
 ENDU
        runcmd @git, qw(reset -q --hard), $merge;
     }
@@ -6192,6 +6194,10 @@ END
 
     if ($quilt_mode =~ m/baredebian/) {
        $uheadref = $quilt_upstream_commitish;
+       # TRANSLATORS: this translation must fit in the ASCII art
+       # quilt differences display.  The untranslated display
+       # says %9.9s, so with that display it must be at most 9
+       # characters.
        $uhead_whatshort = __ 'upstream';
     }
 
@@ -6218,6 +6224,12 @@ END
     progress f_
 "%s: base trees orig=%.20s o+d/p=%.20s",
               $us, $unapplied, $oldtiptree;
+    # TRANSLATORS: Try to keep this ascii-art layout right.  The 0s in
+    # %9.00009s will be ignored and are there to make the format the
+    # same length (9 characters) as the output it generates.  If you
+    # change the value 9, your translation of "upstream" must fit into
+    # the new length, and you should change the number of 0s.  Do
+    # not reduce it below 4 as HEAD has to fit too.
     progress f_
 "%s: quilt differences: src:  %s orig %s     gitignores:  %s orig %s\n".
 "%s: quilt differences: %9.00009s %s o+d/p          %9.00009s %s o+d/p",
@@ -6427,9 +6439,9 @@ sub build_or_push_prep_modes () {
        if do_split_brain() && $includedirty;
 
     if (madformat_wantfixup $format and $quilt_mode =~ m/baredebian$/) {
-       my ($dummy, $umessage);
-       ($quilt_upstream_commitish, $dummy, $umessage) =
-       resolve_upstream_version
+       my ($umessage);
+       ($quilt_upstream_commitish, $quilt_upstream_commitish_used,
+        $umessage) = resolve_upstream_version
            $quilt_upstream_commitish, upstreamversion $version;
        progress f_ "dgit: --quilt=%s, %s", $quilt_mode, $umessage;
     } elsif (defined $quilt_upstream_commitish) {