Reputation: 31
I am running an automated hg merge under CruiseControl.NET as part of an MSBuild job. For some reason the merge runs in non-interactive mode even though I have not specified -y
in the command. This is causing unexpected results since it takes the first option when prompted about a conflict, I'd rather it just times out and fails so we know we need to look at it manually.
So two questons:
1) Why is it running non-iteractively when I haven't given it a -y
?
2) Is there a way to force the hg merge to be interactive so the job will timeout and fail?
Upvotes: 3
Views: 2593
Reputation: 26789
Based on this answer on another question, it looks like Mercurial auto-detects if it is running under a TTY or is headless, thus doesn't prompt you. You could override this by supplying the ui.interactive
config option:
hg --config ui.interactive=yes
Upvotes: 4
Reputation: 9406
I think better idea is to use hg merge --tool internal:merge
. Mercurial will try to make automatic merge but will fail if there are any conflicts. There are other options possible here.
I am using it daily after automatic pull from external ClearCase repository and it works great. If there are any conflicts than my CI job just fails imediatelly.
Upvotes: 3