diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-07 00:41:56 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-07 00:42:27 +0100 |
commit | 180a9c094c1b1e51281c70940dc451465ec04806 (patch) | |
tree | 5e1caa5ef01af48c2cc3a916d3d2cf7c85eec46d | |
parent | 87da76cc34151e4623797b32d16c351029969bb6 (diff) |
git-debrebase new-upstream: Add a -1 revision if the user didn't supply one.
Closes:#903127.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | git-debrebase | 6 | ||||
-rw-r--r-- | git-debrebase.1.pod | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 6dea169..4acfcb8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. -- diff --git a/git-debrebase b/git-debrebase index 557e789..c28a775 100755 --- a/git-debrebase +++ b/git-debrebase @@ -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; diff --git a/git-debrebase.1.pod b/git-debrebase.1.pod index 1c3e681..4d1a673 100644 --- a/git-debrebase.1.pod +++ b/git-debrebase.1.pod @@ -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 |