narrow: delegate the dirstate's narrow spec writing to the transaction
This make it more transactional and will help us to simplify their backup.
The implementation is not great, but it keep the patch simple as this is not the
time for a larger refactoring yet.
mkcommit() {
name="$1"
shift
echo "$name" > "$name"
hg add "$name"
hg ci -m "$name" "$@"
}