[devscripts] 03/04: debcommit: Add hg support to DEBCOMMIT_SIGN_COMMITS.
James McCoy
jamessan at debian.org
Tue Mar 11 03:57:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 801ca3ace87993a1e28207ea9c0edad5609edf46
Author: James McCoy <jamessan at debian.org>
Date: Sat Mar 8 21:25:54 2014 -0500
debcommit: Add hg support to DEBCOMMIT_SIGN_COMMITS.
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 2 +-
scripts/debcommit.pl | 12 ++++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b4386bb..1e8aa7d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,7 +19,7 @@ devscripts (2.14.2) UNRELEASED; urgency=medium
every single commit (Closes: #741040)
[ James McCoy ]
- * debcommit: Add bzr support to DEBCOMMIT_SIGN_COMMITS.
+ * debcommit: Add hg and bzr support to DEBCOMMIT_SIGN_COMMITS.
-- Jakub Wilk <jwilk at debian.org> Sun, 26 Jan 2014 21:50:35 +0100
diff --git a/scripts/debcommit.pl b/scripts/debcommit.pl
index bbd2517..a87ea6a 100755
--- a/scripts/debcommit.pl
+++ b/scripts/debcommit.pl
@@ -85,7 +85,7 @@ the message begins with "[*+-] ".
=item B<--sign-commit>, B<--no-sign-commit>
If this option is set, then the commits that debcommit creates will be
-signed using gnupg. Currently this is only supported by git and bzr.
+signed using gnupg. Currently this is only supported by git, hg, and bzr.
=item B<--sign-tags>, B<--no-sign-tags>
@@ -214,7 +214,7 @@ Options:
-a --all Commit all files (default except for git)
-s --strip-message Strip the leading '* ' from the commit message
--no-strip-message Do not strip a leading '* ' (default)
- --sign-commit Enable signing of the commit (git and bzr)
+ --sign-commit Enable signing of the commit (git, hg, and bzr)
--no-sign-commit Do not sign the commit (default)
--sign-tags Enable signing of tags (git only)
--no-sign-tags Do not sign tags (default)
@@ -532,6 +532,14 @@ sub commit {
$action_rc = $diffmode
? action($prog, "diff", @files_to_commit)
: action($prog, "commit", "-m", $message, @extra_args, @files_to_commit);
+ if ($prog eq 'hg' && $action_rc && $signcommit) {
+ my @sign_args;
+ push(@sign_args, '-k', $keyid) if $keyid;
+ push(@sign_args, '-u', $maintainer, '-d', $date) if $changelog_info;
+ if (!action($prog, 'sign', @sign_args)) {
+ die "$progname: failed to sign commit\n";
+ }
+ }
}
elsif ($prog eq 'git') {
if (! @files_to_commit && ($all || $release)) {
--
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