Mercurial premerge =仅对特定文件为false,对其他所有文件为true? [英] Mercurial premerge = false only for specific files, = true for all others?

查看:69
本文介绍了Mercurial premerge =仅对特定文件为false,对其他所有文件为true?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mercurial是否有可能自动合并所有更改(特别提名的文件除外)?对于特定文件,有些行可能会被覆盖,因此我希望它强制使用可视合并工具进行手动合并.

Is it possible for Mercurial to automatically merge all changes except for specifically nominated files? For the specific files there are some lines that may be overwritten so I want it to force a manual merge with the visual merge tool.

用例是从父仓库中提取并使用相同的代码构建应用程序的不同版本.特定文件将包括Visual Studio项目文件& AssemblyInfo文件-我想保留针对特定版本的引用和.NET框架.有关我的场景的更多背景信息,请参见 http://kiln.stackexchange.com/questions/2320/best-practice-to-maintain-different-build-configs-for-the-same-code

The use-case for this is pulling from a parent repo and building a different version of an app form the same code. The specific files would include the Visual Studio project file & AssemblyInfo file - I want to retain the version-specific references and .NET framework to build against. For more background of my scenario see http://kiln.stackexchange.com/questions/2320/best-practice-to-maintain-different-build-configs-for-the-same-code

推荐答案

是的,您可以针对每个文件配置单独的合并工具,并且如果需要,它们的区别仅在于预合并标记:

Yes, you can configure separate merge tools on a per-file basis, and they could differ only by pre-merge flag if you wanted:

[merge-tools]
mymergetool.priority = 100
mymergetool.premerge = True
mymergetool.args = $local $other $base -o $output
mymergetool.executable = /path/to/mergetool

manualmerge.priority = 100
manualmerge.premerge = False
manualmerge.args = $local $other $base -o $output
manualmerge.executable = /path/to/mergetool


[merge-patterns]
filename_to_never_automerge = manualmerge

详细信息: https://www.mercurial-scm.org/wiki/MergeToolConfiguration

这篇关于Mercurial premerge =仅对特定文件为false,对其他所有文件为true?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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