summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rwxr-xr-xgit-debrebase6
-rw-r--r--git-debrebase.1.pod6
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