summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67abd41)
raw | patch | inline | side by side (parent: 67abd41)
author | Shawn Bohrer <shawn.bohrer@gmail.com> | |
Thu, 13 Mar 2008 00:03:24 +0000 (19:03 -0500) | ||
committer | Simon Hausmann <simon@lst.de> | |
Thu, 13 Mar 2008 07:57:29 +0000 (08:57 +0100) |
Perforce allows you to set the P4EDITOR environment variable to your
preferred editor for use in perforce. Since we are displaying a
perforce changelog to the user we should use it when it is defined.
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
preferred editor for use in perforce. Since we are displaying a
perforce changelog to the user we should use it when it is defined.
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4 | patch | blob | history |
index 28b9c3c3cba175ce082c2c499488f81369ac858b..3cb0330ec2d89d0637bbbc5a529158f695793638 100755 (executable)
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()