Mercurial > hg-stable
changeset 22011:97acb4504704
import: pass 'editform' argument to 'cmdutil.getcommiteditor'
This patch passes 'editform' argument according to the format below:
COMMAND[.ROUTE]
- ROUTE: name of route, if there are two or more routes in COMMAND
In this patch, 'normal' and 'bypass' are used as ROUTE.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 02 Aug 2014 21:46:27 +0900 |
parents | 41e969cb9468 |
children | 9d92b9d1e282 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Aug 02 21:46:27 2014 +0900 +++ b/mercurial/cmdutil.py Sat Aug 02 21:46:27 2014 +0900 @@ -593,7 +593,7 @@ tmpname, message, user, date, branch, nodeid, p1, p2 = \ patch.extract(ui, hunk) - editor = getcommiteditor(**opts) + editor = getcommiteditor(editform='import.normal', **opts) update = not opts.get('bypass') strip = opts["strip"] sim = float(opts.get('similarity') or 0) @@ -687,12 +687,13 @@ files, eolmode=None) except patch.PatchError, e: raise util.Abort(str(e)) + editor = getcommiteditor(editform='import.bypass') memctx = context.makememctx(repo, (p1.node(), p2.node()), message, opts.get('user') or user, opts.get('date') or date, branch, files, store, - editor=getcommiteditor()) + editor=editor) n = memctx.commit() finally: store.close()