`hg log <path>` will also show the history of a known path ever under
version control.
The query should be very fast (even if the path disappeared hundreds of
thousands of commits ago) because Mercurial stores file data by its path.
Contrast with Git, where it has to resolve trees for all commits until it
can find a reference to a path.
$ time hg log dom/canvas/WebGLContextReporter.cpp > /dev/null
0.110s real
$ time git log -- dom/canvas/WebGLContextReporter.cpp > /dev/null
3.175s