HG(FILES)
πΈ HG(FILES) β the hg files glow-up β¨
okay bestie, sit down, hydrate, because this page is literally just "which files are we even tracking" and it's lowkey iconic. π
β¨ NAME β¨
hg files β list tracked files. that's it. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
hg files [OPTION]... [FILE]...
β¨ DESCRIPTION β¨
so basically it prints the files that are under Mercurial control in the working directory, or in a revision you pick, for whatever files you hand it β and heads up, removed files do not make the cut, they're not invited to the party π. You can name your files as filenames or as filesets, both are valid, both slay.
If you give it nothing to match against, it just prints the names of all files under Mercurial control. all of them. the whole roster. π
π Template π
besides the common template keywords and functions, these keywords are supported. also go peek at hg help templates for more (iykyk).
flagsβ String. the character that denotes the file's symlink and executable bits. it's giving little flag emoji energy but for bits. π©pathβ String. the repository-absolute path of the file. the full government name, fr fr.sizeβ Integer. size of the file in bytes. the number, no notes. π
π Examples π
- list all files under the current directory:
hg files .
- shows sizes and flags for current revision:
hg files -vr .
- list all files named README:
hg files -I "**/README"
- list all binary files:
hg files "set:binary()"
- find files containing a regular expression:
hg files "set:grep('bob')"
- search tracked file contents with xargs and grep:
hg files -0 | xargs -0 grep foo
also go readhg help patternsandhg help filesetsfor more info on how to specify file patterns. that's where the β¨loreβ¨ lives.
Returns 0 if a match is found, 1 otherwise. simple as that, no cap. β
π OPTIONS π
-r,--rev <REV>β search the repository as it is in REV. time travel, but for repos. π°οΈ-0,--print0β end filenames withNUL, for use withxargs. the classic "my filenames have spaces and I'm not crying about it" move. π-I,--include <PATTERN[+]>β include names matching the given patterns. come on in bestie π«Ά-X,--exclude <PATTERN[+]>β exclude names matching the given patterns. not you, girl, sorry π-T,--template <TEMPLATE>β display with template. dress it up, make it cute. π-S,--subreposβ recurse into subrepositories. it's giving inception. π
[+] marked option can be specified multiple times β so yes, you can absolutely stack them, go off. β¨
and that's the whole page, bestie. mwah. this was the HG(FILES) page β literally just that, HG(FILES), no version drama, no date drama, just the manual name holding it down at the bottom like the main character it is. ππ
π¦ where this page comes from
- arch rolling: mercurial 7.2.4-1 Β· GPL
- fedora 43: mercurial 7.1.1-1.fc43 Β· GPL-2.0-or-later
- fedora 43: mercurial 7.1.1-2.fc43 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2-1.fc44 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2.4-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mercurial 7.1.2
- nixos 26.05: mercurial-full 7.1.2
- nixpkgs unstable: mercurial 7.2.2
- nixpkgs unstable: mercurial-full 7.2.2
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms