Retrieve old version of a file without changing working copy parent

前端 未结 2 538
温柔的废话
温柔的废话 2021-02-05 01:28

How do you get a copy of an earlier revision of a file in Mercurial without making that the new default working copy of the file in your workspace?

I\'ve found the

2条回答
  •  走了就别回头了
    2021-02-05 02:30

    The command you use is this:

    hg cat -r 10 myfile.pls > C:\temp\dump\myfile_revision10.pls
    

    Knowing a bit of Unix helps with Mercurial commands. Perhaps cat should have a built in alias print or something similar.

提交回复
热议问题