Integrating ClearCase with developer tools using DevInt CLI

The IDE integration CLI is a command-line utility that simplifies and standardizes DevOps Code ClearCase® operations across all four view types: dynamic, snapshot, automatic, and web.

This tool provides a unified solution for CLI-based integration in development workflows, minimizing manual intervention and ensuring a consistent experience with ClearCase®, regardless of view configuration. Across all four view types, the IDE integration CLI offers a uniform interface for interacting with ClearCase® repositories.

The IDE integration CLI accepts command-line arguments and returns results via standard output (stdout) in JSON format. For more information, see the API documentation.

The following commands are available in IDE integration CLI, along with their features:

  • login – Authenticate to the system securely. This is applicable to automatic and web views.
  • checkout – Mark files for editing.
  • checkin – Commit your changes to the source control.
  • uncheckout – Revert checked-out files.
  • addtosource – Add new files to source control.
  • hijack – Temporarily override the version control in snapshot, automatic, and web views.
  • unhijack – Restore hijacked files to the source control.
  • rename – Rename version-controlled elements.
  • remove – Delete elements from the source control.
  • properties – View element properties.
  • createactivity – Create a new UCM activity.
  • setactivity – Assign work to a specific activity.
  • getactivities – Retrieve a list of available activities in the view.

Command:

login: Log in to the system securely.

  • Synopsis:
    ideintegration login -userName user-name {-password user-password|-stdin-password} -ccrcWanServerURL server-url
    [-primaryGroupName user-primary-group] [-groupList user-group-list]
    Note: Save the token from the login response for all subsequent operations.
  • Description: Authenticate to the system securely by providing your user name and password.

  • Options:
    • -userName user-name: User name to log in to the system.
    • -password user-password: Password to log in to the system.
    • -stdin-password: Prompt for the password in the standard input.
    • -ccrcWanServerURL server-url: URL for the CCRC WAN server to connect to it.
    • -primaryGroupName user-primary-group (optional): Primary group name for the session.
    • -groupList user-group-list (optional): List of user group names for the session, separated by space.
  • Examples:
    ideintegration login -userName alias -password password@1234 -ccrcWanServerURL http://www.example.com/ccrc

Command:

checkout: Check out resources from the source control.

  • Synopsis:

    ideintegration checkout [-reserved|-unreserved] [-token token-string|-stdin-token] [-comment comment] -resourcePaths resource-list
  • Description: Check out the specified resources from the source control system for editing.

    • Note: If you do not specify either reserved or unreserved, ClearCase® automatically uses a reserved checkout by default.
  • Options:
    • -reserved (optional): Reserves the check-out for exclusive editing.
    • -unreserved (optional): Reserves the check-out for editing, but it is not exclusive.
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -comment comment (optional): Provide a comment for the check-out operation.
    • -resourcePaths resource-list: List of resources to check-out, separated by space.
      Note: The resourcePaths option can be pathnames that are absolute or relative to the current working directory.
  • Examples:
    ideintegration checkout -token token123 -resourcePaths file1.c file2.c

Command:

checkin: Check in resources to the source control.

  • Synopsis:

    ideintegration checkin [-checkinIdentical] [-token token-string|-stdin-token] [-comment comment] -resourcePaths resource-list
  • Description: Check in the specified resources to the source control system.

  • Options:
    • -checkinIdentical (optional): Check in even if the file is identical to the previous version.
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -comment comment (optional): Provide a comment for the check-in operation.
    • -resourcePaths resource-list: List of resources to check-in, separated by space.
      Note: The resourcePaths option can be pathnames that are absolute or relative to the current working directory.
  • Examples:
    ideintegration checkin -token token123 -resourcePaths file1.c file2.c

Command:

uncheckout: Undo check out of the resources.

  • Synopsis:

    ideintegration uncheckout [-token token-string|-stdin-token] [-keep] -resourcePaths resource-list
  • Description: Cancels the check-out of the specified resources, with an option to keep any local changes.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -keep (optional): After uncheck-out of a resource, a local copy of the changes is created with the .keep extension.
      Note: If you do not specify the keep option, a backup keep file will not be generated. If a .keep file already exists and if the file is checked out again, the backup file is named .keep.number, where the number is the next available positive integer.
    • -resourcePaths resource-list: List of resource paths to uncheck-out, separated by space.
      Note: The resourcePaths option can be pathnames that are absolute or relative to the current working directory.
  • Examples:

    ideintegration uncheckout -token token123 -resourcePaths file1.c file2.c

Command:

addtosource: Adds resources to the source control.

  • Synopsis:

    ideintegration addtosource [-token token-string|-stdin-token] [-comment comment] -resourcePaths resource-list
  • Description: Adds the specified resources to the source control system.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -comment comment (optional): Provide a comment for the add operation.
    • -resourcePaths resource-list: List of resources to add, separated by space.
    Note: The resourcePaths option can be pathnames that are absolute or relative to the current working directory.
  • Examples:

    ideintegration addtosource -token token123 -comment "Initial add" -resourcePaths file1.c

Command:

hijack: Hijack resources for manual editing.

  • Synopsis:
    ideintegration hijack [-token token-string|-stdin-token] -resourcePaths resource-list
  • Description: Hijacks the specified resources, allowing manual editing outside of source control.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -resourcePaths resource-list: List of resource paths to hijack, separated by space.
      Note: The resourcePaths option can be pathnames that are absolute or relative to the current working directory.
  • Examples:

    ideintegration hijack -token token123 -resourcePaths file1.c

Command:

unhijack: Restore hijacked resources.

  • Synopsis:
    ideintegration unhijack [-token token-string|-stdin-token] [-keep] -resourcePaths resource-list
  • Description: Restores the specified hijacked resources to their original state in the source control.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -keep (optional): After unhijack of a resource, a local copy of the changes is created with the .keep extension.
      Note: If you do not specify the keep option, a backup keep file will not be generated. If a .keep file already exists and if the file is checked out again, the backup file is named .keep.number, where the number is the next available positive integer.
    • -resourcePaths resource-list: List of resource paths to unhijack, separated by space.
      Note: The resourcePaths option can be pathnames that are absolute or relative to the current working directory.
  • Examples:

    ideintegration unhijack -token token123 -resourcePaths file1.c

Command:

rename: Renames a resource.

  • Synopsis:
    ideintegration rename [-token token-string|-stdin-token] -resourcePath resource-path -newName new-name
  • Description: Renames the specified resource to a new name in the source control.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -resourcePath resource-path: Path of the resource to rename.
      Note: The resourcePath option can be pathnames that are absolute or relative to the current working directory.
    • -newName new-name: New name for the resource.
  • Examples:
    ideintegration rename -token token123 -resourcePath file1.c -newName file2.c
    Note: The rename command allows you to move the resource to another directory, provided the destination directory is checked out.

Command:

remove: Remove resources from the source control.

  • Synopsis:
    ideintegration remove [-token token-string|-stdin-token] [-forceRemove] [-comment comment] -resourcePaths resource-list
  • Description: Removes the specified resources from the source control system. This is equivalent to rmname. It removes the name from visibility in the source control for the current configuration while leaving it visible in previous configurations.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -forceRemove (optional): Force removal of resources.
    • -comment comment (optional): Provide a comment for the remove operation.
    • -resourcePaths resource-list: List of resources to remove, separated by space.
      Note: The resourcePaths option can be pathnames that are absolute or relative to the current working directory.
  • Examples:

    ideintegration remove -token token123 -forceRemove -resourcePaths file1.c

Command:

properties: Display properties of resources.

  • Synopsis:
    ideintegration properties [-token token-string|-stdin-token] -resourcePaths resource-list
  • Description: Displays properties of the specified resources in the source control.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -resourcePaths resource-list: List of resource paths to display properties, separated by space.
      Note: The resourcePaths option can be pathnames that are absolute or relative to the current working directory.
  • Examples:

    ideintegration properties -token token123 -resourcePaths file1.c file2.c

Command:

createactivity: Create a new UCM activity.

  • Synopsis:
    ideintegration createactivity [-token token-string|-stdin-token] -activityID activity-ID 
    [-activityHeader activity-headline] [-setActivity] -viewPath view-path
  • Description: Creates a new UCM activity in the specified view path.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -activityID activity-ID: Identifier for the new activity.
    • -activityHeader activity-headline: Header name of the activity.
    • -setActivity (optional): Set the new activity as current.
    • -viewPath view-path: Path of the view for the activity.
      Note: The createactivity view-path option can be any valid pathname within the view (including '.' if the current working directory is in the view).
  • Examples:

    ideintegration createactivity -token token123 -activityID 42 -viewPath /project

Command:

setactivity: Set the current UCM activity.

  • Synopsis:
    ideintegration setactivity [-token token-string|-stdin-token] -activityID activity-ID -viewPath view-path
  • Description: Sets the specified activity as the current UCM activity in the given view path.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -activityID activity-ID: Identifier of the activity to set.
    • -viewPath view-path: Path of the view for the activity to set.
      Note: The setactivity view-path option can be any valid pathname within the view (including '.' if the current working directory is in the view).
  • Examples:

    ideintegration setactivity -token token123 -activityID 42 -viewPath /view/viewname

Command:

getactivities: List of UCM activities for a stream.

  • Synopsis:
    ideintegration getactivities [-token token-string|-stdin-token] -stream stream
  • Description: Lists the UCM activities related to the specified stream.

  • Options:
    • -token token-string (optional): This option is used to provide authentication token. For LAN based views, this option should not be used.
    • -stdin-token (optional): Prompt for the token in the standard input.
    • -stream stream: Name of the stream.
  • Examples:

    ideintegration getactivities -token token123 -stream main