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

RTC-6.0: Read a file from RTC source control using RTC API.

I have a file in Stream-->Component-->Folder-->abc.xml. i want to read the content of that file using API. how can i do this? Also i would be even better if i am able to download this file on my local machine.

0 votes



3 answers

Permanent link


Please be aware, that asking API questions is bare luck if someone has an example
Please consider searching the internet as well, before you ask.

0 votes

Comments

I found it was ANOTHER person that asked the same question that I answered recently.


Permanent link
RTC doesn't store 'files' it stores changes.  and then you get an assembled result of all the changes up to the version you ask for.

these are content objects.

0 votes

Comments

Note that how the content of a file is stored in the database is an implementation detail that the user and script writer can ignore.   They would retrieve the content of a file, and they do not need to be aware of how that content is assembled form what is stored in the database.  For folks interested in the implementation details, also note that some files are stored in the database in a compressed format, rather than a delta format.

right, don't be concerned with the implementation of storage. use the content objects and methods to get the data.


Permanent link
Hi Naveen,

Retrieving the file contents can be done via the CLI as a kind of API with some commands that rarely change between releases.

The CLI is not capable of downloading directly from a stream, but it will load a repository workspace that flows with the stream.

# create a repository workspace using the CLI (if you don't already have one)
lscm create workspace -r <serveruri> -s <yourstreamname> <repositoryworkspacename>

# load repository workspace (in an empty directory)
lscm load -r <serveruri> <repositoryworkspacename>

# accept any new changes from the stream to make sure that we are up-to-date
lscm accept

Now, folder/abc.xml should have the latest contents from the stream.

I hope that this helps,
Chris

0 votes

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
× 10,951

Question asked: Oct 14 '15, 8:24 a.m.

Question was seen: 3,750 times

Last updated: Oct 20 '15, 2:56 p.m.

Confirmation Cancel Confirm