You're right that you want a pretxnchangegroup hook, but you don't want to check all the new revisions -- because people will fix the errors you reject in subsequent changesets but if you're checking all changesets their work will never be accepted!
Instead either just check all files in all the heads, or use the hg status --rev x:y
syntax to get a list of the changed files between the revision you already have and the tip revision you're receiving, and check only those files only in the tip revision.
If you really want the list of all revisions you'd use a revset ( hg help revsets
) new in version 1.6, but you really only want to check the results, not all the revisions that get you there.