identifying data structure used within repo.status()

TK Soh teekaysoh at gmail.com
Mon Feb 18 08:01:14 CST 2008


On Feb 18, 2008 8:17 AM, Matt Mackall <mpm at selenic.com> wrote:
>
> On Sun, 2008-02-17 at 15:01 +0000, 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?
>
> It should survive as long as repo.dirstate (and repo) survives. But it
> shouldn't grow.

BTW, does the following dict looks familiar too?

{'': '', '\x00': '\x00', '\x00\x00': '\x00\x00',
'\x00\x00\x00...0\x00\x00\x00': '\x00\x00\x00...0\x00\x00\x00', ...}


More information about the Mercurial-devel mailing list