auto answer questions during hg fetch

Kai Grossjohann kai.grossjohann at
Fri Mar 28 04:50:12 CDT 2008

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 shop
> 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 (I
> 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
> message."
> _______________________________________________
> Mercurial mailing list
> Mercurial at

More information about the Mercurial mailing list