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 |
@@ -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