Settings and profile files
pb-diff keeps your preferences and session state in plain text files, not in the registry, so you can read, edit, copy or delete them. Only the desktop application reads them.
Where the options are kept
The options are stored per user as JSON in
%APPDATA%\pb-diff\settings.json, a file that is readable,
diffable and easy to copy between machines. A settings.json
beside the executable takes precedence over the per-user file, which is
what you want on a USB stick or a shared build agent. Starting pb-diff
with --portable selects that local file even when it does
not exist yet, which keeps a portable copy's settings with it. pb-diff
writes nothing until a setting changes, then writes back to the file
selected at start-up.
--portable moves the settings and nothing else. The
Recent list, the last file selection, the last three-way paths and the
window and pane geometry stay in %APPDATA%\pb-diff\: they
are a record of what you did rather than how you work, and copying them
between machines would be a nuisance rather than a convenience. If the
folder beside the executable is not writable, such as a read-only share,
a CD or an installation under Program Files, the status bar
says so the first time you press OK in Options. Your choices apply to
that session but are not remembered.
The file is text so that you can edit it, and an edit can go wrong. A
settings.json that is no longer valid JSON is renamed to
settings.json.bad and pb-diff starts on the defaults,
rather than silently replacing it and overwriting your mistake at the
first change: the mistake stays in front of you and the values you had
are still there to copy back. The file need not name every setting: one
it does not mention keeps its default, and so does a setting a later
version of pb-diff adds.
pb-diff-cli takes compare options from the switches on
each command and reads no machine settings. The same command line
therefore produces the same bytes on every machine, including rendered
reports, which use fixed defaults instead of the desktop settings.
What pb-diff remembers, and where
Apart from a local settings.json when one is used,
everything pb-diff writes for itself is under
%APPDATA%\pb-diff\:
| File | What it holds | Written when |
|---|---|---|
settings.json |
Every option in the Options dialog: colours, fonts, tab size, compare behaviour, folders. | You press OK in Options |
recent.txt |
The File ▸ Recent list: up to fifteen comparisons of every kind, one per line, the paths separated by a tab and preceded by the kind for anything but a pair. | Each comparison starts |
last-threeway.txt |
The three paths of the last three-way merge, for the start-up sheet's three-way merge. | Each three-way compare |
last-selection.pbdiff-sel |
The File Selection's current
lists, in the format of a saved selection. Each comparison you start
replaces them with what it compared; one opened with -SDI,
as a source-control client opens it, does not. |
Each comparison starts, and as you edit a File Selection |
open-at-exit.pbdiff-sel |
The comparison in front when pb-diff was last closed, for Reopen the comparison left open, and the last file selection to reopen. Absent when no comparison was open. | The window closes |
windows\wpf\Main.txt,
windows\wpf\PrintPreview.txt |
The size, position and maximised state of the two windows that have one: the application window and print preview. | The window closes |
windows\wpf\wpf.ThreeWayMerge.Panes.txt,
windows\wpf\wpf.FileCompare.Tree.txt,
windows\wpf\wpf.LineCompare.Inputs.txt |
Where each kind of tab's splitters were left, so the next tab of that kind opens the same way. Reset Document pane layouts in Options ▸ Window settings forgets all three. | The tab closes |
windows\wpf\wpf.FileCompare.Columns.txt,
windows\wpf\wpf.ThreeWayMerge.Columns.txt |
How the versions of a File Compare, and of a three-way merge, were last left dividing the width, in thousandths, so the next tab of that kind opens the same way. Absent while they are at equal widths. Reset Document pane layouts forgets them too. | You move the line between two versions, or put them back to equal widths |
Deleting any of these resets that one thing; deleting the folder resets pb-diff to a fresh install, which is also why an uninstall leaves the folder alone.
pb-diff never modifies the files you give it. A comparison writes nothing but these files; an output file appears only when you save a merge, a selection or a report.