chiark / gitweb /
push actually takes an optional suite, like it says in the synopsis.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Sep 2013 00:14:55 +0000 (01:14 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Sep 2013 00:14:55 +0000 (01:14 +0100)
debian/changelog
dgit
dgit.1

index bb7ff046a729aa228e1d7836a7db93be22402c00..bf459a99d91be09dc3dea3eb4121375556fd6043 100644 (file)
@@ -1,6 +1,7 @@
 dgit (0.16~experimental2) experimental; urgency=low
 
   * WIP remote functionality.  Untested, do not use.
+  * push actually takes an optional suite, like it says in the synopsis.
 
  --
 
diff --git a/dgit b/dgit
index 2fb3e0ef9e6589b843764591be1fd89c80bc6a01..b4c931687e43f40474792227d7c9cac94130993b 100755 (executable)
--- 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();
     }
diff --git a/dgit.1 b/dgit.1
index 251af593181580eb1d818bf6f74bb9f830bbbdae..b3f8f95351ab63a47dac787754fee690dbd7526b 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -125,7 +125,7 @@ will be passed on to git-buildpackage.
 
 Tagging, signing and actually uploading should be left to dgit push.
 .TP
-.B dgit push
+\fBdgit push\fR [\fIsuite\fP]
 Does an `upload', pushing the current HEAD to the archive (as a source
 package) and to dgit-repos (as git commits).  The package must already
 have been built ready for upload, with the .dsc and .changes
@@ -139,7 +139,8 @@ signed tag, and finally uses dput to upload the .changes to the
 archive.
 
 dgit push always uses the package, suite and version specified in the
-debian/changelog and the .dsc, which must agree.
+debian/changelog and the .dsc, which must agree.  If the command line
+specifies a suite then that must match too.
 
 If dgit push fails while uploading, it is fine to simply retry the
 dput on the .changes file at your leisure.