If you have a small list of files without extension that you want to ignore, then you can just list them as glob patterns:
syntax: glob
foobar
abracadabra
If you want to ignore all files without an extension, then things become more difficult. If you use the regexp provided by zerkms,
syntax: regexp
^[^.]+$
then you will also ignore directories without an "extension", that is directories without .
in their names such as src
, and so on.
Because Mercurial matches files and directories top-down while traversing your working copy, and because it doesn't distinguish between files and directories when matching against the patterns in the .hgignore
file, you cannot include a directory while ignoring files with the same name.
(You can simulate the opposite: by ignoring foobar/
in regexp syntax you end up ignoring all files inside foobar/
while not ignoring a file named foobar
in another directory.)