Closed jtomori closed 1 day ago
Hi Juraj, Thanks a lot for reporting this problem. I don't think that we've ever tried specifying P4TICKETS within a P4CONFIG file for p4vfs. I have reproduced the bug as you describe. In my case:
set P4CONFIG=C:\temp\p4config.txt
Then C:\temp\p4config.txt
contains:
P4TICKETS=C:\Temp\p4tickets.txt
Then delete the default %USERPROFILE%\p4tickets.txt
file.
When I run p4.exe sync //...
I get a login prompt and see that ticket is saved to C:\Temp\p4tickets.txt
Then when I run p4vfs.exe sync //...
I get a login prompt and see that ticket is saved to %USERPROFILE%\p4tickets.txt
Seems like exactly what you describe. We'll fix this and repost here.
Thank you for looking into it, I appreciate that.
Hello, I'd like to ask you if you could advise a temporary workaround for specifying P4VFS-specific P4TICKETS configuration.
I've tried setting a P4VFS.Service
-specific environment variable (as explained here and confirmed with Process Explorer), but that doesn't seem to have any effect on P4VFS' behavior.
The only thing that works reliably is to set P4TICKETS as a user/system environment variable, but I'd like to avoid that as that affects P4 as well.
A partially working workaround is to specify P4TICKETS in the command line's environment, which works when running e.g. p4vfs sync -t
, but hydration of virtual files then doesn't work.
Best, Juraj
Hi Juraj,
That's a clever idea with P4VFS.Service-specific environment variable, but I can see why it wouldn't work due to how the service is trying to use the impersonated process environment.
This really seems like a bug in P4VFS, and I don't know of another way (besides what you mention, and p4 set registry) to override the service environment. It's the intension for the service to use the environment of the impersonating process or calling process. Doesn't seem to be working in this case. I'll take a closer look ... and write a test.
Regards -Jess
There's a new branch dev/p4config-fixes
with an addition to test UnitTestCommon.EnvironmentConfigTest
to reproduce this issue (currently failing). I'm expecting a small change to the DepotClient
code to fix this.
This should be fixed in release v1.28.2.0 Release Notes v1.28.2.0
Hello, thank you for the update, it has fixed the issue.
Hello, based on my testing it seems like the P4VFS service is not respecting P4TICKETS's value, which is specified in a P4CONFIG file specific to a workspace.
For example, I am able to run
p4 sync
without a password prompt in a workspace directory (it's picking up P4TICKETS correctly, can be verified withp4 set
), butp4vfs sync
shows a dialog asking me for a password (entering it saves the ticket into my home folder). A temporary workaround is to specify P4TICKETS as a system-wide environment variable, but that is not ideal as I'd prefer to control its value on a per-workspace basis.Best, Juraj