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