Switch off and on versioning

As an Admin user, you can switch off versioning to reduce the size of the repository. If you switch off versioning, you can switch it on anytime. By default, versioning is on.

All Tricentis Tosca installations used within the same project must be of the same version.

This is particularly true if you want to use versioning. Turning off versioning may break older Tosca Commander versions.

Switching off versioning truncates version history. Truncating large version history takes time and can require large amount of free space for temporary use. The temporarily required space is maximum the size of your workspace.

Switching off versioning on MSSQL databases require additional actions from the database administrator. For more information, see the section about switching off versioning on MSSQL databases.

Search for checked-out items

Before you switch versioning off or on, make sure that all objects in the master branch are checked in. You cannot switch versioning off or on if a user has objects checked out.

To make sure that all objects are checked in, do the following:

  1. Right-click the project root element and select Search all->CheckedOut objects (by any user) from the mini toolbar.

  2. In the subsequent dialog, select the TQL search tab and search for checked out items.

If you still cannot switch versioning off or on, there might be some lost objects which prevent the operation. To find these objects, do the following:

  1. Right-click the project root element and select Search all->lost objects from the mini toolbar.

  2. In the subsequent dialog, select the TQL search tab and search for lost objects.

    As a result, Tosca lists the lost objects that prevent you from switching off or on versioning. Make sure to check-in the lost objects to be able to switch versioning off and on.

Need a hand with creating TQL search parameters? Tosca Copilot is here to help! For more details, check out the Tosca Copilot documentation (opens in new tab).

Switch off versioning

Before you switch off versioning, make sure that you have checked in all objects in the master branch.

Once you switch off versioning, all versioning-related functions are disabled.

To switch off versioning, follow these steps:

  1. Select Manage Versioning from the Versioning ribbon item.

  2. In the Manage Versioning dialog, switch the toggle to Versioning is disabled.

    If you switch off versioning, you permanently delete all of your version history, including revisions.

Switch off versioning

  1. Click Confirm.

    The subsequent dialog gives you an overview of what you are about to delete.

    Before you proceed, note the following:

    • This also deletes all branches. This means that you can't create branches or merge them together.

    • Make sure you have checked in all objects in the master branch.

  2. Click Yes, delete to confirm.

Switch on versioning

Before you switch on versioning, make sure that you've checked in all objects in the master branch.

You cannot switch on versioning if a user has objects checked out.

To switch on versioning, follow the steps below:

  1. Select Manage Versioning from the Versioning ribbon item.

  2. In the Manage Versioning dialog, switch the toggle to Versioning is enabled.

    If you switch on versioning, Tosca stores object revisions.

Switch on versioning

  1. Click Confirm to enable versioning.

 

Switch off and on versioning via TC-Shell or TC API

You can switch off and on versioning via TC-Shell, in both interactive and script mode.

Switch off and on versioning via TC-Shell in interactive mode

You can switch off and on versioning via TC-Shell. To do so in TC-Shell interactive mode, follow the steps below:

  1. Open your workspace in TC-Shell.

  2. Navigate to the project node.

  3. Run TC-Shell task ToggleVersionHistory.

  4. Enter c to continue.

  5. In the subsequent dialog, confirm that you want Tosca to toggle version history:

    • Enter Yes to confirm. Tosca switches versioning off or on, based on your versioning settings: If versioning was on, Tosca switches it off. If versioning was off, Tosca switches it on. By default, versioning is switched on.

    • Enter No to cancel the task.

Switch off and on versioning via TC-Shell in script mode

To switch off and on versioning via TC-Shell in script mode, run the following TC-Shell task: ToggleVersionHistory c Yes.

Tosca switches versioning off or on, based on your versioning settings: If versioning was on, Tosca switches it off. If versioning was off, Tosca switches it on. By default, versioning is switched on.

Switch off and on versioning via TC API

You can switch off and on versioning using TC API. For more information about TC-API, access the Tosca Commander API documentation.

Switch off versioning on an MSSQL database

Switching off versioning truncates version history. After the truncation, in MSSQL databases, the database server keeps the space that had been taken up by the version history data as reserved disk space. As a consequence, the database size doesn't decrease only by switching off versioning.

In order to free up this disk space and reduce the database size, switching off versioning requires an additional step for MSSQL users. To complete the truncation of version history on MSSQL databases, follow the steps below:

  1. Follow the instructions to switch off versioning.

  2. As the following operation requires database administrator rights, ask your database administrator to run the following MSSQL command on the database: DBCC SHRINKDATABASE(<the name of your database>, <the percentage of space that you want left in the database server as reserved disk space>).

    This way, your database administrator frees up space from the reserved disk space of the database server that used to be taken up by the version history data.

For example, the following command instructs the server to keep 1% of the reserved disk space in the My_DB database. This way, 99% of the reserved disk space is freed up: DBCC SHRINKDATABASE(MY_DB, 1).

For more information, see the MSSQL documentation.