X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=4aff8637b4b1c2c829c3f050a25621c1abe0b613;hb=2eff224fc177203b2b38c12cc706210d1b422870;hp=e11d2fb5b8014c885474e5badb18d8a857cfb593;hpb=9d91e25a38b64bce53bc315b2f69f1f99e4c1ef3;p=dgit.git diff --git a/dgit b/dgit index e11d2fb5..4aff8637 100755 --- a/dgit +++ b/dgit @@ -78,7 +78,8 @@ our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)"); 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'; @@ -1593,6 +1594,7 @@ sub generate_commits_from_dsc () { 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) = @@ -1709,8 +1711,11 @@ sub generate_commits_from_dsc () { my $clogp; my $r1clogp; + printdebug "import clog search...\n"; + for (;;) { my $stanzatext = do { local $/=""; ; }; + printdebug "import clogp ".Dumper($stanzatext) if $debuglevel>1; last if !defined $stanzatext; my $desc = "package changelog, entry no.$."; @@ -1718,6 +1723,8 @@ sub generate_commits_from_dsc () { 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 @@ -1742,8 +1749,12 @@ sub generate_commits_from_dsc () { # 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; @@ -1760,7 +1771,12 @@ sub generate_commits_from_dsc () { # 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} ? <{Tree} author $r1authline @@ -1781,6 +1797,8 @@ END_T } } + printdebug "import main commit\n"; + open C, ">../commit.tmp" or die $!; print C <{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(</dev/null', @gbp, qw(pq import); my $gapplied = git_rev_parse('HEAD'); my $gappliedtree = cmdoutput @git, qw(rev-parse HEAD:); @@ -2385,7 +2405,7 @@ END } else { $hash = $mergeinputs[0]{Commit}; } - progress "fetch hash=$hash\n"; + printdebug "fetch hash=$hash\n"; my $chkff = sub { my ($lasth, $what) = @_; @@ -3712,7 +3732,7 @@ The Debian packaging git branch contains these updates to the upstream .gitignore file(s). This patch is autogenerated, to provide these updates to users of the official Debian archive view of the package. -[dgit version $our_version] +[dgit ($our_version) update-gitignore] --- END close GIPATCH or die "$gipatch: $!";