Reverting Changes

Applies to TestComplete 15.63, last modified on April 10, 2024

If your project or project suite is stored in a Mercurial repository, you can revert all uncommitted changes you made to your project or project suite or restore it to a needed changeset.

Reverting Local Changes

If you use the TortoiseHg client to work with Mercurial from TestComplete, you can cancel all local changes not committed to the repository yet:

  1. Select File > Source Control > Revert from the TestComplete main menu.

    – or –

    Right-click your project suite in the Project Explorer and then click Source Control > Revert.

    – or –

    Click Revert Local Changes on the Source Control toolbar (if the toolbar is hidden, right-click the toolbar area and then click Source Control).

  2. In the Revert dialog, select the files, changes in which you want to revert, and click Revert.

    Reverting Chnages in TortoiseHg Revert Dialog

    Click the image to enlarge it.

TestComplete will undo all changes made to the specified files.

Reverting Individual Changes

If you use the TortoiseHg client to work with Mercurial from TestComplete, to undo changes made to an individual file:

  1. Select File > Source Control > Commit from the TestComplete main menu.

    – or –

    Right-click your project suite in the Project Explorer and then click Source Control > Commit.

    – or –

    Click Commit Changes to Repository on the Source Control toolbar (if the toolbar is hidden, right-click the toolbar area and then click Source Control).

  2. In the TortoiseHg client’s Commit dialog, right-click the needed file and then click Revert.

    Reverting Chnages in TortoiseHg Commit Dialog

    Click the image to enlarge it.

Reverting to a Specific Changeset

To roll back your project or project suite to the state of a particular changeset:

  • Select File > Source Control > Show Log from the TestComplete main menu.

    – or –

    Right-click your project suite in the Project Explorer and then click Source Control > Show Log.

    – or –

    Click View the Commit History of the Repository on the Source Control toolbar (if the toolbar is hidden, right-click the toolbar area and then click Source Control).

  • If you use the TortoiseHg client, TestComplete will open the TortoiseHg Workbench, where you can view the revision history and update your local repository to the needed changeset.

    For information on how to do it, see TortoiseHg documentation.

    If you do not use TortoiseHg, TestComplete will open the Revision History dialog.

    Reverting to a Specific Revision via TestComplete Revision History Dialog

    Click the image to enlarge it.

    1. In the dialog, right-click the needed changeset and then click Update.

    2. TestComplete will open the Update dialog.

    3. To undo all uncommitted local changes, select the Discard uncommitted changes, no backup (--clean) check box.

    4. Click Update.

    TestComplete will update your local repository to the selected changeset.

Related Tasks

See Also

Integration With Mercurial - Common Tasks
Integration With Mercurial
Committing Changes to Repository
Viewing Changes in a Visual Diff Tool
Getting Changes from a Remote Repository to a Local Repository

Highlight search results