-
Cristian Adam authored
When using P4CONFIG one can user multiple p4 workspaces. For every workspace one needs to have a p4config.txt file, which contains the P4CLIENT, P4USER, P4PORT variable values. Qt Creator will query on various directories for p4 configuration. "p4 client" command will give an error if a p4config.txt file is not present. p4 will try to connect to localhost when P4PORT is not set and give and error, but it will take a long time to timeout. This timeout gives the impression that P4 does a lot of work and Qt Creator will sometimes freeze. The solution to this timeout is to set P4PORT and P4USER. In this case "p4 client" will give back the same generic "Root:" variable e.g. c:\p4, which will be seen as a valid path and PerforcePlugin::setTopLevel will be called and thus setting the path of the current workspace, which is not valid. Fortunately in this case "Client:" and "Host:" variables in the output given by the "p4 client" have the same value. "Client:" will probably never have the same value as the "Host:" value, thus making it safe to ignore these invalid "p4 client" calls. Change-Id: Iafb2640cccd7bd10c455d33ea9d36c5eae2e2951 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
30db0202