Edgewall Software

Ticket #6614: fix-_history.diff

File fix-_history.diff, 1.4 KB (added by cboos, 11 months ago)

better Pool usage in SubversionRepository._history()

  • trac/versioncontrol/svn_fs.py

     
    496496        if start < end: 
    497497            start, end = end, start 
    498498        root = fs.revision_root(self.fs_ptr, start, pool()) 
    499         history_ptr = fs.node_history(root, svn_path, pool()) 
     499        tmp1 = Pool(pool) 
     500        tmp2 = Pool(pool) 
     501        history_ptr = fs.node_history(root, svn_path, tmp1()) 
    500502        cross_copies = 1 
    501503        while history_ptr: 
    502             history_ptr = fs.history_prev(history_ptr, cross_copies, pool()) 
     504            history_ptr = fs.history_prev(history_ptr, cross_copies, tmp2()) 
     505            tmp1.clear() 
     506            tmp1, tmp2 = tmp2, tmp1 
    503507            if history_ptr: 
    504                 path, rev = fs.history_location(history_ptr, pool()) 
     508                path, rev = fs.history_location(history_ptr, tmp2()) 
     509                tmp2.clear() 
    505510                if rev < end: 
    506511                    break 
    507512                path = _from_svn(path) 
    508513                if not self.authz.has_permission(path): 
    509514                    break 
    510515                yield path, rev 
    511  
     516        del tmp1 
     517        del tmp2 
     518     
    512519    def _previous_rev(self, rev, path='', pool=None): 
    513520        if rev > 1: # don't use oldest here, as it's too expensive 
    514521            try: