From 585cfef168061d0728969c7d9db7e0f04cfc4efa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 29 Jun 2019 12:52:55 +0100 Subject: [PATCH] dgit: baredebian: Introduce --upstream-commitish Not documented yet. Nor, used, since $quilt_mode is not ever baredebian yet. So currently just an option you can pass to make dgit bomb out. Signed-off-by: Ian Jackson --- dgit | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dgit b/dgit index a1683844..fb64dc2d 100755 --- a/dgit +++ b/dgit @@ -79,6 +79,7 @@ our $changes_since_version; our $rmchanges; our $overwrite_version; # undef: not specified; '': check changelog our $quilt_mode; +our $quilt_upstream_commitish; our $quilt_modes_re = 'linear|smash|auto|nofix|nocheck|gbp|dpm|unapplied'; our $splitview_mode; our $splitview_modes_re = qr{auto|always|never}; @@ -5984,6 +5985,7 @@ sub quilt_check_splitbrain_cache ($$) { push @cachekey, $upstreamversion; push @cachekey, $quilt_mode; push @cachekey, $headref; + push @cachekey, $quilt_upstream_commitish // '-'; push @cachekey, hashfile('fake.dsc'); @@ -6391,6 +6393,17 @@ sub build_or_push_prep_modes () { fail __ "dgit: --include-dirty is not supported with split view". " (including with view-splitting quilt modes)" if do_split_brain() && $includedirty; + + if (madformat_wantfixup $format and $quilt_mode =~ m/baredebian$/) { + my ($dummy, $umessage); + ($quilt_upstream_commitish, $dummy, $umessage) = + resolve_upstream_version + $quilt_upstream_commitish, upstreamversion $version; + progress f_ "dgit: --quilt=%s, %s", $quilt_mode, $umessage; + } elsif (defined $quilt_upstream_commitish) { + fail __ + "dgit: --upstream-commitish only makes sense with --quilt=baredebian" + } } sub build_prep_early () { @@ -7352,6 +7365,9 @@ sub parseopts () { } elsif (m/^--delayed=(\d+)$/s) { push @ropts, $_; push @dput, $_; + } elsif (m/^--upstream-commitish=(.+)$/s) { + push @ropts, $_; + $quilt_upstream_commitish = $1; } elsif (m/^--save-(dgit-view)=(.+)$/s || m/^--(dgit-view)-save=(.+)$/s ) { -- 2.30.2