How to create remote change sets(with external link) ?
Hi,
I want to create a remote change set, like below:
After click the change set link, you can see details of change at Github:
Above is how jazzHub track changes to your Github source code.
This change set is a bit different:
1.Seems it doesn't belong to an existing component
2.It can refer to an external link , not only an existing workItem in RTC.
Now I can create change sets using following code:
IChangeSetHandle changeSet = workspace.createChangeSet (component, "comment", true, null);
IFileSystemWorkItemManager itemManager = (IFileSystemWorkItemManager) repo
.getClientLibrary(IFileSystemWorkItemManager.class);
List<ILink> link = itemManager.createLink(wsHandle, changeSet,
new IWorkItemHandle[] { (IWorkItemHandle)workItem.getItemHandle()}, null);
But the change sets I created must belong to an existing component, and it must to an existing workItem.
How to create remote change sets using plain java library or REST API ?
Thanks!
Accepted answer
Remote change set links are created when linking a change set on one server to a work item on another server.
To create the link, use IWorkspaceManager#createLinks(). These are OSLC links and it's how distributed SCM works with work item linking. However, it is marked as experimental so be prepared if it is deprecated.
To create the link, use IWorkspaceManager#createLinks(). These are OSLC links and it's how distributed SCM works with work item linking. However, it is marked as experimental so be prepared if it is deprecated.
One other answer
If you are interested in the Plain Java Client Libraries, you can start your endeavor here: http://rsjazz.wordpress.com/2013/10/15/extracting-an-archive-into-jazz-scm-using-the-plain-java-client-libraries/
The post links to several other posts around these topics. But it is only for Jazz SCM.
If you are looking for creating work items, start here: https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation
To get started on these topics, try to search here:https://rsjazz.wordpress.com/ . I have several posts around the API. This is a good starting point if you are new to it: https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/
Please note, the posts are interconnected and you should be able to search the log either with the built in search or using search engines.
The post links to several other posts around these topics. But it is only for Jazz SCM.
If you are looking for creating work items, start here: https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation
To get started on these topics, try to search here:https://rsjazz.wordpress.com/ . I have several posts around the API. This is a good starting point if you are new to it: https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/
Please note, the posts are interconnected and you should be able to search the log either with the built in search or using search engines.
Comments
Lauren Hayward Schaefer
JAZZ DEVELOPER Nov 12 '13, 7:14 a.m.Hi,
I have a few follow up questions for you:
da zhang
Nov 12 '13, 9:36 a.m.Thanks for your reply!
Lauren Hayward Schaefer
JAZZ DEVELOPER Nov 12 '13, 10:36 a.m.I'm not familiar with any Gitorious integrations. I know that to setup the JazzHub integration with GitHub, we had to setup the Git Adapter on our server (https://jazz.net/library/article/854/). I'm not sure if the Git Adapter would work with Gitorious. Hopefully, someone else can point you in the right direction.
FYI @ryehle @cjkyroua
da zhang
Nov 13 '13, 2:33 a.m.Thanks!