ICCBranch interface

Description

The ICCBranch interface represents the Rational® ClearCase® branch object.

Within Rational ClearCase source control, the versions of a particular file or directory element are organized into a version tree. Every element has a \main branch. Users can develop in parallel on a particular source-controlled file or directory by creating from any existing branch a new branch that represents a new stream of changes to the underlying file system object.

Inheritance

ICCBranch inherits from ICCVOBObject, which inherits from IDisppatch. ICCVOBObject interface

Properties and related methods

Master and SetMaster

Gets the master replica for this branch

Sets the master replica for this branch

Read-only properties

BranchPointVersion

Gets the version from which this branch sprouts

Element

Gets the element of this branch

LatestVersion

Gets the latest version on this branch

Lock

Gets the lock on this branch

Path (default property)

Gets the path of this branch

Type

Gets the branch type of this branch

Versions

Gets a collection of all versions along this branch

VOB

Gets the VOB that contains this branch

Methods

CreateLock

Locks this branch

Remove

Removes the branch from its branch point version

RequestMaster

Requests the master replica for this branch be set to the current VOB replica

Examples

Creation

You can get a CCBranch object from the following interfaces:

BranchPointVersion

Gets the version from which this branch sprouts

Category

Read-only property

VB syntax

Property BranchPointVersion As CCVersion

Visual C++ syntax

ICCVersionPtr GetBranchPointVersion();

Remarks

Note that the \main branch has no branch point version; attempting to get this property for \main results in an error.

Member of: ICCBranch interface

CreateLock

Locks this branch

Category

Method

VB syntax

Sub CreateLock([ Comment As String = "" ], [ Obsolete As Boolean = False ], [ ExemptUsersStringArray As Variant ])

Visual C++ syntax

HRESULT CreateLock(
     _bstr_t Comment,
     VARIANT_BOOL Obsolete,
     const _variant_t& ExemptUsersStringArray = vtMissing);
Parameter
Description
Comment
Optional in Visual Basic. A comment to associate with the history record for this CreateLock operation.
Obsolete
Optional in Visual Basic. True to make the locked branch obsolete in addition to locked (like cleartool lock -obsolete); False to lock the branch without making it obsolete.
ExemptUsersStringArray
Optional. Variant array of String values containing the names of users exempted from the lock being created.

See also

Lock

Member of: ICCBranch interface

Element

Gets the element of this branch

Category

Read-only property

VB syntax

Property Element As CCElement

Visual C++ syntax

ICCElementPtr GetElement();

Member of: ICCBranch interface

LatestVersion

Gets the latest version on this branch

Category

Read-only property

VB syntax

Property LatestVersion As CCVersion

Visual C++ syntax

ICCVersionPtr GetLatestVersion();

Member of: ICCBranch interface

Lock

Gets the lock on this branch

Category

Read-only property

VB syntax

Property Lock As CCLock

Visual C++ syntax

ICCLockPtr GetLock();

See also

CreateLock

Member of: ICCBranch interface

Master

Gets the master replica for this branch

Category

Read-only property

VB syntax

Property Master As String

Visual C++ syntax

_bstr_t GetMaster();

Path

Gets the path of this branch

Category

Read-only property

VB syntax

Property Path As String

Visual C++ syntax

_bstr_t GetPath();

Member of: ICCBranch interface

Remove

Removes the branch from its branch point version

Category

Method

VB syntax

Sub Remove([ Comment As String = "" ])

Visual C++ syntax

HRESULT Remove(_bstr_t Comment);
Parameter
Description
Comment
Optional in Visual Basic. A comment to associate with the history record for this Remove operation.

Member of: ICCBranch interface

RequestMaster

Requests the master replica for this branch be set to the current VOB replica

Category

Method

VB syntax

Sub RequestMaster([ Comment As String = "" ])

Visual C++ syntax

HRESULT RequestMaster(_bstr_t Comment);
Parameter
Description
Comment
Optional in Visual Basic. A comment to associate with the history record for this RequestMaster operation.

Remarks

Access rights in the environment must be configured properly for a RequestMaster call to succeed. Even when RequestMaster succeeds, mastership for the branch has not been transferred to your local replica. See the reqmaster reference page in the IBM Rational ClearCase Command Reference for more information.

SetMaster

Sets the master replica for this branch

Category

Method

VB syntax

Sub SetMaster(Replica As String, [ Comment As String = "" ])

Visual C++ syntax

HRESULT SetMaster(
     _bstr_t Replica,
     _bstr_t Comment);
Parameter
Description
Replica
Name of the replica to which mastership of the branch is being transferred. A null or empty Replica denotes the master of the corresponding branch type.
Comment
Optional in Visual Basic. A comment to associate with the history record for this SetMaster operation.

Type

Gets the branch type of this branch

Category

Read-only property

VB syntax

Property Type As CCBranchType

Visual C++ syntax

ICCBranchTypePtr GetType();

Return value

The local copy of the global type, not a handle to the global type, is returned.

Member of: ICCBranch interface

Versions

Gets a collection of all versions along this branch

Category

Read-only property

VB syntax

Property Versions As CCVersions

Visual C++ syntax

ICCVersionsPtr GetVersions();

Member of: ICCBranch interface

VOB

Gets the VOB that contains this branch

Category

Read-only property

VB syntax

Property VOB As CCVOB

Visual C++ syntax

ICCVOBPtr GetVOB();

Member of: ICCBranch interface


Feedback