How to locate and recover a deleted file

前端 未结 2 1892
灰色年华
灰色年华 2021-02-12 11:45

At some stage in the past I had a \"foo.txt\" which was under Mercurial source control. However it has now been deleted.

How can I recover the file when I don\'t know th

2条回答
  •  我在风中等你
    2021-02-12 12:26

    Using revsets:

    hg log -r "removes('path_to_file')"
    

    Where path_to_file can be anything documented in hg help patterns, including an exact path, a glob or a regular expression.

提交回复
热议问题