If the files you want to omit from the "hg commit" command are already "tracked", you should use the -X option. The sample passed to -X is quite flexible, allowing you to run, for example:
% hg stat A etc/foo.conf M src/bar.c M lib/libbar/loader.c % hg commit -X '**.conf'
to avoid committing any file with a .conf extension, no matter how deep it is in the source tree. In the workspace shown above, this would fix "src / bar.c" and "lib / libbar / loader.c", but not "etc / foo.conf".
To exclude multiple file name patterns, use several -X options, for example:
% hg commit -X '**.conf' -X '**.sh'
Giorgos Keramidas May 22, '09 at 1:16 2009-05-22 01:16
source share