开发者

Mercurial - Exceptions to internal:local merge-patterns?

To ensure we use the trunk version of some files when merging we use internal:local:

[merge-patterns开发者_JAVA百科]
.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?


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

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>

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜