Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.4, 2.0.5, and 2.1

stable visdiff: catch environmental errors when copying back modified files

Essentially fixing a bug reported on the hgtk branch (#1842)

Changeset d921582266a5

Parent a614b2251210

by Steve Borho

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

 
333
334
335
336
337
338
339
 
 
 
 
 
 
 
340
341
342
 
333
334
335
 
 
 
 
336
337
338
339
340
341
342
343
344
345
@@ -333,10 +333,13 @@
    # detect if changes were made to mirrored working files   for copy_fn, working_fn, mtime in fns_and_mtime: - if os.path.getmtime(copy_fn) != mtime: - ui.debug('file changed while diffing. ' - 'Overwriting: %s (src: %s)\n' % (working_fn, copy_fn)) - util.copyfile(copy_fn, working_fn) + try: + if os.path.getmtime(copy_fn) != mtime: + ui.debug('file changed while diffing. ' + 'Overwriting: %s (src: %s)\n' % (working_fn, copy_fn)) + util.copyfile(copy_fn, working_fn) + except EnvironmentError: + pass # Ignore I/O errors or missing files     def dodiffwrapper():   try: