my $r = $ua->get(@_) or die $!;
return undef if $r->code == 404;
$r->is_success or fail "failed to fetch $what: ".$r->status_line;
my $r = $ua->get(@_) or die $!;
return undef if $r->code == 404;
$r->is_success or fail "failed to fetch $what: ".$r->status_line;
$csuite = archive_query('canonicalise_suite');
if ($isuite ne $csuite) {
# madison canonicalises for us
$csuite = archive_query('canonicalise_suite');
if ($isuite ne $csuite) {
# madison canonicalises for us
close C or die $!;
my $outputhash = make_commit qw(../commit.tmp);
my $cversion = getfield $clogp, 'Version';
close C or die $!;
my $outputhash = make_commit qw(../commit.tmp);
my $cversion = getfield $clogp, 'Version';
if ($lastpush_hash) {
runcmd @git, qw(reset --hard), $lastpush_hash;
runcmd qw(sh -ec), 'dpkg-parsechangelog >>../changelogold.tmp';
if ($lastpush_hash) {
runcmd @git, qw(reset --hard), $lastpush_hash;
runcmd qw(sh -ec), 'dpkg-parsechangelog >>../changelogold.tmp';
fail "existing file $f has hash $got but .dsc".
" demands hash $fi->{Hash}".
" (perhaps you should delete this file?)";
fail "existing file $f has hash $got but .dsc".
" demands hash $fi->{Hash}".
" (perhaps you should delete this file?)";
close H or die $!;
runcmd @git, qw(remote add), 'origin', access_giturl();
if (check_for_git()) {
close H or die $!;
runcmd @git, qw(remote add), 'origin', access_giturl();
if (check_for_git()) {
}
fetch_from_archive() or no_such_package;
runcmd @git, qw(reset --hard), lrref();
}
fetch_from_archive() or no_such_package;
runcmd @git, qw(reset --hard), lrref();
return;
}
runcmd_ordryrun @git, qw(add), sort keys %adds;
my $m = "Commit Debian 3.0 (quilt) metadata";
return;
}
runcmd_ordryrun @git, qw(add), sort keys %adds;
my $m = "Commit Debian 3.0 (quilt) metadata";
runcmd_ordryrun @git, qw(commit -m), $m;
}
sub madformat ($) {
my ($format) = @_;
return 0 unless $format eq '3.0 (quilt)';
runcmd_ordryrun @git, qw(commit -m), $m;
}
sub madformat ($) {
my ($format) = @_;
return 0 unless $format eq '3.0 (quilt)';
runcmd qw(dpkg-source -x --), "../../../../$dscfn";
my ($tree,$dir) = mktree_in_ud_from_only_subdir();
chdir '../../../..' or die $!;
runcmd qw(dpkg-source -x --), "../../../../$dscfn";
my ($tree,$dir) = mktree_in_ud_from_only_subdir();
chdir '../../../..' or die $!;