X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=b4c931687e43f40474792227d7c9cac94130993b;hb=6c9c982217c2e5fd2f64fa55aaf8a3b6ac89e14f;hp=2fb3e0ef9e6589b843764591be1fd89c80bc6a01;hpb=68dadfa3503db1f12b4402bbf043d51441a9a412;p=dgit.git diff --git a/dgit b/dgit index 2fb3e0ef..b4c93168 100755 --- a/dgit +++ b/dgit @@ -1142,15 +1142,24 @@ sub cmd_push { check_not_dirty(); my $clogp = parsechangelog(); $package = getfield $clogp, 'Source'; + my $specsuite; if (@ARGV==0) { - $isuite = getfield $clogp, 'Distribution'; - if ($new_package) { - local ($package) = $existing_package; # this is a hack - canonicalise_suite(); - } + } elsif (@ARGV==1) { + ($specsuite) = (@ARGV); } else { badusage "incorrect arguments to dgit push"; } + $isuite = getfield $clogp, 'Distribution'; + if ($new_package) { + local ($package) = $existing_package; # this is a hack + canonicalise_suite(); + } + if (defined $specsuite && $specsuite ne $isuite) { + canonicalise_suite(); + $csuite eq $specsuite or + fail "dgit push: changelog specifies $isuite ($csuite)". + " but command line specifies $specsuite"; + } if (check_for_git()) { git_fetch_us(); }