bzrlib.errors.ObjectNotLocked annotating file from other branch

Bug #496590 reported by Martin von Gagern on 2009-12-14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Andrew Bennetts
Andrew Bennetts
Andrew Bennetts

Bug Description

Steps to reproduce:
$ bzr init-repo repo
$ cd repo
$ bzr init trunk
$ cd trunk
$ echo foo > foo
$ bzr add foo
$ bzr ci -m foo
$ cd ..
$ bzr co --lightweight trunk work
$ cd work
$ bzr --no-plugins annotate -r branch:../trunk foo

bzr: ERROR: bzrlib.errors.ObjectNotLocked: <bzrlib.groupcompress._GCGraphIndex object at 0x1f7c250> is not locked

Traceback (most recent call last):
  File ".../", line 826, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File ".../", line 1027, in run_bzr
    ret = run(*run_argv)
  File ".../", line 638, in run_argv_aliases
  File ".../", line 1042, in ignore_pipe
    result = func(*args, **kwargs)
  File ".../", line 4512, in run
    file_version = tree.inventory[file_id].revision
  File ".../", line 2016, in __getitem__
  File ".../", line 494, in iteritems
  File ".../", line 143, in _ensure_root
    self._root_node = self._get_node(self._root_node)
  File ".../", line 156, in _get_node
    bytes = self._read_bytes(node)
  File ".../", line 167, in _read_bytes
    bytes ='fulltext')
  File ".../", line 1413, in get_record_stream
    orig_keys, ordering, include_delta_closure):
  File ".../", line 1518, in _get_remaining_record_stream
    locations = self._index.get_build_details(keys)
  File ".../", line 2003, in get_build_details
  File ".../", line 1923, in _check_read
    raise errors.ObjectNotLocked(self)
ObjectNotLocked: <bzrlib.groupcompress._GCGraphIndex object at 0x1f7c250> is not locked

bzr 2.1.0dev4 on python 2.6.4 (Linux-2.6.32-gentoo-x86_64-AMD_Phenom-tm-_II_X4_945_Processor-with-gentoo-2.0.1)
arguments: ['.../', '--no-plugins', 'annotate', '-r', 'branch:../trunk', 'foo']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.utf8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
    including this traceback and a description of the problem.

This happened with current, i.e. 4894 resp. <email address hidden>

Related branches

Martin Pool (mbp) on 2009-12-15
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
tags: added: annotate
Andrew Bennetts (spiv) on 2010-01-07
Changed in bzr:
status: Confirmed → Fix Committed
assignee: nobody → Andrew Bennetts (spiv)
Martin Pool (mbp) wrote :

Is this now fix released in 2.1?

Martin von Gagern (gagern) wrote :

Still can reproduce with current trunk and current 2.1 branch.

Andrew Bennetts (spiv) wrote :

Neither of my branches (one is targetted to 2.0, the other to trunk) have landed yet, hopefully tomorrow though.

Also, for convenience, here's a shell script that reproduces. I've confirmed that both branches fix this bug.

Andrew Bennetts (spiv) wrote :

Fixed in lp:bzr r4948, and lp:bzr/2.0 r4721.

Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments