开发者

Search a Batch of Files for a Line of Text

开发者 https://www.devze.com 2022-12-21 06:56 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号