Basically I only want to keep the file in the repository, but I don't want to trace it in revision history.
A Mercurial repository does not hold files—not directly, anyway. A Mercurial repository holds commits. Commits are the revision history. Commits hold files, so if the file is going to be in the repository, it is going to be in a commit, and therefore it is in the history.
That's your choice: the file is in the repository by being in commits, and hence is in revision history; or the file is not in the repository.
(Note that you may have files in your work-tree that are not in the repository proper. Such a file is called an untracked file. Since it is not in the repository, cloning the repository does not produce a copy of the untracked file. This description is a little imprecise, but if you want untracked files, just create them and be happy. You may want to add such files' names, or regular expression or glob patterns, to a .hgignore
file that you do put in the repository.)