identifying data structure used within repo.status()

Adrian Buehlmann adrian at cadifra.com
Sun Feb 17 10:04:33 CST 2008


On 17.02.2008 16:01, TK Soh wrote:
> On Feb 17, 2008 12:00 PM, Matt Mackall <mpm at selenic.com> wrote:
>> On Sun, 2008-02-17 at 10:39 +0000, TK Soh wrote:
>>> I am investigating a potential memory leak in TortoiseHg's overlay
>>> icon extension that call repo.status() to retrieve the file status. I
>>> wonder if anyone recognize the follow data structure, and possible
>>> point me into the right place in Mercurial's source code:
>>>
>>>    {'.hgignore': ('n', 33206, 320, 1201827364, 9),
>>>     '.hgsigs': ('n', 33206, 792, 1201827364, 7),
>>>     '.hgtags': ('n', 33206, 829, 1201827364, 7),
>>>     'CONTRIBUTORS': ('n', 33206, 1663, 1201827364, 12), ...}
>> That's the dirstate.
> 
> Thanks.
> 
> BTW, gc.get_objects() shows that this data structure was somehow not
> garbage collected, and persisted cross repo.status() calls. Is this
> intentional?
> 
> Since the overlay extension never exits, the memory size (VM) of
> Explorer grow over time to a fairly dangerous level.

Just for reference:
http://tortoisehg.sourceforge.net/hg/tortoisehg-crew/file/tip/tortoise/iconoverlay.py

Line:
117     def _get_state(self, upath):


More information about the Mercurial-devel mailing list