如何搜索历史 Mercurial 文件内容?
我在代码中发现了一个问题,其中曾经指定过某些内容,但现在不再指定,因此我想通过存储库的历史记录搜索特定字符串。
有没有办法在 TortoiseHg 中做到这一点? 我知道这需要一段时间,但我会花更长的时间......
I've found an issue in my code where something used to be specified, but is no longer, so I want to search for a particular string through the history of the repository.
Is there a way to do this in TortoiseHg? I know it would take a while, but it'd take me longer...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您不介意通过命令行使用 Mercurial,可以使用
hg grep
。它可能暴露在 TortoiseHg 工作台的某个地方,但我不知道。If you don't mind working with Mercurial via the command line, there's
hg grep
. It's probably exposed somewhere in the TortoiseHg Workbench, but I don't know.菜单“查看”-> “搜索”。这将打开搜索窗格,您可以使用它来搜索工作副本中的字符串
Menu "View" -> "Search". This will open the search pane which you can use to search for strings inside your
hg grep --all --files-with-matches MyKeyword
请参阅
hg help grep
hg grep --all --files-with-matches MyKeyword
see
hg help grep