Your company here — click to reach over 10,000 unique daily visitors

hg-nbmerge - Man Page

A mercurial CLI merge tool for notebooks


usage: hg-nbmerge [-h] [--version] [--config]

[--log-level {DEBUG,INFO,WARN,ERROR,CRITICAL}] [-s] [-o] [-a] [-m] [-i] [-d] [--merge-strategy {inline,use-base,use-local,use-remote}] [--input-strategy {inline,use-base,use-local,use-remote}] [--output-strategy {inline,use-base,use-local,use-remote,remove,clear-all}] [--no-ignore-transients] base local remote merged

A mercurial CLI merge tool for notebooks.

Uses nbdime to merge notebooks instead of plain text merges of JSON. See the documentation for how to correctly configure mercurial to use this.

Use with:

hg merge [<commit> [<commit>]]

positional arguments


The base notebook filename.


The local modified notebook filename.


The remote modified notebook filename.


The merge result notebook filename.


-h,  --help

show this help message and exit


show program's version number and exit


list the valid config keys and their current effective values


set the log level by name.

--merge-strategy {inline,use-base,use-local,use-remote}

the merge strategy to use.

--input-strategy {inline,use-base,use-local,use-remote}

the merge strategy to use for inputs (overrides 'merge-strategy' for inputs).

--output-strategy {inline,use-base,use-local,use-remote,remove,clear-all}

the merge strategy to use for outputs (overrides 'merge-strategy' for outputs).


disallow deletion of transient data such as outputs and execution counts in order to resolve conflicts.


Set which parts of the notebook (not) to process.

-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.


June 2024 hg-nbmerge 4.0.1