Mercurial-internal:local合并模式的例外? [英] Mercurial - Exceptions to internal:local merge-patterns?

查看:73
本文介绍了Mercurial-internal:local合并模式的例外?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为确保在合并合并时使用某些文件的主干版本,我们使用 internal:local:

[merge-patterns]
.hgtags = internal:local
pom.xml = internal:local

在某些情况下,合并似乎不使用本地文件,实际上合并了来自远程存储库的更改.为什么会这样?

It seems in some cases, the merge does NOT use the local file, it does actually merge the changes from the remote repository. Why would this be happening?

推荐答案

Mercurial的"premerge"内部合并实际上甚至在启动合并工具之前就已成功解决了某些文件的合并冲突.

The Mercurial "premerge" internal merge is actually successfully resolving merge conflicts for certain files before even launching a merge tool.

如果选择的合并工具预合并为 是的,那么内部合并是 尝试过,如果看起来成功 那么结果将是无声的 在不运行实际合并的情况下使用 工具

If the chosen merge tools premerge is True then an internal merge is attempted, and if it seems successful then the result it will silently be used without running the actual merge tool

查看本文有关合并工具配置的详细信息.可以通过对Mercurial.ini文件进行以下修改来关闭特定类型文件(或目录)的预合并:

Check out this article on merge tool configuration for more info. Turning off premerge for a particular type of file (or directory) can be done using these modifications to your Mercurial.ini file:

[merge-tools]
<name>.premerge = False
<name>.args = --auto $base $other $other -o $output
<name>.executable = kdiff3

[merge-patterns]
**.xml = <name>
.hgtags = <name>

请注意,默认情况下,kdiff3应该随TortoiseHg一起提供,<name>可以是您想要的任何东西;称其为"localFilesOnly"或类似名称.

Note that kdiff3 should come with TortoiseHg by default, and <name> can be anything you want; call it, 'localFilesOnly' or something like that.

这篇关于Mercurial-internal:local合并模式的例外?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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