summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-29 12:52:55 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-29 12:58:21 +0100
commit585cfef168061d0728969c7d9db7e0f04cfc4efa (patch)
tree18ccb76845a434462fb3b81d43b9c3fb761eeffb /dgit
parent5842b3c11835c671451b1dd159b2d7f338e5d802 (diff)
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 <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit16
1 files changed, 16 insertions, 0 deletions
diff --git a/dgit b/dgit
index a168384..fb64dc2 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
) {