This answer to your comment on Andrey answer :
hg manifest accepts the --rev argument, which you can use to list all the files in your repository:
hg manifest --rev tip
To get a list of files matching the pattern at the tip, use:
hg stat --all --include *.sql --rev tip --no-status hg stat -A -I *.sql --rev tip -n
From there, you can redirect the output to a file and edit each line in the hg cat , as in the original question. It seems (at least I did some experiments) that hg cat uses the contents of the working directory and not the contents of the repository for the specified revision - to match the glob, therefore, the exact file name, you can hg cat it with any revision.
source share