It's all about the answers!

Ask a question

DSCM How to identify if a Changeset is a replica?

diogo cruz (21512) | asked Nov 17 '15, 3:14 a.m.
edited Oct 12 '17, 1:04 p.m. by David Lafreniere (4.5k7)

 Hi Everyone,

Is there any way to differentiate between an "original changeset" and a "replicated changeset"?
I´m interested in the answer both for GUI and API.

I know already that when one does distributed delivery to another repository, both changesets uuids keeps the original value. 
For my use cases it´s really important to know if a component (baslienes and changesets) comes from another repository....

Thank you.

Accepted answer

permanent link
Michael Valenta (3.6k3) | answered Nov 17 '15, 8:23 a.m.

The only way I can think of to do this would be to look at the version identifiers for the file states in the change sets. File states have a short identifier, which is just an integer, and a long identifier, that is of the form shortId@repoUUID. You can get the version identifiers for file states using the API IWorkspaceManager#getVersionableIdentifiers. The article talks about using version identifiers in a distributed environment.

One final note. It is possible that the end state in the change set came from another repo (e.g. if a resolve with proposed was performed) so you may need to check multiple states in the change set.

Hope this helps,
David Lafreniere selected this answer as the correct answer

diogo cruz commented Nov 17 '15, 8:38 a.m. | edited Jan 10 '16, 1:12 p.m.

For a Changeset based SCM system this answer is really weird.
Doesn´t the changeset follow the same standard? I mean, part of the UUID coming from the repo uuid?

Michael Valenta commented Nov 17 '15, 9:00 a.m. | edited Jan 10 '16, 1:13 p.m.

No, the change set UUID determination uses the UUID generator provided by the EMF framework. The decision to use this approach predates the introduction of distributed SCM. Version identifiers were introduced after distributed SCM so have the long form which includes the repo UUID.

Your answer

Register or to post your answer.