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:
-
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).
-
In the Revert dialog, select the files, changes in which you want to revert, and click Revert.
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:
-
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).
-
In the TortoiseHg client’s Commit dialog, right-click the needed file and then click Revert.
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.
-
In the dialog, right-click the needed changeset and then click Update.
-
TestComplete will open the Update dialog.
-
To undo all uncommitted local changes, select the Discard uncommitted changes, no backup (--clean) check box.
-
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