CLI Reference > Configuration Management Commands > si revertcp
 
si revertcp
reverts a change package
Synopsis
si revertcp [--cpid=ID|--changePackageId=ID] [(-f|--[no]confirm)] [--issueId=value] [(-S sandbox|--sandbox=sandbox)] [--[no]failOnAmbiguousProject] [--[no]spanSandboxes] [(-?|--usage)] [(-Ffile|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [(-g|--gui)] [--hostname=server] [--password=password] [--port=number] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|default]] [--user=name] issue|issue:change package id
Description
si revertcp reverts the changes made by the entries in the specified change package. The command reverts the changes by performing new changes, which may result in new revisions of members. Even though the changes are reverted, they still appear in the history where applicable.
The si revertcp command does not perform an operation for every type of entry in the specified change package. The following entry types are supported:
Add (results in a pending Drop operation)
Drop (results in a pending Add operation)
Update (results in the need for a merge)
Update Revision (results in the need for a merge)
Add From Archive (results in a pending Drop operation)
Even if an entry type is supported, there may be legitimate reasons why the changes needed to revert the entry could not occur (such as insufficient permissions assigned to you). If Integrity Lifecycle Manager cannot perform the changes needed to revert an entry, the information is reported to you after the command completes. You can use that information to manually make the needed changes where possible.
* 
The command only reverts a single closed change package.
A destination change package is required, to record the operations needed to revert the change package.
The command requires a Sandbox context to perform the operations needed to revert the change package.
You may need to manually revert some of the changes yourself. The command returns a list of change package operations that could not be reverted
If the merges are for revisions on the same member in the same Sandbox (contiguous merges), they are collapsed into one operation.
For reverting a change package that contains an update revision, if the revision of the member being updated to in a change package is the same or later in the current project configuration, the result is a merge of the differences out of the working file. If the revision in the change package is earlier in the member history than the member revision of current project configuration, then the result will be a merge in instead of merge out. For example, if the change package has an update revision to 1.1, the revision of the member in the project is 1.3, the result is a merge in the member history. If the change package has an update revision to 1.2 and the revision of the member in the project was 1.2 (or 1.1) the result is a merge out in the member history.
The si revertcp command does not implicitly extend subprojects in an extendable development path. Before using this command, you must manually extend the extendable development path to the appropriate subprojects. For more information, see si extenddevpath.
Options
This command takes the universal options available to all si commands, as well as some general options. See the options reference page for descriptions.
--cpid=ID
--changePackageId=ID
specifies the change package used to record the operations needed to revert the change package selection.
--issueId=value
specifies the issue that contains the change package used to record the operations needed to revert the change package selection. The issue must contain only one open change package. The issue can contain any number of closed change packages.
-S sandbox
--sandbox=sandbox
specifies the location of a Sandbox to perform the operations needed to revert the specified change package. Locations that include spaces must be enclosed by quotes.
--[no]spanSandboxes
specifies whether or not to search outside of the current Sandbox (the Sandbox that si revertcp is run from) to locate a Sandbox that contains the project on which to perform the operations needed to revert the change package entries. When multiple Sandboxes are found, Integrity Lifecycle Manager uses the Sandbox that contains the longest common directory prefix matching the Sandbox that the si revertcp command is run from. By default, this option is enabled.
issue
issue:change package id
specifies the change package to revert. Only a closed change package can be reverted. The change package can be specified one of the following ways:
issue identifies a specific issue that contains the change package to revert. The issue must contain only one closed change package.
issue:change package id identifies a specific change package to revert.
Diagnostics
See the diagnostics reference page for possible exit status values.
Preferences
Using si setprefs or si viewprefs, you are able to set or view the preference keys for this command.
See Also
Commands: si viewcps
Miscellaneous: ACL, diagnostics, options, preferences