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

Creating a baseline programmatically

Is it possible to programmatically (via Java API or via scm command line) create a component baseline when a delivery is completed?
This function should work this way:
- verify whether each component has changed since the last baseline
- create a baseline on each modified component
Doing this is easy, for example, in ClearCase, but I'm still a newbie in RTC...

1

0 votes


Accepted answer

Permanent link
Yes. A snapshot in RTC is also essentially a composite baseline (the implementation term is BaselineSet). Baselines will be created for each component, unless they're already at a baseline level.

This is actually configurable in the API, but the UI and SCM CLI always create a new baseline if needed.

The API is on interface com.ibm.team.scm.client.IWorkspaceConnection:

public IBaselineSetHandle createBaselineSet(Collection excludedComponents, String name,
String comment, boolean createNewBaselines, IProgressMonitor monitor) throws TeamRepositoryException;
Luca Martinucci selected this answer as the correct answer

0 votes


2 other answers

Permanent link
Yes, you may use the SCM CLI to create a snapshot on the target workspace/stream (or source workspace). It will create baselines for any components that aren't already at a baseline.


./scm.sh help create snapshot
Help on create snapshot
Create a new snapshot associated with the workspace or stream. The snapshot will create baselines for itself if necessary.

Aliases: ss

Usage: scm create snapshot [options] <workspace>
workspace - Workspace or stream associated with the snapshot (name[@repo], alias, uuid[@repo]).

Options:
--certificate arg - The file containing the user's login certificate.
--smartCard - Use the connected smart card for authentication.
-d [--description] arg - Description for the snapshot.
-n [--name] arg - Name for the snapshot. If omitted, the workspace's name will be used.
-P [--password] arg - Password for repository.
-r [--repository-uri] arg - URI specifying the location of repository.
-u [--username] arg - Username for repository.

1 vote


Permanent link
Yes, you may use the SCM CLI to create a snapshot on the target workspace/stream (or source workspace). It will create baselines for any components that aren't already at a baseline.


I think snapshot is something like "composite baseline" in ClearCase. Question:

1. In CC, when we create a new baseline in a stream has multiple components, it creates a so called composite baseline in the stream. Underline it will create a new baseline on any component has new changes. Will snapshot do the same?

Thanks
Jirong

0 votes

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
× 10,941

Question asked: Jun 09 '11, 6:23 a.m.

Question was seen: 7,439 times

Last updated: Jun 09 '11, 6:23 a.m.

Confirmation Cancel Confirm