Checking in an element

If you use ClearCase® for source control management, you need to check in a script to create a new version of a file

Before you begin

About this task

You can check in one or more directories, scripts, or the contents of a folder. You can also merge files, if needed, when you check in an element.

An element is an object in a VOB, a database that stores your project's files. An element can be a Functional Test script, a Functional Test project, an object map or a Java™ file. All elements are stored with version history and comments.

To merge is the process of combining the contents of two or more files into a single new file. Typically, the files are versions of a single file element.

A merge condition is created when multiple users have checked out the same version of a file. Each user makes changes and checks in the file. The first user to check in the file creates a new version. The second user to check in the file is required to merge. If ClearCase can manage combining the multiple edits to the file, the changes are merged into a new version of the file automatically. If the edits conflict or cannot be resolved, users must resolve the conflicts. ClearCase starts the Diff Merge tool, in which you can view the differences and merge two or more files, if necessary.

Tip: To find checked out elements, click View > Pending Checkins. You can check in an element from the Pending Checkins View.

To check in an element:

Procedure

  1. From the Solution Explorer, right-click one or more checked out elements.
  2. Right-click the selected element, and then click Check In.
  3. Under Name, clear the check box of any element you do not want to check in.
  4. To check in a file so that others can get your changes, but keep this file checked out so that you can continue to work on it, click Options (Options button), and then click Keep Checked Out.
  5. Under Comments, type the comments that describe the changes.
    Note: Comments appear in the version's ClearCase Properties Browser and in the element's ClearCase History Browser.
  6. To check in all files and use the same comment for all files, click Check In.
  7. If you check in an element and a later version of this element already exists and is different than your element, you are prompted to merge.
    Tip: If you see the not ready symbol (not ready symbol) in the State column, it means that you cannot check in an element.

Results

If you check in an element and a later version of this element already exists and is different than your element, you are prompted to merge. ClearCase attempts to merge automatically, starting the Diff Merge tool if it needs your input to merge. Use the Diff Merge tool to view the differences and merge two or more files, if needed.

Related Topics:

About Merging

Canceling while checking in a merged test object map

Undoing a Checkout

Checking Out an Element

Using ClearCase with Test Object Maps

What to do next

Feedback