Rev 2372: Update the dirstate tests to lock and unlock properly. in http://bzr.arbash-meinel.com/branches/bzr/experimental/dirstate

John Arbash Meinel john at arbash-meinel.com
Fri Feb 23 01:11:27 GMT 2007


At http://bzr.arbash-meinel.com/branches/bzr/experimental/dirstate

------------------------------------------------------------
revno: 2372
revision-id: john at arbash-meinel.com-20070223011122-eyncc8ny0hchp0qc
parent: john at arbash-meinel.com-20070222232615-46n3rjdpfrsbmu3b
parent: jw+debian at jameswestby.net-20070222224549-16u0yxrdrqg3vgpg
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate
timestamp: Thu 2007-02-22 19:11:22 -0600
message:
  Update the dirstate tests to lock and unlock properly.
  Change the lock.WriteLock functions so that they open in 'rb+' mode instead
  of automatically truncating the file.
  test_dirstate.py now passes, but we need to figure out or locking mechanism for
  WorkingTree4. (does it just lock at the same time as Tree.lock_write()?)
modified:
  bzrlib/dirstate.py             dirstate.py-20060728012006-d6mvoihjb3je9peu-1
  bzrlib/lock.py                 lock.py-20050527050856-ec090bb51bc03349
  bzrlib/tests/test_dirstate.py  test_dirstate.py-20060728012006-d6mvoihjb3je9peu-2
    ------------------------------------------------------------
    revno: 2370.1.2
    merged: jw+debian at jameswestby.net-20070222224549-16u0yxrdrqg3vgpg
    parent: jw+debian at jameswestby.net-20070222212253-lacx7ppcjunahmio
    committer: James Westby <jw+debian at jameswestby.net>
    branch nick: dirstate
    timestamp: Thu 2007-02-22 22:45:49 +0000
    message:
      (broken) Add the locking methods.
      
        * Callers should now use lock_read and lock_write before they do
          anything with dirstate.
        * You can only grab a single lock on the object, and can't unlock it
          if not locked.
        * initialize now returns a writelocked object to the caller.
        * This breaks the tests massively, sorry, as they need to do locking now.
          - Currently the main problem is the dirstate never being flushed to disk,
            so all tests trip the assertion that the header is incorrect.
    ------------------------------------------------------------
    revno: 2370.1.1
    merged: jw+debian at jameswestby.net-20070222212253-lacx7ppcjunahmio
    parent: john at arbash-meinel.com-20070222202320-k3x9ozxjj2ugnygc
    committer: James Westby <jw+debian at jameswestby.net>
    branch nick: dirstate
    timestamp: Thu 2007-02-22 21:22:53 +0000
    message:
      Store the filename of the dirstate in an attribute.
      
        * Store the filename so that it can be more adventurous in what it does
          with the file.
        * Callers of the constructor should now pass the path to it, and any
          methods that want to access the path should do so through self._filename.
-------------- next part --------------

Diff too large for email (1092 lines, the limit is 1000).


More information about the bazaar-commits mailing list