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.
include hg
recursive-include mercurial *.py
include hgweb.cgi
include hgeditor rewrite-log
include tests/README tests/run-tests tests/test-*[a-z] tests/*.out
include *.txt
include templates/map templates/map-*[a-z]
include templates/*.tmpl
include doc/README doc/*.txt Makefile
recursive-include contrib *
include README
include CONTRIBUTORS
include COPYING
include TODO
include MANIFEST.in