4.7. Changelog

The changelog tool (also known as the repository explorer) is used to visualize the revision history of your repository and to perform any maintenence tasks that involve changesets. It presents a graph of the revision history, showing the parent/child relationship of each change. At each revision you can view the files that were modified and the contents of those changes.


Changelog viewer dialog with main toolbar hidden

The changelog tool has a menu bar for accessing tool functions and for launching other tools.

Launch other TortoiseHg tools as separate processes
Toggle the visibility of various features, or refresh views
Select specific changesets in your repository history
Access synchronization functions, more below
Help contents shows this web page. About shows TortoiseHg version info

The toolbar buttons from left to right:

Reload the revision history (if you commit in another window, etc)
Reset Marks
Remove ‘new’, ‘incoming’, and ‘outgoing’ revision marks and refresh
Patch Queue
Toggles the display of the MQ pane. This button is only visible when the MQ extension has been enabled by the user.
Launch the commit tool in a separate process
Launch the data mining tool in a separate process
Launch the recovery dialog in a separate process
Web Server
Launch the web server dialog in a separate process
Launch the shelve tool in a separate process
Patch Branch
Toggles the display of the Patch Branch pane. This button is only visible when the pbranch extension has been enabled by the user.
Load more
Load the next N revisions into the graph
Load all
Load all remaining revisions into the graph

4.7.1. Sync Bar


Synchronization features in changelog tool

From left to right...

Download incoming changesets from the remote repository, store them in a temporary bundle file, then enter bundle preview mode with the incoming changes applied. Incoming changesets will have a ‘down’ arrow in the revision graph.
Accept (pull) the changesets from the previewed bundle. This button is only sensitive when previewing a changeset bundle. The after-pull effect is respected after pulling from a bundle.
Reject the changesets from the previewed bundle and exit preview mode. This button is only sensitive when previewing a changeset bundle.
Pull incoming changesets from the remote repository, then apply after-pull effect (update, fetch, or rebase).
Open the import dialog to import one or more patches
Determine outgoing changesets that would be pushed to the remote repository. Outgoing changesets are marked with an ‘up’ arrow.
Push outgoing changesets to the remote repository.
Email outgoing changesets to the remote repository.
Stop current transaction. The button is only sensitive during outgoing commands.

To the right of the Stop button is a combo box containing all of the configured peer repository paths for the current repository. The default path is selected at startup, if it has been configured. See hg.1.html#urls for details on specifying remote repository URLs.

To the right of the path combo box is the After Pull combo that selects the operation which is performed after every pull operation triggered by the sync bar. The user must have the rebase extension enabled in order for that option to be available in the after pull combo. The same is true of the fetch extension and it’s post pull operation.

To the right of the After Pull combo is the Settings button. It opens the repository settings tool on the Sync tab where the after pull configurable and peer repository paths can be configured.

Changesets which are added to the repository after the changelog tool was opened are marked with green stars in the graph. This includes recent commits, pulled changesets, and applied patches.


To clear the new, incoming, and outgoing marks from the changeset graph, use View -> Reset Marks

4.7.3. 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.

4.7.4. Performance Implications

There are some Repository Explorer features that should probably be avoided in large repositories.

  • View -> Color By Branch

    This option requires the log viewer to query the branch name of every revision in order to draw the graph. It can cause refreshes to be slow.

  • View -> Compact Graph

    This option can cause refresh to be slower than the default setting. Also be aware that enabling this feature makes the graph lines less accurate. The feature trades merge parent accuracy for horizontal screen space.

  • Column Changes

    This column can be expensive to calculate on repositories with large working copies, causing both refreshes and scrolling to be slow.

4.7.5. Revision Context Menus

Right-clicking on a revision in the (top) graph pane will bring up the revision context menu.

Visualize Change
Open this change in your visual diff tool
Display Change
Open this changeset in the changeset browser (more below)
Diff to Local
Display changes (visual diff) between this revision and your current working directory
Copy Hash
Copy current revision’s full hash to the clipboard
Push to Here
Performs the equivalent of ‘push -r <rev>’. This option is only available on changesets marked as outgoing.
Push this Branch
Performs the equivalent of ‘push –new-branch –branch <branch>’. This option is only available on changesets marked as outgoing.
Update your working directory to this revision. Opens the TortoiseHg update dialog with this revision selected.
Merge With...
Merge with this revision. Opens the TortoiseHg merge dialog with this revision selected.
Create a backout changeset for selected revision
Revert working copy to this revision’s contents, without updating working directory parent revision. Use with care.
Export Patch
Generate a patch file containing this revision’s changes
Email Patch
Send this revision’s changes to email recipient. Opens the TortoiseHg email dialog with this revision selected.
Bundle rev:tip
Create a bundle with all revs from selected to tip
Open the archive dialog for this revision, allowing user to generate a backup copy of the repository at that revision.
Add/Remove Tag
Open the TortoiseHg tag dialog with this revision selected
Add/Move/Remove Bookmark
Open the TortoiseHg bookmark dialog with this revision selected This option requires the boomarks extension to be enabled
Rename Bookmark
Open the TortoiseHg bookmark rename dialog This option requires the boomarks extension to be enabled
Mercurial Queues
Import revision to MQ
Import selected revision into the current patch queue. Only valid for qbase or checked out head revision. Only visible when MQ is enabled
Strip Revision...
Remove the selected revision and all of it’s descendants from the repository [1] Only visible when MQ is enabled
Transplant to local
Transplant selected revision onto the current working parent. Only visible when the transplant extension is enabled
Reset bisect state. See bisect section below.
Mark as Good
Mark changeset as good
Mark as Bad
Mark changeset as bad
Skip Testing
Skip testing this changeset

If you right-click on a row other than the one that was currently selected, you get a secondary context menu which defines commands that operation on revision ranges.

Diff with selected
Opens status viewer with cumulative changes of the range of changesets. The status viewer allows cherry picked changes to be saved to a file.
Visual Diff with selected
Opens visual diff window with cumulative changes of the range of changesets. See also menuselection:Global Settings –> TortoiseHg –> Visual Diff Tool
Email from here to selected
Opens email dialog with range of changesets.
Bundle from here to selected
Creates a bundle file with range of changesets.
Export patches from here to selected
Creates a patch file for each changeset in selected range.
Merge with ...
Merges this revision with the other selected revision. If neither revision is currently checked out, the merge dialog will be forced to update to the first selected revision before starting the merge. This will fail if the working directory is not clean.
Transplant revision range to local
Transplant selected range of changesets on to current working parent revision. Only visible when the transplant extension is enabled
Rebase on top of selected
Rebase selected changeset and ancestors on top of original selected revision. Only visible when the rebase extension is enabled
Import from here to selected to MQ
Import selected revision range into the current patch queue. Only visible when MQ is enabled
Select common ancestor
Selects (highlights) the common ancestor of the two selected revisions. Helpful, when reviewing merges.
[1]The strip command will store the stripped revisions in a bundle file that can later be reapplied. See also EditingHistory.

4.7.6. File Context Menus

Right-clicking on filenames in the file list (bottom left) pane will bring up a context menu for the selected file:

Visual Diff
Open this revision of the file in your visual diff tool
Diff to Local
Visualize differences between this revision and your checked out version
View at Revision
Open this revision of the file in your visual editor [2]
Save at Revision
Write this revision of the file to specified location
File History
Show revisions that modified this file [3]
Annotate File
Open this file in the datamine app, annotated at this revision
Revert File Contents
Checkout this specific revision of this file [4]
[2]Global Settings ‣ TortoiseHg ‣ Visual Editor
[3]Does not show revisions where a file was deleted, as this is only a manifest change, it does not modify the file’s history.
[4]The new contents will appear as local changes and must be committed.

4.7.7. Changeset browser

The changeset browser will only show a single file’s diffs at a time, as a performance optimization. If you would like to see all of the file diffs at once, click on the [All Files] row. The changeset browser will also skip displaying diffs for files which are above a maximum limit. See Global Settings ‣ TortoiseHg ‣ Max Diff Size. The size limit can be temporarily disabled by toggling View -> Ignore Max Diff Size.

The changelog and datamine tools can open the changeset browser to view a single revision or the combined effect of a range of revisions. The changeset browser is very similar to the commit and shelve tools. It has a file list on the left of all files that have been changed, and a diff pane on the right with the changes to each file.

The diff pane is tabbed and allows one to select files and hunks that you wish to extract from the changeset(s) you are browsing and write them to a patch file using the Save as toolbar button. This is a very efficient way to cherry pick changes from a repository. This changeset browser also supports the Ctrl-C keyboard accelerator to copy hightlighted diff hunks to the clipboard.

Unfortunately, TortoiseHg still does not have a dialog for importing patches into a repository, so this must be done on the command line with the hg import command.

4.7.8. Message Parsing

New in TortoiseHg 1.0, the repository browser 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.


issue.regex = #(\d+)\b
issue.link = http://bitbucket.org/<your project and repo>/issue/{1}/

issue.regex = \bissue\d+\b
issue.link = http://mercurial.selenic.com/bts/

4.7.9. Bisect

TortoiseHg 1.0 introduced support for bisect bug searching to help find changesets which introduce problems. To use, mark the earliest changeset you know exhibits the problem as bad, then mark the latest changeset which is free from the problem as good. The changelog tool will select a changeset for you to test. Once you have performed tests, mark the changeset as good or bad, and bisect will either update to another candidate changeset or announce that it has found the bad revision.

As a shortcut, you can also mark a revision as good or bad without checking it out first.

For more automated bisecting, you must use the Mercurial command line and provide an automated test that can build and run a changeset and return 0-good, 125-skip, or 127-abort, or anything else to mean bad. See the hg bisect command help for more information.

4.7.10. Keyboard navigation

Zoom to the working directory parent revision
Display visual diffs for selected changeset or file
Refresh repository contents
Go to a specific revision

4.7.11. Configurables

The changelog browser has a few configurable options that can be set in the TortoiseHg Settings dialog on the Changelog 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
Copy Hash
Copy a revision’s changeset id hash to the clipboard when selected [DEPRECATED]
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.
Use Expander
Show changeset details within an expander. When contained within the expander, the details do not scroll with the changeset contents.

The exact colors given to particular users can be configured by adding lines like these to your Mercurial.ini file:

authorcolor.USERNAME = color

The changelog browser 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
Bottom Diffs
Show diffs below file list

4.7.12. From command line

The changelog viewer can be started from command line

hgtk log [OPTIONS] [FILE]

aliases: history

changelog viewer


 -l --limit  limit number of changes displayed

use "hgtk -v help log" to show global options