Changeset 3e5ed82b4056…
Parent cc93f52da903…
by
Changes to one file · Browse files at 3e5ed82b4056 Showing diff from parent cc93f52da903 Diff from another changeset...
@@ -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()
|
Loading...