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
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
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 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
Filter features in changelog tool
The search bar allows one to quickly filter the changesets panel. Buttons from right to left...
- All
- Show all changesets in the respository. Essentially removes all filters.
- Tagged
- Show only changesets with tags.
- Ancestry
- Show only changesets that are ancestors of the currently selected changeset. This option is only sensitive when a revision is selected.
- Parents
- Show only the working directory parent revisions. Unless a merge is in progress, this will be only one revision.
- Heads
- Show only repository heads (changesets without any child revisions).
- Merges
- Show only merge changesets (changesets with two parents)
- Hide Merges
- A toggle button, not a radio like the other buttons in the search bar, which toggles the display of merge changesets.
- Branches
- A combo box with the list of named branches in your repository. See Repo Settings -> Changelog -> Dead Branches for a method to prune names from this combo box.
- Custom Filter Combo
- Finally there is a combo box that selects among the various filter types that can be manually specified.
To specify a custom filter, the user selects the filter type, enters the search text of that type, and then hits return in the text entry.
- Rev Range
- Parse the user text as a revision range. See hg.1.html#revisions for details on how to specify revision ranges.
- File Patterns
- Parse the user text as a file pattern glob, unless the user text is prefixed with a pattern type like regexp:. See hg.1.html#patterns for details on how to specify file patterns.
- Keywords
- Parse the user text as a keyword pattern that should be matched against changeset meta data like comitter, message, etc.
- Date
- Parse the user text as a date range. See hg.1.html#dates for details on how to specify date ranges.
- User
- Parse the user text as a user / comitter name.
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.
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.
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
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