5.4. Workbench¶
The Workbench is the primary TortoiseHg application. It allows you to browse your local repositories, make commits, perform searches, synchronize with other repositories, and perform various maintenance tasks. Nearly every Mercurial feature is accessible from the Workbench.

Workbench dialog.
Workbench Main Widgets are:
- Revision History View
- A tabbed widget to view multiple repositories at once. The different columns show general information about each changeset in the graphlog. You can configure the columns to show from the menu via
, and there you can reorder the columns too. This is the main or central widget of the Workbench application.- Repository Registry
- This widget, by default shown on the left, allows to manage multiple repositories from the Workbench. You can show/hide it via
or with the corresponding button in the Dock Toolbar. It’s also a dockable widget. The menu option allows to not only view the names of the repositories but also their path in a second column.- Output Log
- This dockable widget, which can be shown/hidden with
, gives the user information about the Mercurial commands that were executed during the current session. You can also use it as a commandline by typing Mercurial commands at its prompt directly. It shows any error messages when appropriate. Content is wiped when the Workbench is closed.- Task Tabs
- The lower right part of the Workbench is occupied by a stack of widget where you can perform various frequent tasks. It is a tabbed widget. See further for more detail about each one.
5.4.2. Edit Toolbar¶

Edit toolbar
Moving around in the revision history. All the buttons work on the current repository.
- Refresh
- Reload the revision history of the current repository.
- Back
- Go back to the previously selected revision.
- Forward
- Go forward to the next revision in your selection history or most recent revision set query.
- Filter toolbar
- Show and activate the Filter Toolbar at the top of the revision graph.
5.4.3. Dock Toolbar¶

Dock toolbar
Show or hide some main widgets in the Workbench.
- Show Repository Registry
- Show/hide the Repository Registry widget.
- Show Output Log
- Show/hide the Output Log widget.
5.4.4. Sync Toolbar¶

Sync toolbar
Synchronize your repository with other repositories.
- Incoming
- Download incoming changesets from the remote repository, store then in a temporary bundle file, then enter bundle preview mode with the incoming changes applied. Incoming changesets will be shown as normal, while others will be shown grayed in the revision graph. The buttons Accept and Reject are then shown at the top of the revision graph.
- Pull
- Pull incoming changesets from the remote repository, then apply after-pull effect (update, fetch, or rebase).
- Outgoing
- Determine outgoing changesets that would be pushed to the remote repository. Outgoing changesets will be shown as normal, while others will be shown grayed in the revision graph.
- Push
- Push outgoing changesets to the remote repository.
5.4.5. Task Toolbar¶

Task toolbar
Work with the various task tabs.
- Revision Details
- Shows information about the current revision : files added, removed, renamed, or modified, file contents, changeset info. See Revision Details for more detail.
- Commit
- Here you can add new files, and do your commits. See Commit for more detail.
- Search
- For performing text searches through file content.
- Synchronize
- Gives you full control about how you let your repositories communicate with any other repository. See Synchronize for more detail.
There is some relation between the revision or patch selected in the graph pane, and the task tabs.
- Clicking on the Working Directory automatically switches to the Commit task tab.
- Clicking on any revision other than the Working Directory switches to the Revision Details task tab.
You can overrule this standard behaviour by doing an ALT-Click for making your selection. This preserves the current task tab, no matter what revision or patch you select. Cursor selection movements also do not switch task tabs.
5.4.6. Filter Toolbar¶

Filter features for the Workbench.
The filter bar allows one to quickly filter the changesets panel. It is based on the Revision Sets feature of Mercurial. See hg.1.html#revsets for details on how to specify revision sets. The toolbar can be toggled with Ctrl-S. Parts from left to right:
- Clear
- Clears the search lineedit. Essentially disables all filters.
- Filter entry
- Here you can type a filtering condition. The widget is a combobox, holding a history of previous filtering conditions.
- Trigger
- Applies the condition set by the filter.
- Open
- Opens the RevSet dialog. There you can select and/or enter your condition in a combined way via point-and-click and by typing.
- Delete
- Deletes the selected query.
- Toggle filter
- Applies the filter condition by sowing changesets that don’t conform to it in a color suggesting insensitiveness, so the selected ones stand out more.
- Branch options
- A few options for showing branches. See
for a method to prune names from this combo box.- Branches combo
- A combo box with the list of named branches in your repository.
- Custom Filter Combo
- Finally there is a combo box that selects among the various filter types that can be manually specified.
If the repository tab is previewing incoming changesets, a pair of buttons are prepended to the start of the filter bar:
- Accept
- Accept (pull) the changesets from the previewed bundle. This button is only visible when previewing a changeset bundle. The after-pull effect is respected after pulling from a bundle.
- Reject
- Reject the changesets from the previewed bundle and exit preview mode. This button is only visible when previewing a changeset bundle.
The Workbench will attempt to lookup the entered search phrase in the repository to see if it matches a tag, bookmark, branch name, changeset hash, or revision number. If no changeset match is found, the Workbench checks if the search phrase has any parentheses. If no parentheses are found, the Workbench assumes the search is a keyword and performs a keyword() revision set search. If parentheses are found, the Workbench assumes the search phrase is a revision set specification and attempts to resolve the set.
If you need to perform a keyword search that includes parentheses, use keyword("PHRASE(FOO)").
5.4.7. Revision Graph Details¶
The graph column shows the child-parent relationships between revisions in your repository history. This column auto-sizes for as many lines of ancestry that are required to visualize the revisions you have loaded. The column has an initial hard-limit width to prevent some degenerative cases from breaking the viewer, but can be resized after refreshes.
5.4.8. Performance Implications¶
There are some Workbench features that could have performance implications in large repositories.
- Enabling the Changes column can be expensive to calculate on repositories with large working copies, causing both refreshes and scrolling to be slow.
- Normally, when the user scrolls through the history, chunks of changesets are read as you scroll. This menu choice allows you to have the Workbench read all the changesets from the repository, probably allowing smoother moving through the history.
5.4.11. Message Parsing¶
The changeset display pane will detect and underline changeset hashes, HTTP(s) URLs, and bug report identifiers inside changeset messages. These underlined phrases are clickable links.
Every word-boundary delimited string of 12 or 40 characters from the range [0-9a-f] is considered a changeset link. Clicking on it in the repository explorer will jump to the given changeset if possible.
HTTP and HTTPS URLs are similarly turned into clickable links which are opened in your default web browser.
Issue tracker links are enabled when configured in the tortoisehg
section of your configuration files. Since only a single issue tracker
can be configured at a time, it is typically configured in the
repository’s .hg/hgrc
file. There are two keys: issue.regex and
issue.link. The first defines the regex to match when picking up issue
numbers, while the second defines the command to run when an issue
number is recognized.
You may include groups in issue.regex, and corresponding {n} tokens in issue.link (where n is a non-negative integer). {0} refers to the entire string matched by issue.regex, while {1} refers to the first group and so on. If no {n} tokens are found in issue.link, the entire matched string is appended instead.
Examples:
BitBucket:
issue.regex = #(\d+)\b
issue.link = https://bitbucket.org/<your project and repo>/issue/{1}/
Mercurial:
issue.regex = \bissue(\d+)\b
issue.link = https://bz.mercurial-scm.org/show_bug.cgi?id={1}
5.4.12. Output Log Console¶
The console built into the Workbench Output Log dock widget can run Mercurial (hg) commands, TortoiseHg (thg) commands, a couple special commands, and limited shell commands. Commands are always executed in the root of the current repository. The prompt is updated to keep you aware of the context.
If the command line begins with ‘hg’, the Mercurial command is run in TortoiseHg’s execution environment; meaning output is sent to the log widget and input requests are handled by dialog windows.
If the command line begins with ‘thg’, the requested command is run in a new window but in the same process. For instance ‘thg ci’ will open a new commit tool window for the current repository.
It the command is ‘clear’ (or ‘cls’), the output log contents are erased.
If the command is ‘exit’, the output log window is closed.
Otherwise, the command line is forwarded to your platform’s default command shell with a limited execution context. There is no stdin while stdout and stderr are piped to the output log.
5.4.14. Configurables¶
The Workbench has a few configurable options that can be set in the TortoiseHg Settings dialog on the Workbench tab.
- Author coloring
- If true, each author’s changeset will be given a unique color
- Long Summary
- Concatenate commit message lines until 80 chars are reached
- Graph batch limit
- Number of revisions to read in each batch load
- Dead Branches
- Comma separated list of branch names that should be ignored when building a list of branch names for a repository.
- Branch Colors
- Space separated list of branch names and colors on the form branch:#XXXXXX. Spaces and colons in the branch name must be escaped using a backslash (\). Likewise some other characters can be escaped in this way, e.g. \u0040 will be decoded to the @ character, and \n to a linefeed.
- Hide Tags
- Space separated list of tags that will not be shown. Useful example: Specify “qbase qparent qtip” to hide the standard tags inserted by the Mercurial Queues Extension.
The exact colors given to particular users can be configured by adding
lines like these to your Mercurial.ini
file:
[tortoisehg]
authorcolor.USERNAME = color
The Workbench also respects the following settings on the TortoiseHg tab:
- Tab Width
- Number of spaces to expand tabs in diffs
- Max Diff Size
- Maximum size of file to be diffed
5.4.15. From command line¶
The Workbench can be started from command line
thg log [OPTIONS] [FILE]
aliases: history, explorer, workbench
workbench application
use "thg -v help log" to show global options