Commands on file doesn't work with lightweight checkout from distant repository

Bug #253297 reported by Alexandre Garnier
2
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

With a lightweight checkout from distant repository (at least bzr://), commands on file like annotate, or log (only with --xml option from bzr-xmloutput)

Exemple :
$ bzr init-repo --no-trees repo
$ bzr init repo/branch
$ bzr serve --directory=repo

Use normal checkout
$ bzr checkout bzr://localhost/branch
$ cd branch
$ echo "test" > file
$ bzr add file
$ bzr ci
$ bzr annotate file
1 Alexand | test

With lightweight checkout
$ cd ..
$ bzr co --lightweight bzr://localhost/branch branch_light
$ cd branch_light
$ bzr annotate file
bzr: ERROR: bzrlib.errors.ObjectNotLocked: KnitPackRepository('bzr://localhost/.bzr/repository/') is not locked

Traceback (most recent call last):
  File "/opt/bzr/lib/python/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/opt/bzr/lib/python/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/opt/bzr/lib/python/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/opt/bzr/lib/python/bzrlib/commands.py", line 800, in ignore_pipe
    result = func(*args, **kwargs)
  File "/opt/bzr/lib/python/bzrlib/builtins.py", line 3496, in run
    show_ids=show_ids)
  File "/opt/bzr/lib/python/bzrlib/annotate.py", line 74, in annotate_file
    annotation = list(_annotate_file(branch, rev_id, file_id))
  File "/opt/bzr/lib/python/bzrlib/annotate.py", line 126, in _annotate_file
    annotations = _annotations(branch.repository, file_id, rev_id)
  File "/opt/bzr/lib/python/bzrlib/annotate.py", line 115, in _annotations
    w = repo.weave_store.get_weave(file_id, repo.get_transaction())
  File "/opt/bzr/lib/python/bzrlib/repofmt/pack_repo.py", line 1764, in get_weave_or_empty
    self.repo._pack_collection.ensure_loaded()
  File "/opt/bzr/lib/python/bzrlib/repofmt/pack_repo.py", line 1332, in ensure_loaded
    raise errors.ObjectNotLocked(self.repo)
ObjectNotLocked: KnitPackRepository('bzr://localhost/.bzr/repository/') is not locked

bzr 1.3.1 on python 2.5.2.final.0 (linux2)
arguments: ['/opt/bzr/bin/bzr', 'annotate', 'file']
encoding: 'ISO-8859-1', fsenc: 'ISO-8859-1', lang: 'en_US'
plugins:
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

It's the same with Bazaar 1.5.

Revision history for this message
Alexandre Garnier (zigarn) wrote :

gannotate from bzr-gtk works just fine.

Revision history for this message
James Westby (james-w) wrote :

Hi,

Thanks for taking the time to report this bug.

This particular bug has already been reported, but please
feel free to report any other bugs that you find.

Thanks,

James

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.