[devscripts] 02/04: debcommit: Add bzr support to DEBCOMMIT_SIGN_COMMITS

James McCoy jamessan at debian.org
Tue Mar 11 03:57:53 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 bc63bac5e16757c6bb636cb61b3fd9f8a6ba50f3
Author: James McCoy <jamessan at debian.org>
Date:   Sat Mar 8 21:02:43 2014 -0500

    debcommit: Add bzr support to DEBCOMMIT_SIGN_COMMITS
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog     |  3 +++
 scripts/debcommit.pl | 13 ++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b00aa6a..b4386bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,9 @@ devscripts (2.14.2) UNRELEASED; urgency=medium
   * debcommit: Add switch+conf.setting allowing to specify Git to sign
     every single commit (Closes: #741040)
 
+  [ James McCoy ]
+  * debcommit: Add bzr support to DEBCOMMIT_SIGN_COMMITS.
+
  -- Jakub Wilk <jwilk at debian.org>  Sun, 26 Jan 2014 21:50:35 +0100
 
 devscripts (2.14.1) unstable; urgency=medium
diff --git a/scripts/debcommit.pl b/scripts/debcommit.pl
index e6ebe83..bbd2517 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.
+signed using gnupg. Currently this is only supported by git 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 only)
+   --sign-commit       Enable signing of the commit (git 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)
@@ -604,7 +604,14 @@ sub commit {
 		my $time = Date::Format::strftime('%Y-%m-%d %H:%M:%S %z', \@time);
 		push(@extra_args, "--author=$maintainer", "--commit-time=$time");
 	    }
-	    $action_rc = action($prog, "commit", "-m", $message,
+	    my @sign_args;
+	    if ($signcommit) {
+		push(@sign_args, "-Ocreate_signatures=always");
+		if ($keyid) {
+		    push(@sign_args, "-Ogpg_signing_key=$keyid");
+		}
+	    }
+	    $action_rc = action($prog, @sign_args, "commit", "-m", $message,
 		@extra_args, @files_to_commit);
 	}
     }

-- 
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