I have been working with Plastic SCM for a while, but only recently discovered a flaw in my mental model of how change sets in branches work.
Consider this simple scenario:
- Assume I have a branch A with a file
foo.txt
- I branch latest change set of A to a child branch B.
- I switch workspace to B and checkout
foo.txt
and make some changes, which I check in. - I branch the last change set of B to C.
- I attempt to merge C to A
In short: A branch to B, change foo.txt
in B, branch to C, merge C to A.
To my surprise the changes made to foo.txt
in the B intermediate branch was ignored, because I didn't make changes to foo.txt
in C. So after the merge from C to A, A contains the original foo.txt before branching out B.
I would have expected my intermediate changes in B to be merged when performing a full merge from C to A, but obviously my understanding of change sets in branches have been wrong. This has caused quite some clean up from time to time when changes mysteriously were lost.
Does Git and Mercurial or other DVCS behave similarly?
Edit:
Plastic version <= 3 merges only changes in the source branch, not intermediate branches.
Plastic >= 4 merges the whole branch path.