The rollback command creates a new latest version from a version using the commitID of the
previous version to identify the version. The item you roll back to a previous version must be:
- The latest version of the item.
- Locked in the workspace.
- Contain no locally modified files.
- A dynamic version.
- Not a link to a cached version (which is static by definition.)
Specify a comment for every rollback operation. You can use either the
--comment option or use a file containing a text comment with the
--cfile option.
When --verbose is not specified, the command returns a success message. When
--verbose is specified, the output includes output from the underlying
command operations, such as the sws checkin and sws update
commands that update the files on the server and in the workspace to the specified rollback
version.
The rollback operation, by default, releases the locks on the files.
Use the --keep-locks option for the command to retain the locks after the
rollback operation. If you keep the lock, you can release them later with a subsequent checkin
or unlock operation.