It's all about the answers!

Ask a question

How to deliver change-sets programmatically?


Daniele Menon (2643) | asked Feb 02 '10, 6:01 a.m.
Hi,

I need to deliver some change sets into a stream programmatically on the server side. How is it possible? I prefer do not deliver baselines, but only change sets.

I know the method IScmService.deliverCombined. It requires one baseline per component to make the bases of the corresponding components in the target workspace. However it is specified that "the lack of an entry for a given component indicates that the target workspace's basis for that component should remain unchanged". What does it mean? If I put a null value for a given component I obtain NullPointerException. How can I do not use baselines?

Thanks
Daniele

5 answers



permanent link
Jean-Michel Lemieux (2.5k11) | answered Feb 09 '10, 8:55 a.m.
JAZZ DEVELOPER
Null isn't accepted, you can provide an empty list of baselines if you only want to deliver change sets.
Cheers,
Jean-Michel

permanent link
Daniele Menon (2643) | answered Feb 15 '10, 12:04 p.m.
Hi Jean-Michel,

however, how can I initialize an empty list of baselines?

Thanks,
Daniele

permanent link
Daniele Menon (2643) | answered Feb 16 '10, 5:32 a.m.
I found it:

IBaselineHandle bsHan[] = new IBaselineHandle[0];	


It works!

permanent link
Danil Suits (81177) | answered Aug 17 '10, 2:59 p.m.
Prior Art:
http://jazz.net/forums/viewtopic.php?t=8955

I'm evaluating the possibility of using the Java API to act as a bridge between our continuous integration server and a build workspace.

And I'm trying to make sure I understand the implications of NOT accepting baselines when I accept change sets.

Scenario - we create a dedicated build workspace which accepts changes from a developers repository workspace. Each time the CI-server polls for changes, we generate an IChangeHistorySyncReport. If new change sets are available, we scan the list of changes, removing any active changesets we find, and then accept the list into the build workspace, passing a Collections.EMPTY_LIST as the set of baselins.

We then create a new baseline for the build workspace, so that the ci-server can find its way back to this version of the source.

When I look at the build workspace in the Eclipse client, the Pending Changes view show that my Incoming Changes are now limited to the active change sets, and some baselines.

Is there any reason I should care about the baselines? It seems to me that I get no advantage from delivering baselines from the developer's workspace to the build workspace, nor is their advantage to going the other way.

permanent link
Geoffrey Clemm (30.0k23035) | answered Aug 17 '10, 10:51 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I agree that there are many situations where you do not want to deliver
baselines. There are several work items around this situation, most of
them referenced by work item 85458 "Baselines should be only delivered
by an explicit "promote" operation.". Please feel free to add your
comments/support to this (or the related work items). I personally am
in favor of 85458, since this would align the behavior of baselines with
the behavior of snapshots (which are just composite baselines).

Cheers,
Geoff

On 8/17/2010 3:07 PM, Danil wrote:
Prior Art:
http://jazz.net/forums/viewtopic.php?t=8955

I'm evaluating the possibility of using the Java API to act as a
bridge between our continuous integration server and a build
workspace.

And I'm trying to make sure I understand the implications of NOT
accepting baselines when I accept change sets.

Scenario - we create a dedicated build workspace which accepts changes
from a developers repository workspace. Each time the CI-server polls
for changes, we generate an IChangeHistorySyncReport. If new change
sets are available, we scan the list of changes, removing any active
changesets we find, and then accept the list into the build
workspace, passing a Collections.EMPTY_LIST as the set of baselins.

We then create a new baseline for the build workspace, so that the
ci-server can find its way back to this version of the source.

When I look at the build workspace in the Eclipse client, the Pending
Changes view show that my Incoming Changes are now limited to the
active change sets, and some baselines.

Is there any reason I should care about the baselines? It seems to me
that I get no advantage from delivering baselines from the developer's
workspace to the build workspace, nor is their advantage to going the
other way.

Your answer


Register or to post your answer.