diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-09-03 00:10:59 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-09-03 17:45:38 +0100 |
commit | 73feeec9e48f70e6ff31f41c3580cea6ede3da7a (patch) | |
tree | d19de3f61e55297fa18eea0348be513d95bb11ae | |
parent | 82438d6d84d80afc6352108c820fbf6cd481dee4 (diff) |
dgit: Break out quiltify_check_unrepresentable
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | dgit | 30 |
1 files changed, 19 insertions, 11 deletions
@@ -5473,6 +5473,24 @@ sub quiltify_trees_differ ($$;$$$) { return $r; } +sub quiltify_check_unrepresentable ($) { + my ($unrepres) = @_; + return unless @$unrepres; + if ($quilt_mode =~ m/baredebian/) { + # With baredebian, even if the upstream commitish has this + # problem, we don't want to print this message, as nothing + # is going to try to make a patch out of it anyway. + return; + } + print STDERR f_ "dgit: cannot represent change: %s: %s\n", + $_->[1], $_->[0] + foreach @$unrepres; + + forceable_fail [qw(unrepresentable)], __ <<END; +HEAD has changes to .orig[s] which are not representable by `3.0 (quilt)' +END +} + sub quiltify_tree_sentinelfiles ($) { # lists the `sentinel' files present in the tree my ($x) = @_; @@ -6457,17 +6475,7 @@ END $us, $dl[0], $dl[1], $dl[3], $dl[4], $us, $uhead_whatshort, $dl[2], $uhead_whatshort, $dl[5]; - if (@unrepres && $quilt_mode !~ m/baredebian/) { - # With baredebian, even if the upstream commitish has this - # problem, we don't want to print this message, as nothing - # is going to try to make a patch out of it anyway. - print STDERR f_ "dgit: cannot represent change: %s: %s\n", - $_->[1], $_->[0] - foreach @unrepres; - forceable_fail [qw(unrepresentable)], __ <<END; -HEAD has changes to .orig[s] which are not representable by `3.0 (quilt)' -END - } + quiltify_check_unrepresentable(\@unrepres); my @failsuggestion; if ($onlydebian) { |