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: catch RepoError and EnvironmentError globally (fixes #227)

Changeset f4325c885ae5

Parent 71804cca102a

by Steve Borho

Changes to one file · Browse files at f4325c885ae5 Showing diff from parent 71804cca102a Diff from another changeset...

 
289
290
291
292
293
294
 
 
 
 
 
 
 
 
 
 
 
 
 
295
296
297
 
289
290
291
 
 
 
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
@@ -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)