I have a Mercurial Repository for a code project and I want to search all of the files, in all directories and sub-directories, for a given string. What 开发者_JS百科is the best method, or program to do so?
I can conduct this search in Ubuntu Linux or a Windows environment.
Probably best to just do a checkout of the repository and use grepWin on windows, or grep on Linux.
For a simple search in the working copy, I would also use the normal grep
program (I'm on Linux).
But if you want to search the history for a string, then note that Mercurial also has a hg grep
function. That can be handy if you want to see when a given function, say, was introduced or removed.
If TortoiseHg is installed Search History is available in Windows Explorer context menu.
精彩评论