Skip to content

Gear Deduplication

houle988 edited this page Nov 3, 2026 · 4 revisions

Gear Deduplication

When importing gear — whether from a BlueDive XML backup, a MacDive CSV file, or as part of a dive import — BlueDive checks each incoming item against your existing inventory and skips anything that already appears to be there. This prevents your gear list from accumulating duplicates every time you restore from a backup or re-import a logbook.

When deduplication runs

  • Standalone gear import — when you import a BlueDive Gear XML or a MacDive CSV from the Equipment tab.
  • Dive import — when dives are imported from a file (BlueDive XML, MacDive XML, UDDF, Subsurface XML) with the Import Gear option on, each gear item the dives reference is checked against your inventory before being linked to the dive. With Import Gear off, no gear is added or linked. Garmin FIT files carry no gear.

How matching works

BlueDive checks in two steps. It tries the most reliable method first, then falls back if needed.

Step 1 — Same record (BlueDive exports only)

Every gear item exported by BlueDive carries its own record number. When you import a BlueDive file, BlueDive first looks for an item in your inventory with the same record number. If it finds one, that item is reused — nothing new is created.

This step only applies to files exported by BlueDive. MacDive XML, Subsurface XML, UDDF, and CSV files do not carry these record numbers.

Step 2 — Matching by name and details (all formats)

When no item has the same record number — or when the file format doesn't carry one — BlueDive compares the following fields:

  1. Name — must match, ignoring upper/lower case and any spaces before or after it.
  2. Category — must be the same category (e.g., Tank, First Stage).
  3. Serial number vs. diver name — the result depends on whether the items have a serial number:
    • Both items have a serial number — the serial numbers are compared, ignoring upper/lower case and surrounding spaces. If they match, the items are considered the same piece of gear, regardless of who owns it.
    • Neither item has a serial number — the diver name is compared instead, ignoring upper/lower case. Both the name and diver must match for the items to be considered the same. An item with a diver name never matches one without — this matters for MacDive CSV imports, which bring every item in without a diver name: a CSV item with no serial number will not match an existing item that has a diver set, and is added as a new item.
    • One has a serial and the other doesn't — the items are treated as different and no merge occurs.

Within a single BlueDive file, two items with different record numbers are never merged into each other, even when their name and serial number match — the file holds them as separate records (for example two regulators of the same model), so each keeps its own item and dive links. Matching against gear that was already in your inventory before the import is unchanged.

Serial numbers that are placeholder values — n/a, na, unknown, none, 0, 00, -, or -- — are treated the same as having no serial number.

What happens when a match is found

BlueDive reuses the existing item rather than creating a new one. No duplicate appears in your inventory.

If the incoming item includes service history, BlueDive also checks whether that history should be carried over to the existing item:

  • The service history and last service date are updated only if the imported date is more recent than what's already recorded. If the import has no date at all, its history is used only when the existing item has no service history of its own. In any other case, nothing changes.
  • When the incoming data does win, its service history replaces what was stored — records are not combined. Plain-text notes from an older import are never used to overwrite a structured maintenance history (individual service entries with date, description, and cost).

Gear groups and tank templates

A BlueDive gear file also contains your gear groups and tank templates. These are matched by record number only: a group or template already in your logbook (from the same export) is skipped, but one with the same name and a different record number — for example, one you created again by hand on another device — is imported as an additional group or template.

Import format summary

Format Carries record numbers How gear is matched
BlueDive gear file Yes Same record, then name and details
MacDive CSV No Name and details only
BlueDive dive file Yes (gear) Same record, then name and details
MacDive Dive XML No Name and details only
Subsurface XML No Name and details only
UDDF No Name and details only

Related pages

Clone this wiki locally