[devscripts] 01/01: debcommit: Use actual package version in tag message
James McCoy
jamessan at debian.org
Sat Dec 12 12:32:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 284bceb11f715e6b80dd65fe6edad18ab4a96846
Author: James McCoy <jamessan at debian.org>
Date: Sat Dec 12 07:29:30 2015 -0500
debcommit: Use actual package version in tag message
Some VCS require modifications to the package version to use it as a
tag. In those cases, we still want to use the package's actual version
in the tag message.
Closes: #802503
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 3 +++
scripts/debcommit.pl | 62 +++++++++++++++++++++++++---------------------------
2 files changed, 33 insertions(+), 32 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 069368a..ed58bd3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -114,6 +114,9 @@ devscripts (2.15.10) UNRELEASED; urgency=medium
locales.
* chdist:
+ Make the apt-file support compatible with 3.x apt-file.
+ * debcommit:
+ + When a VCS requires a mangled package version for the tag name, still
+ use the actual package version in the tag message. (Closes: #802503)
[ Daniel Kahn Gillmor ]
* debuild:
diff --git a/scripts/debcommit.pl b/scripts/debcommit.pl
index 7bf6d95..46009e7 100755
--- a/scripts/debcommit.pl
+++ b/scripts/debcommit.pl
@@ -651,18 +651,17 @@ sub commit {
sub tag {
my ($package, $tag) = @_;
+ # Make the message here so we can mangle $tag later, if needed
+ my $tag_msg = "tagging package $package version $tag";
if ($prog eq 'svn' || $prog eq 'svk') {
my $svnpath=`svnpath`;
chomp $svnpath;
my $tagpath=`svnpath tags`;
chomp $tagpath;
- if (! action($prog, "copy", $svnpath, "$tagpath/$tag",
- "-m", "tagging package $package version $tag")) {
- if (! action($prog, "mkdir", $tagpath,
- "-m", "create tag directory") ||
- ! action($prog, "copy", $svnpath, "$tagpath/$tag",
- "-m", "tagging package $package version $tag")) {
+ if (! action($prog, "copy", $svnpath, "$tagpath/$tag", "-m", $tag_msg)) {
+ if (! action($prog, "mkdir", $tagpath, "-m", "create tag directory")
+ || ! action($prog, "copy", $svnpath, "$tagpath/$tag", "-m", $tag_msg)) {
die "debcommit: failed tagging with $tag\n";
}
}
@@ -696,47 +695,46 @@ sub tag {
if (! action($prog, "tag", $tag)) {
die "debcommit: failed tagging with $tag\n";
}
- } else {
- die "debcommit: bazaar or branch version too old to support tags\n";
- }
+ } else {
+ die "debcommit: bazaar or branch version too old to support tags\n";
+ }
}
elsif ($prog eq 'git') {
- $tag=~s/^[0-9]+://; # strip epoch
- $tag=~tr/~/./; # mangle for git
- if ($tag=~/-/) {
+ $tag =~ s/^[0-9]+://; # strip epoch
+ $tag =~ tr/~/./; # mangle for git
+ if ($tag =~ /-/) {
# not a native package, so tag as a debian release
- $tag="debian/$tag";
+ $tag = "debian/$tag";
}
if ($signtags) {
- if (defined $keyid) {
- if (! action($prog, "tag", "-u", $keyid, "-m",
- "tagging package $package version $tag", $tag)) {
- die "debcommit: failed tagging with $tag\n";
- }
+ my $tag_msg = "tagging package $package version $tag";
+ if (defined $keyid) {
+ if (! action($prog, "tag", "-u", $keyid, "-m", $tag_msg, $tag)) {
+ die "debcommit: failed tagging with $tag\n";
}
- else {
- if (! action($prog, "tag", "-s", "-m",
- "tagging package $package version $tag", $tag)) {
- die "debcommit: failed tagging with $tag\n";
- }
+ }
+ else {
+ if (! action($prog, "tag", "-s", "-m", $tag_msg, $tag)) {
+ die "debcommit: failed tagging with $tag\n";
}
+ }
}
elsif (! action($prog, "tag", $tag)) {
- die "debcommit: failed tagging with $tag\n";
- }
+ die "debcommit: failed tagging with $tag\n";
+ }
}
elsif ($prog eq 'hg') {
- $tag=~s/^[0-9]+://; # strip epoch
+ $tag =~ s/^[0-9]+://; # strip epoch
$tag="debian-$tag";
- if (! action($prog, "tag", "-m", "tagging package $package version $tag", $tag)) {
- die "debcommit: failed tagging with $tag\n";
- }
+ if (! action($prog, "tag", "-m", $tag_msg, $tag)) {
+ die "debcommit: failed tagging with $tag\n";
+ }
}
elsif ($prog eq 'darcs') {
- if (! action($prog, "tag", $tag)) {
- die "debcommit: failed tagging with $tag\n";
- }
+ if (! action($prog, "tag", $tag)) {
+ die "debcommit: failed tagging with $tag\n";
+ }
}
else {
die "debcommit: unknown program $prog";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list