Small fix for msvcrt locking code

Wouter van Heyst larstiq at larstiq.dyndns.org
Thu Aug 25 22:14:46 BST 2005


On Thu, Aug 18, 2005 at 11:39:26PM -0400, Matt Lavin wrote:
> This should fix many warnings being reported to the console when using 
> msvrt locking.  This is my very first time looking at or modifying the 
> source of bzr, so I could be way off base.  I couldn't figure out how to 
> create a nice patch file that I think I've seen on this list but here is 
> the diff

This patch shuts up the spurious warnings like:

  F:\bzr-0.0.6\bzrlib\lock.py:64: UserWarning: lock on <open file
  'F:\bzr.dev\.bzr \branch-lock', mode 'rb' at 0x00D4C608> not released
   warn("lock on %r not released" % self.f)
  Exception bzrlib.errors.LockError: <bzrlib.errors.LockError instance
  at 0x00D4A2 10> in <bound method _msvc_ReadLock.__del__ of
  <bzrlib.lock._msvc_ReadLock objec t at 0x00D494B0>> ignored

the patch looks good to me, but it does create an inbalance between the
two styles (self.f = None and del self.f), so one of those should
probably be used throughout lock.py

Martin, could you apply this?
Wouter van Heyst




More information about the bazaar mailing list