RTC-SCM-CLI: how to detect whether a login is necessary before calling any CLI command ?
This wrapper tool calls lscm.bat (from RTC-scmTools-Win-4.0.3 installation)
These are the steps that are executed by the user of the wrapper tool:
- Execute login command
- Internally, calls lscm.bat with login command (with appropriate username and password)
- As lscm.bat is called for the first time, it launches "scm.exe" which continues to run even after termination of lscm.bat (I assume, this scm.exe is the daemon process that is explained in jazz.net. Please correct me if I'm wrong)
-
login command is successfully executed
-
Execute "create stream" command
- Internally, calls lscm.bat with "create stream" command (with appropriate arguments)
-
Stream gets created successfully from the account of the user who logged-in during step-1
-
....
- User continues to execute other commands of lscm.bat
-
User executes logout command
Questions:
-
Is there a possibility that the user might get automatically logged out during steps 2 to 4, in case if these steps are executed in longer intervals ? Say, the user executes step-2 today, but doesn't close the wrapper tool application, and doesn't shut down the PC, then executes step-3 one day later.
- Internally, is there a timeout defined for automatic logout ?
- if yes, how to detect this auto logout, so that login command can be issued before executing the actual command intended by the user in step 2 to 4 ?
-
if not, are there any other scenarios during which the user credentials might be lost ?
Thanks for your help in advance.
2 answers
Comments
Thanks for the info.
1. In my local PC, under the user's home directory, I could find the ".jazz-scm" folder (please note the hyphen in between). But inside thls folder, I could not find the repositories.txt file. This .jazz-scm folder contains below sub folder tree.
.jazz-scm
|- configuration
|- 4.0.5.0-RTC-I20131024-0100
|- org.eclipse.core.runtime
|- org.eclipse.equinox.app
|- org.eclipse.osgi
|- org.eclipse.update
2. Is this explanation applicable only for daemon (lscm.bat) or is it applicable even if I directly use scm.exe as well ? Will this scm.exe also pick up the credentials from this cached location ?
3. Is this cached location common for all clients (lscm.bat, scm.exe, web client, eclipse client, msscci client etc.,) ?
4. If I execute logout command from scm.exe, then will this cached location be cleaned up ?
- I don't think that is the right scm cli configuration directory. It should be at %LOCALAPPDATA%/jazz-scm or %APPDATA%/jazz-scm. If you have run the 'login' command then you should see the repositories.txt file. If you have run using --config option then you will find it in that directory.
- It is applicable to both lscm.bat and scm.exe. lscm.bat launches scm.exe in the background as a daemon process.
- The cached location is scm cli (lscm.bat and scm.exe) specific.
- Yes, logout command will clear the entry from repositories.txt file. You can run 'list credentials' command to see the cached credentials.