Closed mikeseese closed 2 years ago
Ouch, thanks for reporting! I think that it would be a regression, since there was another issue on the same theme that I closed some time ago IIRC.
edit: https://github.com/SRombauts/UE4PlasticPlugin/issues/67 Space in repository name prevents History from working #67 (two years ago)
Hello @seesemichaelj,
I tried to reproduce
So I dug it a bit more, and if I erase or rename the .plastic/ directory in the workspace I end up with the same error message as you, I think. Could you check your own logs?
LogSourceControl: Warning: RunCommand: 'getworkspacefrompath C:/Creative/Kindred Games/Workspaces/SwordsnMagic2021/ --format={0}' (in 0.002s) output (44 chars): C:/Creative/Kindred is not in a workspace.
If this is the issue you are seeing, I think it's actually only an issue with the error message, because it wasn't able to find a workspace and tried to work up the path, but returned a truncated path in the error message
When I wrote "works great" it means I was able to create new projects with a space in the path, add them to source control, and then restart the project and confirm it was all working correctly
But I could reproduce the truncated error message using the "cm" command line interface, and then fix it by adding double quotes around the path:
C:\Creative\Kindred Games\Workspaces\SwordsnMagic2022>cm getworkspacefrompath C:\Creative\Kindred Games\Workspaces\SwordsnMagic2022
C:\Creative\Kindred is not in a workspace.
C:\Creative\Kindred Games\Workspaces\SwordsnMagic2022>cm getworkspacefrompath "C:\Creative\Kindred Games\Workspaces\SwordsnMagic2022"
C:\Creative\Kindred Games\Workspaces\SwordsnMagic2022 is not in a workspace.
With the fix provided in #103 I get the proper error message:
LogSlate: Window 'Source Control Login' being destroyed
LogSourceControl: IssueAsynchronousCommand: Connect
LogSourceControl: Verbose: RunCommand: 'getworkspacefrompath "C:/Creative/Kindred Games/Workspaces/SwordsnMagic2021/" --format={0}' (91 chars, 0 files)
LogSourceControl: Warning: RunCommand: 'getworkspacefrompath "C:/Creative/Kindred Games/Workspaces/SwordsnMagic2021/" --format={0}' (in 0.002s) output (79 chars):
C:/Creative/Kindred Games/Workspaces/SwordsnMagic2021/ is not in a workspace.
LogSourceControl: Verbose: RunCommand: cumulated time spent in shell: 1.897s (count 5)
SourceControl: Error: C:/Creative/Kindred Games/Workspaces/SwordsnMagic2021/ is not in a workspace.
And as expected I can connect to a workspace with a space in the path
If you are willing to test it please have a go, else I'll have it reviewed in due time :)
Cheers! Sébastien
A couple of things to digest here:
While the initial error was from a colleague, I was able to reproduce it today without deleting .plastic
:
When opening the Output Log
however, I see more context about the warning:
LogSourceControl: IssueAsynchronousCommand: Connect
LogSourceControl: Warning: RunCommand: 'getworkspacefrompath D:/Kindred Games/SnM --format={0}' (in 0.004s) output (35 chars):
D:/Kindred is not in a workspace.
SourceControl: Error: D:/Kindred is not in a workspace.
LogSourceControl: Connect processed in 0.009s
SourceControl: Error: Failed to enable Plastic SCM source control. You need to initialize the project as a Plastic SCM repository first.
So great, looks like #103 will fix that.
So before testing #103, I tested master
to make sure I got the same error as a control test since I'm not really sure which commit of the plugin is being used (because I wasn't the one to add it to source control in this project).
Regardless, master
at the time of writing this (ba734c6) does fail, so I'm not sure why you couldn't reproduce the error.
Now testing #103, I am able to connect to source control with no issue. So I guess either way, #103 fixes the problem even if you can't reproduce the problem haha.
Hi, thanks for testing this all over again.
Yes I agree it is strange, so I did test back and force, using both the exact path you provided or the default one from Users/
Nevertheless, it was indeed a bug calling this command without the double quotes, so fixing it is a no brainer :)
Fixed by #103
When trying to initialize the source control provider on
v1.5.1
, it fails to recognize it as a workspace if there's a space in any of the ancestor directories. You can see here thatD:/Creative/Kindred Games/Workspaces/SwordsnMagic2022
gets interpreted asD:/Created/Kindred
, effectively ignoring the rest of the path.