HG(LOCATE)
πΈ HG(LOCATE) πΈ
okay bestie, gather round, we're doing a hg locate deep dive π it's the Mercurial manual page, it's deprecated (rip), and we're gonna read it together like it's a group chat.
β¨ NAME β¨
hg locate β locate files matching specific patterns (DEPRECATED) π
π SYNOPSIS π
hg locate [OPTION]... [PATTERN]...
π¦ DESCRIPTION π¦
So basically, this prints out the files under Mercurial control in your working directory whose names match whatever patterns you handed it. matching era β¨
By default, it searches all directories in the working directory. If you want it to only search the current directory and its subdirectories, pass "--include ." β yes, literally that. it's giving "stay in your lane" π
If you give it no patterns to match, it just prints the names of all the files under Mercurial control in the working directory. all of them. the whole roster π
Now, if you're planning to feed this output into the "xargs" command, use the -0 option on both this command and "xargs". why? because otherwise "xargs" will treat a single filename that contains whitespace as multiple filenames π and that's a mess nobody asked for. the -0 on both sides keeps things clean.
Also, real talk: check out hg help files for a more versatile command β this one's the deprecated cousin, iykyk.
It returns 0 if a match is found, and 1 otherwise. simple as that. periodt.
π OPTIONS π
-r,--rev <REV>β search the repository as it is in REV π-0,--print0β end filenames with NUL, for use withxargs-f,--fullpathβ print complete paths from the filesystem root π-I,--include <PATTERN[+]>β include names matching the given patterns-X,--exclude <PATTERN[+]>β exclude names matching the given patterns
[+] marked option can be specified multiple times β so if you've got a lot of patterns, go off, stack 'em π«Ά
and that's the whole page, bestie π this was the HG(LOCATE) manual β HG(LOCATE), one and only, no cap. mwah π
π¦ 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