Merge lp:~arvindsraj-deactivatedaccount/bzr-gtk/gpreferences-665560 into lp:bzr-gtk/gtk2

Proposed by Arvind S Raj
Status: Work in progress
Proposed branch: lp:~arvindsraj-deactivatedaccount/bzr-gtk/gpreferences-665560
Merge into: lp:bzr-gtk/gtk2
Diff against target: 19 lines (+7/-2)
1 file modified
commands.py (+7/-2)
To merge this branch: bzr merge lp:~arvindsraj-deactivatedaccount/bzr-gtk/gpreferences-665560
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) code Disapprove
Review via email: mp+44122@code.launchpad.net

Description of the change

"bzr gpreferences" displays no graphical error is the user details have not been set by "bzr whoami". This becomes confusing, when run from System -> Preferences -> Bazaar Preferences, since no feedback is given. Added a graphical error in addition to printing the error in the command line.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The preferences window is used to set the user name, so it's wrong for us to complain if it's not set yet. Instead, we should fix where we raise this exception.

review: Disapprove (code)

Unmerged revisions

701. By Arvind S Raj

gpreferences 'crash' fixed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'commands.py'
2--- commands.py 2010-10-27 13:43:51 +0000
3+++ commands.py 2010-12-18 02:18:09 +0000
4@@ -373,8 +373,13 @@
5 def run(self):
6 open_display()
7 from bzrlib.plugins.gtk.preferences import PreferencesWindow
8- dialog = PreferencesWindow()
9- dialog.run()
10+ try:
11+ dialog = PreferencesWindow()
12+ a = dialog.run()
13+ except NoWhoami, error_msg:
14+ error_dialog(_i18n('Unable to determine your name.'), \
15+ _i18n('Please, set your name with the "whoami" command.'))
16+ print error_msg
17
18
19 class cmd_gmerge(Command):

Subscribers

People subscribed via source and target branches

to status/vote changes: