Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8.1, 0.8.2, and 0.8.3

datamine: catch util.Abort() during grep operations

Refs #383

Prevents backtraces on invalid inputs. Status bar will be given the
error text.

Changeset a0f069ba19a6

Parent 801cc31baabb

by Steve Borho

Changes to one file · Browse files at a0f069ba19a6 Showing diff from parent 801cc31baabb Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​datamine.py Stacked
 
355
356
357
358
 
 
 
 
 
 
 
 
359
360
361
 
355
356
357
 
358
359
360
361
362
363
364
365
366
367
368
@@ -355,7 +355,14 @@
  for x in excs:   if x: args.extend(['-X', x])   args.append(retext) - thread = thread2.Thread(target=hgcmd_toq, args=args) + + def threadfunc(path, q, *args): + try: + hgcmd_toq(path, q, *args) + except util.Abort, e: + self.stbar.set_status_text(_('Abort: %s') % str(e)) + + thread = thread2.Thread(target=threadfunc, args=args)   thread.start()   frame._mythread = thread   self.stop_button.set_sensitive(True)