Show More
@@ -241,15 +241,16 b' def pygmentize_annotation(filenode, **kw' | |||
|
241 | 241 | """ |
|
242 | 242 | |
|
243 | 243 | color_dict = {} |
|
244 | def gen_color(): | |
|
245 |
"""generator for getting |
|
|
246 | and golden ratio. | |
|
244 | def gen_color(n=10000): | |
|
245 | """generator for getting n of evenly distributed colors using | |
|
246 | hsv color and golden ratio. It always return same order of colors | |
|
247 | ||
|
248 | :returns: RGB tuple | |
|
247 | 249 | """ |
|
248 | 250 | import colorsys |
|
249 | n = 10000 | |
|
250 | 251 | golden_ratio = 0.618033988749895 |
|
251 | 252 | h = 0.22717784590367374 |
|
252 | #generate 10k nice web friendly colors in the same order | |
|
253 | ||
|
253 | 254 | for c in xrange(n): |
|
254 | 255 | h += golden_ratio |
|
255 | 256 | h %= 1 |
@@ -4,22 +4,22 b'' | |||
|
4 | 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
5 | 5 | |
|
6 | 6 | A deamon will read from task table and run tasks |
|
7 | ||
|
7 | ||
|
8 | 8 | :created_on: Jan 26, 2010 |
|
9 | 9 | :author: marcink |
|
10 |
:copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com> |
|
|
10 | :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com> | |
|
11 | 11 | :license: GPLv3, see COPYING for more details. |
|
12 | 12 | """ |
|
13 | 13 | # This program is free software; you can redistribute it and/or |
|
14 | 14 | # modify it under the terms of the GNU General Public License |
|
15 | 15 | # as published by the Free Software Foundation; version 2 |
|
16 | 16 | # of the License or (at your opinion) any later version of the license. |
|
17 |
# |
|
|
17 | # | |
|
18 | 18 | # This program is distributed in the hope that it will be useful, |
|
19 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 | 21 | # GNU General Public License for more details. |
|
22 |
# |
|
|
22 | # | |
|
23 | 23 | # You should have received a copy of the GNU General Public License |
|
24 | 24 | # along with this program; if not, write to the Free Software |
|
25 | 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
@@ -105,7 +105,8 b' class WhooshIndexingDaemon(object):' | |||
|
105 | 105 | """ |
|
106 | 106 | index_paths_ = set() |
|
107 | 107 | try: |
|
108 | for topnode, dirs, files in repo.walk('/', 'tip'): | |
|
108 | tip = repo.get_changeset('tip') | |
|
109 | for topnode, dirs, files in tip.walk('/'): | |
|
109 | 110 | for f in files: |
|
110 | 111 | index_paths_.add(jn(repo.path, f.path)) |
|
111 | 112 | for dir in dirs: |
General Comments 0
You need to be logged in to leave comments.
Login now