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