Inline Git & Mercurial Blame for the Delphi IDE
Features · Requirements · Installation · Usage · Configuration · Changelog · License
DX.Blame brings GitLens-style blame annotations directly into the Delphi code editor. See who changed a line, when, and why — without leaving the IDE.
Works with Git and Mercurial repositories. Auto-detects the VCS in use.
- Blame annotation at the end of the current line (author, relative time)
- Caret-anchored positioning — annotation follows the caret column, preventing horizontal jumps on lines of varying length
- Theme-aware color that adapts to light and dark IDE themes
- Configurable display: author, date format, max length, summary
- Current line's blame info displayed in the IDE statusbar
- Click the statusbar panel to open commit details
- Runs independently of inline annotations — use both, or either
- Click on an annotation to see full commit info (hash, author, date, message)
- Open a color-coded diff dialog showing exactly what changed
- Navigate to the annotated revision — opens the historical file version scrolled to the source line
- Git via
git blame --porcelainandgit show - Mercurial via
hg annotatewith template-based parsing andhg cat/hg log - TortoiseHg context menu integration (Annotate, Log)
- Auto-detection of
.git/.hgin the project directory - Configurable VCS preference when both Git and Hg are present (remembered per project)
- Settings page under Tools > Options > Third Party > DX Blame
- Toggle blame via Ctrl+Alt+B keyboard shortcut
- Toggle blame via editor right-click context menu
- Splash screen and About Box registration
- Asynchronous blame engine — never blocks the IDE
- Optional debug logging to the IDE Messages window (off by default for Release-built packages)
- Delphi 12 Athens or Delphi 13
- Git installed and available in
PATH(for Git repositories) - Mercurial (hg) installed and available in
PATH(for Mercurial repositories) - Windows 10 or later
DX.Blame compiles from a single codebase on Delphi 12 and 13 using conditional compilation ({$IF CompilerVersion}). Delphi 13-specific features (e.g. INTACodeEditorEvents370 for click-consuming and caret tracking) are enabled automatically when building with Delphi 13. On Delphi 12, the plugin uses the standard INTACodeEditorEvents interface — all core functionality (inline blame, statusbar, commit details, diff dialog) works identically.
-
Clone the repository:
git clone https://github.com/omonien/DX.Blame.git -
Open
DX.Blame.groupprojin the Delphi IDE -
Build the
DX.Blame.bplpackage (right-click → Build) -
Install the package:
- Component > Install Packages > Add...
- Navigate to
build\Win32\Debug\DX.Blame.bpl(orbuild\Win32\Release\...if you built Release) - Click OK
-
The plugin is now active. Open a file in a Git or Mercurial repository to see blame annotations.
Alternatively, build from the command line using the included PowerShell script:
.\build\DelphiBuildDPROJ.ps1 -ProjectFile .\src\DX.Blame.dprojThis automatically detects the newest Delphi version on the system (defaults: Debug, Win32). For a Release build: add -Config Release. To build the test runner: use -ProjectFile .\tests\DX.Blame.Tests.dproj.
After building the test project, run DUnitX from the output folder (same Config / Platform as the build):
.\build\Win32\Release\DX.Blame.Tests.exe -exit:Continue -consolemode:QuietFor a Debug build, use .\build\Win32\Debug\DX.Blame.Tests.exe instead. All tests should pass before tagging a release.
The design-time package is linked into the IDE’s Bpl directory (see DCC_BplOutput in DX.Blame.dproj), not under build\. For example, with Delphi 13 (37.0) on Win32 you will typically get:
%PUBLIC%\Documents\Embarcadero\Studio\37.0\Bpl\DX.Blame370.bpl
Use that file when installing the package in the IDE or when attaching a binary to a GitHub release.
Open any source file in a Git or Mercurial repository. Blame annotations appear automatically at the end of each line showing the author and relative time.
Press Ctrl+Alt+B to toggle blame annotations on and off.
Right-click in the editor to access:
- Enable/Disable Blame (Ctrl+Alt+B) — quick toggle with checkmark
- Show revision... — open the historical file version at the annotated commit, scrolled to the current line
Click on a blame annotation (or the statusbar panel) to see full commit details including hash, author, date, and message. From there, open the Diff dialog to see color-coded changes.
Access settings via Tools > Options > Third Party > DX Blame.
| Setting | Description | Default |
|---|---|---|
| Show Author | Display author name in annotations | On |
| Date Format | Relative ("3 days ago") or absolute | Relative |
| Show Commit Summary | Include commit subject in the annotation text | Off |
| Max Length | Maximum length of the annotation string (20–200) | 80 |
| Annotation Color | Auto (theme-derived) or custom color | Auto |
| Annotation Position | Caret-anchored or right-aligned in editor | Caret-anchored |
| Popup Trigger | Hover over annotation or click on hash link | Hover |
| Show Inline | Enable/disable inline annotations | On |
| Show in Statusbar | Enable/disable statusbar blame | On |
| VCS Preference | Auto / Git / Mercurial | Auto |
| Hotkey | Keyboard shortcut for toggle | Ctrl+Alt+B |
| Enable debug logging | Write diagnostic lines to IDE Messages | On in Debug builds, off in Release builds |
Settings are stored in %APPDATA%\DX.Blame\settings.ini.
Release notes and version history: CHANGELOG.md.
Version numbers are defined only in src/DX.Blame.Version.pas (cDXBlameMajorVersion … cDXBlameBuild). The string shown in the IDE (splash, about) comes from DXBlameVersionString, which is derived from those four values.
The Delphi project files duplicate Win32 version metadata (FileVersion / ProductVersion in the .dproj files). After changing the numeric constants, run build/Sync-DXBlameVersion.ps1 so the package and test projects stay aligned. Use -WhatIf to preview changes.
DX.Blame/
src/ Source code (33 units in the design-time package)
DX.Blame.dpk Design-time package
DX.Blame.dproj Project file
res/ Resources (splash icon, logos)
build/ Build output, DelphiBuildDPROJ.ps1, Sync-DXBlameVersion.ps1
tests/ DUnitX test project
docs/ Documentation
libs/ External dependencies (Git submodules)
CHANGELOG.md Release notes
MIT License — Copyright © 2026 Olaf Monien