RTC-6.0: Read a file from RTC source control using RTC API.
3 answers
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.
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.
these are content objects.
Comments
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
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