It's all about the answers!

Ask a question

scm status fails to detect that a file has been added to the component


Jerry Feldman (12710) | asked Jun 30 '14, 11:47 a.m.
I am writing a script to load a large number of files into a component.
First, the component has been set up in inittial state and loaded into a local repository workspace using the RTC GUI. I then exit the GUI and log in using:
lscm login -r <repo> -n nick -u <me> -P <mypass> -c

I then copy a file into component in the workspace and run status. status does not return a value, and -v returns that the file system is consistent

[ ~]$ scm status -v
Local file system is consistent.

Is there some additional steps I need to do in scm to get it to detect a change so I can subsequently checkin and deliver the changes



Accepted answer


permanent link
Arne Bister (2.6k12732) | answered Jun 30 '14, 2:17 p.m.
JAZZ DEVELOPER
Jerry,

loading a repository workspace with RTC GUI will lock the sandbox to that RTC client. If you look at the sandbox location from SCM commandline the workspace will not appear as loaded.
You need to load the repository workspace via >scm load into that sandbox, then detecting added files as changes will work.

If this answers your question please mark it as accepted.
Feel free to question for more details.

Best,
Arne
Jerry Feldman selected this answer as the correct answer

Comments
Jerry Feldman commented Jun 30 '14, 2:59 p.m.

When I try to load, it tells me I am already logged in. Note that I loaded the workspace with RTC last week and RTC is currently not running, and there is no lock on the workspace.
Now when I load that workspace using its alias:
lscm load -r mysb 1035 TestSources/
Successfully loaded items into the sandbox.
[~]$ lscm status
Problem running 'status':
Could not initialize data area. Could not lock /home/jfeldman - locked by other process.

Actually this could have been a cockpit error. "TestSources" is the component in the local repository. I did not specify the full path. now I have 18 daemon start processes running.


Jerry Feldman commented Jun 30 '14, 3:16 p.m.

After cleaning things out and moving to a different system, same directory:
I ran lscm login as in my initial post:
Logged in to https://<repo>:9552/ccm/
Then immediately:
lscm load -r mysb 1035 ~/CWMSF/TestSources/
Problem running 'load':
Could not login to https://<repo>:9552/ccm/ as "<myuserid>". Already logged in as "<myuserid>". Run "lscm logout" and retry.


Arne Bister commented Jun 30 '14, 3:26 p.m.
JAZZ DEVELOPER

Jerry,
the "Could not initialize data area. Could not lock /home/jfeldman - locked by other process." error tells you that the sandbox is still locked to the RTC GUI loaded workspace. RTC does not have to be running. This information is persisted in the sandbox in a .jazz5 directory
You can proceed from here in several different ways: start RTC GUI, connect to RTC and unload the repository workspace from there, then load from commandline.
Or you can load the repository workspace in a different sandbox location. However, that may not nest with existing sandboxes.
Or you can delete the sandbox loaded content including the .jazz5 (given there are no unresolved changes you want to keep) and reload the workspace from commandline. You would have to resynchronize workspace state in the RTC GUI later if you do take option three.
Option two might be iffy because it looks like you initially loaded into your home directory. Loading into /home/jfeldman/sandbox would leave you more options, i.e. another sandbox in /home/jfeldman/sandbox2 etc.
See also RTC Loading Content article.


Arne Bister commented Jun 30 '14, 3:35 p.m.
JAZZ DEVELOPER

Jerry,
could the "already logged in" issue be the same as in this post with lower case / UPPER CASE user ID for login? Cp. also this other post.


Shashikant Padur commented Jun 30 '14, 11:49 p.m.
JAZZ DEVELOPER
You can use scm cli even though the RTC Eclipse client is running. There are couple of things to note:
1) The Eclipse client should be started first before running any of the cli commands.
2) You should be using 'lscm' instead of 'scm'. 'lscm' starts an out of process daemon if one does not exist or uses an existing daemon if available. In the case where the Eclipse client is running the cli will use the Eclipse's daemon.
3) Some of the callbacks to get more input from the user might pop up in the Eclipse client.

The login issue is I believe the one pointed out by Arne. I believe this is solved in 5.0 or the upcoming release. For now you should login using the UPPERCASE or whatever case is actually stored on the server and the subsequent commands should work.

Jerry Feldman commented Jul 01 '14, 8:38 a.m.

The login issue is that my user name is registered on the server with a capitalized name. Changing my script to exactly match the user id registered on the server solved the problem.

I would like to thank both of you for helping.


Jerry Feldman commented Jul 01 '14, 9:17 a.m.

I was able to successfully create and load a new workspace, but it does not show up in my filesystem:
[jfeldman@feldmang ~]$ lscm create workspace -r mysb newWorkspace -s "The stream"
Workspace (1032) "newWorkspace" successfully created
[jfeldman@feldmang ~]$ lscm load newWorkspace -r mysb
Successfully loaded items into the sandbox.


Shashikant Padur commented Jul 01 '14, 9:36 a.m.
JAZZ DEVELOPER

CLI does not work well with empty workspace or even if the workspace has components that does not have any files/folders it will not load the workspace.

The only way it will load isĀ If there are components and if you have used the -i/--include-root option it will load the component names as folders.

showing 5 of 8 show 3 more comments

Your answer


Register or to post your answer.