From patchwork Sat Aug 2 13:02:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03, of, 15] gpg: pass 'editform' argument to 'cmdutil.getcommiteditor' From: Katsunori FUJIWARA X-Patchwork-Id: 5231 Message-Id: To: mercurial-devel@selenic.com Date: Sat, 02 Aug 2014 22:02:12 +0900 # HG changeset patch # User FUJIWARA Katsunori # Date 1406983586 -32400 # Sat Aug 02 21:46:26 2014 +0900 # Node ID f75a4312e85846fedab4c63ab5925a1598bd6139 # Parent 3d0afcec1d5053a7ed5f82947fd13b7c8f762891 gpg: pass 'editform' argument to 'cmdutil.getcommiteditor' This patch passes 'editform' argument according to the format below: EXTENSION[.COMMAND][.ROUTE] - EXTENSION: name of extension - COMMAND: name of command, if there are two or more commands in EXTENSION - ROUTE: name of route, if there are two or more routes in COMMAND In this patch, 'sign' is used as COMMAND, and ROUTE is omitted. diff --git a/hgext/gpg.py b/hgext/gpg.py --- a/hgext/gpg.py +++ b/hgext/gpg.py @@ -277,8 +277,9 @@ % hgnode.short(n) for n in nodes]) try: + editor = cmdutil.getcommiteditor(editform='gpg.sign', **opts) repo.commit(message, opts['user'], opts['date'], match=msigs, - editor=cmdutil.getcommiteditor(**opts)) + editor=editor) except ValueError, inst: raise util.Abort(str(inst))