rmver

Removes a version from the version tree of an element

APPLICABILITY

ClearCase (cleartool subcommand), Attache (command)

SYNOPSIS

rmver [ -f·orce ] [ -xbr·anch ] [ -xla·bel ] [ -xat·tr ] [ -xhl·ink ] [ -dat·a ]

[ -ver·sion version-selector | -vra·nge low-version high-version ]
[ -c·omment comment | -cfi·le comment-file-pname |-cq·uery | -cqe·ach | -nc·omment ]
pname ...

DESCRIPTION

This command destroys information irretrievably. Using it carelessly may compromise your organization's ability to support old releases.

rmver deletes one or more versions from their elements. For each version, this entails the following:

NOTE: If an element's versions are all stored in a single data container, the deleted version is removed logically, not physically, and no disk space is freed.

A destroy version event record is created for the element.

Behavior in Snapshot Views

In a snapshot view, rmver does not unload the element, but leaves a view-private copy of the element in the view. In other respects, rmver behaves the same in a snapshot view as it does in a dynamic view.

Restrictions

You cannot delete a version from which someone currently has a checkout. You cannot delete version 0 on a branch, except by deleting the entire branch. (See rmbranch.)

Deleted Version-IDs

ClearCase never reuses the version-ID of a deleted version. There is no way to collapse a branch to fill the gaps left by deleted versions. If a deleted version was the last version on a branch (say, version 6), the next checkin on that branch creates version 7.

A reference to a deleted version produces a not found or no such file or directory error.

Controlling the Size of the vista.tjf File

The file vista.tjf records updates to the VOB that result from rmver operations. vista.tjf can grow very large. To limit its size, read about the file db.conf in the config_ccase reference page.

PERMISSIONS AND LOCKS

Permissions Checking: For each object processed, you must be one of the following: version creator, element owner, VOB owner, member of the ClearCase group. See the permissions reference page.

Locks: An error occurs if any of the following objects are locked: VOB, element type, element, branch type, branch, pool (non-directory elements only).

OPTIONS AND ARGUMENTS

CONFIRMATION STEP.  Default: rmver prompts for confirmation before deleting anything.

-f·orce

Suppresses the confirmation step.

DELETING INTERESTING VERSIONS.  Default: rmver does not delete a version to which a version label, attribute, or hyperlink is attached, or at which a branch begins.

-xbr·anch

Deletes a version even if one or more branches begin there. In the process, those branches (including all their versions and subbranches) are also deleted.
-xla·bel

Deletes a version even if it has one or more version labels.
-xat·tr

Deletes a version even if it has one or more attributes.
-xhl·ink

Deletes a version even if it has one or more hyperlinks. This also destroys the hyperlink object, thus modifying the other object to which the hyperlink was attached.
CAUTION: Using this option can delete merge arrows (hyperlinks of type Merge) created by the merge command. This may destroy essential metadata.

DATA-ONLY DELETIONDefault: rmver deletes both the version object in the VOB database along with associated metadata, and the corresponding data container in a source storage pool.

-dat·a

Deletes only the data for the specified version, leaving the version object, its subbranches, and its associated metadata intact. In particular, this option preserves event records and enables continued access to the configuration record of a DO version.
CAUTION: Using this option implicitly invokes the -xbranch, -xlabel, -xattr, and -xhlink options, as well. That is, the data container is deleted even if the version has a label, attribute, or hyperlink attached or has a branch sprouting from it.

SPECIFYING THE VERSIONS TO BE REMOVED.  Default: None.

-ver·sion version-selector

For each pname, removes the version specified by version-selector. This option overrides both version-selection by the view and version-extended naming. See the version_selector reference page for syntax details.
-vra·nge low-version high-version

For each pname, removes all versions between (but not including) the two specified versions. low-version and high-version must be on the same branch, and are specified in the same way as version-selector.
pname ...

(Required) One or more pathnames, indicating versions to be removed:

  • A standard or view-extended pathname to an element specifies the version in the view.
  • A version-extended pathname specifies a version, independent of view.
Use -version or -vrange to override these interpretations of pname.

EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -nc). See CUSTOMIZING COMMENT HANDLING in the comments reference page. Comments can be edited with chevent.

-c·omment comment | -cfi·le comment-file-pname |-cq·uery | -cqe·ach | -nc·omment

Overrides the default with the option you specify. See the comments reference page.

EXAMPLES

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 rmver msg.c
Removing these versions of "msg.c":
 \main\1
Remove versions? [no] yes
Removed versions of "msg.c".
cmd-context rmver -force -version \main\rel2_bugfix\1 util.c
Removing these versions of "util.c":
\main\rel2_bugfix\1
Removed versions of "util.c".
cmd-context rmver -xlabel -xattr Makefile@@\main\3
Removing these versions of "Makefile":
\main\3 (has: labels, attributes)
Remove versions? [no] yes
Removed versions of "Makefile".
cmd-context rmver -vrange \main\0 \main\LATEST hello.c
Removing these versions of "hello.c":
\main\1
\main\2
Remove versions? [no] yes
Removed versions of "hello.c".
cmd-context rmver -xbranch util.c@@\main\2
Removing these versions of "util.c":
\main\2 (has: subbranches)
Remove versions? [no] yes
Removed versions of "util.c".

SEE ALSO

config_ccase, describe, lshistory, lsvtree, rmbranch, rmelem, rmname



Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved.