D6664: transaction: leave unfinished without crashing when not properly released

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sat Aug 3 16:41:19 EDT 2019


indygreg added a comment.


  The presence of `__del__` is a bit dangerous and I've debugged a handful of issues related to having `__del__` on `transaction`. We still leak repo objects in places due to circular references. It's super annoying.
  
  Ideally we would use context managers everywhere and we could remove `__del__` completely. I would strongly suggest that we make `__del__` deprecated and emit a warning if it is doing something meaningful, as I view the lack of the caller cleaning up state as a bug. Then we can remove `__del__` in some future release.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6664/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6664

To: martinvonz, #hg-reviewers
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list