~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Jelmer Vernooij
  • Date: 2011-10-05 18:11:19 UTC
  • mto: This revision was merged to the branch mainline in revision 6216.
  • Revision ID: jelmer@samba.org-20111005181119-temwjtxkgnt3jybm
Fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
        if branch:
211
211
            if self.wants_revision_history:
212
212
                # TODO: avoid looking at all of history
213
 
                graph = branch.repository.get_graph()
214
 
                revs = list(graph.iter_lefthand_ancestry(
215
 
                    branch.last_revision(), [revision.NULL_REVISION]))
 
213
                branch.lock_read()
 
214
                try:
 
215
                    graph = branch.repository.get_graph()
 
216
                    revs = list(graph.iter_lefthand_ancestry(
 
217
                        branch.last_revision(), [revision.NULL_REVISION]))
 
218
                finally:
 
219
                    branch.unlock()
 
220
                revs.reverse()
216
221
            else:
217
222
                revs = None
218
223
        else: