# HG changeset patch # User Augie Fackler # Date 2015-12-01 19:44:08 # Node ID 8a829fc84bb35a851159f7506def7e12faf2157b # Parent 3fe8cb40c9c5973f72cad2b6190b4880abed7cff test-fncache: ensure lock doesn't look held to __del__ This was showing a DeprecationWarning on Python 2.6. diff --git a/tests/test-fncache.t b/tests/test-fncache.t --- a/tests/test-fncache.t +++ b/tests/test-fncache.t @@ -209,8 +209,10 @@ Aborting lock does not prevent fncache w > > def lockexception(orig, vfs, lockname, wait, releasefn, *args, **kwargs): > def releasewrap(): + > l.held = False # ensure __del__ is a noop > raise error.Abort("forced lock failure") - > return orig(vfs, lockname, wait, releasewrap, *args, **kwargs) + > l = orig(vfs, lockname, wait, releasewrap, *args, **kwargs) + > return l > > def reposetup(ui, repo): > wrapfunction(repo, '_lock', lockexception) @@ -225,7 +227,6 @@ Aborting lock does not prevent fncache w $ touch y $ hg ci -qAm y abort: forced lock failure - Exception mercurial.error.Abort: Abort('forced lock failure',) in > ignored (glob) [255] $ cat .hg/store/fncache data/y.i