I am using mercurial for version control of a few files in a directory. Suppose I have 10 commits (10 changesets or revisions). I want to just view how a particular file, say thisFile.py, looked in its 7th revision. I don't want to revert back to this older version. I don't want to go and make any changes or fix any bugs in this previous version. I simply want to see it, without affecting the latest version of the file or the mercurial history in any way. Is there a simple way to do it?
How to view previous version of a file in Mercurial
mercurial
Related Topic
- Ny way to delete local commits in Mercurial
- Mercurial — revert back to old version and continue from there
- Mercurial: How to undo changes
- How to remove certain changesets from a specific Mercurial clone
- Discard all and get clean copy of latest revision
- Git – Converting Mercurial folder to a Git repository
Best Answer
Use the
hg cat
command with the-r
(revision) argument.where 46 is the revision number (use
hg log
to see revision history)