Rolling Back to a Previous Version

You can revert or "rollback" an item to a previous item version. The previous item version becomes the latest version on the branch. When you roll back to a version, all versions between them are preserved in case they are required later.


Before you begin:
  • You must have one or more workspaces containing the contents of the semiconductor items being modified.
  • The workspaces must be up to date with the server version and there can be no modified files in your workspace. If the workspaces are not up to date, or the files are locally modified, you cannot roll back to the selected version.
  • The semiconductor item must be locked in the local workspace.
  • The item versions must be dynamic versions.

    The item cannot be a static version. A new commit cannot be created from a static version. Similarly, an item cannot be a link to the item cache where the cached item is a static version. In addition, the item in the cache cannot be locked or modified.

Note: This operation is performed using the local workspace, if you are using caches to improve performance, the items, files, and folders from the cache cannot be:
  • Locked
  • Modified
The rollback can never be done from within a cache because cached versions are static.
See Also
Viewing Version History for Semiconductor Item Workspace Content
  1. Look up the commitID of the version being rolled back. There are several ways to get a commit ID, including running the history command.
  2. From the command-line client, run the rollback command.

    sws rollback [-h] [--verbose] [--cfile CFILE] [--comment COMMENT] [--dir DIR] --commit COMMITID PATH
    For more information on understanding the rollback command, see Understanding the sws rollback Command. For information on each specific option, see sws rollback Command Options.

Result: If the command succeeds, the specified rollback version becomes the latest version and the locks are released. If the command does not succeed, it returns an appropriate error.