It's all about the answers!

Ask a question

How to Export a Component?

William Rathbone (811) | asked Feb 26 '15, 11:23 a.m.
edited Feb 27 '15, 1:43 a.m. by Geoffrey Clemm (30.1k33035)

Very simple requirement but I'm struggling to find the answer within RTC.

How can I simply export the contents of a component to a location outside of a sandbox / workspace i.e. the equivalent of an svn export command.

I understand that then the files will be out of RTC control but that's exactly what I want, just a simple copy of the files with which I can do what I want.

I'm using the scm CLI on Linux

Accepted answer

permanent link
Shashikant Padur (4.2k27) | answered Feb 26 '15, 10:13 p.m.
edited Feb 26 '15, 10:35 p.m.
Once you have loaded the workspace to a sandbox you can run 'lscm workspace unload' or 'lscm unload -w <workspace>' in post 4.0.5 clients. This will disconnect the loaded workspace in the sandbox so that it will not be tracked by RTC. Note that this will not delete the sandbox contents and the .jazz5 directory will still remain. To delete the sandbox contents you need to pass the -D/--delete option to the unload subcommand.
William Rathbone selected this answer as the correct answer

William Rathbone commented Feb 27 '15, 4:48 a.m.

Thanks Sha, still a pain that you have to go via a workspace I was hoping you could just get a copy straight from the stream but it appears not.

Out of interest what does the unload command actually do? you say disconnect the workspace in the sandbox but what does that mean? does it just put some flag into the .jazz5 directory saying the directory is no longer under RTC control?

Shashikant Padur commented Feb 27 '15, 5:02 a.m. | edited Feb 27 '15, 5:02 a.m.

Yes, it would update some info so that RTC knows not to track the workspace anymore. Note: The sandbox could still be valid as you might have loaded other workspaces to the same sandbox location.

There is an enhancement request open for loading from a stream:

3 other answers

permanent link
Jeff Care (1.0k3733) | answered Feb 26 '15, 11:26 a.m.
 My svn-foo is very rusty, but wouldn't this just be the same as doing a load?

scm load -r <your repo> <your workspace> <your component>

William Rathbone commented Feb 26 '15, 11:35 a.m.

No that's loading a workspace which will be under RTC control. I just want a simple copy of the files contained within the component from the stream without the RTC 'wrap'


Jeff Care commented Feb 26 '15, 11:52 a.m.

 So just delete the .jazz5 & .workspace directories.

William Rathbone commented Feb 26 '15, 12:36 p.m.

I shouldn't have to start playing with RTCs hidden files to do this. As previously what I'm looking for is the RTC equivalent of the difference between the svn checkout command (which results in a svn versioned directory with .svn hidden folder etc.) and the svn export command which just gives you a copy of the files.

This is very basic and useful functionality present in the likes of CVS, SVN etc. which I though would be provided by all SCM tools ......

Jeff Care commented Feb 26 '15, 2:04 p.m.

I don't disagree with you but to my knowledge there's no direct equivalent in RTC for svn export. Maybe one of the RTC developers will chime in & correct me if I'm wrong.

As best I know, your best alternative is to load your workspace, then delete the .jazz5 directory in the sandbox root. It's only one directory: the metadata is not dispersed throughout the extracted source tree.

Kevin Ramer commented Feb 26 '15, 4:21 p.m.

On another bent, if on just does scm load, and never touches it with RTC ( whether via scm or RTC ) ....  

That's the approach taken by our build shop.  1) accept changes into the workspace 2) fetch the workspace 3) build.   Never are items delivered back to RTC from such.

My $0.02

include <stddisclaimer.h>

permanent link
Ralph Schoon (62.7k33643) | answered Feb 27 '15, 5:00 a.m.
Here is a potential solution for automating it:
Currently there is no way to do this without having a repository workspace. There is a request to have the capability to download from the Web UI, but that is not yet implemented as far as I know.
If you loaded a repository workspace and you are in Eclipse, you can also basically export the projects from there.

permanent link
William Rathbone (811) | answered Mar 02 '15, 4:22 a.m.

Ok thanks all, I think!

I'm using scm command line interface on Liunx so Eclipse based options don't work for me.

I suggest this is added to the RTC feature wish list ... and not just for the Web UI. 

Your answer

Register or to post your answer.