What is the proper way to use scm for automated loads from a stream?
I would like to do a fresh load from a stream for each of our daily/weekly builds. Do I always need to "accept" into a workspace first and then load it into the sandbox?
The following is from the documentation on the accept command:
The scm accept subcommand accepts change sets into a repository workspace. If you run it in a local workspace, the accepted change sets are also loaded into the local workspace.
When I run the scm accept command however, I don't see any files in the sandbox (it said "Workspace unchanged"). Is there a way to accept AND load files in 1 operation. I essentially want to do something similar to an "svn export" or "svn co" if that helps clarify what I'm asking.
One answer
First note that this must be documentation from a pre-4.0.4 release ... since we don't use the term "local workspace" anymore ... we use the term "sandbox". Note that the documentation says that the accepted change sets are automatically loaded *if you run it in a local workspace [i.e., sandbox]*. In other words, if you have the repository workspace loaded, then accepts into that repository workspace will automatically be loaded (because RTC always tries to keep a local workspace and its sandbox in sync).
So you first need to load the repository workspace, and then newly accepted changes will be automatically loaded.
And this does require two commands ... both a "load" command and an "accept" command (unless you happen to know that the repository workspace is up-to-date WRT the stream, in which case a "load" is sufficient).
Note: In RTC we use the term "load" to refer to the process of loading files from the repository workspace to the sandbox, not "check out".
So you first need to load the repository workspace, and then newly accepted changes will be automatically loaded.
And this does require two commands ... both a "load" command and an "accept" command (unless you happen to know that the repository workspace is up-to-date WRT the stream, in which case a "load" is sufficient).
Note: In RTC we use the term "load" to refer to the process of loading files from the repository workspace to the sandbox, not "check out".
Comments
Thanks Geoff. From an automated perspective, is there a command or some way to tell if a workspace has already been loaded? Since I do not know at the time of starting a build, my workaround right now is to do 1) Accept all changes to the workspace followed by 2) Force load.
scm accept -r jazz -t MY_WORKSPACE
scm load MY_WORKSPACE--force -r jazz
I added the force option just to make sure I have the latest code placed into the sandbox. Would you recommend this approach?
Comments
Joseph Mao
JAZZ DEVELOPER Oct 03 '13, 1:04 a.m.Hi Jeffrey,
Jeffrey Cheng
Oct 03 '13, 12:13 p.m.I suppose it doesn't always have to be a fresh load, but I cannot always guarantee that whatever code is in the sandbox will be the latest or has not been modified. In our current process (using a different version control system) we are accustomed to performing a fresh load upon each build.
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Oct 03 '13, 12:13 p.m.Note: I modified the title and text of this question to use the RTC term "load" instead of the non-RTC term "checkout".