It's all about the answers!

Ask a question

What happens when I deliver change set to a component at the same time creating baseline for that component

Halil BAHADIR (3322020) | asked Jul 09 '12, 7:18 a.m.
The scenario is,

I've started to create baseline for the component, when it is continuing to create, I've checked-in the change set to that component

or similar case,

I've started to create snapshot for the stream, when it is continuing to create, I've delivered the change set to the component that is creating baseline in that snapshot process..

What is the situation at that case?


Ralph Schoon commented Jul 09 '12, 7:47 a.m. | edited Jul 09 '12, 10:02 a.m.

Halil, I am not sure I understand the question. There is also too few information in your post to answer. You can create Baselines and Snapshots on Streams or on repository workspaces.

If you create a snapshot or baseline at a repository workspace, all change sets that are outgoing for each component will be completed and included in the baseline (and snapshot, because that creates a baseline if necessary). It is basically creating a baseline of the state of our repository workspace on the server as it is right now.

If you have unresolved changes you get a warning. If you continue to create the baseline the unresolved changes are not part of it.

Halil BAHADIR commented Jul 09 '12, 8:29 a.m. | edited Jul 09 '12, 10:02 a.m.

I don't know, can this scenario happen or if so frequency?

I will write more to be clear and simple..

I've a  Stream "StrA" which includes "CompA" and "CompB". As a developer I've also created repository workspace following StrA and loaded both components to my local. I developed some code and checked in. Then In my repo workspace, I've outgoing change sets for CompA waiting to go..

At that time I click to create snapshot for strA. Let's say It takes long creating snapshot process (I mean clicking to create to finishing all baselines takes 3 min.). When creating baseline process continues I've decided to deliver the outgoing change set to the stream's CompA.

So the question is:

* What happens at that time? For example,  Deliver process waits the streams snapshot creation process than deliver starts. or snapshot process stops, deliver occurs than snapshot creation restarts..

Our customer ask this because they want to automate the baseline creation process and want to mitigate the risk for conflicting deliver and baseline creation process and wants to do a synchronization.

Ralph Schoon commented Jul 09 '12, 8:43 a.m. | edited Jul 09 '12, 10:03 a.m.

Hi Halil,

I would suggest to use a repository workspace to create the baselines and snapshots. In this case you are in total control and there is no racing condition that can happen. This is as far as I understand done for example by the build engine. While the baseline/snapshot is created, the state of your repository workspace represents what will be included in the baseline. It can not change during the baseline operation. The isolation the repository workspace provides makes sure nothing can happen to the files in the baseline. This can also be automated using the SCM tools.

For streams, I would assume that changes that occur during the snapshot/baseline process can't get into the baseline. However I think you can't be sure what the stream contains when you create the baseline.

Accepted answer

permanent link
Geoffrey Clemm (30.1k33035) | answered Jul 09 '12, 10:19 a.m.
edited Jul 09 '12, 10:49 a.m.
When you issue a "baseline/snapshot" request and a "deliver change set" request against a given component in a given stream, one of those will always be executed atomically before the other ... so either the baseline/snapshot will contain the complete change set (the "deliver" operation was executed first) or the baseline/snapshot will contain none of the change set (the "baseline/snapshot" operation was executed first).  So in particular, once a snapshot operation on a stream starts, a "deliver change set" operation against a component of that stream will be blocked until the snapshot operation completes.

Halil BAHADIR selected this answer as the correct answer

Ralph Schoon commented Jul 09 '12, 10:31 a.m.

Thanks Geoff, I wasn't sure about the implication on working on a stream where i have no control.

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.