trac 做代码比较时“Too many open files”

来源:互联网 发布:云南师范大学网络教学 编辑:程序博客网 时间:2024/05/16 19:08


Trac做代码比较时候,如果比较的代码文件比较多,会出现:

Trac detected an internal error:

SubversionException: 24 - Can't open file '/space/mirror/GMA/db/revs/0/5': Too many open files


解决方案是把tracopt/versioncontrol/svn/svn_fs.py 里的get_cotent函数改为:


    def get_content(self):        """Retrieve raw content as a "read()"able object."""        if self.isdir:            return None        pool = Pool(self.pool)        s = core.Stream(fs.file_contents(self.root, self._scoped_path_utf8,                                         pool()))        # The stream object needs to reference the pool to make sure the pool        # is not destroyed before the former.        s._pool = pool        return s



如果是egg安装方式,需要把trac文件后缀名改为zip ,解压后修改再放到egg里面


0 0