[PATCH] Make sure bundlerepo doesn't leak temp files (issue2491)

Isaac Jurado diptongo at gmail.com
Sat Feb 12 12:08:56 CST 2011


On Sat, Feb 12, 2011 at 10:47 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1297504691 -3600
> # Node ID e898aca66ad00102f35774e96526136e964e84a5
> # Parent  d4ab9486e514dd24e21a2ca3b6c439ea13d85cab
> Make sure bundlerepo doesn't leak temp files (issue2491)
>
> Add empty repository.close() and call it in dispatch.
>
> Remove bundlerepository.__del__(), merging it into bundlerepository.close(),
> which overrides repository.close().
>
> http://docs.python.org/reference/datamodel.html says:
>
> "It is not guaranteed that __del__() methods are called for objects that
> still exist when the interpreter exits."

+1 for this one.  This bug will always be resurrecting as long as
temporary file cleanup depends on a call to __del__()

-- 
Isaac Jurado

"The noblest pleasure is the joy of understanding"
Leonardo da Vinci


More information about the Mercurial-devel mailing list