It's all about the answers!

Ask a question

Regarding Replacing the components from local workspace OR different Stream and it's impact on the resulted change sets

Amit Kumar (19314) | asked Sep 10 '17, 5:47 p.m.

Let's say , I have two streams , Stream A and Stream B , both using same Component C and there are numbers of Developers working on these streams.

Now, Suppose Developer 1 created a baseline of his current Workspace (pointing to Stream A) and named it as "Baseline A1"  and post that accepted all( assuming 10 in numbers) Incoming Change sets into his local Workspace ( from Stream A). Developer 1 has latest code into his local , and same will be recorded in the history of Component C ( right click on Component C --> show --> history), and this will be limited to Developer 1 only. (Let's mark history as 1 ,2, 3... 10) ( just trying to show different history, total 10 here, these are commits history only)

Assume,  a Developer 2 working on Stream B, using same Component C created a Baseline/Snap of his local Workspace (pointing to Stream B) and named it as "Baseline B2". (Let's say it has history like 21,22...25, total 5 )

(Note, both Stream A and Stream B has different commits history).

Now, Below cases are based on the Developer 1 working on Stream A only.

Case 1 - After accepting all( 10) Incoming into local Workspace, Developer 1 wants to revert to the baseline which he created, So, he replaced the Component C baseline with "Baseline A1". (which also means all the new changes sets have been discarded ). So, history will be also reverted ,( means it will come to same which was there before accepting the new change sets ) ( means hisotry 1.2.3....10 will be lost now)

Case 2. , After accepting all Incoming change sets, Developer 1 added the "Baseline B2" into Stream A, which will show "Baseline B2" (of Component C) coming as an "Incoming"  into his local Workpace (pointing to Stream A only ). Once he accepts this "Baseline B2", history of Component C for new changes sets will remain intact, ( Those history 1 ,2, 3... 10 will remain there ) and more history (21,22...25, total 5 ) will come . So here history is not getting lost . Total history will be (1 ,2, 3... 10  and  21,22...25, total 15 )

Sorry for such a huge used case, but I tried to make it less complex by using those simple examples

Now ,could anyone please endorse following with more detailed explanation ( if possible)
1. Replacing the components from Local Workspace Baseline discards the new change sets while Replacing the component from Stream itself( Either by Adding new snapshot/Baseline from other Workspace/stream OR using same stream Snap) do not discard any change sets, even it add the new Change sets coming from that Baseline .

** Please note , in all scenarios, we have assumed the accepting change sets have no code-conflicts and they are being accepted as it is

Accepted answer

permanent link
Geoffrey Clemm (30.1k33035) | answered Sep 11 '17, 4:08 a.m.
There are two distinct operations: "Replace" and "Accept/Deliver".   
- "Replace" of a configuration X of a component in a stream/workspace with another configuration Y of that component effectively discards whatever change sets are currently in configuration X, and replaces them with the change sets of the configuration Y.  It doesn't matter whether  configuration Y is a baseline or is from another workspace/stream, and it doesn't matter whether configuration X is in a workspace or stream ... the semantics of replace is always the same.
- "Accept/Deliver" of configuration Y of a component to a configuration X of that component in a stream/workspace effectively adds all change sets in Y that are not already in configuration X to configuration X (so it is like a "union" operation).  It doesn't matter whether the source configuration is a baseline or is from a stream/workspace, and it doesn't matter whether the target configuration is in a stream or a workspace ... the semantics of accept/deliver is always the same.

Note that there are statements in the question that are ambiguous/unclear.

- When you said "create a baseline of his current workspace", I'm assuming you meant "create a baseline of component C in his repository workspace" (one can create a snapshot of a workspace, not a baseline).
- What does "post that accepted all Incoming Change sets into his local Workspace" mean?
I assume by "his local Workspace", you just meant "his workspace" (if not, please explain).
I also assume that by "post that accepted", you just mean "accepted" (if not, please explain).
I am assuming that the 10 change sets are in addition to the change sets of Component C that were already in the workspace (in which case, the history after the accept is something like <32, 33, 34, 1, 2, 3, ..., 9, 10>).
Just for interest's sake, why mention Developer B and Stream B, if they are not relevant to your questions?

Amit Kumar selected this answer as the correct answer

Amit Kumar commented Feb 01 '18, 5:45 p.m.

1 . Yes, I meant "create a baseline of component C in his repository workspace". Sorry for the confusion.

2. Yes. "his workspace".

3. Yes, "accepted"

Just wanted to show that Component C has different history (as Different Developer committed) , and created a baseline B2, which I used for Developer A. Just was trying to  simplifying the used case,

Thanks for your reply. I got my answer :)

Your answer

Register or to post your answer.