Changeset f4325c885ae5…
Parent 71804cca102a…
by
Changes to one file · Browse files at f4325c885ae5 Showing diff from parent 71804cca102a Diff from another changeset...
@@ -289,9 +289,19 @@ if options['quiet']:
ui.quiet = True
- if cmd not in nonrepo_commands.split() and not path:
- raise error.RepoError(_("There is no Mercurial repository here"
- " (.hg not found)"))
+ if cmd not in nonrepo_commands.split():
+ 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
cmdoptions['mainapp'] = True
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
|
Loading...