Adapt commit to use file matching code.
The code is slightly complicated by the need to commit all outstanding
changes in the repository if no file names are given (other commands
operate on the current directory and its subdirectories in this case).
localrepository.changes has acquired an optional match parameter, to let
it filter out include/exclude options.
\.orig$
\.rej$
~$
\.so$
\.pyc$
\.swp$
^build/
^dist/
^doc/.*\.[0-9]$
^MANIFEST$
^.pc/
^patches/
^mercurial/__version__.py$