How to create remote change sets(with external link) ?
![]()
da zhang (3●1●1)
| asked Nov 11 '13, 11:54 p.m.
retagged Dec 16 '13, 5:26 p.m. by David Lafreniere (4.8k●7)
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. da zhang selected this answer as the correct answer
|
One other answer
![]()
Ralph Schoon (62.7k●3●36●43)
| answered Nov 13 '13, 3:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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. |
Comments
Hi,
I have a few follow up questions for you:
Thanks for your reply!
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
Thanks!