dunamai-from-mercurial - Man Page

dunamai from mercurial – generate version from Mercurial

Synopsis

dunamai from mercurial [-h] [--metadata] [--no-metadata] [--dirty] [--tagged-metadata] [--pattern PATTERN] [--format FORMAT] [--style {pep440,semver,pvp}] [--latest-tag] [--strict] [--debug] [--bump] [--full-commit]

Options

Optional Arguments

-h--help

Show a help message and exit

--metadata

Always include metadata. Ignored when --format is used (default: None)

--no-metadata

Never include metadata. Ignored when --format is used (default: None)

--dirty

Include dirty flag if applicable. Ignored when --format is used (default: False)

--tagged-metadata

Include tagged metadata if applicable. Ignored when --format is used (default: False)

--pattern PATTERN

Regular expression matched against the version source. This must contain one capture group named base corresponding to the release segment of the source. Optionally, it may contain another two groups named stage and revision corresponding to a prerelease type (such as ‘alpha’ or ‘rc’) and number (such as in ‘alpha-2’ or ‘rc3’). It may also contain a group named tagged_metadata corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named epoch for the PEP 440 concept. If the base group is not present, then instead this will be interpreted as a named preset, which may be one of the following: default, default-unprefixed (default: (?x) (?# ignore whitespace) ^v((?P<epoch>\d+)!)?(?P<base>\d+(\.\d+)*) (?# v1.2.3 or v1!2000.1.2) ([-._]?((?P<stage>[a-zA-Z]+)[- ._]?(?P<revision>\d+)?))? (?# b0) (\+(?P<tagged_metadata>.+))?$ (?# +linux))

--format FORMAT

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp} (default: None)

--style { pep440 , semver , pvp }

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style’s rules (default: None)

--latest-tag

Only inspect the latest tag on the latest tagged commit for a pattern match (default: False)

--strict

When there are no tags, fail instead of falling back to 0.0.0 (default: False)

--debug

Display additional information on stderr for troubleshooting (default: False)

--bump

Increment the last part of the version base by 1, unless the stage is set, in which case increment the revision by 1 or set it to a default of 2 if there was no revision. Does nothing when on a commit with a version tag. (default: False)

--full-commit

Get the full commit hash instead of the short form (only: Git, Mercurial) (default: False)

See Also

dunamai-from-any(1), dunamai-from-bazaar(1), dunamai-from-darcs(1), dunamai-from-fossil(1), dunamai-from-git(1), dunamai-from-pijul(1), dunamai-from-subversion(1)

dunamai-from(1), dunamai(1)

hg(1)

Referenced By

dunamai(1), dunamai-from(1), dunamai-from-any(1), dunamai-from-bazaar(1), dunamai-from-darcs(1), dunamai-from-fossil(1), dunamai-from-git(1), dunamai-from-pijul(1), dunamai-from-subversion(1).

December 2022