Compare Summary
A Compare Summary tab lists one row per file or library entry in a comparison of many objects, along with its state. From here you decide which pairs are worth opening in detail. One opens when New Comparison was given two libraries, when a File Selection is compared, when two folders are named on the command line or dropped on the window, or when a saved selection of two file lists is opened. Two releases of a library walks through one.
The rows
Every file, or every entry of a library, appears once, with a status marker, a status name and a row tint:
| State | Meaning |
|---|---|
| New | Present in New only. |
| Modified | Present on both sides, and they differ. |
| Deleted | Present in Old only. |
| Unchanged | Present on both sides with no differences. Hidden while Only changed rows is on. |
| Renamed, unchanged | A pair you paired by hand, compared, no differences. |
| Renamed, modified | A pair you paired by hand, compared, differences found. |
The markers are described in the Status Icon Legend. Beside each name the grid carries the object type and the size of each side, and above the grid a line tallies how many rows are in each state. That tally sits with the rows it counts rather than in the tool bar, which carries the commands of the tab in front and no readings.
How rows are matched
Old and New are matched by file or entry name, ignoring case. A
library entry and an exported file of the same object therefore meet,
which is how a .pbl is compared against a folder of its own
exports. A folder in a selection is expanded first: it stands for the
PowerBuilder objects and libraries beneath it, and the files that come
out of it are matched by name like any others. A file that was renamed
appears as one Deleted row and one New row; pair them yourself as
described in Pair renamed
objects.
Two inputs on one side that come to the same name are ambiguous. This happens most often when two folders on one side each hold a file with that name. pb-diff does not guess which one pairs with which. Neither is paired, each is listed under the path that distinguishes it, and a note above the grid identifies the name and the files that carried it. Pair the intended files by hand, or remove one from the File Selection. The note disappears once the ambiguity is gone.
Nothing an input list names can disappear from the result. The same
notes above the grid name a file that has been deleted since the
selection was saved, and a folder that could not be read to the bottom,
because either one leaves the comparison short of something the lists
name. It also names a .pbl or .pbd that is not
a PowerBuilder library, which is left out of the comparison, and a file
whose content is not the format its extension names, which stays in the
grid compared as text: see When a
file is not what its name says. And they say what a folder holding a
whole application gave twice and pb-diff took once - a .pbd
beside its .pbl, compiled objects whose source is there,
ws_objects: see the File
Selection.
The notes are grouped by kind and side, each group headed by how many it holds; click a group to see its notes. The band never grows beyond a few lines - it scrolls instead - so the grid is always in view, and Hide notes folds it to its first line.
How hard pb-diff looks at each pair before calling it modified is the Object compare type option (Options ▸ PowerBuilder):
- Metadata looks at size and modification time only. Fast enough to survey thousands of entries, but it will call an object modified when only its timestamp moved.
- Binary compares the bytes. Exact, but a re-export with no semantic change reads as modified.
- Parsed parses both sides and compares the hierarchies. Slowest, and free of the false positives the other two produce. This is the default.
While it compares
Comparing two application folders can take a while. The status bar says how far it has got - first the files being read, then the objects being compared, with a count and a progress bar - and Cancel beside it stops the compare. A cancelled compare leaves the summary as it was, and closing the summary stops its compare too.
Showing only what changed
Only Changed Items (Ctrl+Shift+I) leaves the new, modified, deleted and renamed-modified rows and hides the rest. The same command does the same job in a File Compare, so one toggle means one thing everywhere. This tab puts it in the tool bar as an Only changed rows box. It starts selected when the summary opens, as Show only changed items when a comparison opens in Options decides. On a library with two thousand entries and nine changes that is what you want; clear it when you need to see the unchanged rows as well.
Opening a detailed compare
Double-click a modified or renamed-modified row to open a File Compare tab for that source pair.
Enter or Ctrl+Enter does the same for
the selected rows, each in its own tab. This also works when a
source-control client launches pb-diff with -SDI: the
summary remains the primary tab, and its details and reports stay in the
same window. Closing a detail returns to the summary; closing the
summary ends the session after any unsaved-merge confirmation.
Compiled entries and resources do not contain source to show. Double-clicking them explains that only metadata or byte comparison is available, rather than opening binary data as a source diff; see Reading PowerBuilder libraries. A PBD that does carry source entries can open those entries normally.
Click one Deleted row and one New row, and Pair as Rename joins them; Remove Rename Pairing takes the pairing apart again. Rows that can each be opened on their own are not a rename: select several of those and each opens in its own tab. See Pair renamed objects.
A row that exists on one side only has nothing to compare, and pb-diff says so rather than opening an empty tab. When the two sides turn out to be identical, the tab says that too, above the grid.
Saving the selection
File ▸ Save writes the two file lists this summary
came from to a .pbdiff-sel selection file, with any rename
pairings, which File ▸ Open Selection and
-Mode LoadFile read back. Use it when a summary turns out
to be one you will want to repeat.
Reports
Two reports are produced from this tab, under Compare ▸
Reports: Comparison Report lists every row,
and Comparison Changes Report lists the new, modified,
deleted and renamed-modified rows. See Reports. The same states and counts come as JSON
from
pb-diff-cli compare-lib old.pbl new.pbl --changed-only --format json,
whose exit code tells a build script whether anything changed.