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.
+ hg init
+ echo nothing
+ hg add a
+ hg commit -m ancestor -d '0 0'
+ echo something
+ hg commit -m branch1 -d '0 0'
+ hg co 0
+ echo 'something else'
+ hg commit -m branch2 -d '0 0'
+ export HGMERGE=merge
+ HGMERGE=merge
+ hg up -m 1
merge: warning: conflicts during merge
merging a
merging a failed!
+ hg id
32e80765d7fe+75234512624c+ tip
+ grep -Ev '>>>|<<<' a
something else
=======
something
+ hg status
M a
? .out