mercurial - 通过修补补丁找到 Mercurial 的变更集

标签 mercurial

有没有办法通过在编辑中给出模式(更改后的代码)而不是日志消息或文件名来找到更改?

我在“帮助帮助重置”中已经看得很透彻,我认为没有一个好的方法。这是我想出的最好的技巧,但是我希望我错过了一项功能,或者有人可以做得更好。
hg log -M -u goldberg -p | grep '(^changeset:\|<pattern>)'| grep -C 1'<pattern>'

(然后手动选择修订号,以供以后使用这些修订)

最佳答案

您应该看看 hg grep

Search revisions of files for a regular expression.

This command behaves differently than Unix grep. It only accepts
Python/Perl regexps. It searches repository history, not the working
directory. It always prints the revision number in which a match appears.

By default, grep only prints output for the first revision of a
file in which it finds a match. To get it to print every revision that
contains a change in match status ("-" for a match that becomes a non-match, 
or "+" for a non-match that becomes a match), use the --all flag.

Returns 0 if a match is found, 1 otherwise.


您可以键入hg grep --help以获取更多信息。

关于mercurial - 通过修补补丁找到 Mercurial 的变更集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5330782/

相关文章:

mercurial - Mercurial怎么可能是版权和自由软件呢?

configuration - 如何在命令行上覆盖 .hgrc 选项?

vim - 在 Mercurial 中使用 VCSCommand Vim 插件时出现问题

ruby - 如何在 ruby​​ 中处理不正确的 git/hg clone 命令

windows - tortoisehg 工作台 : convert extension is disabled

windows - 克隆存储库导致超时

iphone - iPhone 项目的 Mercurial 分步指南?

python - 版本簿记是在导入之前还是之后进行?

sqlite - 如何在 Mercurial 中始终使用文件的 'remote' 版本?

git - 查看我在 Git 和 Mercurial 中本地提交的文件