vscode-perforce icon indicating copy to clipboard operation
vscode-perforce copied to clipboard

Add support for symlink workspaces

Open jhollowe opened this issue 2 years ago • 3 comments

Adds the ability for VS Code workspace to be a symbolic link to a Perforce workspace by following any symlinks in the VS Code workspace path.

jhollowe avatar Apr 26 '22 19:04 jhollowe

Thanks for raising - I can see I need to fix the pipelines!

I'm not in a great position to try this out fully - Wondering what combinations you have tested?

For example is it possible that p4 info might itself return a symlink in the "Client root" field? (I don't know the answer, but it seems likely if you specified your client root as a symlink then p4 info would return that symlink back to you)

In which case, by only following the real path we might break previously working cases where both the client root and the workspace are both symlinks.

mjcrouch avatar Apr 28 '22 10:04 mjcrouch

This allows the extension to know the files are in the perforce workspace, but it seems perforce automatically expands the symlinks, so commands (i.e. p4 opened) show the symlinks as not being in the perforce workspace; I need to work on it more to ensure everything works with a symlink client root.

jhollowe avatar Apr 29 '22 14:04 jhollowe

I don't have time to get everything working with the symlink workspace right now, but I believe the current code will not hurt anything, just give a partial solution which myself or others can expand on later.

jhollowe avatar May 02 '22 21:05 jhollowe