diff mercurial/cmdutil.py @ 22205:9fa429723f26

ui: invoke editor for committing with HGEDITFORM environment variable At the external editor invocation for committing, the value specified as "editform" for "cmdutil.getcommiteditor" is in "HGEDITFORM". This enables external editor to do own customization according to commit types.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 15 Aug 2014 23:05:53 +0900
parents 55308ab8117c
children d3659b3795e9
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Aug 15 04:37:46 2014 +0200
+++ b/mercurial/cmdutil.py	Fri Aug 15 23:05:53 2014 +0900
@@ -2215,7 +2215,7 @@
     # run editor in the repository root
     olddir = os.getcwd()
     os.chdir(repo.root)
-    text = repo.ui.edit(committext, ctx.user(), ctx.extra())
+    text = repo.ui.edit(committext, ctx.user(), ctx.extra(), editform=editform)
     text = re.sub("(?m)^HG:.*(\n|$)", "", text)
     os.chdir(olddir)