##// END OF EJS Templates
py3: handle keyword arguments in hgext/gpg.py...
Pulkit Goyal -
r34979:de1f0457 default
parent child Browse files
Show More
@@ -106,7 +106,7 b' class gpg(object):'
106 def newgpg(ui, **opts):
106 def newgpg(ui, **opts):
107 """create a new gpg instance"""
107 """create a new gpg instance"""
108 gpgpath = ui.config("gpg", "cmd")
108 gpgpath = ui.config("gpg", "cmd")
109 gpgkey = opts.get('key')
109 gpgkey = opts.get(r'key')
110 if not gpgkey:
110 if not gpgkey:
111 gpgkey = ui.config("gpg", "key")
111 gpgkey = ui.config("gpg", "key")
112 return gpg(gpgpath, gpgkey)
112 return gpg(gpgpath, gpgkey)
@@ -253,6 +253,7 b' def sign(ui, repo, *revs, **opts):'
253
253
254 def _dosign(ui, repo, *revs, **opts):
254 def _dosign(ui, repo, *revs, **opts):
255 mygpg = newgpg(ui, **opts)
255 mygpg = newgpg(ui, **opts)
256 opts = pycompat.byteskwargs(opts)
256 sigver = "0"
257 sigver = "0"
257 sigmessage = ""
258 sigmessage = ""
258
259
@@ -312,7 +313,8 b' def _dosign(ui, repo, *revs, **opts):'
312 % hgnode.short(n)
313 % hgnode.short(n)
313 for n in nodes])
314 for n in nodes])
314 try:
315 try:
315 editor = cmdutil.getcommiteditor(editform='gpg.sign', **opts)
316 editor = cmdutil.getcommiteditor(editform='gpg.sign',
317 **pycompat.strkwargs(opts))
316 repo.commit(message, opts['user'], opts['date'], match=msigs,
318 repo.commit(message, opts['user'], opts['date'], match=msigs,
317 editor=editor)
319 editor=editor)
318 except ValueError as inst:
320 except ValueError as inst:
General Comments 0
You need to be logged in to leave comments. Login now