Mercurial > kallithea
comparison rhodecode/lib/celerylib/tasks.py @ 603:95a502d94860
removed soon deprecated walk method on repository instance
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 18 Oct 2010 01:14:40 +0200 |
parents | ba7e24cd4786 |
children | 7e536d1af60d |
comparison
equal
deleted
inserted
replaced
602:8d970b568c13 | 603:95a502d94860 |
---|---|
306 'php4', 'phtml', 'pm', 'py', 'rb', 'rst', 's', 'sh', | 306 'php4', 'phtml', 'pm', 'py', 'rb', 'rst', 's', 'sh', |
307 'tpl', 'txt', 'vim', 'wss', 'xhtml', 'xml', 'xsl', 'xslt', | 307 'tpl', 'txt', 'vim', 'wss', 'xhtml', 'xml', 'xsl', 'xslt', |
308 'yaws'] | 308 'yaws'] |
309 repos_path = get_hg_ui_settings()['paths_root_path'].replace('*', '') | 309 repos_path = get_hg_ui_settings()['paths_root_path'].replace('*', '') |
310 repo = MercurialRepository(repos_path + repo_name) | 310 repo = MercurialRepository(repos_path + repo_name) |
311 | 311 tip = repo.get_changeset() |
312 | |
312 code_stats = {} | 313 code_stats = {} |
313 for topnode, dirs, files in repo.walk('/', 'tip'): | 314 for topnode, dirs, files in tip.walk('/'): |
314 for f in files: | 315 for f in files: |
315 k = f.mimetype | 316 k = f.mimetype |
316 if f.extension in LANGUAGES_EXTENSIONS: | 317 if f.extension in LANGUAGES_EXTENSIONS: |
317 if code_stats.has_key(k): | 318 if code_stats.has_key(k): |
318 code_stats[k] += 1 | 319 code_stats[k] += 1 |