diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -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 diff --git a/rhodecode/lib/indexers/daemon.py b/rhodecode/lib/indexers/daemon.py --- a/rhodecode/lib/indexers/daemon.py +++ b/rhodecode/lib/indexers/daemon.py @@ -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 + :copyright: (C) 2009-2011 Marcin Kuzminski :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: