identifying data structure used within repo.status()

TK Soh teekaysoh at gmail.com
Sun Feb 17 09:01:36 CST 2008


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.


More information about the Mercurial-devel mailing list