From the PowerBuilder IDE: see what you changed
The everyday use of pb-diff is inside PowerBuilder. You change an object in the IDE, choose Git Diff or SVN Diff from PowerBuilder's source-control menu, and pb-diff opens on your change against the version in the repository: the object's hierarchy, the functions, events and controls you changed, and nothing the IDE merely wrote out differently.
This page sets that up. Configure the viewer in PowerBuilder itself:
pb-diff does not edit PowerBuilder settings or pb.ini
files. These instructions apply to native Git and SVN connections with a
Diff Viewer page, not to the older PBNative/SCC API
connection. Use the desktop executable
pb-diff.exe, not the headless
pb-diff-cli.exe.
There are three routes. Choose the first unless you already work with TortoiseGit or TortoiseSVN.
1. PowerBuilder directly, without any visual GIT client
For this route you need PowerBuilder with its native Git or SVN connection already configured and an installed or portable copy of pb-diff. No visual Git client is required: PowerBuilder supplies the two source files and launches pb-diff directly.
- Open the PowerBuilder version you want to configure.
- Right-click the workspace (or solution), choose Properties, select Source Control and click Advanced.
- Select Diff Viewer, choose Other, and fill in the fields below.
| Field in PowerBuilder | Value |
|---|---|
| Diff Tool | Other |
| Executable, if shown separately | pb-diff.exe |
| Path to Executable | C:\Program Files\pb-diff\pb-diff.exe, replaced with
your installed or portable path |
| Arguments | The following line only, without an executable name |
-SDI -Mode TwoWay -Detect H -File1 "%base" -File2 "%mine"
- Save with OK in the Advanced and Properties dialogs. Set the executable path as well as the tool selection; choosing a tool without its path can leave the previous selection in place.
- Reopen Advanced to check the saved values, then use Git Diff or SVN Diff on a tracked, locally modified object. pb-diff shows the synchronized source on Old and your local edits on New.
%base is the synchronized version (Old);
%mine is the local version (New). Keep the double quotes
around both placeholders for paths containing spaces.
-Detect H reads the PowerBuilder export header when a
temporary file name does not describe its object type, and for a
PowerBuilder 2025 Solution source, which has no header, how the file
opens. -SDI makes the comparison the whole session: close
it and PowerBuilder carries on. Replace the whole argument template:
Tortoise's /command:diff /path:%mine is not a pb-diff
command and does not supply both input files. The older PBNative/SCC API
%s placeholders and Git's
$LOCAL/$REMOTE variables do not belong in this
PowerBuilder dialog.
No client-registration command in pb-diff is needed for this route. A visual Git client may be installed on the same machine, but it is not involved in comparisons started this way from the IDE. Configure PowerBuilder's Diff Viewer independently of that client's settings.
Diff Viewer configures comparisons only.
PowerBuilder's separate Show Log/Edit Conflicts page
(Show Log in some versions) requires TortoiseGit for Git or TortoiseSVN
for SVN in the native integration described here. Without that client,
those IDE commands are unavailable. Do not put pb-diff.exe
in that field: pb-diff does not retrieve repository history or mark
repository conflicts resolved. Use Git's command line or a separate
client for those operations.
2. PowerBuilder through TortoiseGit or TortoiseSVN
Use this route when you want PowerBuilder to delegate comparisons to the Tortoise client and reuse that client's per-extension diff settings. There are two configurations, in two programs.
- In pb-diff, open Tools ▸ Set up TortoiseGit for Git or Tools ▸ Set up TortoiseSVN for SVN. Review the export-extension rows and choose Apply. Rows belonging to another tool are not selected automatically: select them explicitly if pb-diff should replace that viewer. If the client is already configured for this pb-diff installation, no registration change is needed. See Source-control setup.
- In the PowerBuilder version you use, open workspace or solution Properties, Source Control, Advanced, then Diff Viewer. Select the corresponding Default (TortoiseGit …) or Default (TortoiseSVN …) preset and browse to the executable below.
| Connection | Executable in PowerBuilder | Typical path |
|---|---|---|
| Git | TortoiseGitProc.exe |
C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe |
| SVN | TortoiseProc.exe |
C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe |
- Keep the preset's arguments, normally
/command:diff /path:%mine. These are Tortoise arguments, not the direct pb-diff arguments from route 1. Save both dialogs. - If you want PowerBuilder's history and conflict commands, set
Show Log/Edit Conflicts (called Show
Log in some versions) to the same Tortoise executable. Do not
select
pb-diff.exe,TortoiseGitMerge.exeorTortoiseMerge.exethere.
PowerBuilder launches Tortoise, which obtains the required revisions and launches its configured viewer. PowerBuilder does not import Tortoise settings; Tortoise reads them when called. Merely installing Tortoise is not enough: the relevant extension must be registered with pb-diff under the same Windows account, and PowerBuilder must select Tortoise as its viewer. Other file types retain their existing Tortoise viewer. The setup commands do not install Tortoise.
The client's Diff Viewer and Merge Tool settings are separate. Registering a diff tool does not configure conflict editing. After saving a merged export in pb-diff, close the comparison session and confirm resolution in the client rather than inferring it from the GUI exit code. Refresh and compile the object in PowerBuilder, then use Git Resolve or SVN Resolve as appropriate before committing. Saving an export does not update an object already loaded in a PBL.
3. Other visual Git clients
Tortoise is one option, not a prerequisite for pb-diff. If you use another visual Git client, such as Sourcetree or Git Extensions, PowerBuilder can still use the direct setup in route 1.
Comparisons started in that client are a separate integration, configured in the client's own external diff and merge settings; Source-control clients gives the command lines. Another Git GUI is not a drop-in executable for PowerBuilder's native Show Log/Edit Conflicts page either: open that client's history or conflict commands outside the IDE. For SVN without TortoiseSVN, use the equivalent external-client workflow.
Several PowerBuilder versions on one machine
Open and configure each PowerBuilder version you use. Do not assume that changing PB 2022 also configures PB 2019 or PB 2025. Their user settings can live in different files, for example:
%LOCALAPPDATA%\Appeon\PowerBuilder 19.0\pb.ini
%LOCALAPPDATA%\Appeon\PowerBuilder 22.0\pb.ini
%LOCALAPPDATA%\Appeon\PowerBuilder 25.0\pb.ini
These are examples of configuration locations, not files pb-diff
scans or modifies. Use each IDE's Advanced dialog
rather than copying an entire pb.ini between versions.
Custom locations and other preferences in those files are another reason
to let PowerBuilder save them.
On the reported PB 2022 R3 installation, Diff Viewer settings are shared across workspaces: opening the dialog through workspace properties does not make the setting workspace-specific. That observation does not establish sharing across versions or Windows accounts. Check the viewer in each IDE you use. If you move a portable pb-diff installation, update every direct path to it; for the Tortoise route, update Tortoise's pb-diff associations instead.
Check the configuration and its limits
After saving, check Advanced again and compare a tracked, locally modified window or DataWindow. Git Diff and SVN Diff are unavailable for an unchanged or untracked object. Verify that pb-diff shows the synchronized source on Old and the local edits on New, including when the project path contains spaces. For route 2, also test a history comparison from Tortoise. For route 3, test a comparison from the other client separately from the IDE. Test merging on a disposable conflict before using it on working changes.
If Tortoise opens its own viewer, check the extension entry and the Windows account. If a direct launch lacks one input, check Other, the saved executable path and the full two-placeholder argument line. PowerBuilder or the invoking client expands placeholders; pb-diff does not. These are configuration recipes, not certification of every IDE or Git GUI version.
PowerBuilder also offers .pbw and .pbt
comparisons, and pb-diff compares both, target by target and library by
library (see Project and build files).
The direct route uses one viewer for every one of PowerBuilder's diff
operations, these included. PowerBuilder's native Git and SVN Diff does
not offer binary .pbl comparison. Compare .pbl
and .pbd files by opening them directly in pb-diff or
through Tortoise's library diff associations. Libraries remain read-only
and have no merge association.
A PowerBuilder 2025 Solution uses the same set-up; its objects are UTF-8 source files that Git and SVN track directly. See PowerBuilder 2025 Solutions.
References
Appeon's Git Diff,
SVN
Diff, Git Show
Log/Edit Conflicts, SVN Show
Log/Edit Conflicts, Git conflict
resolution and SVN conflict
resolution. The illustrated Git
and SVN
walkthroughs show Other and the two-file argument
convention. Tortoise's automation references explain diff
and conflicteditor for TortoiseGit
and TortoiseSVN.