Comment 5 for bug 430232

Revision history for this message
John A Meinel (jameinel) wrote :

So I've confirmed it is a bug in qbzr. I'm uploading a fix for it now.

However, I'm also noticing that this is a latent bug in a bunch of other locations. Like "qmerge" is going to have the same problem.
=== modified file 'lib/commands.py'
--- lib/commands.py 2009-08-31 09:36:23 +0000
+++ lib/commands.py 2009-09-15 21:56:43 +0000
@@ -341,10 +341,10 @@
     aliases = ['qci']

     def _qbzr_run(self, selected_list=None, message=None, local=False, ui_mode=False):
+ application = QtGui.QApplication(sys.argv)
         tree, selected_list = builtins.tree_files(selected_list)
         if selected_list == ['']:
             selected_list = []
- application = QtGui.QApplication(sys.argv)
         self.main_window = CommitWindow(tree, selected_list, dialog=False,
             message=message, local=local, ui_mode=ui_mode)
         self.main_window.show()

The basic issue is that opening a branch will potentially try to open a dialog to prompt a user for their password, and this is happening *before* the application is created.

I think what we need is to move the "app = QtGui.QApplication" up into the QBzrCommand code, rather than having every qbzr command do it manually.