D1303: py3: handle keyword arguments in hgext/gpg.py
This revision was automatically updated to reflect the committed changes. Closed by commit rHGde1f045781e0: py3: handle keyword arguments in hgext/gpg.py (authored by pulkit, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D1303?vs=3240=3278#toc REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1303?vs=3240=3278 REVISION DETAIL https://phab.mercurial-scm.org/D1303 AFFECTED FILES hgext/gpg.py CHANGE DETAILS diff --git a/hgext/gpg.py b/hgext/gpg.py --- a/hgext/gpg.py +++ b/hgext/gpg.py @@ -106,7 +106,7 @@ def newgpg(ui, **opts): """create a new gpg instance""" gpgpath = ui.config("gpg", "cmd") -gpgkey = opts.get('key') +gpgkey = opts.get(r'key') if not gpgkey: gpgkey = ui.config("gpg", "key") return gpg(gpgpath, gpgkey) @@ -253,6 +253,7 @@ def _dosign(ui, repo, *revs, **opts): mygpg = newgpg(ui, **opts) +opts = pycompat.byteskwargs(opts) sigver = "0" sigmessage = "" @@ -312,7 +313,8 @@ % hgnode.short(n) for n in nodes]) try: -editor = cmdutil.getcommiteditor(editform='gpg.sign', **opts) +editor = cmdutil.getcommiteditor(editform='gpg.sign', + **pycompat.strkwargs(opts)) repo.commit(message, opts['user'], opts['date'], match=msigs, editor=editor) except ValueError as inst: To: pulkit, #hg-reviewers, yuja Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D1303: py3: handle keyword arguments in hgext/gpg.py
yuja added inline comments. INLINE COMMENTS > gpg.py:317 > +editor = cmdutil.getcommiteditor(editform='gpg.sign', > +**pycompat.byteskwargs(opts)) > repo.commit(message, opts['user'], opts['date'], match=msigs, Fixed this to call strkwargs(). REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1303 To: pulkit, #hg-reviewers, yuja Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D1303: py3: handle keyword arguments in hgext/gpg.py
pulkit created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1303 AFFECTED FILES hgext/gpg.py CHANGE DETAILS diff --git a/hgext/gpg.py b/hgext/gpg.py --- a/hgext/gpg.py +++ b/hgext/gpg.py @@ -106,7 +106,7 @@ def newgpg(ui, **opts): """create a new gpg instance""" gpgpath = ui.config("gpg", "cmd") -gpgkey = opts.get('key') +gpgkey = opts.get(r'key') if not gpgkey: gpgkey = ui.config("gpg", "key") return gpg(gpgpath, gpgkey) @@ -253,6 +253,7 @@ def _dosign(ui, repo, *revs, **opts): mygpg = newgpg(ui, **opts) +opts = pycompat.byteskwargs(opts) sigver = "0" sigmessage = "" @@ -312,7 +313,8 @@ % hgnode.short(n) for n in nodes]) try: -editor = cmdutil.getcommiteditor(editform='gpg.sign', **opts) +editor = cmdutil.getcommiteditor(editform='gpg.sign', +**pycompat.byteskwargs(opts)) repo.commit(message, opts['user'], opts['date'], match=msigs, editor=editor) except ValueError as inst: To: pulkit, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel