hg merge: out of memory

Matt Mackall mpm at selenic.com
Wed Aug 4 17:17:32 UTC 2010


On Wed, 2010-08-04 at 18:04 +0200, André Sintzoff wrote:
> Hello,
> 
> I get an out of memory error when performing hg merge.
> This occurs on a Windows machine. Before failing, the RAM used by the
> hg process is about 800 Mbyte.

How much memory does your machine actually have? There seems to be an
issue with the stock memory allocator that's being used by Python on
some Windows machines.

> On a Ubuntu machine, the hg merge does not fail but the RAM used by hg
> is about several hundred Mbyte.
> 
> In the repository, they are about some very big text files but they
> are not modified.
> Are such files loaded in RAM during merge process?

Depends what you mean by 'not modified'. If a file is deleted on either
side of the merge, its history may be searched for renames, in which
case it will be loaded into memory.

> BTW, in the debug log, I don't understand why there is a reference to
> rev 700 as the merge is done between rev 1140 and rev 1141
> and the common ancestor is rev 1057

Short answer: it's expected. The long answer to that is quite
complicated - I refer you to the archives and the source code if you're
morbidly curious.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list