chiark / gitweb /
dgit: Always canonicalise suite rather earlier
[dgit.git] / dgit
diff --git a/dgit b/dgit
index f0f16518f44ba58877ec6b5894ffc3a4136675d0..f8b4fddabf46a87e7ce4b210ef24f6f83800b964 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1570,7 +1570,7 @@ sub push_parse_changelog ($) {
 
     $package = getfield $clogp, 'Source';
     my $cversion = getfield $clogp, 'Version';
-    my $tag = debiantag($cversion);
+    my $tag = debiantag($cversion, access_basedistro);
     runcmd @git, qw(check-ref-format), $tag;
 
     my $dscfn = dscfn($cversion);
@@ -1897,10 +1897,12 @@ sub cmd_push {
     if ($new_package) {
        local ($package) = $existing_package; # this is a hack
        canonicalise_suite();
-    }
-    if (defined $specsuite && $specsuite ne $isuite) {
+    } else {
        canonicalise_suite();
-       $csuite eq $specsuite or
+    }
+    if (defined $specsuite &&
+       $specsuite ne $isuite &&
+       $specsuite ne $csuite) {
            fail "dgit push: changelog specifies $isuite ($csuite)".
                " but command line specifies $specsuite";
     }