diff options
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1711,8 +1711,11 @@ sub generate_commits_from_dsc () { 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.$."; @@ -1720,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 @@ -1744,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; @@ -1762,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} ? <<END_O : <<END_T); tree $tt->{Tree} author $r1authline @@ -1783,6 +1797,8 @@ END_T } } + printdebug "import main commit\n"; + open C, ">../commit.tmp" or die $!; print C <<END or die $!; tree $tree @@ -1803,6 +1819,8 @@ END 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); |