Creates a permanent new version of an element
ClearCase (cleartool subcommand), Attache (command)
To create a new version of an element, checkin makes changes in the VOB and in the view.
For one or more elements, checkin creates a successor to a version that was previously checked out in the current view: the predecessor version. The version number of the successor is the next unused number on the branch. (If one or more versions have been deleted from the end of the branch with rmver, it may seem that some version numbers have been skipped.) An appropriate message is displayed:
Checked in "msg.c" version "\main\bugfix\26".
In Attache, any existing local files corresponding to pathname arguments are uploaded before performing the checkin remotely; directories are not uploaded.
A checkin event record is created, which can be listed with the lshistory command:
cmd-context lshistory msg.c
06-Aug.12:09 akp create version "msg.c@@\main\bugfix\26"
Only elements can be checked in. You cannot check in a view-private or local file; you must first make an element of the same name. Use the mkelem -ci command to simultaneously create an element and check in a view-private or local file as its first version.
checkin works differently in different contexts.
After the element is checked in, your view typically selects the version you just created. However, in a dynamic view and Attache it is possible that your view selects another version (perhaps on another branch), because that version is specified by your config spec rules. In this case, checkin displays a warning message. In Attache, the workspace copy is not updated.
In Attache, a warning is issued for each argument that has no corresponding local file, but the command will still execute remotely. For each successfully checked-in version, the local file is changed to be read-only.
From the viewpoint of the VOB database, the new, checked-in version is the same object as the checked-out version. Thus, any metadata items (version labels, attributes, hyperlinks) that were attached to the checked-out version remain attached to the new version. And, for example, checkin followed by mklabel is equivalent to mklabel followed by checkin.
At the time you enter a checkin command, there may be several checkouts of the same version. At most one of the checkouts (perhaps yours) is reserved; all the others are unreserved. Your checkin command succeeds in either of these cases:
If the command fails because someone else has a reserved checkout, you must wait until that checkout is resolved, with checkin, uncheckout, or unreserve. If the command fails because someone has checked in a successor version ahead of you, you can check in your work by performing the following steps:
(ClearCase dynamic views and Attache only) You can check in a derived object to make it a version of an element (a DO version). By default, both the data and configuration record of a derived object are checked in. To save disk storage, you can use the -cr option to check in only the configuration record, not the data. Checking in a nonshareable DO converts the DO, its sibling DOs, and its sub-DOs to shareable DOs.
clearmake can reuse or wink in a derived object only if it is stored under its original pathname. Thus, a DO version created under an alternate name with checkin -from cannot be used by clearmake for build avoidance. (clearmake can still use the derived object named in the -from option, which is unaffected by this command.)
See the mkelem reference page for information on creating a file element for a DO, and see Working with Derived Objects and Configuration Records in Building Software with ClearCase for information regarding subsequent operations on DO versions.
Permissions Checking: checkin performs the following permission check:
See the permissions reference page.
Locks: checkin fails if any of the following objects have been locked: VOB, element type, branch type, element, branch, pool (file elements only).
EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your home directory's .clearcase_profile file in ClearCase or your remote home directory's .clearcase_profile file in Attache (default: -cqe). See CUSTOMIZING COMMENT HANDLING in the comments reference page. Comments can be edited with chevent.
NOTE: If a checkout comment exists (specified with the checkout command and/or generated to record changes to a checked-out directory), you can make it the checkin comment by using either of the following commands:
Any other entry at the -cqe prompt specifies a new checkin comment, discarding the checkout comment (if any) for that element. The -c and -cq options always discard the checkout comment (if any) for each element processed.
SUPPRESSING WARNING MESSAGES Default: Warning messages are displayed.
CHECKING IN DERIVED OBJECTS. Default: checkin checks in both the data and configuration record for a derived object.
MANAGING SOURCE FILES. Default:
You can use the following options (which have no meaning for directory elements) to save view-private copies, or to check in source files from other locations.
(or possibly, pname.keep.n). In Attache, this file is not downloaded to the workspace. -keep is the default when you use the -from option, because the current contents of the checked-out version would otherwise be lost.MISCELLANEOUS OPTIONS. Default: checkin resets the new version's modification time to the check-in time. Also, checkin cancels the checkin operation for files managed by certain type managers, if the contents of the files match their predecessor versions.
SPECIFYING OBJECTS TO CHECK IN. Default: None.
activity-name | name of the activity | |
Examples including wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the command interpreter prompt. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.
cmd-context lscheckout -long util.c
10-May-99.16:11:07 Chuck Jackson (jackson.dvt@oxygen)
checkout version "util.c" from \main\4 (reserved)
by view: cj ("oxygen:c:\users\views\cj.vws")
"revise syntax"
cmd-context checkin -nc util.c
Checked in "util.c" version "\main\5".
cmd-context checkin -rm -from c:\users\cep\util.c -c "Release 1.1 update" util.c
Checked in "util.c" version "\main\6".
cmd-context checkin -nc -cr hello
Checked in "hello" version "\main\1".
attache_command_line_interface, attache_graphical_interface, checkout, clearmake, config_spec, get, lshistory, merge, mkelem, mkeltype, mklabel, profile_ccase, put, rmver, setwork, uncheckout
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved. |