It's all about the answers!

Ask a question

Adding files to the root and non project folders in scm


Tim Collier (611) | asked Mar 10 '12, 7:29 p.m.
We are moving files from clearcase to RTC SCM, and we have two situations that arent in documentation that we can find.

How do I add files to the "root" of the workspace? The import seems to require that all files be imported into an open project folder.

How do I add folders that arent eclps projects to the workspace (i.e. file system folders)?

Accepted answer


permanent link
Geoffrey Clemm (30.1k33035) | answered Mar 11 '12, 12:41 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In RTC, every version-controlled file has to belong to some component, just as in ClearCase, every version-controlled file has to belong to some VOB. So neither RTC nor ClearCase allows you to put version-controlled files in the root of the workspace (RTC) or view (ClearCase).

WRT Eclipse projects, RTC SCM doesn't care whether or not your files are in Eclipse projects. So in particular, if you use the RTC scm command line to import your files, the issue of Eclipse projects never comes up. But Eclipse does care (the various Eclipse navigators will only show you files in Eclipse projects). So if you want to import your files using the Eclipse, you will have to add a .project file at the root of the file tree you want to import (that causes it to show up in the Eclipse UI. You can then put the tree under source control. But before you complete or deliver the change set, right click over the .project file and select "undo". This takes that .project file out of the change set.

Cheers,
Geoff

We are moving files from clearcase to RTC SCM, and we have two situations that arent in documentation that we can find.

How do I add files to the "root" of the workspace? The import seems to require that all files be imported into an open project folder.

How do I add folders that arent eclps projects to the workspace (i.e. file system folders)?
Ralph Schoon selected this answer as the correct answer

4 other answers



permanent link
Tim Collier (611) | answered Mar 12 '12, 8:54 a.m.
Ok, i guess the difference here is, in clearcase the component name was displayed in the view directory tree, and you could place files directly into the root of the component. In RTC the component is not shown in the workspace directory, so you cant place them there from eclipse.

We will try adding a dummy .project file and see what happens.


Thanks



In RTC, every version-controlled file has to belong to some component, just as in ClearCase, every version-controlled file has to belong to some VOB. So neither RTC nor ClearCase allows you to put version-controlled files in the root of the workspace (RTC) or view (ClearCase).

WRT Eclipse projects, RTC SCM doesn't care whether or not your files are in Eclipse projects. So in particular, if you use the RTC scm command line to import your files, the issue of Eclipse projects never comes up. But Eclipse does care (the various Eclipse navigators will only show you files in Eclipse projects). So if you want to import your files using the Eclipse, you will have to add a .project file at the root of the file tree you want to import (that causes it to show up in the Eclipse UI. You can then put the tree under source control. But before you complete or deliver the change set, right click over the .project file and select "undo". This takes that .project file out of the change set.

Cheers,
Geoff

We are moving files from clearcase to RTC SCM, and we have two situations that arent in documentation that we can find.

How do I add files to the "root" of the workspace? The import seems to require that all files be imported into an open project folder.

How do I add folders that arent eclps projects to the workspace (i.e. file system folders)?

permanent link
Sudhakar Frederick (80113631) | answered Apr 29 '12, 6:37 p.m.
JAZZ DEVELOPER
Hi Geoff
So how to get a new file/folder into a component with the cli (4.0 RC2)?
Here's what I did:

lscm load -r alias myworkspace -t /mysandbox/mydir mycomponent
touch mydir/newfile.txt
mkdir mydir/newdir

now
lscm status
doesn't show any of these additions and I can't check in.

Funny enough if I "Load as.." the workspace/component exactly the same way using Eclipse to /mysandbox/mydir, then go to a terminal and do
touch mydir/newfile.txt
mkdir mydir/newdir

then refreshing Eclipse shows the new file/folder as unresolved changes (or outgoing if auto check-in is enabled)

permanent link
Geoffrey Clemm (30.1k33035) | answered Apr 29 '12, 10:52 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
My knowledge of the command line is limited to what I know from the documentation, so we'll need one of the command line gurus to chime in here for an explanation.

Cheers,
Geoff

Hi Geoff
So how to get a new file/folder into a component with the cli (4.0 RC2)?
Here's what I did:

lscm load -r alias myworkspace -t /mysandbox/mydir mycomponent
touch mydir/newfile.txt
mkdir mydir/newdir

now
lscm status
doesn't show any of these additions and I can't check in.

Funny enough if I "Load as.." the workspace/component exactly the same way using Eclipse to /mysandbox/mydir, then go to a terminal and do
touch mydir/newfile.txt
mkdir mydir/newdir

then refreshing Eclipse shows the new file/folder as unresolved changes (or outgoing if auto check-in is enabled)

-1
permanent link
Venkateswara Rao Desu (91) | answered Jul 22 '14, 12:54 a.m.
edited Jul 22 '14, 1:02 a.m.

 For New file/folder to be added to existing component we have to do a sequence steps

#1) share the file/folder 
#2) Do status check command to see changeset number
#3) Run changeset with comment
#4) Run changeset complete
#5) associate change set to story or task
#6) Run Deliver 
#7) Run status again to check

Below is example of steps


$lscm share <MY_WORK_SPACE> <EXISTING_COMPONENT> <NEW_FOLDER_ADDED>
Password (<MY_USERNAME>< @ https://xyz:9094/jazz/):          
Shared successfully

$lscm status
Password (<MY_USERNAME>< @ https://xyz:9094/jazz/):          
Workspace: (4107) "<MY_WORK_SPACE>" <-> (4108) "<STREAM_ASSOCIATED_TO_WORKSPACE>"
  Component: (4106) "<EXISTING_COMPONENT>"
    Baseline: (4109) 1 "Initial Baseline"
    Outgoing:
      Change sets:
        (4112) *--@  "Share" 21-Jul-2014 06:19 PM


$lscm changeset comment 4112 "Some comment for changeset"
Password (<MY_USERNAME>< @ https://xyz:9094/jazz/):          
 Comment set.

$lscm changeset complete 4112
Password (<MY_USERNAME>< @ https://xyz:9094/jazz/):          
Change set completed.

$lscm changeset associate 4112 <STORY_NUMBER_TO_ASSOCIATE>
Password (<MY_USERNAME>< @ https://xyz:9094/jazz/):          
Link created.

$lscm deliver
Password (<MY_USERNAME>< @ https://xyz:9094/jazz/):          
Delivering changes:
........
....................

Deliver command successfully completed.

$lscm status -C
Password (<MY_USERNAME>< @ https://xyz:9094/jazz/):          

Your answer


Register or 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.