Rev 2292: Add a brief explanation of what tokens are used for to lock_write docstrings. in sftp://bazaar.launchpad.net/%7Ebzr/bzr/bzr.dev.hpss.api.changes/
Andrew Bennetts
andrew.bennetts at canonical.com
Fri Apr 13 02:10:56 BST 2007
At sftp://bazaar.launchpad.net/%7Ebzr/bzr/bzr.dev.hpss.api.changes/
------------------------------------------------------------
revno: 2292
revision-id: andrew.bennetts at canonical.com-20070413010947-wdy5e6gexv20k98b
parent: andrew.bennetts at canonical.com-20070412082651-cwzuhh5xqwdtchsw
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: bzr.dev.hpss.api.changes
timestamp: Fri 2007-04-13 11:09:47 +1000
message:
Add a brief explanation of what tokens are used for to lock_write docstrings.
modified:
bzrlib/lockable_files.py control_files.py-20051111201905-bb88546e799d669f
bzrlib/lockdir.py lockdir.py-20060220222025-98258adf27fbdda3
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/test_lockable_files.py test_lockable_files.py-20051225183927-365c7fd99591caf1
=== modified file 'bzrlib/lockable_files.py'
--- a/bzrlib/lockable_files.py 2007-04-12 08:03:10 +0000
+++ b/bzrlib/lockable_files.py 2007-04-13 01:09:47 +0000
@@ -240,6 +240,10 @@
instance doesn't support using token locks.
:raises MismatchedToken: if the specified token doesn't match the token
of the existing lock.
+
+ A token should be passed in if you know that you have locked the object
+ some other way, and need to synchronise this object's state with that
+ fact.
"""
# mutter("lock write: %s (%s)", self, self._lock_count)
# TODO: Upgrade locking to support using a Transport,
=== modified file 'bzrlib/lockdir.py'
--- a/bzrlib/lockdir.py 2007-04-11 13:35:32 +0000
+++ b/bzrlib/lockdir.py 2007-04-13 01:09:47 +0000
@@ -436,6 +436,10 @@
instance doesn't support using token locks.
:raises MismatchedToken: if the specified token doesn't match the token
of the existing lock.
+
+ A token should be passed in if you know that you have locked the object
+ some other way, and need to synchronise this object's state with that
+ fact.
XXX: docstring duplicated from LockableFiles.lock_write.
"""
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-04-11 13:35:32 +0000
+++ b/bzrlib/repository.py 2007-04-13 01:09:47 +0000
@@ -242,6 +242,10 @@
:raises MismatchedToken: if the specified token doesn't match the token
of the existing lock.
+ A token should be passed in if you know that you have locked the object
+ some other way, and need to synchronise this object's state with that
+ fact.
+
XXX: this docstring is duplicated in many places, e.g. lockable_files.py
"""
return self.control_files.lock_write(token=token)
=== modified file 'bzrlib/tests/test_lockable_files.py'
--- a/bzrlib/tests/test_lockable_files.py 2007-04-12 08:03:10 +0000
+++ b/bzrlib/tests/test_lockable_files.py 2007-04-13 01:09:47 +0000
@@ -306,10 +306,6 @@
third_lockable.unlock()
-
-
-
-
# This method of adapting tests to parameters is different to
# the TestProviderAdapters used elsewhere, but seems simpler for this
# case.
More information about the bazaar-commits
mailing list