chiark / gitweb /
Provide --force-unsupported-source-format
[dgit.git] / dgit
diff --git a/dgit b/dgit
index f821299f4d06e129de1be4ba6093fac50c867789..ea14ba523ca15b4aeafe3637d43e11c4fab2ec00 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -74,7 +74,8 @@ our $tagformat_want;
 our $tagformat;
 our $tagformatfn;
 
 our $tagformat;
 our $tagformatfn;
 
-our %forceopts = map { $_=>0 } qw(unrepresentable);
+our %forceopts = map { $_=>0 }
+    qw(unrepresentable unsupported-source-format);
 
 our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
 
 
 our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
 
@@ -1308,7 +1309,9 @@ sub get_archive_dsc () {
        $dsc = parsecontrolfh($dscfh,$dscurl,1);
        printdebug Dumper($dsc) if $debuglevel>1;
        my $fmt = getfield $dsc, 'Format';
        $dsc = parsecontrolfh($dscfh,$dscurl,1);
        printdebug Dumper($dsc) if $debuglevel>1;
        my $fmt = getfield $dsc, 'Format';
-       fail "unsupported source format $fmt, sorry" unless $format_ok{$fmt};
+       $format_ok{$fmt} or forceable_fail [qw(unsupported-source-format)],
+           "unsupported source format $fmt, sorry";
+           
        $dsc_checked = !!$digester;
        printdebug "get_archive_dsc: Version ".(getfield $dsc, 'Version')."\n";
        return;
        $dsc_checked = !!$digester;
        printdebug "get_archive_dsc: Version ".(getfield $dsc, 'Version')."\n";
        return;