chiark / gitweb /
git-debrebase new-upstream: Add a -1 revision if the user didn't supply one.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Jul 2018 23:41:56 +0000 (00:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Jul 2018 23:42:27 +0000 (00:42 +0100)
Closes:#903127.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
git-debrebase
git-debrebase.1.pod

index 6dea1695c50947a6dde65cc1cad2b9082de51074..4acfcb81bfedc36a12ce3f228f5d3f3070b211f2 100644 (file)
@@ -4,6 +4,8 @@ dgit (5.8~) unstable; urgency=medium
   * dgit, git-debrebase: Properly make patches even if an awkward
     .gitignore ignores the things in debian/patches.  Closes:#903130.
   * git-debrebase status: Fix commit reporting.  Closes:903131.
+  * git-debrebase new-upstream: Add a -1 revision if the user
+    didn't supply one.  Closes:#903127.
   * dgit(1): Unscramble push[-source] descriptions.  Closes:#903116.
 
  --
index 557e7898a1cd8fa11771982a2f9717177000a7a7..c28a775ce87261022855fcbb753c6d8b82ee9056 100755 (executable)
@@ -1140,7 +1140,11 @@ sub cmd_new_upstream () {
     badusage "need NEW-VERSION [UPS-COMMITTISH]" unless @ARGV >= 1;
 
     # parse args - low commitment
-    my $new_version = (new Dpkg::Version scalar(shift @ARGV), check => 1);
+    my $spec_version = shift @ARGV;
+    my $new_version = (new Dpkg::Version $spec_version, check => 1);
+    if ($new_version->is_native()) {
+       $new_version = (new Dpkg::Version "$spec_version-1", check => 1);
+    }
     my $new_upstream_version = $new_version->version();
 
     my $new_upstream = shift @ARGV;
index 1c3e68128f0e4967e90d1bb9e219b43b075e57a9..4d1a67360d6a4ba9a4700cd08caac5cb840a57dd 100644 (file)
@@ -135,6 +135,12 @@ If you git-rebase --abort,
 the whole new upstream operation is aborted,
 except for the laundering.
 
+<new-version>
+may be whole new Debian version, including revision,
+or just the upstream part,
+in which case -1 will be appended
+to make the new Debian version.
+
 The <upstream-details> are, optionally, in order:
 
 =over