Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.1, 2.0.2, and 2.0.3

stable run: move repository check after QApplication() is created

Creating the repository earlier was causing:
QObject::startTimer: QTimer can only be used with threads started with QThread

Changeset 3e5ed82b4056

Parent cc93f52da903

by Steve Borho

Changes to one file · Browse files at 3e5ed82b4056 Showing diff from parent cc93f52da903 Diff from another changeset...

 
293
294
295
296
297
298
299
300
301
302
303
304
 
305
306
307
 
464
465
466
 
 
 
 
 
 
 
 
 
 
 
 
467
468
469
 
293
294
295
 
 
 
 
 
 
 
 
 
296
297
298
299
 
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
@@ -293,15 +293,7 @@
  if not path:   raise error.RepoError(_("There is no Mercurial repository here"   " (.hg not found)")) - try: - # Ensure we can open the repository before opening any dialog - # windows. Since thgrepo instances are cached, this is not wasted. - from tortoisehg.hgqt import thgrepo - repo = thgrepo.repository(lui, path) - except error.RepoError, e: - qtlib.WarningMsgBox(_('Repository Error'), - hglib.tounicode(str(e))) - raise + options['root'] = path     cmdoptions['mainapp'] = True   d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) @@ -464,6 +456,18 @@
  qtlib.configstyles(ui)   qtlib.initfontcache(ui)   self._mainapp.setWindowIcon(qtlib.geticon('thg-logo')) + + if 'root' in opts: + try: + # Ensure we can open the repository before opening any + # dialog windows. Since thgrepo instances are cached, this + # is not wasted. + from tortoisehg.hgqt import thgrepo + repo = thgrepo.repository(lui, opts['root']) + except error.RepoError, e: + qtlib.WarningMsgBox(_('Repository Error'), + hglib.tounicode(str(e))) + return   dlg = dlgfunc(ui, *args, **opts)   if dlg:   dlg.show()