dialog for 'send merge directive' fails from branch subdir

Bug #247763 reported by Selene ToyKeeper
4
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Confirmed
Undecided
Unassigned

Bug Description

The new 'Send Merge Directive' feature in vis fails when vis is not started from the branch root directory. If I start vis, then click that menu item, this happens:

~/src/bzr/gtk/vis-enhancements/viz/> bzr.dev vis
Traceback (most recent call last):
  File "/home/scott/.bazaar/plugins/gtk/revisionmenu.py", line 92, in send_merge_directive
    window = SendMergeDirectiveDialog(self.branch, self.revids[0])
  File "/home/scott/.bazaar/plugins/gtk/mergedirective.py", line 52, in __init__
    self._create()
  File "/home/scott/.bazaar/plugins/gtk/mergedirective.py", line 82, in _create
    submit_branch = self.submit_branch.get_branch()
  File "/home/scott/.bazaar/plugins/gtk/branchbox.py", line 56, in get_branch
    return Branch.open(self.get_url())
  File "/home/scott/src/bzr/trunk/bzrlib/branch.py", line 112, in open
  File "/home/scott/src/bzr/trunk/bzrlib/bzrdir.py", line 709, in open
  File "/home/scott/src/bzr/trunk/bzrlib/bzrdir.py", line 746, in open_from_transport
  File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 1616, in do_catching_redirections

  File "/home/scott/src/bzr/trunk/bzrlib/bzrdir.py", line 723, in find_format
  File "/home/scott/src/bzr/trunk/bzrlib/bzrdir.py", line 1511, in find_format
bzrlib.errors.NotBranchError: Not a branch: "/home/scott/src/bzr/gtk/vis-enhancements/trunk/".

My submit branch is '../trunk', so it appears that the feature just needs to resolve that against the branch root instead of the current directory.

Versions:
  bzr.dev r3535
  bzr-gtk r531

Also, I get the same error (minus traceback) if I run 'bzr.dev send -o /dev/null', but this is not as much of an issue. On the CLI, I can specify a path to the submit branch, but the GUI fails before even giving me a chance to enter a path.

Revision history for this message
Jasper Groenewegen (colbrac) wrote :

I can't reproduce that error. If I start bzr vis from the olive subfolder in a branch from trunk and open that Send Merge directive, no error. If I press ok (leaving target branch empty as it is):
Traceback (most recent call last):
  File "/home/jasper/.bazaar/plugins/gtk/revisionmenu.py", line 95, in send_merge_directive
    outf.writelines(window.get_merge_directive().to_lines())
  File "/home/jasper/.bazaar/plugins/gtk/mergedirective.py", line 111, in get_merge_directive
    base_revision_id=None)
  File "/usr/lib/python2.5/site-packages/bzrlib/merge_directive.py", line 477, in from_objects
    repository.lock_write()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 2033, in lock_write
    raise errors.ReadOnlyError(self)
bzrlib.errors.ReadOnlyError: A write attempt was made in a read only transaction on KnitPackRepository('file:///home/jasper/Programming/bzr-gtk/.bzr/repository/')

- If I press cancel the window is not properly destroyed and I can't reopen it.
- The 'email to' is filled in from ~/.bazaar/locations.conf
- I miss the public branch text entry which is also set in ~/.bazaar/locations.conf

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

Interesting. I also see the issue where the dialog won't re-open after cancelling, but that seems like a separate bug.

I'm attaching a short script I can use to reproduce the "not a branch" error. When vis pops up, click Revision -> Send Merge Directive. I get the not-a-branch error. (if I try a second time, I get a different traceback about "RuntimeError: could not create signal", but that may be a side effect)

Vincent Ladeuil (vila)
Changed in bzr-gtk:
status: New → Confirmed
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.