From: Ian Jackson Date: Fri, 21 Aug 2015 12:06:31 +0000 (+0100) Subject: quilt fixup: break out quilt_fixup_multipatch ready for quilt_fixup_singlepatch X-Git-Tag: debian/1.4~14 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=65e408b63ca374ff30e165e5b876091c49f74370 quilt fixup: break out quilt_fixup_multipatch ready for quilt_fixup_singlepatch Functional change: bomb out with die if single-debian-patch, rather than going wrong --- diff --git a/dgit b/dgit index ce858ab9..e5edd551 100755 --- a/dgit +++ b/dgit @@ -2744,6 +2744,30 @@ sub build_maybe_quilt_fixup () { check_for_vendor_patches(); + my $clogp = parsechangelog(); + my $headref = git_rev_parse('HEAD'); + + prep_ud(); + changedir $ud; + + my $upstreamversion=$version; + $upstreamversion =~ s/-[^-]*$//; + + if ($fopts->{'single-debian-patch'}) { + #quilt_fixup_singlepatch($clogp, $headref, $upstreamversion); + die; + } else { + quilt_fixup_multipatch($clogp, $headref, $upstreamversion); + } + + changedir '../../../..'; + runcmd_ordryrun_local + @git, qw(pull --ff-only -q .git/dgit/unpack/work master); +} + +sub quilt_fixup_multipatch ($$$) { + my ($clogp, $headref, $upstreamversion) = @_; + # Our objective is: # - honour any existing .pc in case it has any strangeness # - determine the git commit corresponding to the tip of @@ -2788,15 +2812,6 @@ sub build_maybe_quilt_fixup () { # 5. If we had a .pc in-tree, delete it, and git-commit # 6. Back in the main tree, fast forward to the new HEAD - my $clogp = parsechangelog(); - my $headref = git_rev_parse('HEAD'); - - prep_ud(); - changedir $ud; - - my $upstreamversion=$version; - $upstreamversion =~ s/-[^-]*$//; - my $fakeversion="$upstreamversion-~~DGITFAKE"; my $fakedsc=new IO::File 'fake.dsc', '>' or die $!; @@ -2872,10 +2887,6 @@ END runcmd @git, qw(rm -rqf .pc); commit_admin "Commit removal of .pc (quilt series tracking data)"; } - - changedir '../../../..'; - runcmd_ordryrun_local - @git, qw(pull --ff-only -q .git/dgit/unpack/work master); } sub quilt_fixup_editor () {