From ec2180ffff14c6e14703a70b4e68861312607f10 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 31 Jul 2018 10:21:57 +0100 Subject: [PATCH] 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 --- debian/changelog | 1 + git-debrebase | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 41026cce..ef70f6e2 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 3449ec39..49445296 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) { -- 2.30.2