Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
my $got = read PF, $d, 65536;
die "$ourfn: $!" unless defined $got;
last if !$got;
my $got = read PF, $d, 65536;
die "$ourfn: $!" unless defined $got;
last if !$got;
- print $fh "data-block ".length($d)."\n" or die $!;
- print $fh $d or die $!;
+ print $fh "data-block ".length($d)."\n" or confess $!;
+ print $fh $d or confess $!;
}
PF->error and die "$ourfn $!";
print $fh "data-end\n" or die $!;
}
PF->error and die "$ourfn $!";
print $fh "data-end\n" or die $!;
- die "contains unexpected slashes\n" if m{//} || m{/$};
- die "contains leading punctuation\n" if m{^\W} || m{/\W};
- die "contains bad character(s)\n" if m{[^-a-z0-9_.+=~/]}i;
- die "is series file\n" if m{$series_filename_re}o;
- die "too long\n" if length > 200;
+ die __ "contains unexpected slashes\n" if m{//} || m{/$};
+ die __ "contains leading punctuation\n" if m{^\W} || m{/\W};
+ die __ "contains bad character(s)\n" if m{[^-a-z0-9_.+=~/]}i;
+ die __ "is series file\n" if m{$series_filename_re}o;
+ die __ "too long\n" if length > 200;
- print STDERR "quiltifying commit $cc:".
- " ignoring/dropping Gbp-Pq $what: $@";
+ print STDERR f_
+ "quiltifying commit %s: ignoring/dropping Gbp-Pq %s: %s",
+ $cc, $what, $@;
$patchname = $translitname;
};
print STDERR
$patchname = $translitname;
};
print STDERR
- "dgit: patch title transliteration error: $@"
+ +(f_ "dgit: patch title transliteration error: %s", $@)
if $@;
$patchname =~ y/ A-Z/-a-z/;
$patchname =~ y/-a-z0-9_.+=~//cd;
if $@;
$patchname =~ y/ A-Z/-a-z/;
$patchname =~ y/-a-z0-9_.+=~//cd;
for ($index='';
stat "debian/patches/$patchname$index";
$index++) { }
for ($index='';
stat "debian/patches/$patchname$index";
$index++) { }
- $!==ENOENT or die "$patchname$index $!";
+ $!==ENOENT or confess "$patchname$index $!";
runcmd @git, qw(checkout -q), $cc;
runcmd @git, qw(checkout -q), $cc;
sub quilt_fixup_delete_pc () {
runcmd @git, qw(rm -rqf .pc);
sub quilt_fixup_delete_pc () {
runcmd @git, qw(rm -rqf .pc);
- commit_admin <<END.<<ENDU
+ commit_admin +(__ <<END).<<ENDU
Commit removal of .pc (quilt series tracking data)
END
Commit removal of .pc (quilt series tracking data)
END
sub quilt_fixup_singlepatch ($$$) {
my ($clogp, $headref, $upstreamversion) = @_;
sub quilt_fixup_singlepatch ($$$) {
my ($clogp, $headref, $upstreamversion) = @_;
- progress "starting quiltify (single-debian-patch)";
+ progress __ "starting quiltify (single-debian-patch)";
# dpkg-source --commit generates new patches even if
# single-debian-patch is in debian/source/options. In order to
# dpkg-source --commit generates new patches even if
# single-debian-patch is in debian/source/options. In order to
- remove_stray_gits("source package");
+ remove_stray_gits(__ "source package");
mktree_in_ud_here();
rmtree '.pc';
mktree_in_ud_here();
rmtree '.pc';
- progress
- "dgit: split brain (separate dgit view) may be needed (--quilt=$quilt_mode).";
+ progress f_
+ "dgit: split brain (separate dgit view) may be needed (--quilt=%s).",
+ $quilt_mode;
# we look in the reflog of dgit-intern/quilt-cache
# we look for an entry whose message is the key for the cache lookup
my @cachekey = (qw(dgit), $our_version);
# we look in the reflog of dgit-intern/quilt-cache
# we look for an entry whose message is the key for the cache lookup
my @cachekey = (qw(dgit), $our_version);
unpack_playtree_mkwork($headref);
my $saved = maybe_split_brain_save $headref, $cachehit, "cache-hit";
if ($cachehit ne $headref) {
unpack_playtree_mkwork($headref);
my $saved = maybe_split_brain_save $headref, $cachehit, "cache-hit";
if ($cachehit ne $headref) {
- progress "dgit view: found cached ($saved)";
+ progress f_ "dgit view: found cached (%s)", $saved;
runcmd @git, qw(checkout -q -b dgit-view), $cachehit;
$split_brain = 1;
return ($cachehit, $splitbrain_cachekey);
}
runcmd @git, qw(checkout -q -b dgit-view), $cachehit;
$split_brain = 1;
return ($cachehit, $splitbrain_cachekey);
}
- progress "dgit view: found cached, no changes required";
+ progress __ "dgit view: found cached, no changes required";
return ($headref, $splitbrain_cachekey);
}
return ($headref, $splitbrain_cachekey);
}
sub quilt_fixup_multipatch ($$$) {
my ($clogp, $headref, $upstreamversion) = @_;
sub quilt_fixup_multipatch ($$$) {
my ($clogp, $headref, $upstreamversion) = @_;
- progress "examining quilt state (multiple patches, $quilt_mode mode)";
+ progress f_ "examining quilt state (multiple patches, %s mode)",
+ $quilt_mode;
# Our objective is:
# - honour any existing .pc in case it has any strangeness
# Our objective is:
# - honour any existing .pc in case it has any strangeness
$!=0; $?=-1;
if (system @bbcmd) {
failedcmd @bbcmd if $? < 0;
$!=0; $?=-1;
if (system @bbcmd) {
failedcmd @bbcmd if $? < 0;
failed to apply your git tree's patch stack (from debian/patches/) to
the corresponding upstream tarball(s). Your source tree and .orig
are probably too inconsistent. dgit can only fix up certain kinds of
failed to apply your git tree's patch stack (from debian/patches/) to
the corresponding upstream tarball(s). Your source tree and .orig
are probably too inconsistent. dgit can only fix up certain kinds of
my $mustdeletepc=0;
if (stat_exists ".pc") {
-d _ or die;
my $mustdeletepc=0;
if (stat_exists ".pc") {
-d _ or die;
- progress "Tree already contains .pc - will use it then delete it.";
+ progress __ "Tree already contains .pc - will use it then delete it.";
$mustdeletepc=1;
} else {
rename '../fake/.pc','.pc' or die $!;
$mustdeletepc=1;
} else {
rename '../fake/.pc','.pc' or die $!;
}
printdebug "differences \@dl @dl.\n";
}
printdebug "differences \@dl @dl.\n";
"%s: base trees orig=%.20s o+d/p=%.20s",
$us, $unapplied, $oldtiptree;
"%s: base trees orig=%.20s o+d/p=%.20s",
$us, $unapplied, $oldtiptree;
"%s: quilt differences: src: %s orig %s gitignores: %s orig %s\n".
"%s: quilt differences: HEAD %s o+d/p HEAD %s o+d/p",
$us, $dl[0], $dl[1], $dl[3], $dl[4],
$us, $dl[2], $dl[5];
if (@unrepres) {
"%s: quilt differences: src: %s orig %s gitignores: %s orig %s\n".
"%s: quilt differences: HEAD %s o+d/p HEAD %s o+d/p",
$us, $dl[0], $dl[1], $dl[3], $dl[4],
$us, $dl[2], $dl[5];
if (@unrepres) {
- print STDERR "dgit: cannot represent change: $_->[1]: $_->[0]\n"
+ print STDERR f_ "dgit: cannot represent change: %s: %s\n",
+ $_->[1], $_->[0]
- forceable_fail [qw(unrepresentable)], <<END;
+ forceable_fail [qw(unrepresentable)], __ <<END;
HEAD has changes to .orig[s] which are not representable by `3.0 (quilt)'
END
}
my @failsuggestion;
if (!($diffbits->{O2H} & $diffbits->{O2A})) {
HEAD has changes to .orig[s] which are not representable by `3.0 (quilt)'
END
}
my @failsuggestion;
if (!($diffbits->{O2H} & $diffbits->{O2A})) {
- push @failsuggestion, [ 'unapplied',
- "This might be a patches-unapplied branch." ];
+ push @failsuggestion, [ 'unapplied', __
+ "This might be a patches-unapplied branch." ];
} elsif (!($diffbits->{H2A} & $diffbits->{O2A})) {
} elsif (!($diffbits->{H2A} & $diffbits->{O2A})) {
- push @failsuggestion, [ 'applied',
- "This might be a patches-applied branch." ];
+ push @failsuggestion, [ 'applied', __
+ "This might be a patches-applied branch." ];
- push @failsuggestion, [ 'quilt-mode',
+ push @failsuggestion, [ 'quilt-mode', __
"Maybe you need one of --[quilt=]gbp --[quilt=]dpm --quilt=unapplied ?" ];
"Maybe you need one of --[quilt=]gbp --[quilt=]dpm --quilt=unapplied ?" ];
- push @failsuggestion, [ 'gitattrs',
+ push @failsuggestion, [ 'gitattrs', __
"Warning: Tree has .gitattributes. See GITATTRIBUTES in dgit(7)." ]
if stat_exists '.gitattributes';
"Warning: Tree has .gitattributes. See GITATTRIBUTES in dgit(7)." ]
if stat_exists '.gitattributes';
- push @failsuggestion, [ 'origs',
+ push @failsuggestion, [ 'origs', __
"Maybe orig tarball(s) are not identical to git representation?" ];
if (quiltmode_splitbrain()) {
"Maybe orig tarball(s) are not identical to git representation?" ];
if (quiltmode_splitbrain()) {
- progress "starting quiltify (multiple patches, $quilt_mode mode)";
+ progress f_ "starting quiltify (multiple patches, %s mode)", $quilt_mode;
quiltify($clogp,$headref,$oldtiptree,\@failsuggestion);
if (!open P, '>>', ".pc/applied-patches") {
quiltify($clogp,$headref,$oldtiptree,\@failsuggestion);
if (!open P, '>>', ".pc/applied-patches") {