ReadOnlyError when using tag for bzr viz

Bug #133220 reported by Gary van der Merwe
6
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Triaged
Medium
Unassigned

Bug Description

I get a ReadOnlyError when I use the tag function form bzr viz, but *not* when in the log window in olive-gtk.

Steps to reproduce:
* Run bzr viz
* Right click on a revision, click on tag revision.
* Enter tag name.
* Click Add Tag

Expected result:
* Tag added.

Actual Result:
* The following error is written to the console, and the tag is not added:
Traceback (most recent call last):
  File bzrlib/plugins/gtk/revisionmenu.py, line 84, in show_tag
    self.branch.lock_write()
  File bzrlib/branch.py, line 1304, in lock_write
    repo_token = self.repository.lock_write()
  File bzrlib/repository.py, line 306, in lock_write
    result = self.control_files.lock_write(token=token)
  File bzrlib/lockable_files.py, line 225, in lock_write
    raise errors.ReadOnlyError(self)
bzrlib.errors.ReadOnlyError: A write attempt was made in a read only transaction on LockableFiles(lock, /path/to/.bzr/repository/)

Revision history for this message
Gary van der Merwe (garyvdm) wrote : [PATCH] Fix for Bug #133220: ReadOnlyError when using tag for bzr viz

Hi

The attached patch fixes Bug #133220: ReadOnlyError when using tag for
bzr viz. What the patch does is just before we create a write lock, we
check if there is a read lock. If there is, unlock it, and then create
to read lock afterwards.

Please can the be merged into the trunk?

Gary

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 133220] ReadOnlyError when using tag for bzr viz

  status triaged
  importance medium
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Changed in bzr-gtk:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Szilveszter Farkas (phanatic) wrote :

I cannot reproduce this bug using bzr-gtk trunk, so I suppose it was fixed. Please reopen the bug, if you experience this issue...

Changed in bzr-gtk:
status: Triaged → Fix Released
Revision history for this message
Jasper Groenewegen (colbrac) wrote :

Actually it seems this is not fixed properly. The pain is in the tags.py/AddTagDialog which does a branch.tags.set_tag() without any branch locking/unlocking. Present in trunk 560.

Changed in bzr-gtk:
status: Fix Released → Triaged
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

This may be related to bug 213915.

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.