Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to add a file in a sub-directory with lscm?

First I load a file from my workspace in a sub directory while I am in a directory that is my sandbox:
lscm load -r my_repository -t root/subdir  my_workspace  my_component/root/subdir/file1
Now I have the file (relative to my sandbox where I executed the command) in: root/subdir/file1
Now I create a new file in that subdir:
echo "a test" > root/subdir/new_file
If I tried to checkin the new_file, 'lscm checkin' tells me it isn't shared.  So I tried to share it:
lscm share -r my_repository --verbose  --remotePath root/subdir my_workspace my_component root/subdir/new_file
But lscm prints out:
Cannot share projects under "<my path to sandbox>/root/subdir" - ancestor is shared: "<my path to sandbox>". Try 'lscm help share' for more information.

So how do I checkin the new_file to my workspace into its correct place in root/subdir?

Regards, Markus.

0 votes


Accepted answer

Permanent link
In your case RTC only tracks the file under root/subdir and not the directory itself. To track the directory you have to load at the directory level: lscm load -r my_repository -t root/subdir  my_workspace  my_component/root/subdir
After which adding files under root/subdir will be tracked.
Markus Selve selected this answer as the correct answer

0 votes

Comments

Thanks a lot for your answer! 

In the future it would be nice, if you could explain a bit more what steps one actually has to do to achieve the goal.  You are obviously an experienced lscm developper, but I'm a new-by user.  For you everything is explained with 'adding files will be tracked'.  After trying around a bit I found out that this means, I do not have to use 'lscm share' at all, after I loaded the whole sub directory.  It would have been helpful, if you had added sentences like this at the end of your answer:
- just add the file in the sandbox
- don't use 'lscm share' at all
- proceed as with a changed file:
  - create a changeset
  - checkin to workspace

 Acknowledged. Thanks.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,024

Question asked: Feb 25 '15, 11:18 a.m.

Question was seen: 3,069 times

Last updated: Feb 26 '15, 3:31 a.m.

Confirmation Cancel Confirm