ReadOnlyError for log from other branch

Bug #497676 reported by Martin von Gagern on 2009-12-17
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Unassigned

Bug Description

From the user point of view, this feels like a variation of bug #496590, while the internal cause is probably the same as in bug #144421.

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 log -r branch:../trunk

bzr: ERROR: bzrlib.errors.ReadOnlyError: A write attempt was made in a read only transaction on LockableFiles(lock, file://.../repo/trunk/.bzr/branch/)

Traceback (most recent call last):
  File ".../bzr.dev/bzrlib/commands.py", line 826, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File ".../bzr.dev/bzrlib/commands.py", line 1027, in run_bzr
    ret = run(*run_argv)
  File ".../bzr.dev/bzrlib/commands.py", line 638, in run_argv_aliases
    return self.run(**all_cmd_args)
  File ".../bzr.dev/bzrlib/commands.py", line 1042, in ignore_pipe
    result = func(*args, **kwargs)
  File ".../bzr.dev/bzrlib/builtins.py", line 2334, in run
    rev1, rev2 = _get_revision_range(revision, b, self.name())
  File ".../bzr.dev/bzrlib/builtins.py", line 2401, in _get_revision_range
    rev1 = rev2 = revisionspec_list[0].in_history(branch)
  File ".../bzr.dev/bzrlib/revisionspec.py", line 222, in in_history
    return self._match_on_and_check(branch, revs)
  File ".../bzr.dev/bzrlib/revisionspec.py", line 201, in _match_on_and_check
    info = self._match_on(branch, revs)
  File ".../bzr.dev/bzrlib/revisionspec.py", line 817, in _match_on
    branch.fetch(other_branch, revision_b)
  File ".../bzr.dev/bzrlib/decorators.py", line 192, in write_locked
    self.lock_write()
  File ".../bzr.dev/bzrlib/branch.py", line 2151, in lock_write
    return self.control_files.lock_write(token=token)
  File ".../bzr.dev/bzrlib/lockable_files.py", line 188, in lock_write
    raise errors.ReadOnlyError(self)
ReadOnlyError: A write attempt was made in a read only transaction on LockableFiles(lock, file://.../repo/trunk/.bzr/branch/)

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: ['.../bzr.dev/bzr', '--no-plugins', 'log', '-r', 'branch:../trunk']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.utf8'
plugins:

*** 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
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

You probably want to write a bunch of test cases, ensuring that branch: revspecs work for all commands.

Related branches

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin von Gagern wrote:
> Public bug reported:
>
>>From the user point of view, this feels like a variation of bug #496590,
> while the internal cause is probably the same as in bug #144421.
>

>
> You probably want to write a bunch of test cases, ensuring that branch:
> revspecs work for all commands.
>
> ** Affects: bzr
> Importance: Undecided
> Status: New
>

A workaround is "bzr log -r -1:../trunk".

Though that only works if the trunk revision is already present in the
local repository.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksqQYIACgkQJdeBCYSNAAOGwwCgq4JHDaVMLsA/2yB0UImSEJbx
pTMAnRuig28H+5q0s71WtjyWg898R5ND
=ho5N
-----END PGP SIGNATURE-----

Martin Pool (mbp) on 2009-12-21
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers