Merge branch 'maint'
[gitweb.git] / contrib / fast-import / git-p4
index 28b9c3c3cba175ce082c2c499488f81369ac858b..3cb0330ec2d89d0637bbbc5a529158f695793638 100755 (executable)
@@ -652,7 +652,10 @@ class P4Submit(Command):
             defaultEditor = "vi"
             if platform.system() == "Windows":
                 defaultEditor = "notepad"
-            editor = os.environ.get("EDITOR", defaultEditor);
+            if os.environ.has_key("P4EDITOR"):
+                editor = os.environ.get("P4EDITOR")
+            else:
+                editor = os.environ.get("EDITOR", defaultEditor);
             system(editor + " " + fileName)
             tmpFile = open(fileName, "rb")
             message = tmpFile.read()