how to view previous version of a file in Mercurial

前端 未结 3 1127
醉梦人生
醉梦人生 2021-01-31 08:04

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 th

3条回答
  •  [愿得一人]
    2021-01-31 08:27

    Use the hg cat command with the -r (revision) argument.

    hg cat path_to/myfile.cpp -r 46
    

    where 46 is the revision number (use hg log to see revision history)

提交回复
热议问题