Reputation: 2660
First off, I would prefer not to check in the generated files at all but my manager insists. So, given those constraints I would like to create a mercurial "merge-patterns" that will always take "their files" in all directories named "generated" in my working repo. I have read the hgrc documentation and a related post and here is what I think it should look like:
[merge-patterns]
generated/** = internal:other #keep their files
And this is placed in my root .hg/hgrc file. When I run the hg update with the merge conflicts this is what I get:
> hg update
couldn't find merge tool internal:other #keep their files specified for generated/**
merging generated/file.sv
So I modified the "merge-patterns" to look like this:
[merge-patterns]
**/generated/** = internal:other #keep their files
And here is what I get:
> hg update
merging generated/file.sv
So, I no longer get the "couldn't find merge tool internal:other" warning but it is still trying to merge the generated files.
Any ideas on how to get this to work?
Additional notes:
Upvotes: 4
Views: 1074
Reputation: 73788
I believe the problem is simply the comment! Mercurial is searching for a tool named
internal:other #keep their files
and that's unlikely to exist :-) Try moving the comment to a line above:
[merge-patterns]
# keep their files
generated/** = internal:other
I haven't tested this out, but I believe you still need the first pattern you used — the warning went away with your second try because the pattern no longer matched inside the subrepo. Even when you start the merge from the top-level, the subrepos are merged as if hg merge
was executed inside the subrepo.
Upvotes: 4