Rev 6374: Merge fix from jelmer in file:///home/vila/src/bzr/bugs/904550-default-gpg-key/

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Dec 15 08:09:39 UTC 2011


At file:///home/vila/src/bzr/bugs/904550-default-gpg-key/

------------------------------------------------------------
revno: 6374 [merge]
revision-id: v.ladeuil+lp at free.fr-20111215080938-e5fz674dka1c93m9
parent: v.ladeuil+lp at free.fr-20111215075313-hm1swu2wf922twal
parent: jelmer at samba.org-20111215014123-11zk7pajade6iv75
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 904550-default-gpg-key
timestamp: Thu 2011-12-15 09:09:38 +0100
message:
  Merge fix from jelmer
modified:
  bzrlib/gpg.py                  gpg.py-20051017065112-8654536d415dacc6
-------------- next part --------------
=== modified file 'bzrlib/gpg.py'
--- a/bzrlib/gpg.py	2011-12-15 07:53:13 +0000
+++ b/bzrlib/gpg.py	2011-12-15 08:09:38 +0000
@@ -27,6 +27,7 @@
 import subprocess
 
 from bzrlib import (
+    config as _mod_config,
     errors,
     trace,
     ui,
@@ -181,8 +182,11 @@
             return False
 
     def _command_line(self):
+        key = self._config_stack.get('gpg_signing_key')
+        if key is None:
+            key = _mod_config.extract_email_address(self._config_stack.get('email'))
         return [self._config_stack.get('gpg_signing_command'), '--clearsign',
-                '-u', self._config_stack.get('gpg_signing_key')]
+                '-u', key]
 
     def sign(self, content):
         if isinstance(content, unicode):



More information about the bazaar-commits mailing list