Search code examples
version-controlmercurial

Find deleted files in Mercurial repository history, quickly?


You can use hg grep, but it searches the contents of all files.

What if I just want to search the file names of deleted files to recover one?

I tried hg grep -I <file-name-pattern> <pattern> but this seems to return no results.


Solution

  • using templates is simple:

    $ hg log --template "{rev}: {file_dels}\n"