Working With Branches

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

This topic describes how you can work with branches in your Mercurial repository from TestComplete.

Creating New Branches

  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 Commit dialog, click Branch:

    Managing branches via the TestComplete Commit dialog

    Click the image to enlarge it.

    Managing branches via TortoiseHg’s Commit dialog

    Click the image to enlarge it.

  3. In the resulting Branch Operation dialog, select the Open a new named branch option, enter the name for your branch and click OK.

    Creating branches via the TestComplete Branch Operation dialog

    Creating Branches in TestComplete Branch Operation Dialog

    Creating branches via TortoiseHg’s Branch Operation dialog

    Creating Branches in TortoiseHg Branch Operation Dialog
  4. Specify other commit options if needed and click Commit in the Commit dialog.

TestComplete will create a new named branch and commit your changes to that branch.

Pushing Local Branches

To push your local branch to your remote repository:

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

    – or –

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

    – or –

    Click Launch the Synchronize Dialog on the Source Control toolbar (if the toolbar is hidden, right-click the toolbar area and then click Source Control).

  2. TestComplete will open a dialog, where you can send changes from your local repository to a remote destination.

  3. If you use TortoiseHg, click Options and select the Allow push of a new branch (--new-branch) option.

    If you do not use TortoiseHg, select Allow push of a new branch (--new-branch) in the Synchronize dialog.

    Pushing your local branch to your remote repository via the TestComplete Synchronize dialog

    Pushing Local Branches via TestComplete Synchronize Dialog

    Click the image to enlarge it.

    Pushing your local branch to your remote repository via the TestComplete Synchronize dialog

    Pushing Local Branches via TestComplete Synchronize Dialog

    Click the image to enlarge it.

  4. Specify other push options if needed and click .

Switching Branches

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

    – or –

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

    – or –

    Click Launch the Update/Checkout Dialog on the Source Control toolbar (if the toolbar is hidden, right-click the toolbar area and then click Source Control).

  2. In the Update dialog, select the branch to which you want to update your project or project suite and click Update.

    Switching between branches via the TestComplete Update dialog

    Switching Between Branches in TestComplete Update Dialog

    Click the image to enlarge it.

    Switching between branches via TortoiseHg’s Update dialog

    Switching Between Branches in TortoiseHg Update Dialog

    Click the image to enlarge it.

TestComplete will update your project or project suite to the tip on the selected branch.

Closing Branches

  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 Commit dialog, click Branch:

    Managing branches via the TestComplete Commit dialog

    Click the image to enlarge it.

    Managing branches via TortoiseHg’s Commit dialog

    Click the image to enlarge it.

  3. In the resulting Branch Operation dialog, select the Close the current branch option and click OK.

    Closing branches via the TestComplete Commit dialog

    Closing Branches in TestComplete Commit Dialog

    Closing branches via TortoiseHg’s Commit dialog

    Closing Branches in TortoiseHg Commit Dialog
  4. Specify other commit options if needed and click Commit in the Commit dialog.

TestComplete will close your current branch.

Related Tasks

See Also

Integration With Mercurial - Common Tasks
Integration With Mercurial
Committing Changes to Repository
Getting Changes from a Remote Repository to a Local Repository

Highlight search results