gcommit fails with "Unknown error" if NoWhoami is raised

Bug #656641 reported by Andrew Bennetts
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Fix Released
High
Edward Ari Bichetero

Bug Description

If you have no whoami information set, and try to commit with gcommit, you get an "Unknown error". At the same time you get warnings on the terminal:

/home/andrew/code/bzr-gtk/dialog.py:36: GtkWarning: Failed to set text from markup due to error parsing markup: Error on line 3 char 47: '<email address hidden>' is not a valid name: '@'
  dialog.format_secondary_markup(secondary)
/home/andrew/code/bzr-gtk/dialog.py:37: GtkWarning: Failed to set text from markup due to error parsing markup: Error on line 3 char 47: '<email address hidden>' is not a valid name: '@'
  response = dialog.run()

Note that '<email address hidden>' appears in the text description of NoWhoami.

Here's a fairly easy way to reproduce:

mkdir /tmp/fake_home
bzr init /tmp/a-branch
cd /tmp/a-branch
export EMAIL=
BZR_HOME=/tmp/fake_home bzr gcommit

Enter a commit message and click "Commit".

Presumably the fix involves making bzr-gtk formatting the error text differently?

As a secondary issue, it would be nice for "Unknown Error" situations to at least dump a traceback to stderr or something, rather than leave no clues.

Tags: trivial

Related branches

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

We shouldn't be using markup in the error dialogs - we don't know what text is going to be in bzr exceptions.

Changed in bzr-gtk:
status: New → Triaged
importance: Undecided → High
tags: added: trivial
Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
assignee: nobody → Edward Ari Bichetero (ebichete)
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
status: Fix Committed → Fix Released
milestone: none → 0.103.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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