Rev 2360: (John Arbash Meinel) Clean up OS locks, and implement per-lock implementation tests. in /home/pqm/archives/thelove/bzr/+trunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Mar 15 15:12:47 GMT 2007


------------------------------------------------------------
revno: 2360
revision-id: pqm at pqm.ubuntu.com-20070315151245-0d48a831784fc542
parent: pqm at pqm.ubuntu.com-20070314155044-47c0c6257a6c6717
parent: john at arbash-meinel.com-20070314231341-itctu2g4nobeexu4
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-03-15 15:12:45 +0000
message:
  (John Arbash Meinel) Clean up OS locks, and implement per-lock implementation tests.
added:
  bzrlib/tests/per_lock/         bzrlibtestsper_lock-20070314195914-llb0phfp2laomqb3-1
  bzrlib/tests/per_lock/__init__.py __init__.py-20070314201444-u92yjsqrkh2m3qcb-1
  bzrlib/tests/per_lock/test_lock.py test_lock.py-20070313190612-mfpoa7t8kvrgrhj2-1
modified:
  bzrlib/errors.py               errors.py-20050309040759-20512168c4e14fbd
  bzrlib/lock.py                 lock.py-20050527050856-ec090bb51bc03349
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
  bzrlib/tests/test_errors.py    test_errors.py-20060210110251-41aba2deddf936a8
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070314231341-itctu2g4nobeexu4
    parent: john at arbash-meinel.com-20070314205703-taih3n87g9n4afdv
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: lock_cleanup
    timestamp: Wed 2007-03-14 18:13:41 -0500
    message:
      Don't create the alternative lock types unless we are on windows.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070314205703-taih3n87g9n4afdv
    parent: john at arbash-meinel.com-20070314204717-htynwogv97fqr22a
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: lock_cleanup
    timestamp: Wed 2007-03-14 15:57:03 -0500
    message:
      Code cleanup
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070314204717-htynwogv97fqr22a
    parent: john at arbash-meinel.com-20070314201552-bjtfua57456dviep
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: lock_cleanup
    timestamp: Wed 2007-03-14 15:47:17 -0500
    message:
      Cleanup errors, and change ReadOnlyLockError to pass around more details.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070314201552-bjtfua57456dviep
    parent: john at arbash-meinel.com-20070313231812-h74g1zz32v12lv6s
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: lock_cleanup
    timestamp: Wed 2007-03-14 15:15:52 -0500
    message:
      Update the lock code and test code so that if more than one
      lock implementation is available, they will both be tested.
      
      It is quite a bit of overhead, for a case where we are likely to only have 1
      real lock implementation per platform, but hey, for now we have 2.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070313231812-h74g1zz32v12lv6s
    parent: john at arbash-meinel.com-20070313231737-ce4jw7n4qnx48izk
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: locking
    timestamp: Tue 2007-03-13 18:18:12 -0500
    message:
      Fix Copyright in lock.py
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070313231737-ce4jw7n4qnx48izk
    parent: john at arbash-meinel.com-20070313231151-us9a62z9v7cpqvko
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: locking
    timestamp: Tue 2007-03-13 18:17:37 -0500
    message:
      Remove the msvc lock type, since it can no longer be used.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070313231151-us9a62z9v7cpqvko
    parent: john at arbash-meinel.com-20070313223538-qdjwtmr5dan31t1z
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: locking
    timestamp: Tue 2007-03-13 18:11:51 -0500
    message:
      On Win32 if you have a file opened in read+write mode, you must call seek() when switching
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070313223538-qdjwtmr5dan31t1z
    parent: john at arbash-meinel.com-20070313202827-kj3wt1uqld9mtprj
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: locking
    timestamp: Tue 2007-03-13 17:35:38 -0500
    message:
      Fall back on ctypes to get LockFileEx, because msvcrt.locking()
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070313202827-kj3wt1uqld9mtprj
    parent: john at arbash-meinel.com-20070313193927-8opc18wbi7ln0gil
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: locking
    timestamp: Tue 2007-03-13 15:28:27 -0500
    message:
      Clean up the lock.py code to use less indenting, and conform to better coding practise.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070313193927-8opc18wbi7ln0gil
    parent: john at arbash-meinel.com-20070313191557-ouvms9hsnpij9xct
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: locking
    timestamp: Tue 2007-03-13 13:39:27 -0600
    message:
      Define an explicit error when trying to grab a write lock on a readonly file.
      Add some future tests that ensure write and read locks exclude eachother.
      Currently fcntl locks do not exclude.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070313191557-ouvms9hsnpij9xct
    parent: john at arbash-meinel.com-20070313191105-dlkexxbr3jvva1rx
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: locking
    timestamp: Tue 2007-03-13 13:15:57 -0600
    message:
      Add a tests that multiple write locks raise the right kind of error.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070313191105-dlkexxbr3jvva1rx
    parent: pqm at pqm.ubuntu.com-20070313175755-809681c81472204a
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: locking
    timestamp: Tue 2007-03-13 13:11:05 -0600
    message:
      Add some basic locking tests which should currently pass on all platforms.



More information about the bazaar-commits mailing list