Steve Borho  committed 150a847

run: catch and handle ConfigError as safely as possible (closes #641)

  • Participants
  • Parent commits d8f38e4
  • Branches stable

Comments (0)

Files changed (2)

File tortoisehg/hgqt/

         bb = QDialogButtonBox(QDialogButtonBox.Close, centerButtons=True)
+        desktopgeom = qApp.desktop().availableGeometry()
+        self.resize(desktopgeom.size() * 0.20)
     def _openlink(self, ref):
             # A chicken-egg problem here, we need a ui to get your
             # editor in order to repair your ui config file.
             wctxactions.edit(self, ui.ui(), None, [fname], lineno, None)
+        if ref.startswith('#fix:'):
+            from tortoisehg.hgqt import settings
+            errtext = ref[5:].split(' ')[0]
+            sd = settings.SettingsDialog(configrepo=False, focus=errtext,
+                                parent=self, root='')
+            sd.exec_()
 def run(ui, *pats, **opts):
     return BugReport(opts)

File tortoisehg/hgqt/

         error.RepoLookupError: _('Try refreshing your repository.'),
         error.ParseError: _('Error string "%(arg0)s" at %(arg1)s<br>Please '
                             '<a href="#edit:%(arg1)s">edit</a> your config'),
+        error.ConfigError: _('Configuration Error: "%(arg0)s", please '
+                             '<a href="#fix:%(arg0)s">fix</a> your config'),
     def __init__(self):