our $suite_re = '[-+.0-9a-z]+';
our $cleanmode_re = 'dpkg-source(?:-d)?|git|git-ff|check|none';
our $orig_f_comp_re = 'orig(?:-[-0-9a-z]+)?';
-our $orig_f_tail_re = "$orig_f_comp_re\\.tar(?:\\.\\w+)?";
+our $orig_f_sig_re = '\\.(?:asc|gpg|pgp)';
+our $orig_f_tail_re = "$orig_f_comp_re\\.tar(?:\\.\\w+)?(?:$orig_f_sig_re)?";
our $git_authline_re = '^([^<>]+) \<(\S+)\> (\d+ [-+]\d+)$';
our $splitbraincache = 'dgit-intern/quilt-cache';
printdebug "import considering $f ";
(printdebug "only one dfi\n"), next if @dfi == 1;
(printdebug "not tar\n"), next unless $f =~ m/\.tar(\.\w+)?$/;
+ (printdebug "signature\n"), next if $f =~ m/$orig_f_sig_re$/o;
my $compr_ext = $1;
my ($orig_f_part) =
my $clogp;
my $r1clogp;
+ printdebug "import clog search...\n";
+
for (;;) {
my $stanzatext = do { local $/=""; <CLOGS>; };
+ printdebug "import clogp ".Dumper($stanzatext) if $debuglevel>1;
last if !defined $stanzatext;
my $desc = "package changelog, entry no.$.";
my $thisstanza = parsecontrolfh $stanzafh, $desc, 1;
$clogp //= $thisstanza;
+ printdebug "import clog $thisstanza->{version} $desc...\n";
+
last if !$any_orig; # we don't need $r1clogp
# We look for the first (most recent) changelog entry whose
# versions were created in a non-monotic order rather than
# that the changelog entries have been misordered.
+ printdebug "import clog $thisstanza->{version} vs $upstreamv...\n";
+
last if version_compare($thisstanza->{version}, $upstreamv) < 0;
$r1clogp = $thisstanza;
+
+ printdebug "import clog $r1clogp->{version} becomes r1\n";
}
die $! if CLOGS->error;
close CLOGS or $?==(SIGPIPE<<8) or failedcmd @clogcmd;
# Strictly, r1authline might now be wrong if it's going to be
# unused because !$any_orig. Whatever.
+ printdebug "import tartrees authline $authline\n";
+ printdebug "import tartrees r1authline $r1authline\n";
+
foreach my $tt (@tartrees) {
+ printdebug "import tartree $tt->{F} $tt->{Tree}\n";
+
$tt->{Commit} = make_commit_text($tt->{Orig} ? <<END_O : <<END_T);
tree $tt->{Tree}
author $r1authline
}
}
+ printdebug "import main commit\n";
+
open C, ">../commit.tmp" or die $!;
print C <<END or die $!;
tree $tree
my $rawimport_hash = make_commit qw(../commit.tmp);
if (madformat $dsc->{format}) {
+ printdebug "import apply patches...\n";
+
# regularise the state of the working tree so that
# the checkout of $rawimport_hash works nicely.
my $dappliedcommit = make_commit_text(<<END);
[dgit dummy commit]
END
- runcmd @git, qw(checkout -b dapplied), $dappliedcommit;
+ runcmd @git, qw(checkout -q -b dapplied), $dappliedcommit;
- runcmd @git, qw(checkout -b unpa), $rawimport_hash;
+ runcmd @git, qw(checkout -q -b unpa), $rawimport_hash;
runcmd shell_cmd 'exec >/dev/null', @gbp, qw(pq import);
my $gapplied = git_rev_parse('HEAD');
my $gappliedtree = cmdoutput @git, qw(rev-parse HEAD:);
} else {
$hash = $mergeinputs[0]{Commit};
}
- progress "fetch hash=$hash\n";
+ printdebug "fetch hash=$hash\n";
my $chkff = sub {
my ($lasth, $what) = @_;