HG-NBDIFF(1)

πŸ“¦
version 4.0.4 Β· 2 versions
, in fedora 43, fedora 44

✨ NAME ✨

hg-nbdiff β€” a mercurial external differ for notebooks πŸ’– (yes bestie, it's giving notebook-specific diffing, and it ate)


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first things first, the vibe check on how you actually call this thing:

usage: hg-nbdiff [-h] [-s] [-o] [-a] [-m] [-i] [-d] [--color-words]
       [--no-color] [--no-git] [--no-use-diff] base remote

A mercurial external differ for notebooks. 🌸

Here's the tea: instead of doing a plain text diff on the JSON of your notebook (which is, respectfully, a nightmare πŸ’€), it uses nbdime to make actual diffs for notebooks. Go read the documentation for how to correctly configure mercurial to use this, because the config is lowkey important and I'm not gonna let you rawdog it.

Use it like this:

hg extdiff -p hg-nbdiff [<commit> [<commit>]]

πŸŽ€ positional arguments

  • base β€” The base notebook filename. the before pic πŸ“Έ
  • remote β€” The remote modified notebook filename. the after pic ✨

πŸ’… options

  • -h, --help β€” show this help message and exit. the classic "what does anything do" button 🫢
  • --color-words β€” whether to pass the --color-words flag to any internal calls to git diff. rainbows inside your diffs 🌈
  • --no-color β€” prevent use of ANSI color code escapes for text output. for when you want it plain, no drama
  • --no-git β€” prevent use of git for formatting diff/merge text output. git stays in its lane
  • --no-use-diff β€” prevent use of diff/diff3 for formatting diff/merge text output. bye felicia to the old-school tools

🧚 ignorables

Set which parts of the notebook (not) to process. this is where you pick and choose, main character energy πŸ‘‘

  • -s, --sources, -S, --ignore-sources β€” process/ignore sources.
  • -o, --outputs, -O, --ignore-outputs β€” process/ignore outputs.
  • -a, --attachments, -A, --ignore-attachments β€” process/ignore attachments.
  • -m, --metadata, -M, --ignore-metadata β€” process/ignore metadata.
  • -i, --id, -I, --ignore-id β€” process/ignore identifiers.
  • -d, --details, -D, --ignore-details β€” process/ignore details not covered by other options.
pro tip bestie: the capital-letter versions are the ignore ones, the lowercase are the process ones. matching vibes, opposite intentions. iykyk πŸ’…

okay that's the whole page, no cap πŸ¦‹ mwah, go diff some notebooks πŸ’œ

hg-nbdiff 4.0.4 β€” that's the version, and this lil' page is dated February 2026 🌸✨ periodt.

πŸ“¦ where this page comes from