Skip to content
pb-diff Help

Two releases of a library

Comparing two releases does not start with exporting them. This tutorial compares the two Order Desk libraries directly, opens one changed object from the result, and then compares a folder of exports against a library. The files are the Order Desk examples described in Your first comparison.

Compare the two libraries

Choose Compare ▸ New Comparison, leave it on Two-way comparison, and give it libraries/release-1.4/orders.pbl as Old and libraries/release-1.5/orders.pbl as New. Browse accepts a PowerBuilder library as well as a source file. Choose Compare.

Two whole libraries open a Compare Summary tab: one row per library entry, each marked New, Modified, Deleted or Unchanged. Only Changed Items is on when it opens; on a real application it turns four hundred rows into six. Switch it off to see all fourteen entries: nine modified, n_invoice_export.sru new, w_print_preview.srw deleted and three unchanged.

pb-diff Compare Summary of two PowerBuilder libraries, release 1.4 and release 1.5 of orders.pbl. The grid lists every object with its status: w_order_entry, d_order_lines, n_order_service, m_order_desk, w_customer_lookup, the structure s_order_line, the query q_open_orders, the data pipeline dp_archive_orders and the project p_order_desk modified, n_invoice_export new, w_print_preview deleted, and the application, the function f_round_money and the tax object unchanged.
Release 1.4 and release 1.5 of orders.pbl compared entry by entry, without exporting anything: modified, new, deleted and unchanged objects in one summary. Select the image to view it at full size.

Double-click w_order_entry.srw. The same File Compare opens as the exported files give in Your first comparison. A row of a compiled or resource entry does not open a source comparison: it explains that only metadata or byte comparison is available.

pb-diff opens both libraries read-only. From the command line (summary, changed only):

pb-diff-cli compare-lib libraries/release-1.4/orders.pbl libraries/release-1.5/orders.pbl --format json
pb-diff-cli compare-lib libraries/release-1.4/orders.pbl libraries/release-1.5/orders.pbl --changed-only --format json

Both return exit code 1, differences found; the JSON identifies each entry and its status.

Look through one library

To look through one library rather than compare two, choose File ▸ Open Library and open libraries/release-1.5/orders.pbl. Type in the search box to narrow the list; Source only hides compiled and resource entries. See Library.

pb-diff showing the contents of orders.pbl from release 1.5 in a library tab: one row per object with its type, size and modification time, and the Source only filter and search box in the tool bar.
File > Open Library shows what a library holds, with a Source only filter and a search box. The library is opened read-only. Select the image to view it at full size.

The same list from the command line (result):

pb-diff-cli list libraries/release-1.5/orders.pbl --format json

A folder of exports against a library

New Comparison takes two paths. For a folder of exports, or any set of files, folders and libraries, open File ▸ New File Selection instead: a tab holding two lists, Old and New.

Add the folder old to Old and the library libraries/release-1.5/orders.pbl to New, by dragging them from Explorer onto the list or with the tool bar's Old Folder and New Files buttons. Then save the selection with File ▸ Save. The lists show a folder of release 1.4 exports against the release 1.5 library.

pb-diff File Selection with the old folder of exports in the Old list and orders.pbl from release 1.5 in the New list, ready to be compared.
A File Selection with a folder of release 1.4 exports on the Old side and the release 1.5 library on the New side. Select the image to view it at full size.

Compare pairs each exported file with the library entry of the same object, even though one side is a folder and the other a library: the same eleven changes as between the two libraries, and the unchanged objects with them when Only Changed Items is off.

pb-diff Compare Summary pairing the exported files of release 1.4 with the entries of the release 1.5 library by object name, with their statuses: modified, new, deleted and unchanged.
The comparison of that selection: each exported file meets the library entry of the same object. Select the image to view it at full size.

The CLI addresses a library entry directly, written library!entry (result):

pb-diff-cli compare libraries/release-1.4/orders.pbl!d_order_lines.srd libraries/release-1.5/orders.pbl!d_order_lines.srd --format json

The saved selection names its folder and its library under C:\pb-diff-demo. It opens unchanged when the examples are there; otherwise build the same selection with your own paths.

Next