summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit80
1 files changed, 44 insertions, 36 deletions
diff --git a/dgit b/dgit
index 9fd01b0..f3aea0d 100755
--- a/dgit
+++ b/dgit
@@ -4068,7 +4068,7 @@ sub splitbrain_pseudomerge ($$$$) {
my $i_arch_v = pseudomerge_version_check($clogp, $archive_hash);
if (!defined $overwrite_version) {
- progress "Checking that HEAD inciudes all changes in archive...";
+ progress __ "Checking that HEAD inciudes all changes in archive...";
}
return $dgitview if is_fast_fwd $archive_hash, $dgitview;
@@ -4076,10 +4076,11 @@ sub splitbrain_pseudomerge ($$$$) {
if (defined $overwrite_version) {
} elsif (!eval {
my $t_dep14 = debiantag_maintview $i_arch_v->[0], access_nomdistro;
- my $i_dep14 = infopair_lrf_tag_lookup($t_dep14, "maintainer view tag");
+ my $i_dep14 = infopair_lrf_tag_lookup($t_dep14,
+ __ "maintainer view tag");
my $t_dgit = debiantag_new $i_arch_v->[0], access_nomdistro;
- my $i_dgit = infopair_lrf_tag_lookup($t_dgit, "dgit view tag");
- my $i_archive = [ $archive_hash, "current archive contents" ];
+ my $i_dgit = infopair_lrf_tag_lookup($t_dgit, __ "dgit view tag");
+ my $i_archive = [ $archive_hash, __ "current archive contents" ];
printdebug "splitbrain_pseudomerge i_archive @$i_archive\n";
@@ -4089,10 +4090,11 @@ sub splitbrain_pseudomerge ($$$$) {
1;
}) {
$@ =~ s/^\n//; chomp $@;
- print STDERR <<END;
+ print STDERR <<END.(__ <<ENDT);
$@
-| Not fast forward; maybe --overwrite is needed ? Please see dgit(1).
END
+| Not fast forward; maybe --overwrite is needed ? Please see dgit(1).
+ENDT
finish -1;
}
@@ -4100,15 +4102,13 @@ END
my $r = pseudomerge_make_commit
$clogp, $dgitview, $archive_hash, $i_arch_v,
"dgit --quilt=$quilt_mode",
- (defined $overwrite_version ? <<END_OVERWR : <<END_MAKEFF);
-Declare fast forward from $arch_v
-END_OVERWR
-Make fast forward from $arch_v
-END_MAKEFF
+ (defined $overwrite_version
+ ? f_ "Declare fast forward from %s\n", $arch_v
+ : f_ "Make fast forward from %s\n", $arch_v);
maybe_split_brain_save $maintview, $r, "pseudomerge";
- progress "Made pseudo-merge of $arch_v into dgit view.";
+ progress f_ "Made pseudo-merge of %s into dgit view.", $arch_v;
return $r;
}
@@ -4121,7 +4121,7 @@ sub plain_overwrite_pseudomerge ($$$) {
return $head if is_fast_fwd $archive_hash, $head;
- my $m = "Declare fast forward from $i_arch_v->[0]";
+ my $m = f_ "Declare fast forward from %s", $i_arch_v->[0];
my $r = pseudomerge_make_commit
$clogp, $head, $archive_hash, $i_arch_v,
@@ -4129,7 +4129,7 @@ sub plain_overwrite_pseudomerge ($$$) {
runcmd git_update_ref_cmd $m, 'HEAD', $r, $head;
- progress "Make pseudo-merge of $i_arch_v->[0] into your HEAD.";
+ progress f_ "Make pseudo-merge of %s into your HEAD.", $i_arch_v->[0];
return $r;
}
@@ -4141,7 +4141,8 @@ sub push_parse_changelog ($) {
my $clogpackage = getfield $clogp, 'Source';
$package //= $clogpackage;
- fail "-p specified $package but changelog specified $clogpackage"
+ fail f_ "-p specified %s but changelog specified %s",
+ $package, $clogpackage
unless $package eq $clogpackage;
my $cversion = getfield $clogp, 'Version';
@@ -4162,8 +4163,9 @@ sub push_parse_dsc ($$$) {
my $dversion = getfield $dsc, 'Version';
my $dscpackage = getfield $dsc, 'Source';
($dscpackage eq $package && $dversion eq $cversion) or
- fail "$dscfn is for $dscpackage $dversion".
- " but debian/changelog is for $package $cversion";
+ fail f_ "%s is for %s %s but debian/changelog is for %s %s",
+ $dscfn, $dscpackage, $dversion,
+ $package, $cversion;
}
sub push_tagwants ($$$$) {
@@ -4222,8 +4224,8 @@ sub push_mktags ($$ $$ $) {
my $changes = parsecontrol($changesfile,$changesfilewhat);
foreach my $field (qw(Source Distribution Version)) {
$changes->{$field} eq $clogp->{$field} or
- fail "changes field $field \`$changes->{$field}'".
- " does not match changelog \`$clogp->{$field}'";
+ fail f_ "changes field %s \`%s' does not match changelog \`%s'",
+ $field, $changes->{$field}, $clogp->{$field};
}
my $cversion = getfield $clogp, 'Version';
@@ -4249,8 +4251,11 @@ tagger $authline
END
if ($tw->{View} eq 'dgit') {
+ print TO f_ <<ENDT, $package, $cversion, $clogsuite, $csuite
+%s release %s for %s (%s) [dgit]
+ENDT
+ or die $!;
print TO <<END or die $!;
-$package release $cversion for $clogsuite ($csuite) [dgit]
[dgit distro=$declaredistro$delibs]
END
foreach my $ref (sort keys %previously) {
@@ -4259,12 +4264,14 @@ END
END
}
} elsif ($tw->{View} eq 'maint') {
- print TO <<END or die $!;
-$package release $cversion for $clogsuite ($csuite)
-(maintainer view tag generated by dgit --quilt=$quilt_mode)
+ print TO f_ <<END, $package, $cversion, $clogsuite, $csuite,
+%s release %s for %s (%s)
+(maintainer view tag generated by dgit --quilt=%s)
END
+ $quilt_mode
+ or die $!;
} else {
- die Dumper($tw)."?";
+ confess Dumper($tw)."?";
}
close TO or die $!;
@@ -4309,7 +4316,7 @@ sub sign_changes ($) {
sub dopush () {
printdebug "actually entering push\n";
- supplementary_message(<<'END');
+ supplementary_message(__ <<'END');
Push failed, while checking state of the archive.
You can retry the push, after fixing the problem, if you like.
END
@@ -4319,11 +4326,11 @@ END
my $archive_hash = fetch_from_archive();
if (!$archive_hash) {
$new_package or
- fail "package appears to be new in this suite;".
- " if this is intentional, use --new";
+ fail __ "package appears to be new in this suite;".
+ " if this is intentional, use --new";
}
- supplementary_message(<<'END');
+ supplementary_message(__ <<'END');
Push failed, while preparing your push.
You can retry the push, after fixing the problem, if you like.
END
@@ -4347,8 +4354,8 @@ END
my $dscpath = "$buildproductsdir/$dscfn";
stat_exists $dscpath or
- fail "looked for .dsc $dscpath, but $!;".
- " maybe you forgot to build";
+ fail f_ "looked for .dsc %s, but %s; maybe you forgot to build",
+ $dscpath, $!;
responder_send_file('dsc', $dscpath);
@@ -4363,9 +4370,9 @@ END
if (branch_is_gdr_unstitched_ff($symref, $actualhead, $archive_hash)) {
if (quiltmode_splitbrain()) {
my ($ffq_prev, $gdrlast) = branch_gdr_info($symref, $actualhead);
- fail <<END;
-Branch is managed by git-debrebase ($ffq_prev
-exists), but quilt mode ($quilt_mode) implies a split view.
+ fail f_ <<END, $ffq_prev, $quilt_mode;
+Branch is managed by git-debrebase (%s
+exists), but quilt mode (%s) implies a split view.
Pass the right --quilt option or adjust your git config.
Or, maybe, run git-debrebase forget-was-ever-debrebase.
END
@@ -4387,9 +4394,10 @@ END
my $cachekey;
($dgithead, $cachekey) =
quilt_check_splitbrain_cache($actualhead, $upstreamversion);
- $dgithead or fail
- "--quilt=$quilt_mode but no cached dgit view:
- perhaps HEAD changed since dgit build[-source] ?";
+ $dgithead or fail f_
+ "--quilt=%s but no cached dgit view:
+ perhaps HEAD changed since dgit build[-source] ?",
+ $quilt_mode;
$split_brain = 1;
$dgithead = splitbrain_pseudomerge($clogp,
$actualhead, $dgithead,