mercurial/ui.py
changeset 22205 9fa429723f26
parent 21955 6dfb78f18bdb
child 22291 3b39e1522d8f
--- a/mercurial/ui.py	Fri Aug 15 04:37:46 2014 +0200
+++ b/mercurial/ui.py	Fri Aug 15 23:05:53 2014 +0900
@@ -728,7 +728,7 @@
         if self.debugflag:
             opts['label'] = opts.get('label', '') + ' ui.debug'
             self.write(*msg, **opts)
-    def edit(self, text, user, extra={}):
+    def edit(self, text, user, extra={}, editform=None):
         (fd, name) = tempfile.mkstemp(prefix="hg-editor-", suffix=".txt",
                                       text=True)
         try:
@@ -743,6 +743,8 @@
                 if label in extra:
                     environ.update({'HGREVISION': extra[label]})
                     break
+            if editform:
+                environ.update({'HGEDITFORM': editform})
 
             editor = self.geteditor()