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

Changelog viewer dialog with main toolbar hidden

New in 0.9, the changelog tool has a menu bar for accessing tool functions and for launching other tools.

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

The toolbar buttons from left to right:

Refresh
Reload the revision history (if you commit in another window, etc)
Synchronize
Opens synchronize tool to communicate changes with other repositories
Patch Queue
Toggles the display of the MQ pane. This button is only visible when the MQ 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

Changelog

Synchronization features in changelog tool

From left to right...

Incoming
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
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
Reject the changesets from the previewed bundle and exit preview mode. This button is only sensitive when previewing a changeset bundle.
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 are marked with an ‘up’ arrow.
Push
Push outgoing changesets to the remote repository.
Email
Email outgoing changesets to the remote repository.
Stop
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.

Note

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. 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
Update
update your working directory to this revision [1]
Merge With
merge with this revision [2]
Export Patch
generate a patch file containing this revision’s changes
Email Patch
send this revision’s changes to email recipient [3]
Bundle rev:tip
create a bundle with all revs from selected to tip
Add/Remove Tag
opens the TortoiseHg tag dialog with this revision selected
Backout revision
create a backout changeset for selected revision
Revert
revert working copy to this revision’s contents, without updating working directory parent revision. Use with care.
Archive...
open the archive dialog for this revision, allowing user to generate a backup copy of the repository at that revision.
Transplant to local
Transplant selected revision onto the current working parent. Only visible when the transplant extension is enabled
qimport
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 [4] Only visible when MQ is enabled

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 [5]
Opens visual diff window with cumulative changes of the range of changesets.
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 selected [6]
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
qimport from here to selected
Import selected revision range into the current patch queue. Only visible when MQ is enabled
[1]Opens the TortoiseHg update dialog with this revision selected.
[2]Opens the TortoiseHg merge dialog with this revision selected.
[3]Opens the TortoiseHg email dialog with this revision selected.
[4]The strip command will store the stripped revisions in a bundle file that can later be reapplied. See also.
[5]Global Settings ‣ TortoiseHg ‣ Visual Diff Command
[6]Only sensitive if the selected revision is your current working directory parent

4.7.5. 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 [7]
Save at Revision
Write this revision of the file to specified location
File History
Show revisions that modified this file [8]
Annotate File
Open this file in the datamine app, annotated at this revision
Revert File Contents
Checkout this specific revision of this file [9]
[7]Global Settings ‣ TortoiseHg ‣ Visual Editor
[8]Does not show revisions where a file was deleted, as this is only a manifest change, it does not modify the file’s history.
[9]The new contents will appear as local changes and must be committed.

4.7.6. 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.7. Keyboard navigation

Ctrl-P
Zoom to the working directory parent revision
Ctrl-D
Display visual diffs for selected changeset or file
Ctrl-R
Refresh repository contents

4.7.8. 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:

[tortoisehg]
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.9. From command line

The changelog viewer can be started from command line

hgtk log [OPTIONS] [FILE]

aliases: history

changelog viewer

options:

 -l --limit  limit number of changes displayed

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