DUNAMAI(1)
π NAME π
dunamai β but make it mercurial π§ like, the dunamai from mercurial subcommand, bestie, and yes it slaps
β¨ DESCRIPTION β¨
okay so here's the whole vibe upfront, the usage line, and I'm giving it to you exactly as it is because copy-paste energy is sacred:
usage: dunamai from mercurial [-h] [--metadata] [--no-metadata]
[--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT] [--style
{pep440,semver,pvp}] [--latest-tag] [--highest-tag] [--strict]
[--path PATH] [--debug] [--bump] [--full-commit] [--commit-length
COMMIT_LENGTH] [--commit-prefix COMMIT_PREFIX] [--escape-with
ESCAPE_WITH]
And what does it do?? Generate version from Mercurial π that's the whole plot. It reads your Mercurial repo and hands you a version string, and it's giving β¨build-tooling main characterβ¨
π options π
the good part. every single one. no skips, no skimming, periodt π«Ά
-h,--helpβ shows this help message and then dips out, like it should π--metadataβ always include metadata, no questions asked. lowkey ignored when--formatis used (default:None)--no-metadataβ never include metadata. opposite girl energy. also ignored when--formatis used (default:None)--tagged-metadataβ include tagged metadata if it applies to your situation. and yeah, ignored when--formatis used (default:False)--dirtyβ include the dirty flag if applicable. ignored when--formatis used (default:False)--pattern PATTERNβ a regular expression that gets matched against the version source. it MUST contain one capture group namedbaseβ that's the release segment of the source, no exceptions. optionally it can have two more groups namedstageandrevision, which map to a prerelease type (think'alpha'or'rc') and a number (think stuff like'alpha-2'or'rc3'). it may also contain a group namedtagged_metadatafor extra metadata sitting after the main part of the version (typically after a plus sign). there may <em>also</em> be a group namedepochfor the PEP 440 concept. and here's the twist π if thebasegroup is not present, then the whole thing gets interpreted as a named preset instead, which may be one of:default,default-unprefixed. the default value is this whole beast right here:
(?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)
--pattern-prefix PATTERN_PREFIXβ inserts this right after the pattern's start anchor (^). so it slots in at the very beginning of the match β¨ (default:None)--format FORMATβ your custom output format, do whatever you want with it. available substitutions:{base},{stage},{revision},{distance},{commit},{dirty},{tagged_metadata},{epoch},{branch},{branch_escaped},{timestamp},{major},{minor},{patch}(default:None)--style {pep440,semver,pvp}β a preconfigured output format, so you don't have to do the work yourself. it defaults to PEP 440 if you don't set it <em>and</em> you don't give a custom format. and heads up if you specify both a style <em>and</em> a custom format, then your format gets validated against that style's rules π (default:None)--latest-tagβ only inspects the latest tag on the latest tagged commit, looking for a pattern match. just that one. tunnel vision fr (default:False)--highest-tagβ only inspects the numerically highest tag across <em>all</em> tagged commits for a pattern match. big number wins π (default:False)--strictβ elevates warnings to errors, which is terrifying but valid. when there are no tags, it fails instead of falling back to0.0.0(default:False)--path PATHβ the directory to inspect, if it's not the current working directory. go look somewhere else bestie (default:None)--debugβ displays additional information onstderrfor troubleshooting π (default:False)--bumpβ increments the last part of the versionbaseby1... <em>unless</em> thestageis set, in which case it increments therevisionby1, or sets it to a default of2if there was norevision. and it does nothing when you're on a commit with a version tag. so basically, don't expect anything there π (default:False)--full-commitβ gets the full commit hash instead of the short form. only works on: Git, Mercurial (default:False)--commit-length COMMIT_LENGTHβ uses this many characters from the start of the full commit hash (default:None)--commit-prefix COMMIT_PREFIXβ adds this prefix when serializing commit IDs (default:None)--escape-with ESCAPE_WITHβ when escaping, replace with this substitution instead. the default is just to remove invalid characters entirely, no replacement (default:None)
reminder bestie: any option marked as ignored when--formatis used means exactly that. your flag is not being heard. it's not you, it's the--formatπ
and that's the whole page π¦ dunamai from mercurial, version 1.26.2, dropped in August 2026 β go generate some versions, you absolute icon, ily ππΈπ
π¦ where this page comes from
- fedora 43: python3-dunamai 1.26.2-1.fc43 Β· MIT
- fedora 44: python3-dunamai 1.26.2-1.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms