Rev 2332: TemporaryWriteLock should use an exclusive lock. in http://bzr.arbash-meinel.com/branches/bzr/0.15-dev/locking_errors

John Arbash Meinel john at arbash-meinel.com
Thu Mar 29 00:09:21 BST 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.15-dev/locking_errors

------------------------------------------------------------
revno: 2332
revision-id: john at arbash-meinel.com-20070328230910-ap3peik2cl7lsi9h
parent: john at arbash-meinel.com-20070328201125-l1y0uyia91q56pmf
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: locking_errors
timestamp: Wed 2007-03-28 18:09:10 -0500
message:
  TemporaryWriteLock should use an exclusive lock.
modified:
  bzrlib/lock.py                 lock.py-20050527050856-ec090bb51bc03349
-------------- next part --------------
=== modified file 'bzrlib/lock.py'
--- a/bzrlib/lock.py	2007-03-28 20:11:25 +0000
+++ b/bzrlib/lock.py	2007-03-28 23:09:10 +0000
@@ -228,7 +228,7 @@
             try:
                 # LOCK_NB will cause IOError to be raised if we can't grab a
                 # lock right away.
-                fcntl.lockf(new_f, fcntl.LOCK_SH | fcntl.LOCK_NB)
+                fcntl.lockf(new_f, fcntl.LOCK_EX | fcntl.LOCK_NB)
             except IOError, e:
                 # TODO: Raise a more specific error based on the type of error
                 raise errors.LockContention(e)



More information about the bazaar-commits mailing list