Rev 2212: Add a brief explanation of what tokens are used for to lock_write docstrings. in sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/
Andrew Bennetts
andrew.bennetts at canonical.com
Fri Apr 13 01:57:21 BST 2007
At sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/
------------------------------------------------------------
revno: 2212
revision-id: andrew.bennetts at canonical.com-20070413005608-jkzcnpbnftissj97
parent: andrew.bennetts at canonical.com-20070412162221-6imfutzivlmg4rg5
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss
timestamp: Fri 2007-04-13 10:56:08 +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
=== modified file 'bzrlib/lockable_files.py'
--- a/bzrlib/lockable_files.py 2007-04-12 08:04:51 +0000
+++ b/bzrlib/lockable_files.py 2007-04-13 00:56:08 +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-02-19 02:36:38 +0000
+++ b/bzrlib/lockdir.py 2007-04-13 00:56:08 +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 05:58:16 +0000
+++ b/bzrlib/repository.py 2007-04-13 00:56:08 +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)
More information about the bazaar-commits
mailing list