Mercurial extdiff 一次一个
我使用 winmerge 作为我的 extdiff 工具,如下所示:
[extdiff]
cmd.winmerge = C:\Program Files\WinMerge\WinMergeU.exe
opts.winmerge = /e /x /ub /wl
问题是,当我运行 hg winmerge 时,它似乎会立即发送所有文件,而例如在 Git 中,当我执行diff
它一次调用一个修改过的文件的 difftool。我可以在 Mercurial 中获得相同的行为吗?
I am using winmerge as my extdiff tool, like this:
[extdiff]
cmd.winmerge = C:\Program Files\WinMerge\WinMergeU.exe
opts.winmerge = /e /x /ub /wl
The thing is, when I run hg winmerge
it seems that it sends all of the files at once, while for example in Git, when I do a diff
it calls the difftool with one modified file at a time. Can I get the same behaviour in Mercurial?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就像Mercurial:权威指南<中所解释的那样/a>,extdiff 创建源树的两个快照并在它们上调用 diff 工具。您的工具必须支持目录差异才能工作,但正如所解释的,您可以使用脚本来解决此问题。
此示例脚本在书中给出。它基本上需要两个目录并对每个文件调用 interdiff 实用程序。
对于您的情况,您可以轻松地调整脚本来调用
winmerge
。只需修改第 41 行:假设您创建了一个 hg-winmerge 脚本,然后您可以像这样配置 extdiff:
希望这会有所帮助!
Like explained in Mercurial: The Definitive Guide, extdiff creates two snapshot of the source tree and call the diff tool on them. You're tool has to support directory diff for it to work, but like explained, you can use scripting to workaround this.
This example script is given in the book. It basically takes the two directories and call the
interdiff
utility on every files.In your case, you can easily adapt the script to call
winmerge
instead. Just modify the line 41 :Say you create an hg-winmerge script , you can then configure extdiff like this :
Hope this helps !