-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode-perforce fails when using a "personal (local) server" #169
Comments
I'm also suffering from this issue on my windows computer. My current workaround is changing the .p4config file by expanding the $configdir to the actual directory, and placing quotes around the p4d command, like this: The problem (except having to manually fiddle) is that the p4 command does not compute this, so any manual commands i'd like to run will not work. |
Hi @ulfwin @jdputsch Specifically, I've changed how it runs commands so everything should be correctly escaped, so your .p4config file doesn't need random quotes in it (I haven't tested on windows so my command is slightly different, but it should be cross platform) It does not fix the variable expansion, so you still need to change the default generated .p4config file to replace $configdir with the real path.* I tested it by changing the P4PORT as described, and ensuring * ultimately I would like to change the activation so it doesn't explicitly read the p4 config file, but uses perforce's own logic to get the correct client details, which would expand the variables automatically, but it's quite a big task |
Tired and working on Windows! Thanks a lot @mjcrouch ! Indeed expanding the variables would be nice, but the biggest problem of having to change back and fourth is taken care of with this work around. |
When using a "personal (local) server", vscode-perforce generates incorrect "p4" command lines.
To reproduce:
Personal servers may be created via one of these methods:
In workspace using a personal server, the .p4config file contains a P4PORT entry that looks like these:
Windows:
P4PORT=rsh:p4d.exe -i -J off -r "$configdir\.p4root"
Linux:
P4PORT=rsh:/bin/sh -c "umask 077 && exec p4d -i -J off -r '$configdir/.p4root'"
OSX:
P4PORT=rsh:/bin/sh -c "umask 077 && exec p4d -i -J off -r '$configdir/.p4root'"
Actual Results
This leads the Perforce integrate to run P4 commands that look like this:
"p4" -u jeff.putsch -c jeff.putsch-dvcs-1566707823 -p rsh:/bin/sh -c "umask 077 && exec p4d -i -J off -r '$configdir/.p4root'" -d /home/putsch/src/Maxim/mdx/mipi/ edit "/home/putsch/src/Maxim/mdx/mipi/README.rst"
Which does not provide a valid P4 command:
Expected Results:
A valid P4 command that works in this environment.
One idea would be to add "P4CONFIG" to the environment, then not use the "-p " option if P4PORT starts with "rsh:".
Jeff.
The text was updated successfully, but these errors were encountered: