[PATCH 4 of 5] chgserver: add an explicit gc to trigger __del__

Yuya Nishihara yuya at tcha.org
Fri Mar 18 10:54:51 EDT 2016

On Fri, 18 Mar 2016 06:25:12 -0700, Jun Wu wrote:
> On 03/17/2016 07:18 AM, Yuya Nishihara wrote:
> > I think these tests are incompatible with chg by nature because they rely on
> > gc. Perhaps we should disable them in chg.
> They rely on normal exit, which will call __del__ for every Python objects,
> which is fine in my opinion.

Is implicit tr.release() still allowed? I think it should be ditched because
it makes the locking/transaction order unstable.

> "os._exit" (used by SocketServer) is the abnormal way to exit that needs
> workaround.

Well, I agree _exit() isn't normal, but tr.release() shouldn't rely on exit().
Even without chg, you can do "runcommand buggylocking" more than once in the
same process.

More information about the Mercurial-devel mailing list