It's all about the answers!

Ask a question

What is the proper way to use scm for automated loads from a stream?


Jeffrey Cheng (1133) | asked Oct 02 '13, 9:19 p.m.
edited Oct 03 '13, 12:12 p.m. by Geoffrey Clemm (30.1k33035)
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.

Comments
Joseph Mao commented Oct 03 '13, 1:04 a.m.
JAZZ DEVELOPER

Hi Jeffrey, 


What is the reason you always want a fresh checkout from stream?

In build definition, for Jazz Source control, there is control of Accept options, you can always specify whether or not to accept before loading, and whether or not to build if there are no changes.
 


Jeffrey Cheng commented Oct 03 '13, 12:03 p.m. | edited 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 commented Oct 03 '13, 12:13 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note: I modified the title and text of this question to use the RTC term "load" instead of the non-RTC term "checkout".

One answer



permanent link
Geoffrey Clemm (30.1k33035) | answered Oct 03 '13, 1:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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".

Comments
Jeffrey Cheng commented Oct 03 '13, 12:00 p.m.

 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?

Your answer


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