issue: "glob:" matching not the default in locate
Sanjoy Mahajan
sanjoy at mrao.cam.ac.uk
Thu Jan 19 17:54:40 UTC 2006
[This is the issue that I tried to submit and got the python error:]
The pattern matching in locate is confusing and maybe buggy. For
example, with this repository:
$ hg manifest | awk '{print $3}'
a/aa/1
a/bb/2
c/3
$ hg locate '**/aa/**'
**/aa/**: No such file or directory
$ hg locate 'glob:**/aa/**'
a/aa/1
So glob: needs to be given, even though the manpage says: "By default,
Mercurial treats file names as shell-style extended glob patterns."
Also I think locate should act like the Linux (solaris?) command of the
same name, which prepends and appends ** (in mercurial notation) to the
pattern if it has no wildcards. This behavior matches how I mostly use
locate: I half remember a few characters from the filename, perhaps
based on its subject, and I feed the characters to locate. Then simply
'hg locate aa' does what I want.
$ python -V ; hg --version
Python 2.3.5
Mercurial Distributed SCM (version e1bcf7fa983f)
-Sanjoy
`A society of sheep must in time beget a government of wolves.'
- Bertrand de Jouvenal
More information about the Mercurial
mailing list