} elsif ($here{$lref} eq $objid) {
lrfetchref_used $fullrefname;
} else {
- print STDERR
- "Not updating $lref from $here{$lref} to $objid.\n";
+ print STDERR f_ "Not updating %s from %s to %s.\n",
+ $lref, $here{$lref}, $objid;
}
});
}
}
if (!defined $f) {
- progress "$what: NO git hash";
+ progress f_ "%s: NO git hash", $what;
parse_dsc_field_def_dsc_distro();
} elsif (($dsc_hash, $dsc_distro, $dsc_hint_tag, $dsc_hint_url)
= $f =~ m/^(\w+)\s+($distro_re)\s+($versiontag_re)\s+(\S+)(?:\s|$)/) {
- progress "$what: specified git info ($dsc_distro)";
+ progress f_ "%s: specified git info (%s)", $what, $dsc_distro;
$dsc_hint_tag = [ $dsc_hint_tag ];
} elsif ($f =~ m/^\w+\s*$/) {
$dsc_hash = $&;
parse_dsc_field_def_dsc_distro();
$dsc_hint_tag = [ debiantags +(getfield $dsc, 'Version'),
$dsc_distro ];
- progress "$what: specified git hash";
+ progress f_ "%s: specified git hash", $what;
} else {
- fail "$what: invalid Dgit info";
+ fail f_ "%s: invalid Dgit info", $what;
}
}
my $lrf = lrfetchrefs;
if (!$chase_dsc_distro) {
- progress
- "not chasing .dsc distro $dsc_distro: not fetching $what";
+ progress f_ "not chasing .dsc distro %s: not fetching %s",
+ $dsc_distro, $what;
return 0;
}
- progress
- ".dsc names distro $dsc_distro: fetching $what";
+ progress f_ ".dsc names distro %s: fetching %s", $dsc_distro, $what;
my $url = access_giturl();
if (!defined $url) {
- defined $dsc_hint_url or fail <<END;
-.dsc Dgit metadata is in context of distro $dsc_distro
+ defined $dsc_hint_url or fail f_ <<END, $dsc_distro;
+.dsc Dgit metadata is in context of distro %s
for which we have no configured url and .dsc provides no hint
END
my $proto =
parse_cfg_bool "dsc-url-proto-ok", 'false',
cfg("dgit.dsc-url-proto-ok.$proto",
"dgit.default.dsc-url-proto-ok")
- or fail <<END;
-.dsc Dgit metadata is in context of distro $dsc_distro
+ or fail f_ <<END, $dsc_distro, $proto;
+.dsc Dgit metadata is in context of distro %s
for which we have no configured url;
-.dsc provides hinted url with protocol $proto which is unsafe.
+.dsc provides hinted url with protocol %s which is unsafe.
(can be overridden by config - consult documentation)
END
$url = $dsc_hint_url;
if (parse_cfg_bool 'rewrite-map-enable', 'true', $rewrite_enable) {
if (!defined $mapref) {
- my $lrf = $do_fetch->("rewrite map", $rewritemap) or return;
+ my $lrf = $do_fetch->((__ "rewrite map"), $rewritemap) or return;
$mapref = $lrf.'/'.$rewritemap;
}
my $rewritemapdata = git_cat_file $mapref.':map';
if (defined $rewritemapdata
&& $rewritemapdata =~ m/^$dsc_hash(?:[ \t](\w+))/m) {
- progress
+ progress __
"server's git history rewrite map contains a relevant entry!";
$dsc_hash = $1;
if (defined $dsc_hash) {
- progress "using rewritten git hash in place of .dsc value";
+ progress __ "using rewritten git hash in place of .dsc value";
} else {
- progress "server data says .dsc hash is to be disregarded";
+ progress __ "server data says .dsc hash is to be disregarded";
}
}
}
if (!defined git_cat_file $dsc_hash) {
my @tags = map { "tags/".$_ } @$dsc_hint_tag;
- my $lrf = $do_fetch->("additional commits", @tags) &&
+ my $lrf = $do_fetch->((__ "additional commits"), @tags) &&
defined git_cat_file $dsc_hash
- or fail <<END;
-.dsc Dgit metadata requires commit $dsc_hash
+ or fail f_ <<END, $dsc_hash;
+.dsc Dgit metadata requires commit %s
but we could not obtain that object anywhere.
END
foreach my $t (@tags) {
get_archive_dsc();
if ($dsc) {
- parse_dsc_field($dsc, 'last upload to archive');
+ parse_dsc_field($dsc, __ 'last upload to archive');
resolve_dsc_field_commit access_basedistro,
lrfetchrefs."/".$rewritemap
} else {
- progress "no version available from the archive";
+ progress __ "no version available from the archive";
}
# If the archive's .dsc has a Dgit field, there are three
printdebug "previous reference hash=$lastpush_hash\n";
$lastpush_mergeinput = $lastpush_hash && {
Commit => $lastpush_hash,
- Info => "dgit suite branch on dgit git server",
+ Info => (__ "dgit suite branch on dgit git server"),
};
my $lastfetch_hash = git_get_ref(lrref());
printdebug "fetch_from_archive: lastfetch=$lastfetch_hash\n";
my $lastfetch_mergeinput = $lastfetch_hash && {
Commit => $lastfetch_hash,
- Info => "dgit client's archive history view",
+ Info => (__ "dgit client's archive history view"),
};
my $dsc_mergeinput = $dsc_hash && {
Commit => $dsc_hash,
- Info => "Dgit field in .dsc from archive",
+ Info => (__ "Dgit field in .dsc from archive"),
};
my $cwd = getcwd();
# push. This can happen if the archive moves .dscs about.
# Just follow its lead.
if (is_fast_fwd($lastpush_hash,$dsc_hash)) {
- progress "archive .dsc names newer git commit";
+ progress __ "archive .dsc names newer git commit";
@mergeinputs = ($dsc_mergeinput);
} else {
- progress "archive .dsc names other git commit, fixing up";
+ progress __ "archive .dsc names other git commit, fixing up";
@mergeinputs = ($dsc_mergeinput, $lastpush_mergeinput);
}
}
} else {
printdebug "nothing found!\n";
if (defined $skew_warning_vsn) {
- print STDERR <<END or die $!;
+ print STDERR f_ <<END, $skew_warning_vsn or die $!;
Warning: relevant archive skew detected.
-Archive allegedly contains $skew_warning_vsn
+Archive allegedly contains %s
But we were not able to obtain any version from the archive or git.
END
if (defined $compat_info->{Message}) {
print MC $compat_info->{Message} or die $!;
} else {
- print MC <<END or die $!;
-Record $package ($cversion) in archive suite $csuite
+ print MC f_ <<END, $package, $cversion, $csuite or die $!;
+Record %s (%s) in archive suite %s
Record that
END
};
$message_add_info->($mergeinputs[0]);
- print MC <<END or die $!;
+ print MC __ <<END or die $!;
should be treated as descended from
END
$message_add_info->($_) foreach @mergeinputs[1..$#mergeinputs];
my $chkff = sub {
my ($lasth, $what) = @_;
return unless $lasth;
- die "$lasth $hash $what ?" unless is_fast_fwd($lasth, $hash);
+ confess "$lasth $hash $what ?" unless is_fast_fwd($lasth, $hash);
};
- $chkff->($lastpush_hash, 'dgit repo server tip (last push)')
+ $chkff->($lastpush_hash, __ 'dgit repo server tip (last push)')
if $lastpush_hash;
- $chkff->($lastfetch_hash, 'local tracking tip (last fetch)');
+ $chkff->($lastfetch_hash, __ 'local tracking tip (last fetch)');
fetch_from_archive_record_1($hash);
my $got_vsn = getfield $gotclogp, 'Version';
printdebug "SKEW CHECK GOT $got_vsn\n";
if (version_compare($got_vsn, $skew_warning_vsn) < 0) {
- print STDERR <<END or die $!;
+ print STDERR f_ <<END, $skew_warning_vsn, $got_vsn or die $!;
Warning: archive skew detected. Using the available version:
-Archive allegedly contains $skew_warning_vsn
-We were able to obtain only $got_vsn
+Archive allegedly contains %s
+We were able to obtain only %s
END
}
lrfetchref_used lrfetchref();
- check_gitattrs($hash, "fetched source tree");
+ check_gitattrs($hash, __ "fetched source tree");
unshift @end, $del_lrfetchrefs;
return $hash;
print NATTRS "debian/changelog merge=$driver\n" or die $!;
close NATTRS;
- set_local_git_config "$cb.name", 'debian/changelog merge driver';
+ set_local_git_config "$cb.name", __ 'debian/changelog merge driver';
set_local_git_config "$cb.driver", 'dpkg-mergechangelogs -m %O %A %B %A';
rename "$attrs.new", "$attrs" or die "$attrs: $!";
my $already = is_gitattrs_setup();
if ($already) {
- progress <<END;
+ progress __ <<END;
[attr]dgit-defuse-attrs already found, and proper, in .git/info/attributes
not doing further gitattributes setup
END
ensuredir "$maindir_gitcommon/info";
open GAO, "> $af.new" or die $!;
- print GAO <<END or die $! unless defined $already;
+ print GAO <<END, __ <<ENDT or die $! unless defined $already;
* dgit-defuse-attrs
$new
-# ^ see GITATTRIBUTES in dgit(7) and dgit setup-new-tree in dgit(1)
END
+# ^ see GITATTRIBUTES in dgit(7) and dgit setup-new-tree in dgit(1)
+ENDT
my $gai = open_main_gitattrs();
if ($gai) {
while (<$gai>) {
$gai->error and die $!;
}
close GAO or die $!;
- rename "$af.new", "$af" or die "install $af: $!";
+ rename "$af.new", "$af" or fail f_ "install %s: %s", $af, $!;
}
sub setup_new_tree () {
next unless m{(?:^|/)\.gitattributes$};
# oh dear, found one
- print STDERR <<END;
-dgit: warning: $what contains .gitattributes
+ print STDERR f_ <<END, $what;
+dgit: warning: %s contains .gitattributes
dgit: .gitattributes not (fully) defused. Recommended: dgit setup-new-tree.
END
close $gafl;
$isuite = $tsuite;
$us .= " [$isuite]";
$debugprefix .= " ";
- progress "fetching $tsuite...";
+ progress f_ "fetching %s...", $tsuite;
canonicalise_suite();
print $canonsuitefh $csuite, "\n" or die $!;
close $canonsuitefh or die $!;
return undef;
}
waitpid $pid,0 == $pid or die $!;
- fail "failed to obtain $tsuite: ".waitstatusmsg() if $? && $?!=256*4;
+ fail f_ "failed to obtain %s: %s", $tsuite, waitstatusmsg()
+ if $? && $?!=256*4;
seek $canonsuitefh,0,0 or die $!;
local $csuite = <$canonsuitefh>;
die $! unless defined $csuite && chomp $csuite;
sub { });
return 0 unless defined $cbasesuite;
- fail "package $package missing in (base suite) $cbasesuite"
+ fail f_ "package %s missing in (base suite) %s", $package, $cbasesuite
unless @mergeinputs;
my @csuites = ($cbasesuite);
if ($previous) {
unshift @mergeinputs, {
Commit => $previous,
- Info => "local combined tracking branch",
- Warning =>
- "archive seems to have rewound: local tracking branch is ahead!",
+ Info => (__ "local combined tracking branch"),
+ Warning => (__
+ "archive seems to have rewound: local tracking branch is ahead!"),
};
}
my $tree = cmdoutput qw(git rev-parse), $needed[0]{Commit}.':';
my $commit = "tree $tree\n";
- my $msg = "Combine archive branches $csuite [dgit]\n\n".
- "Input branches:\n";
+ my $msg = f_ "Combine archive branches %s [dgit]\n\n".
+ "Input branches:\n",
+ $csuite;
foreach my $mi (sort { $a->{Index} <=> $b->{Index} } @mergeinputs) {
printdebug "multisuite merge include $mi->{Info}\n";
$mi->{Info};
}
my $authline = clogp_authline mergeinfo_getclogp $needed[0];
- $msg .= "\nKey\n".
+ $msg .= __ "\nKey\n".
" * marks the highest version branch, which choose to use\n".
- " + marks each branch which was not already an ancestor\n\n".
+ " + marks each branch which was not already an ancestor\n\n";
+ $msg .=
"[dgit multi-suite $csuite]\n";
$commit .=
"author $authline\n".
fetch_from_archive_record_1($output);
fetch_from_archive_record_2($output);
- progress "calculated combined tracking suite $csuite";
+ progress f_ "calculated combined tracking suite %s", $csuite;
return 1;
}
git ls-tree -r --name-only -z HEAD | \
xargs -0r touch -h -r . --
END
- printdone "ready for work in $dstdir";
+ printdone f_ "ready for work in %s", $dstdir;
}
sub clone ($) {
# once in parent after first suite fetched,
# and then again in child after everything is finished
my ($dstdir) = @_;
- badusage "dry run makes no sense with clone" unless act_local();
+ badusage __ "dry run makes no sense with clone" unless act_local();
my $multi_fetched = fork_for_multisuite(sub {
printdebug "multi clone before fetch merge\n";
canonicalise_suite();
my $hasgit = check_for_git();
- mkdir $dstdir or fail "create \`$dstdir': $!";
+ mkdir $dstdir or fail f_ "create \`%s': %s", $dstdir, $!;
changedir $dstdir;
runcmd @git, qw(init -q);
record_maindir();
runcmd @git, qw(remote add), 'origin', $giturl;
}
if ($hasgit) {
- progress "fetching existing git history";
+ progress __ "fetching existing git history";
git_fetch_us();
runcmd_ordryrun_local @git, qw(fetch origin);
} else {
- progress "starting new git history";
+ progress __ "starting new git history";
}
fetch_from_archive() or no_such_package;
my $vcsgiturl = $dsc->{'Vcs-Git'};
cfg 'dgit.vcs-git.suites')) {
my $current = cfg 'remote.vcs-git.url', 'RETURN-UNDEF';
if (defined $current && $current ne $vcsgiturl) {
- print STDERR <<END;
-FYI: Vcs-Git in $csuite has different url to your vcs-git remote.
+ print STDERR f_ <<END, $csuite;
+FYI: Vcs-Git in %s has different url to your vcs-git remote.
Your vcs-git remote url may be out of date. Use dgit update-vcs-git ?
END
}
}
- printdone "fetched into ".lrref();
+ printdone f_ "fetched into %s", lrref();
}
sub dofetch () {
sub pull () {
dofetch();
- runcmd_ordryrun_local @git, qw(merge -m),"Merge from $csuite [dgit]",
+ runcmd_ordryrun_local @git, qw(merge -m),
+ (f_ "Merge from %s [dgit]", $csuite),
lrref();
- printdone "fetched to ".lrref()." and merged into HEAD";
+ printdone f_ "fetched to %s and merged into HEAD", lrref();
}
sub check_not_dirty () {
foreach my $f (qw(local-options local-patch-header)) {
if (stat_exists "debian/source/$f") {
- fail "git tree contains debian/source/$f";
+ fail f_ "git tree contains debian/source/%s", $f;
}
}
sub quiltify_nofix_bail ($$) {
my ($headinfo, $xinfo) = @_;
if ($quilt_mode eq 'nofix') {
- fail "quilt fixup required but quilt mode is \`nofix'\n".
- "HEAD commit".$headinfo." differs from tree implied by ".
- " debian/patches".$xinfo;
+ fail f_
+ "quilt fixup required but quilt mode is \`nofix'\n".
+ "HEAD commit%s differs from tree implied by debian/patches%s",
+ $headinfo, $xinfo;
}
}
}
delete $adds{'.pc'}; # if there wasn't one before, don't add it
if (!%adds) {
- progress "nothing quilty to commit, ok.";
+ progress __ "nothing quilty to commit, ok.";
return;
}
- quiltify_nofix_bail "", " (wanted to commit patch update)";
+ quiltify_nofix_bail "", __ " (wanted to commit patch update)";
my @adds = map { s/[][*?\\]/\\$&/g; $_; } sort keys %adds;
runcmd_ordryrun_local @git, qw(add -f), @adds;
- commit_admin <<END
+ commit_admin +(__ <<ENDT).<<END
Commit Debian 3.0 (quilt) metadata
+ENDT
[dgit ($our_version) quilt-fixup]
END
}
return 0 unless $format eq '3.0 (quilt)';
our $quilt_mode_warned;
if ($quilt_mode eq 'nocheck') {
- progress "Not doing any fixup of \`$format' due to".
- " ----no-quilt-fixup or --quilt=nocheck"
+ progress f_ "Not doing any fixup of \`%s'".
+ " due to ----no-quilt-fixup or --quilt=nocheck", $format
unless $quilt_mode_warned++;
return 0;
}
- progress "Format \`$format', need to check/update patch stack"
+ progress f_ "Format \`%s', need to check/update patch stack", $format
unless $quilt_mode_warned++;
return 1;
}
sub maybe_split_brain_save ($$$) {
my ($headref, $dgitview, $msg) = @_;
# => message fragment "$saved" describing disposition of $dgitview
+ # (used inside parens, in the English texts)
my $save = $internal_object_save{'dgit-view'};
- return "commit id $dgitview" unless defined $save;
+ return f_ "commit id %s", $dgitview unless defined $save;
my @cmd = (shell_cmd 'cd "$1"; shift', $maindir,
git_update_ref_cmd
"dgit --dgit-view-save $msg HEAD=$headref",
$save, $dgitview);
runcmd @cmd;
- return "and left in $save";
+ return f_ "and left in %s", $save;
}
# An "infopair" is a tuple [ $thing, $what ]
printdebug "infopair_lrfetchref_tag_lookup $tagobj $tagname $what\n";
return [ git_rev_parse($tagobj), $what ];
}
- fail @tagnames==1 ? <<END : <<END;
-Wanted tag $what (@tagnames) on dgit server, but not found
+ fail @tagnames==1 ? (f_ <<END, $what, "@tagnames")
+Wanted tag %s (%s) on dgit server, but not found
END
-Wanted tag $what (one of: @tagnames) on dgit server, but not found
+ : (f_ <<END, $what, "@tagnames");
+Wanted tag %s (one of: %s) on dgit server, but not found
END
}
sub infopair_cond_ff ($$) {
my ($anc,$desc) = @_;
- is_fast_fwd($anc->[0], $desc->[0]) or fail <<END;
-$anc->[1] ($anc->[0]) .. $desc->[1] ($desc->[0]) is not fast forward
+ is_fast_fwd($anc->[0], $desc->[0]) or
+ fail f_ <<END, $anc->[1], $anc->[0], $desc->[1], $desc->[0];
+%s (%s) .. %s (%s) is not fast forward
END
};
my $arch_clogp = commit_getclogp $archive_hash;
my $i_arch_v = [ (getfield $arch_clogp, 'Version'),
- 'version currently in archive' ];
+ __ 'version currently in archive' ];
if (defined $overwrite_version) {
if (length $overwrite_version) {
infopair_cond_equal([ $overwrite_version,
$i_arch_v);
} else {
my $v = $i_arch_v->[0];
- progress "Checking package changelog for archive version $v ...";
+ progress f_
+ "Checking package changelog for archive version %s ...", $v;
my $cd;
eval {
my @xa = ("-f$v", "-t$v");
my $gf = sub {
my ($fn) = @_;
[ (getfield $vclogp, $fn),
- "$fn field from dpkg-parsechangelog @xa" ];
+ (f_ "%s field from dpkg-parsechangelog %s",
+ $fn, "@xa") ];
};
my $cv = $gf->('Version');
infopair_cond_equal($i_arch_v, $cv);
if ($@) {
$@ =~ s/^dgit: //gm;
fail "$@".
- "Perhaps debian/changelog does not mention $v ?";
+ f_ "Perhaps debian/changelog does not mention %s ?", $v;
}
- fail <<END if $cd->[0] =~ m/UNRELEASED/;
-$cd->[1] is $cd->[0]
-Your tree seems to based on earlier (not uploaded) $v.
+ fail f_ <<END, $cd->[1], $cd->[0], $v
+%s is %s
+Your tree seems to based on earlier (not uploaded) %s.
END
+ if $cd->[0] =~ m/UNRELEASED/;
}
}
sub pseudomerge_make_commit ($$$$ $$) {
my ($clogp, $dgitview, $archive_hash, $i_arch_v,
$msg_cmd, $msg_msg) = @_;
- progress "Declaring that HEAD inciudes all changes in $i_arch_v->[0]...";
+ progress f_ "Declaring that HEAD inciudes all changes in %s...",
+ $i_arch_v->[0];
my $tree = cmdoutput qw(git rev-parse), "${dgitview}:";
my $authline = clogp_authline $clogp;
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;
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";
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;
}
+ my $arch_v = $i_arch_v->[0];
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 $i_arch_v->[0]
-END_OVERWR
-Make fast forward from $i_arch_v->[0]
-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 $i_arch_v->[0] into dgit view.";
+ progress f_ "Made pseudo-merge of %s into dgit view.", $arch_v;
return $r;
}
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,
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;
}
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';
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 ($$$$) {
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';
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) {
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 $!;
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
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
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);
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
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,