commitctx: return "touched" status from _filecommit

Authored by marmoute.


commitctx: return "touched" status from _filecommit

Instead of mutating a list passed in argument, we simply return the information
from the _filecommit function. This make for a cleaner API and allow for
richer information to be returned. That richer information will be used in the
next commit to avoid duplicated computation.

This is part of a larger refactoring/cleanup of the commitctx code to clarify
and augment the logic gathering metadata useful for copy tracing. The current
code is a tad too long and entangled to make such update easy. We start with
easy and small cleanup.

Differential Revision: https://phab.mercurial-scm.org/D8702