Mercurial - 如何强制合并某些文件?

时间:2011-04-15 13:47:04

标签: mercurial merge hgrc

我试图按照question强制对某些文件进行手动合并,但它无法正常工作。某些pom文件正在自动合并,即使我相信我已正确配置我的.hgrc。有什么想法吗?

我试图摆弄合并工具的优先级。最初我们在merge = bc[ui] - 删除了这个,但它没有帮助。

我的.hgrc:

[ui]
editor = notepad
username = Boo Hoo <boo.hoo@who.com>
ssh = plink

[extensions]
fetch =
hgext.extdiff =
mq =
hgext.graphlog = 

[extdiff]
cmd.kdiff3 =
cmd.examdiff = C:\Program Files (x86)\ExamDiff Pro\ExamDiff.exe
cmd.bc = C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
opts.bc = /leftreadonly

[merge-tools]
bc.executable = C:\Program Files (x86)\Beyond Compare 3\BComp
bc.args = /leftreadonly /centerreadonly $local $other $base $output
bc.priority = 1
bc.premerge = True

manual.executable = C:\Program Files (x86)\Beyond Compare 3\BComp
manual.args = /leftreadonly /centerreadonly $local $other $base $output
manual.priority = 100
manual.premerge = False

[merge-patterns]
.hgtags = manual
pom.xml = manual
**\pom.xml = manual

1 个答案:

答案 0 :(得分:1)

考虑file name patterns,并且默认情况下merge-pattern是glob,并且根目录(参见hgrc merge-pattern),你可以尝试:

**/pom.xml

(使用shell样式的路径分隔符“/”而不是“\”)

或尝试使用正则表达式:

re:.*[/\\]pom.xml$