~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisiontree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-11 11:47:36 UTC
  • mfrom: (5200.3.8 lock_return)
  • Revision ID: pqm@pqm.ubuntu.com-20100511114736-mc1sq9zyo3vufec7
(lifeless) Provide a consistent interface to Tree, Branch,
 Repository where lock methods return an object with an unlock method to
 unlock the lock. This breaks the API for Branch,
 Repository on their lock_write methods. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
        return set(self._repository.get_ancestry(self._revision_id,
175
175
                                                 topo_sorted=False))
176
176
 
 
177
    def is_locked(self):
 
178
        return self._repository.is_locked()
 
179
 
177
180
    def lock_read(self):
178
181
        self._repository.lock_read()
 
182
        return self
179
183
 
180
184
    def __repr__(self):
181
185
        return '<%s instance at %x, rev_id=%r>' % (