diff mercurial/commands.py @ 5660:3c80ecdc1bcd

Use VISUAL in addition to EDITOR when choosing the editor to use.
author Osku Salerma <osku@iki.fi>
date Wed, 05 Dec 2007 20:40:01 +0900
parents ae3089cefaab
children 883d887c6408
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Dec 18 14:01:42 2007 -0600
+++ b/mercurial/commands.py	Wed Dec 05 20:40:01 2007 +0900
@@ -430,8 +430,8 @@
     If a list of files is omitted, all changes reported by "hg status"
     will be committed.
 
-    If no commit message is specified, the editor configured in your hgrc
-    or in the EDITOR environment variable is started to enter a message.
+    If no commit message is specified, the configured editor is started to
+    enter a message.
     """
     def commitfunc(ui, repo, files, message, match, opts):
         return repo.commit(files, message, opts['user'], opts['date'], match,
@@ -748,9 +748,7 @@
 
     # editor
     ui.status(_("Checking commit editor...\n"))
-    editor = (os.environ.get("HGEDITOR") or
-              ui.config("ui", "editor") or
-              os.environ.get("EDITOR", "vi"))
+    editor = ui.geteditor()
     cmdpath = util.find_exe(editor) or util.find_exe(editor.split()[0])
     if not cmdpath:
         if editor == 'vi':