Pair renamed objects
Rows in a Compare Summary are matched by name, so an object that was renamed between the two versions shows up as a deletion and an unrelated addition. This page explains how to tell pb-diff that those two rows are the same object.
Why pb-diff does not guess
Renames are not recorded in an export file or in a library, and guessing them from content similarity produces confident wrong answers: a copied-and-edited window looks exactly like a renamed one. pb-diff therefore never invents a rename pairing. You make it, and it is applied to that compare only until you save the selection; nothing in the compared files or libraries is touched.
Pair two rows
- Click the Deleted row.
- Click the New row; the first row stays selected, without a modifier key. Either order works.
- Choose Compare ▸ Pair as Rename, or its labelled button in the tool bar.
The command is enabled only for exactly one Deleted row and one New row. Their states decide which is Old and which is New, so click order cannot reverse the comparison or pair one side of an already modified row by mistake.
The pair is compared on its own, by whatever Object compare type the rest of the summary used, and the two rows are replaced by one carrying the result: Renamed, unchanged if the two are the same object under two names, Renamed, modified if they also differ. The row shows both names, and the status bar says which two rows became which one. Double-click it to open the detailed File Compare for the pair.
Remove a pairing
Select the renamed row and choose Compare ▸ Remove Rename Pairing, or its labelled tool-bar button. The combined row is removed and the original Deleted and New rows return. Refresh keeps the pairings you have not removed, and saving the selection with File ▸ Save keeps the ones that remain.
Try it
Compare rename/old/orders.pbl with
rename/new/orders.pbl, two versions of the Order Desk
library (see The
Order Desk examples), and switch off Only Changed
Items. Among the unchanged objects, the summary shows
n_tax.sru as Deleted and n_tax_calculator.sru
as New.
Select those two rows and choose Pair as Rename. They become one Renamed, modified row: the object was renamed, and it also gained a French tax rate. Double-click it, and the changed function is the only thing the detailed compare shows, instead of one whole object deleted and one whole object added. Save the selection to keep the pairing; the saved selection carries it.
The CLI takes the pairing as an argument instead of a click, repeatable for as many renames as you have. Both commands return exit code 1, but the entry statuses differ (unpaired, paired):
pb-diff-cli compare-lib rename/old/orders.pbl rename/new/orders.pbl --format json
pb-diff-cli compare-lib rename/old/orders.pbl rename/new/orders.pbl --pair n_tax.sru=n_tax_calculator.sru --format json