一次一次水银提取 [英] Mercurial extdiff one at a time

查看:70
本文介绍了一次一次水银提取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将winmerge用作extdiff工具,如下所示:

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

问题是,当我运行hg winmerge时,它似乎一次发送了所有文件,而例如在Git中,当我执行diff时,它一次调用了一个修改过的文件的difftool.我可以在Mercurial中获得相同的行为吗?

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?

推荐答案

类似于

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.

本书中提供了此示例脚本.它基本上占据了两个目录,并在每个文件上调用interdiff实用程序.

This example script is given in the book. It basically takes the two directories and call the interdiff utility on every files.

根据您的情况,您可以轻松地修改脚本以调用winmerge.只需修改第41行:

In your case, you can easily adapt the script to call winmerge instead. Just modify the line 41 :

if os.system('winmerge /e /x /ub /wl "%s" "%s"' % (name(sys.argv[1], f),

假设您创建了一个hg-winmerge脚本,然后可以像这样配置extdiff:

Say you create an hg-winmerge script , you can then configure extdiff like this :

 [extdiff]
 cmd.winmerge = C:\Path\To\My\Script\hg-winmerge

希望这会有所帮助!

这篇关于一次一次水银提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆