Issue
P4EDITOR is set to "vim" in .p4config and I want to use a a different editor inside my Python script. If I change the environment variable P4EDITOR="custom_editor", it has no effect. Seems like perforce looks for .p4config file first and then loooks for environment variables. OS : freeBSD
Solution
Th best approach would be to upgrade the p4 version and do p4 -E P4EDITOR="custom editor"
as suggested by @Bryan.
If upgrading P4 is not an option then copy the the existing .p4config file to a temp file and add P4EDITOR=custom editor
to the temporary config file. If the P4EDITOR
is already set, then modify it in the temporary config file. Also do export P4CONFIG=temp_config
to make the temporary file as the config file.
p4 looks for the config file in the current directory and all it's parents. So the best way to find which config file should be copied and modified is by executing the command p4 set P4CONFIG
. This is very useful if there are multiple config files on the machine.
$ p4 set P4CONFIG
P4CONFIG=.p4config (config '/<path>/.p4config')
Answered By - gaganso Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.