equal
deleted
inserted
replaced
36 configitem('gpg', 'cmd', |
36 configitem('gpg', 'cmd', |
37 default='gpg', |
37 default='gpg', |
38 ) |
38 ) |
39 configitem('gpg', 'key', |
39 configitem('gpg', 'key', |
40 default=None, |
40 default=None, |
|
41 ) |
|
42 configitem('gpg', '.*', |
|
43 default=None, |
|
44 generic=True, |
41 ) |
45 ) |
42 |
46 |
43 class gpg(object): |
47 class gpg(object): |
44 def __init__(self, path, key=None): |
48 def __init__(self, path, key=None): |
45 self.path = path |
49 self.path = path |
214 ui.write(" %s\n" % keystr(ui, key)) |
218 ui.write(" %s\n" % keystr(ui, key)) |
215 |
219 |
216 def keystr(ui, key): |
220 def keystr(ui, key): |
217 """associate a string to a key (username, comment)""" |
221 """associate a string to a key (username, comment)""" |
218 keyid, user, fingerprint = key |
222 keyid, user, fingerprint = key |
219 comment = ui.config("gpg", fingerprint, None) |
223 comment = ui.config("gpg", fingerprint) |
220 if comment: |
224 if comment: |
221 return "%s (%s)" % (user, comment) |
225 return "%s (%s)" % (user, comment) |
222 else: |
226 else: |
223 return user |
227 return user |
224 |
228 |