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 read hg help patterns and hg help filesets for 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 with NUL, for use with xargs. 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. πŸ‘‘πŸ’œ