Skip to content
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

Multiple Work-Spaces (streams) support #209

Closed
alexcomsa opened this issue Feb 7, 2020 · 4 comments
Closed

Multiple Work-Spaces (streams) support #209

alexcomsa opened this issue Feb 7, 2020 · 4 comments

Comments

@alexcomsa
Copy link

Is your feature request related to a problem? Please describe.
Support working with multiple work spaces , currently if you have multiple work-spaces the plugin generates an exception if the p4 cli is not set to the one you want to work with .

Describe the solution you'd like
I want to be able to manipulate multiple work-spaces without manually executing the
p4 set P4CLIENT=myClient command .
Describe alternatives you've considered
I run the the CLI command p4 set P4CLIENT=myClient
Additional context
If the current P4CLIENT is set to client1 and I want to work on a different work space the plugin generates the following exceptions

net.groboclown.p4.server.api.P4CommandRunner$ServerResultException:C:/my/new/workspace... - must create client '_____CLIENT_UNSET_____' to access local files.
	at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.createServerResultException(P4RequestErrorHandler.java:131)
	at net.groboclown.p4.server.impl.connection.impl.MessageP4RequestErrorHandler.handleException(MessageP4RequestErrorHandler.java:411)
	at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.handleConnection(P4RequestErrorHandler.java:161)
	at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.handle(P4RequestErrorHandler.java:70)
	at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$handleAsync$6(SimpleConnectionManager.java:575)
	at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$startPromise$8(SimpleConnectionManager.java:589)
	at net.groboclown.p4.server.api.async.AsyncAnswer.lambda$background$0(AsyncAnswer.java:49)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.perforce.p4java.exception.RequestException:C:/my/new/workspace... - must create client '_____CLIENT_UNSET_____' to access local files.
	at net.groboclown.p4.server.impl.connection.impl.MessageStatusUtil.throwIf(MessageStatusUtil.java:48)
	at net.groboclown.p4.server.impl.connection.impl.P4CommandUtil.getFilesDetails(P4CommandUtil.java:430)
	at net.groboclown.p4.server.impl.connection.ConnectCommandRunner.lambda$listFilesDetails$40(ConnectCommandRunner.java:450)
	at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$null$2(SimpleConnectionManager.java:150)
	at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.handleConnection(P4RequestErrorHandler.java:156)
	... 10 more

Also I have tried to create a P4CONFIG for the new work-space (stream) and I get the following exception

 WARN - nnection.P4RequestErrorHandler - Running an action with the Perforce server client:{perforce-host:prot@stream} generated an error. 
com.perforce.p4java.exception.ConfigException: Client does not exist: MY/NEW-CLIENT
	at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$null$0(SimpleConnectionManager.java:117)
	at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.handleConnection(P4RequestErrorHandler.java:156)
	at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.handle(P4RequestErrorHandler.java:54)
	at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$handleAsync$5(SimpleConnectionManager.java:571)
	at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$startPromise$8(SimpleConnectionManager.java:589)
	at net.groboclown.p4.server.api.async.AsyncAnswer.lambda$background$0(AsyncAnswer.java:49)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
@groboclown
Copy link
Owner

I'm seeing a few other issues around the multi-workspace functionality with the 201 version of the IDE. I'll dig into these along with this issue.

@groboclown
Copy link
Owner

I found a major issue around the association of the VCS root directory with the configuration, stemming from a misinterpretation of the data given to the configuration panel.

I don't know if this will fix this specific issue, but it's at least a start in the right direction.

groboclown added a commit that referenced this issue Feb 25, 2020
Change up the association of the vcs root with the directory mapping object.  In some cases, the directory mapping object was incorrectly setup to point to the project root, rather than the vcs root.  The dialog now carefully creates the vcs directory mapping object to have the expected data.
@groboclown
Copy link
Owner

Please respond back if this fixes the issue, or if you're still experiencing problems.

@groboclown
Copy link
Owner

There was another bug related to this found after this release - the configuration incorrectly maps the wrong configuration to a root path when loading a project. The work-around is to edit the configuration. A fix will be out shortly.

groboclown added a commit that referenced this issue Feb 26, 2020
For #208, the way the server configuration was passed around to the low-level API calls wasn't sufficient.  They also needed some properties from the client configuration (e.g. P4HOST).  A major refactoring of the code was necessary to allow these properties to be passed.

Another bug, a carry over from #209, resulted in loading configurations with wrong VCS root path mapping to the configuration.  A similar fix was necessary.

Cleaned up some of the logging while in here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants