diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-31 10:21:57 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-31 13:12:59 +0100 |
commit | ec2180ffff14c6e14703a70b4e68861312607f10 (patch) | |
tree | 94158868d074fc18fd61424c9a54dff43995732f | |
parent | fd60a31ac3b7308570eee56f1e3c8e5ef0ffafe1 (diff) |
git-debrebase: new-upstream: Fix handling of epochs.
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>
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | git-debrebase | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 41026cc..ef70f6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 handling of epochs. -- diff --git a/git-debrebase b/git-debrebase index 3449ec3..4944529 100755 --- a/git-debrebase +++ b/git-debrebase @@ -1177,7 +1177,8 @@ sub cmd_new_upstream () { 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) { |