Changeset - 99850ac883d1
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 15 years ago 2011-01-21 00:00:20
marcin@python-works.com
Fixed whoosh daemon, for depracated walk method
2 files changed with 12 insertions and 10 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -241,15 +241,16 @@ def pygmentize_annotation(filenode, **kw
 
    """
 

	
 
    color_dict = {}
 
    def gen_color():
 
        """generator for getting 10k of evenly distibuted colors using hsv color
 
        and golden ratio.
 
    def gen_color(n=10000):
 
        """generator for getting n of evenly distributed colors using 
 
        hsv color and golden ratio. It always return same order of colors
 
        
 
        :returns: RGB tuple
 
        """
 
        import colorsys
 
        n = 10000
 
        golden_ratio = 0.618033988749895
 
        h = 0.22717784590367374
 
        #generate 10k nice web friendly colors in the same order
 

	
 
        for c in xrange(n):
 
            h += golden_ratio
 
            h %= 1
rhodecode/lib/indexers/daemon.py
Show inline comments
 
@@ -4,22 +4,22 @@
 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
    A deamon will read from task table and run tasks
 
    
 

	
 
    :created_on: Jan 26, 2010
 
    :author: marcink
 
    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
 
    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
 
    :license: GPLv3, see COPYING for more details.
 
"""
 
# This program is free software; you can redistribute it and/or
 
# modify it under the terms of the GNU General Public License
 
# as published by the Free Software Foundation; version 2
 
# of the License or (at your opinion) any later version of the license.
 
# 
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
# 
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program; if not, write to the Free Software
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
@@ -105,7 +105,8 @@ class WhooshIndexingDaemon(object):
 
        """
 
        index_paths_ = set()
 
        try:
 
            for topnode, dirs, files in repo.walk('/', 'tip'):
 
            tip = repo.get_changeset('tip')
 
            for topnode, dirs, files in tip.walk('/'):
 
                for f in files:
 
                    index_paths_.add(jn(repo.path, f.path))
 
                for dir in dirs:
0 comments (0 inline, 0 general)