What is your end goal for knowing what hotfixes are installed currently? If you want to find equivalent hotfixes in whatever version you're upgrading to, that is probably not worth the effort (depending on what version you're going to).
First, if a hotfix was created the issue should have been fixed at some point out of the box.
Second, 4.2 is pretty old and hotfixes for it may not even apply to newer versions. For example, a change to an out of the box rule that became deprecated in later releases.
Lastly (if my assumption is correct), we do not generally recommend that these types of activities are performed. Our recommendation is for you to perform testing after the upgrade and enter support requests for issues found that you are unable to resolve. If hotfixes are needed, they will be provided to you.
Have you visited the Pega 7 Upgrade center? There are tools, training content, and discussion forums available to assist with your upgrade project. There are also services to guide and assist with your upgrade.