[PATCH 13 of 14] configitems: register the 'gpg.key' config

Boris Feld boris.feld at octobus.net
Fri Oct 6 05:22:29 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1498786954 -7200
#      Fri Jun 30 03:42:34 2017 +0200
# Node ID d54526c257afa33b7624f0b94c16822bcbd08df1
# Parent  b0c42fec8dc28dec5408c0ec506359afc64e4915
# EXP-Topic config.register.gpg
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r d54526c257af
configitems: register the 'gpg.key' config

diff -r b0c42fec8dc2 -r d54526c257af hgext/gpg.py
--- a/hgext/gpg.py	Fri Jun 30 03:42:33 2017 +0200
+++ b/hgext/gpg.py	Fri Jun 30 03:42:34 2017 +0200
@@ -36,6 +36,9 @@
 configitem('gpg', 'cmd',
     default='gpg',
 )
+configitem('gpg', 'key',
+    default=None,
+)
 
 class gpg(object):
     def __init__(self, path, key=None):
@@ -101,7 +104,7 @@
     gpgpath = ui.config("gpg", "cmd")
     gpgkey = opts.get('key')
     if not gpgkey:
-        gpgkey = ui.config("gpg", "key", None)
+        gpgkey = ui.config("gpg", "key")
     return gpg(gpgpath, gpgkey)
 
 def sigwalk(repo):


More information about the Mercurial-devel mailing list