Skip to content
pb-diff Help

What pb-diff does

pb-diff answers one question: what changed between two versions of a PowerBuilder object, and how do you carry the parts you want from one version into the other?

The problem with a text diff

Take two exports of the same window, a fortnight apart. Run a text diff over them and you may get four hundred differing lines. Read them and you find that one developer added an event, and the rest is the PowerBuilder IDE having written the same object out in a different order, with different attribute casing, with declarations grouped differently. The change you care about is in there somewhere.

That is the everyday failure of comparing PowerBuilder exports as text. Three things cause it:

Compared as PowerBuilder sees it

pb-diff parses the export instead. It builds the object's hierarchy: export header, forward declarations, type and property blocks, structures, global, shared and instance variables, external function declarations, one node per function and per event, each control with its own properties and scripts, and the .create and .destroy scripts. It compares a semantic representation section by section, so reordering alone produces no differences, and the differences that remain are attached to the function, event or control they belong to. The panes and the reports still show the original source, exactly as the file has it; the representation used for comparing is never substituted for what the file said.

DataWindows are handled the same way: DataWindow and band properties, visual controls, database columns, Table properties, Retrieve SQL and every direct name=value attribute are separate levels, so a changed display format or one more line of SQL is found and named. The files a build reads beside the objects are read the same way: a target or a PowerBuilder 2025 project is compared library by library, a workspace or a Solution project by project, a resource file resource by resource and a PowerGen project application by application (see Project and build files). XML and XAML, JavaScript and INI files are parsed too. HTML is syntax-coloured and compared as text, and so is anything else. A file that will not parse falls back to a text compare rather than failing.

Without PowerBuilder installed

pb-diff reads PowerBuilder libraries directly: .pbl and .pbd files, and the libraries appended to a built .exe or .dll. Comparing two releases does not start with exporting them, and needs neither PowerBuilder nor ORCA on the machine. It reads PowerBuilder 2025 Solutions as well, whose libraries are folders of source files. See Reading PowerBuilder libraries and PowerBuilder 2025 Solutions.

It works where PowerBuilder developers already are. The PowerBuilder IDE can open it to show what you changed, and TortoiseGit, TortoiseSVN and Git as their diff and merge tool; see From the PowerBuilder IDE: see what you changed.

Merging, and a command line for scripts and agents

A comparison can be turned into a merge: take a function, a control or a single changed block back from the old version, or combine two developers' changes to one object against the version both started from. pb-diff keeps the parts of a control that must agree in step, never writes conflict markers into an object, and saves an export file PowerBuilder imports. See How merging works.

pb-diff-cli.exe does the same comparisons and merges without a window, for build scripts and AI agents, with JSON output and exit codes a script can branch on. See Automate with pb-diff-cli. pb-diff-ci.exe is the tool for build machines: copied on its own to any build machine, it compares libraries and folders object by object, reports what changed and checks sources after a merge, with no licence and no network. See Run pb-diff in CI.

One licence, the whole product

pb-diff is one product: every licence includes the comparisons, both kinds of merge and pb-diff-cli, and the subscription includes pb-diff-ci for build machines, which needs no licence of its own. A licence is issued to a named person and is active on one computer at a time; see Licence for activating it, moving it and using it on a build server.

Where to start