##// END OF EJS Templates
convert: work around svn.ra.get_files() not releasing input buffer
Patrick Mezard -
r7446:2d2e0be7 default
parent child Browse files
Show More
@@ -851,7 +851,6 b' class svn_source(converter_source):'
851 851 raise
852 852
853 853 def _getfile(self, file, rev):
854 io = StringIO()
855 854 # TODO: ra.get_file transmits the whole file instead of diffs.
856 855 mode = ''
857 856 try:
@@ -859,7 +858,12 b' class svn_source(converter_source):'
859 858 if self.module != new_module:
860 859 self.module = new_module
861 860 self.reparent(self.module)
861 io = StringIO()
862 862 info = svn.ra.get_file(self.ra, file, revnum, io)
863 data = io.getvalue()
864 # ra.get_files() seems to keep a reference on the input buffer
865 # preventing collection. Release it explicitely.
866 io.close()
863 867 if isinstance(info, list):
864 868 info = info[-1]
865 869 mode = ("svn:executable" in info) and 'x' or ''
@@ -870,7 +874,6 b' class svn_source(converter_source):'
870 874 if e.apr_err in notfound: # File not found
871 875 raise IOError()
872 876 raise
873 data = io.getvalue()
874 877 if mode == 'l':
875 878 link_prefix = "link "
876 879 if data.startswith(link_prefix):
General Comments 0
You need to be logged in to leave comments. Login now