~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

  • Committer: Danny van Heumen
  • Date: 2010-03-09 21:42:11 UTC
  • mto: (4634.139.5 2.0)
  • mto: This revision was merged to the branch mainline in revision 5160.
  • Revision ID: danny@dannyvanheumen.nl-20100309214211-iqh42x6qcikgd9p3
Reverted now-useless TODO list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
from cStringIO import StringIO
 
18
 
17
19
from bzrlib.lazy_import import lazy_import
18
20
lazy_import(globals(), """
19
21
import codecs
30
32
""")
31
33
 
32
34
from bzrlib.decorators import (
33
 
    only_raises,
 
35
    needs_read_lock,
 
36
    needs_write_lock,
 
37
    )
 
38
from bzrlib.symbol_versioning import (
 
39
    deprecated_in,
 
40
    deprecated_method,
34
41
    )
35
42
 
36
43
 
214
221
        """Setup a write transaction."""
215
222
        self._set_transaction(transactions.WriteTransaction())
216
223
 
217
 
    @only_raises(errors.LockNotHeld, errors.LockBroken)
218
224
    def unlock(self):
219
225
        if not self._lock_mode:
220
226
            return lock.cant_unlock_not_held(self)