Betr.: Re: auto answer questions during hg fetch

Johan Samyn johan.samyn at
Fri Mar 28 05:39:04 CDT 2008

Indeed, Kai, the question is asked by hg update.
Still leaves my question though.
There is a global option -y or --noninteractive that serves to always
answer 'yes' to all questions.
But I don't know if that option will give me the (c)hanged or the (d)eleted

I think what is happening behind the scenes is that "hg fetch" invokes
"hg merge".  And you can tell hg merge what you want to do, e.g. to
always keep the local version.

Perhaps you'd like to try using "hg pull", "hg update" and "hg merge"
manually, instead of "hg fetch", to see whether my speculation is right.


Johan Samyn wrote:
> Hi,
> I'm experimenting with Mercurial for a while now, to determine how far we
> can go in using Mercurial for working with local branches (we're a cvs
> actualy, and we use no branches).
> I have a central Mercurial repo (working tree is my cvs sandbox), and
> several ones cloned from it, as local branches.
> Under those branch repo's I deleted (not hg remove'd !) most of the
> sourcefiles in the working tree, only keeping the ones I have to work on
> have my reasons for doing this of course, it's not just an excercise)).
> When I do a hg fetch to update one of the branch repo's, and the pulled
> changeset contains changes for one of the sourcefiles that were deelted
> under that branch, I am asked the question :
>     remoted changed <sourcefile> which local deleted
>     use (c)hanged version or leave (d)eleted?
> I agree this is a very nice feature of Mercurial.
> But does someone know how to automate the answer to this question, so all
> questions for a changeset are answered the same way, for use in a script
> (in my case answer should be (d)eleted) ?
> Kind regards,
> Johan Samyn

**** DISCLAIMER ****
<A HREF=""> </A>

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this

More information about the Mercurial mailing list