~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-13 18:51:45 UTC
  • mfrom: (4595.5.3 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090813185145-ta4t40a5t8z05amk
(Neil Martinsen-Burrell) Include bazaar-vcs.org/BzrGivingBack in
        HACKING.txt

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)