diff options
-rwxr-xr-x | dgit | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 ) { |