From: Ian Jackson Date: Tue, 31 Jul 2018 09:21:57 +0000 (+0100) Subject: git-debrebase: new-upstream: Fix handling of epochs. X-Git-Tag: archive/debian/6.3~10 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=ec2180ffff14c6e14703a70b4e68861312607f10 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 --- 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) {