Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

hgcmd: add flag to know the user aborted

Changeset 6e3e33dc0506

Parent fc8566242bb9

by Yuki KODAMA

Changes to one file · Browse files at 6e3e33dc0506 Showing diff from parent fc8566242bb9 Diff from another changeset...

 
240
241
242
 
243
244
245
 
331
332
333
334
 
335
336
 
 
337
338
339
 
369
370
371
 
372
373
374
 
515
516
517
518
 
 
519
520
521
 
240
241
242
243
244
245
246
 
332
333
334
 
335
336
 
337
338
339
340
341
 
371
372
373
374
375
376
377
 
518
519
520
 
521
522
523
524
525
@@ -240,6 +240,7 @@
    self.hgthread = None   self.last_pbar_update = 0 + self.useraborted = False   self.is_normal = style == STYLE_NORMAL   self.is_compact = style == STYLE_COMPACT   @@ -331,9 +332,10 @@
  cmdline: command line string.   callback: function called after terminated the thread.   - def callback(returncode, ...) + def callback(returncode, useraborted, ...)   - returncode: See the description of 'hgthread' about return code. + returncode: See the description of 'hgthread'. + useraborted: Indicates whether the thread is aborted by user.   """   if self.hgthread:   return @@ -369,6 +371,7 @@
  Terminate the thread forcibly.   """   if self.hgthread: + self.useraborted = True   self.hgthread.terminate()   self.set_pbar(True)   self.set_buttons(stop=False, close=True) @@ -515,7 +518,8 @@
  self.show_log()   self.hgthread = None   def call_callback(): - callback(returncode, *args, **kargs) + callback(returncode, self.useraborted, *args, **kargs) + self.useraborted = False   gobject.idle_add(call_callback)   return False # Stop polling this function   else: