chiark / gitweb /
git-debrebase: new-upstream: Fix handling of epochs.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Jul 2018 09:21:57 +0000 (10:21 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Jul 2018 12:12:59 +0000 (13:12 +0100)
Dpkg::Version->version() is only the middle part.  ->epoch() doesn't
have the colon.  This is inconvenient enough that we convert it to a
string and use a regexp :-/.

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

index 41026cce4d057aac24416de65a7d9484e21015e4..ef70f6e284ca3c903636bb1266846ea58c83bd20 100644 (file)
@@ -5,6 +5,7 @@ dgit (6.3~) unstable; urgency=medium
   * git-debrebase: new-upstream: Fix error message for new version
     with bad syntax.
   * git-debrebase test suite: Test messages about unprocessable commits.
   * git-debrebase: new-upstream: Fix error message for new version
     with bad syntax.
   * git-debrebase test suite: Test messages about unprocessable commits.
+  * git-debrebase: new-upstream: Fix handling of epochs.
 
  --
 
 
  --
 
index 3449ec3950ad98064baf6b0736455dfa76c456f9..494452961245577de4454e9984f4d0473bd0fadc 100755 (executable)
@@ -1177,7 +1177,8 @@ sub cmd_new_upstream () {
     if ($new_version->is_native()) {
        $new_version = (new Dpkg::Version "$spec_version-1", 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_version = "$new_version";
+    $new_upstream_version =~ s/-.*?$//;;
 
     my $new_upstream = shift @ARGV;
     if (!defined $new_upstream) {
 
     my $new_upstream = shift @ARGV;
     if (!defined $new_upstream) {