[closed] Changesets - Find/Deliver programatically [Plain Java API]
Hi All,
I have changesets shared across multiple streams. I need to find whether a changeset exists in the Repository and deliver the existing across streams. If it doesnt exist, create a new changeset. 1. How to get the id of a changeset and use it in a find query? 2. How to deliver selective changesets from the repository to a particular stream Please advise. Thanks. |
The question has been closed for the following reason: "The question is answered, right answer was accepted" by valli Jun 08 '15, 8:12 a.m.
3 answers
I think you would be better off to use the commandline. the API for SCM is not simple. This is an object oriented system.
Comments
VK L
commented Jun 05 '15, 8:07 a.m.
Hi Sam, I am trying to develop a Java utility for migrating SCM Code-versions into RTC. I am getting the uuid after a changeset creation and using it for a later check.
sam detweiler
commented Jun 05 '15, 8:13 a.m.
Sorry, I don't know the SCM apis enough to help here.
VK L
commented Jun 05 '15, 10:18 a.m.
Thanks Sam. Using SCM Command-line utility - Is it possible to check-in/deliver 2 versions of same file tagged to same changeset?
sam detweiler
commented Jun 05 '15, 10:28 a.m.
RTC ONLY has changesets.. so, when you checking and deliver, it is a changeset that is provided.. the system does not store 'files'. even at the beginning, its a changset from nothing to everything.
VK L
commented Jun 05 '15, 10:47 a.m.
When i checkin file1 under changesetA -> I assume that its Version1 of File1.
sam detweiler
commented Jun 05 '15, 11:05 a.m.
sorry, don't understand..
Geoffrey Clemm
commented Jun 06 '15, 12:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
WRT last comment by VK-L, yes, until you "complete" a change set, you can checkin the same file as many times as you want to the same change set, and yes, this will create a new version of that file in the repository for each checkin. By default, when you look at the content of a change set in the GUI or the command line, it will give you the content of the last version of each file in that change set, but you can ask the Eclipse GUI to show you all the versions of that file that you checked in. I'm not sure if the command line or the other GUI's let you do this.
VK L
commented Jun 06 '15, 3:19 p.m.
Thanks Geoff. Actually i checked-in 1 file multiple times with the same changeset, it looks like its committing the changes onto the same version. I used the below API command for file checkin to the changeset:
VK L
commented Jun 06 '15, 3:28 p.m.
Looks like Changeset deliver only creates the actual file version and not the commit. So all checkins of 1 file are combined to a single version and delivered when changeset is delivered.
showing 5 of 9
show 4 more comments
|
Thanks Geoff. Actually i checked-in 1 file multiple times with the same changeset, it looks like its committing the changes onto the same version. I used the below API command for file checkin to the changeset:
fWorkspace.commit(fChangeSet,Collections.singletonList(fWorkspace.configurationOpFactory() .save(fileWorkingCopy)), fMonitor); When i view the File-history or at the changeset level, i see only 1 version of it, even though i have done 2 commit-actions with 2 different contents. Comments
VK L
commented Jun 06 '15, 3:51 p.m.
Looks like Changeset deliver only creates the actual file version and not the commit. So all checkins of 1 file are combined to a single version and delivered when changeset is delivered.
Geoffrey Clemm
commented Jun 06 '15, 4:58 p.m.
| edited Jun 06 '15, 4:59 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
What did you use to view the file history? Did you use the Eclipse client, and in the history view on the file, did you select "Show Check-In History" in the View menu of the History view? (It is off by default).
VK L
commented Jun 06 '15, 5:20 p.m.
Actually, i check-in FileA multiple times from repository-workspace to the changeset & the changeset is not delivered to the stream yet. I right-click on the file in wrkspace of Eclipse GUI and "Show History" - it shows only 1 version tagged to this Changeset and content is latest..
1
Geoffrey Clemm
commented Jun 06 '15, 5:57 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I predict that you neglected to select "Show Check-In History" in the View menu of the History view.
VK L
commented Jun 07 '15, 3:55 a.m.
I am on 4.0.1 version and i dont see a View menu in History view.Please advise.
VK L
commented Jun 07 '15, 8:52 a.m.
Thanks Geoff - I can see the checkin-history with the different versions. Since there are 2 different set of version-views -> 1 based on changeset and other at checkin level, are the different checkin-versions available for a load and modify by users in their workspace?
Geoffrey Clemm
commented Jun 07 '15, 10:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Note: There is one version tree, but two different views of it with different levels of detail (one that only shows "end versions in a change set" and the other that shows "all versions in a change set"). There must be Java API to access the finer granularity (i.e. at the checkin level), but we'd need someone familiar with the Java API to provide a pointer on where to find it. Note that you can retrieve the content of those checkin versions from the Eclipse UI ... I don't know if any of the other UI's provide access to them.
showing 5 of 7
show 2 more comments
|
Ralph Schoon (63.5k●3●36●46)
| answered Jun 08 '15, 3:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I have explained the API to some extend in Extracting an Archive Into Jazz SCM Using the Plain Java Client Libraries
|