mercurial/ui.py
changeset 16383 f5dd179bfa4a
parent 16373 329887a7074c
child 16683 525fdb738975
child 17048 15d4d475de9e
--- a/mercurial/ui.py	Sun Apr 08 22:17:51 2012 -0500
+++ b/mercurial/ui.py	Sun Apr 08 12:43:41 2012 -0700
@@ -687,10 +687,17 @@
 
     def geteditor(self):
         '''return editor to use'''
+        if sys.platform == 'plan9':
+            # vi is the MIPS instruction simulator on Plan 9. We
+            # instead default to E to plumb commit messages to
+            # avoid confusion.
+            editor = 'E'
+        else:
+            editor = 'vi'
         return (os.environ.get("HGEDITOR") or
                 self.config("ui", "editor") or
                 os.environ.get("VISUAL") or
-                os.environ.get("EDITOR", "vi"))
+                os.environ.get("EDITOR", editor))
 
     def progress(self, topic, pos, item="", unit="", total=None):
         '''show a progress message