~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

[merge] from robert

 - fix handling of symlinks in tree

 - improved executable bits

 - cache pull over http and test for this

Show diffs side-by-side

added added

removed removed

Lines of Context:
343
343
        self._transaction = new_transaction
344
344
 
345
345
    def lock_write(self):
 
346
        mutter("lock write: %s (%s)", self, self._lock_count)
346
347
        # TODO: Upgrade locking to support using a Transport,
347
348
        # and potentially a remote locking protocol
348
349
        if self._lock_mode:
359
360
 
360
361
 
361
362
    def lock_read(self):
 
363
        mutter("lock read: %s (%s)", self, self._lock_count)
362
364
        if self._lock_mode:
363
365
            assert self._lock_mode in ('r', 'w'), \
364
366
                   "invalid lock mode %r" % self._lock_mode
371
373
            self._set_transaction(transactions.ReadOnlyTransaction())
372
374
                        
373
375
    def unlock(self):
 
376
        mutter("unlock: %s (%s)", self, self._lock_count)
374
377
        if not self._lock_mode:
375
378
            raise LockError('branch %r is not locked' % (self))
376
379