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

stable visdiff: delete temp files in all cases

Changeset f5ec4035ce66

Parent ccb67c547110

by Steve Borho

Changes to one file · Browse files at f5ec4035ce66 Showing diff from parent ccb67c547110 Diff from another changeset...

 
63
64
65
 
66
67
68
 
87
88
89
90
91
92
93
94
 
212
213
214
215
 
 
216
217
218
 
269
270
271
272
273
274
275
 
276
277
278
 
 
279
280
281
 
283
284
285
286
 
 
287
288
289
 
63
64
65
66
67
68
69
 
88
89
90
 
 
91
92
93
 
211
212
213
 
214
215
216
217
218
 
269
270
271
 
 
 
 
272
273
 
 
274
275
276
277
278
 
280
281
282
 
283
284
285
286
287
@@ -63,6 +63,7 @@
    self.set_default_size(400, 150)   self.set_has_separator(False) + self.tmproot = None     lbl = gtk.Label(_('Temporary files are removed when this dialog'   ' is closed')) @@ -87,8 +88,6 @@
  hbox.pack_start(check, True, True, 2)   self.singlecheck = check   - self.connect('response', self.response) -   treeview.connect('row-activated', self.rowactivated)   treeview.set_headers_visible(False)   treeview.set_property('enable-grid-lines', True) @@ -212,7 +211,8 @@
  return     tmproot = tempfile.mkdtemp(prefix='extdiff.') - self.connect('destroy', self.delete_tmproot, tmproot) + self.connect('response', self.response) + self.tmproot = tmproot     # Always make a copy of node1a (and node1b, if applicable)   dir1a_files = mod_a | rem_a | ((mod_b | add_b) - add_a) @@ -269,13 +269,10 @@
  vsettings = settings.Settings('visdiff')   vsettings.set_value('launchsingle', self.singlecheck.get_active())   vsettings.write() - return False - - def delete_tmproot(self, window, tmproot): - while True: + while self.tmproot:   try: - shutil.rmtree(tmproot) - return + shutil.rmtree(self.tmproot) + return False   except (IOError, OSError), e:   resp = gdialog.CustomPrompt(_('Unable to delete temp files'),   _('Close diff tools and try again, or quit to leak files?'), @@ -283,7 +280,8 @@
  if resp == 0:   continue   else: - return + return False + return False     def rowactivated(self, tree, path, column):   selection = tree.get_selection()