id = "mercurial" name = "Mercurial" homepage = "https://www.mercurial-scm.org" description = "Mercurial is a free, distributed source control management tool." icon = "SimpleIcons:mercurial" executables = ["hg"] [dotfiles] # `hg help config`, the "Files" section # (mercurial/helptext/config.txt in the Mercurial repository, served as # https://www.mercurial-scm.org/doc/hgrc.5.html). It lists the per-user files # platform by platform: # # Unix: $HOME/.hgrc # ${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc # Windows: %USERPROFILE%\.hgrc, %USERPROFILE%\Mercurial.ini, # %HOME%\.hgrc, %HOME%\Mercurial.ini # # Mercurial merges them rather than picking one, so all three spellings are # listed. %USERPROFILE%\.hgrc and %USERPROFILE%\Mercurial.ini resolve to the # same place as ~/.hgrc and ~/Mercurial.ini, so they are written with the ~ # root; the Windows-only name Mercurial.ini still needs a line of its own. # # The XDG file is written literally rather than as [configHome]: Mercurial # reads $XDG_CONFIG_HOME only on Unix, and [configHome] would additionally # claim %APPDATA%\hg\hgrc on Windows, which Mercurial never opens. The same # call apps/git.toml makes. paths = [ "~/.hgrc", "~/.config/hg/hgrc", "~/Mercurial.ini", ] exclude = [] # No whole-file credential. Note for a consumer: the [auth] section of an hgrc # *can* hold HTTP passwords in the clear — the help text's own example is # # foo.prefix = hg.intevation.de/mercurial # foo.username = foo # foo.password = bar # # but `foo` is a group name the user invents, so the key is written # `.password` and there is no stable prefix a rule could name. That one # is left to the consumer's content scan, the same way apps/pgcli.toml leaves # [alias_dsn]. secret = [] # Read at the start of every hg invocation by a process that then exits. side_effect = false # No machine_lines. The per-user hgrc is [ui] username, [alias], [extensions] # and [color] — what a user wants on the next machine. The absolute paths that # do show up there (an extension's .py file, [web] cacerts) sit under keys the # user names, so they cannot be reached by prefix either. [commands] format = 1 label = "Mercurial" description = "The everyday hg jobs: clone, status, commit and log. Other commands and global options are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand]] path = ["clone"] label = "Clone a repository" [[commands.subcommand.source]] id = "man" kind = "manual" url = "https://manpages.debian.org/unstable/mercurial-common/hg.1.en.html" evidence = """ hg clone [OPTION]... SOURCE [DEST] -U, --noupdate -u,--updaterev -r,--rev -b,--branch --pull --stream """ [[commands.subcommand.field]] id = "source" label = "Source" type = "string" position = 0 sources = ["man"] [[commands.subcommand.field]] id = "dest" label = "Destination" type = "path" position = 1 path = { kind = "directory", role = "output" } sources = ["man"] [[commands.subcommand.field]] id = "noupdate" label = "Bare clone (no working directory)" type = "boolean" option = ["--noupdate", "-U"] sources = ["man"] [[commands.subcommand.field]] id = "updaterev" label = "Revision to check out" type = "string" option = ["--updaterev", "-u"] sources = ["man"] [[commands.subcommand.field]] id = "rev" label = "Only up to revision" type = "string" option = ["--rev", "-r"] multiple = true sources = ["man"] [[commands.subcommand.field]] id = "branch" label = "Only branch" type = "string" option = ["--branch", "-b"] multiple = true sources = ["man"] [[commands.subcommand.field]] id = "stream" label = "Stream clone" type = "boolean" option = ["--stream"] sources = ["man"] [[commands.subcommand.task]] id = "clone" label = "Clone" fields = ["source", "dest"] required = ["source"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["source", "dest", "noupdate"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["updaterev", "rev", "branch", "stream"] [[commands.subcommand]] path = ["status"] label = "Show changed files" [[commands.subcommand.source]] id = "man" kind = "manual" url = "https://manpages.debian.org/unstable/mercurial-common/hg.1.en.html" evidence = """ hg status [OPTION]... [FILE]... -A, --all -m, --modified -a, --added -r, --removed -d, --deleted -u, --unknown -n, --no-status --rev """ [[commands.subcommand.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["man"] [[commands.subcommand.field]] id = "all" label = "Show all files" type = "boolean" option = ["--all", "-A"] sources = ["man"] [[commands.subcommand.field]] id = "modified" label = "Only modified" type = "boolean" option = ["--modified", "-m"] sources = ["man"] [[commands.subcommand.field]] id = "added" label = "Only added" type = "boolean" option = ["--added", "-a"] sources = ["man"] [[commands.subcommand.field]] id = "removed" label = "Only removed" type = "boolean" option = ["--removed", "-r"] sources = ["man"] [[commands.subcommand.field]] id = "deleted" label = "Only deleted" type = "boolean" option = ["--deleted", "-d"] sources = ["man"] [[commands.subcommand.field]] id = "unknown" label = "Only unknown" type = "boolean" option = ["--unknown", "-u"] sources = ["man"] [[commands.subcommand.field]] id = "no_status" label = "Hide status prefix" type = "boolean" option = ["--no-status", "-n"] sources = ["man"] [[commands.subcommand.field]] id = "rev" label = "Compare to revision" type = "string" option = ["--rev"] multiple = true sources = ["man"] [[commands.subcommand.task]] id = "status" label = "Working directory status" fields = ["files"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["files", "all", "modified", "added", "removed", "deleted", "unknown"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["no_status", "rev"] [[commands.subcommand]] path = ["commit"] label = "Commit changes" [[commands.subcommand.source]] id = "man" kind = "manual" url = "https://manpages.debian.org/unstable/mercurial-common/hg.1.en.html" evidence = """ hg commit [OPTION]... [FILE]... -A, --addremove --close-branch --amend -m,--message -u,--user -d,--date -I,--include -X,--exclude -i, --interactive """ [[commands.subcommand.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["man"] [[commands.subcommand.field]] id = "message" label = "Commit message" type = "string" option = ["--message", "-m"] sources = ["man"] [[commands.subcommand.field]] id = "addremove" label = "Add new and remove missing files" type = "boolean" option = ["--addremove", "-A"] sources = ["man"] [[commands.subcommand.field]] id = "amend" label = "Amend the previous commit" type = "boolean" option = ["--amend"] effect = "overwrite" sources = ["man"] [[commands.subcommand.field]] id = "close_branch" label = "Close the branch" type = "boolean" option = ["--close-branch"] sources = ["man"] [[commands.subcommand.field]] id = "user" label = "Author" type = "string" option = ["--user", "-u"] sources = ["man"] [[commands.subcommand.field]] id = "date" label = "Date" type = "string" option = ["--date", "-d"] sources = ["man"] [[commands.subcommand.field]] id = "include" label = "Include pattern" type = "string" option = ["--include", "-I"] multiple = true sources = ["man"] [[commands.subcommand.field]] id = "exclude" label = "Exclude pattern" type = "string" option = ["--exclude", "-X"] multiple = true sources = ["man"] [[commands.subcommand.field]] id = "interactive" label = "Interactive" type = "boolean" option = ["--interactive", "-i"] sources = ["man"] [[commands.subcommand.task]] id = "commit" label = "Commit all changes" fields = ["message", "addremove"] required = ["message"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["message", "files", "addremove", "interactive"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["amend", "close_branch", "user", "date", "include", "exclude"] [[commands.subcommand]] path = ["log"] label = "Show history" [[commands.subcommand.source]] id = "man" kind = "manual" url = "https://manpages.debian.org/unstable/mercurial-common/hg.1.en.html" evidence = """ hg log [OPTION]... [FILE] -f, --follow -r,--rev -k,--keyword -u,--user -d,--date -p, --patch -l,--limit -M, --no-merges --stat -G, --graph -T,--template