Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

DSCM How to identify if a Changeset is a replica?

 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.

1

0 votes


Accepted answer

Permanent link
Diogo,

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 https://jazz.net/library/article/1418 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,
Michael
David Lafreniere selected this answer as the correct answer

1 vote

Comments

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?

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,036
× 51

Question asked: Nov 17 '15, 3:14 a.m.

Question was seen: 3,359 times

Last updated: Oct 12 '17, 1:04 p.m.

Confirmation Cancel Confirm