Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Mercurial GraphNew to Visual Studio Code? Get it now.
Mercurial Graph

Mercurial Graph

fama

|
4 installs
| (0) | Free
Visualize Mercurial commit history with branches, bookmarks, tags, and revision diffs
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mercurial Graph

Mercurial Graph is a Visual Studio Code extension for exploring a Mercurial repository's commit graph. Its editor view combines a lane-based graph and commit table with branch, bookmark, and tag badges; branch filtering; commit search; a commit detail panel; changed-file diffs; and a right-click context menu.

The extension complements vscode-hg; it does not replace staging, commit, push, or pull features.

Requirements

  • Visual Studio Code 1.85 or newer
  • Mercurial (hg) installed and available on PATH, or configure mercurialGraph.hgPath

Enable and Open the Graph

After installing Mercurial Graph, it is enabled automatically. Open a folder containing a Mercurial repository, then open the graph using either method:

  • Command Palette: press Ctrl+Shift+P (Cmd+Shift+P on macOS), then run Mercurial Graph: View Repository Graph.
  • Source Control: open the Source Control view and click the Mercurial Graph action in its title bar.

The graph opens in an editor tab. If the command or icon is missing, open Extensions, search for Mercurial Graph, and make sure it is enabled. If needed, use the extension's gear menu to enable it, then reload the VS Code window.

Use the branch picker or search field to narrow history. Select a commit to see its metadata and changed files; select a file to open its parent-versus-commit diff. Right-click a commit to view details or copy its changeset ID.

Use Mercurial Graph: Refresh or the Refresh button in the graph to reload history. Ctrl/Cmd+F focuses commit search and Ctrl/Cmd+R refreshes the graph. The graph displays the most recent 100 commits by default; change mercurialGraph.maxCommits to adjust the limit.

Build and Package

From the monorepo root, run:

pnpm install
pnpm --filter mercurial-graph run compile
pnpm --filter mercurial-graph run package

The generated VSIX is written to this extension directory. Building requires Node.js 24 or newer and pnpm 12 or newer.

Implementation

Commit metadata comes from hg log --template json; graph lanes are generated in the webview from parent changesets and update with branch/search filters. Changed-file status and historical contents come from hg status --change and hg cat. Diffs are opened in VS Code's native diff editor and compare each commit with its first parent.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft