"bzr log -rbefore:" crashes with ReadOnlyError

Bug #563438 reported by Daniel Hahler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

I've been fooling around with bzr, trying to figure out how to get an "annotated" diff of changes introduced by a merge.

First, it appears to fail reporting via Apport, then the ReadOnlyError.

$ bzr log -r before: blogs/rsc/css/basic.css
bzr: failed to report crash using apport:
     IOError(13, 'Permission denied')
bzr: ERROR: bzrlib.errors.ReadOnlyError: A write attempt was made in a read only transaction on LockableFiles(lock, file:///home/user/src/b2evo/whissip/.bzr/branch/)

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/user/.bazaar/plugins/pager/__init__.py", line 60, in run
    cmd_class.run(self, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1070, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 2310, in run
    revision, file_list)
  File "/usr/lib/python2.6/dist-packages/bzrlib/log.py", line 1913, in _get_info_for_log_files
    "log")
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 2401, in _get_revision_range
    rev1 = rev2 = revisionspec_list[0].in_history(branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 222, in in_history
    return self._match_on_and_check(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 201, in _match_on_and_check
    info = self._match_on(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 550, in _match_on
    r = RevisionSpec.from_string(self.spec)._match_on(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 327, in _match_on
    return self._try_spectype(rs_class, branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 309, in _try_spectype
    return rs.in_history(branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 222, in in_history
    return self._match_on_and_check(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 201, in _match_on_and_check
    info = self._match_on(branch, revs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/revisionspec.py", line 817, in _match_on
    branch.fetch(other_branch, revision_b)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    self.lock_write()
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2144, in lock_write
    return self.control_files.lock_write(token=token)
  File "/usr/lib/python2.6/dist-packages/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:///home/user/src/b2evo/whissip/.bzr/branch/)

bzr 2.1.1 on python 2.6.5 (Linux-2.6.32-21-generic-i686-with-Ubuntu-10.04-lucid)
arguments: ['/usr/bin/bzr', 'log', '-r', 'before:', 'blogs/rsc/css/basic.css']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.UTF-8'
plugins:
  bisect /home/user/.bazaar/plugins/bisect [1.1.0.pre.0]
  builddeb /usr/lib/python2.6/dist-packages/bzrlib/plugins/builddeb [2.2.0]
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.1.0]
  etckeeper /usr/lib/python2.6/dist-packages/bzrlib/plugins/etckeeper [unknown]
  extmerge /home/user/.bazaar/plugins/extmerge [unknown]
  fastimport /home/user/.bazaar/plugins/fastimport [0.9.0dev]
  gtk /usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk [0.98.0.final.1]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.1.1]
  loom /home/user/.bazaar/plugins/loom [1.4.0dev]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.1.1]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.1.1]
  pager /home/user/.bazaar/plugins/pager [unknown]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.18.5]
  rebase /usr/lib/python2.6/dist-packages/bzrlib/plugins/rebase [0.5.5]
  search /home/user/.bazaar/plugins/search [1.7.0dev]
  shell_hooks /home/user/.bazaar/plugins/shell_hooks [1.0.0dev]
  stats /home/user/.bazaar/plugins/stats [unknown]
  upload /usr/lib/python2.6/dist-packages/bzrlib/plugins/upload [1.0.0dev]

*** 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.

Tags: log
Revision history for this message
Andrew Bennetts (spiv) wrote :

"bzr log -rbefore:" reproduces this. It might be a side-effect of the DWIM-revspec code.

Note that "before:" by itself isn't a valid revisionspec, you need to specify a revision to be before. See the examples listed in "bzr help revisionspec".

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
summary: - bzr crashes with ReadOnlyError
+ "bzr log -rbefore:" crashes with ReadOnlyError
Vincent Ladeuil (vila)
tags: added: log
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.