comparison fetch_command.py @ 74:450d5d9d3b80

SubversionRepo: do not use temporary file in get_file() Existing code says swig bindings do not support StringIO objects as output for svn.ra.get_file(). This issue was never reported in the convert extension.
author Patrick Mezard <pmezard@gmail.com>
date Sun, 09 Nov 2008 18:08:35 -0600
parents 9c1b53abefcb
children 6c62bd201785
comparison
equal deleted inserted replaced
73:9c1b53abefcb 74:450d5d9d3b80
347 except OSError, e: 347 except OSError, e:
348 pass 348 pass
349 f = open(file_path, 'w') 349 f = open(file_path, 'w')
350 f.write(svn.get_file(diff_path+'/'+m, r.revnum)) 350 f.write(svn.get_file(diff_path+'/'+m, r.revnum))
351 f.close() 351 f.close()
352 except core.SubversionException, e: 352 except IOError:
353 if (e.message.endswith("' path not found") 353 pass
354 or e.message.startswith("File not found: revision")):
355 pass
356 else:
357 raise
358 d2 = empty_file_patch_wont_make_re.sub('', d) 354 d2 = empty_file_patch_wont_make_re.sub('', d)
359 d2 = property_exec_set_re.sub('', d2) 355 d2 = property_exec_set_re.sub('', d2)
360 d2 = property_exec_removed_re.sub('', d2) 356 d2 = property_exec_removed_re.sub('', d2)
361 old_cwd = os.getcwd() 357 old_cwd = os.getcwd()
362 os.chdir(our_tempdir) 358 os.chdir(our_tempdir)