comparison pylons_app/lib/utils.py @ 245:a83a1799480c

Reimplemented way of caching repos list, hg model now get's repos objects right from cached dict, this way we skipp creating instances of MercurialRepository and gain performance. Some import cleanup
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 03 Jun 2010 00:04:48 +0200
parents 48727add84c9
children fb7f066126cc
comparison
equal deleted inserted replaced
244:782f0692b29c 245:a83a1799480c
105 tmp = [name] 105 tmp = [name]
106 tmp.extend(args) 106 tmp.extend(args)
107 args = tuple(tmp) 107 args = tuple(tmp)
108 108
109 if name == 'cached_repo_list': 109 if name == 'cached_repo_list':
110 from pylons_app.lib.base import _get_repos_cached 110 from pylons_app.model.hg_model import _get_repos_cached
111 region_invalidate(_get_repos_cached, None, *args) 111 region_invalidate(_get_repos_cached, None, *args)
112 112
113 if name == 'full_changelog': 113 if name == 'full_changelog':
114 from pylons_app.lib.base import _full_changelog_cached 114 from pylons_app.model.hg_model import _full_changelog_cached
115 region_invalidate(_full_changelog_cached, None, *args) 115 region_invalidate(_full_changelog_cached, None, *args)
116 116
117 from vcs.backends.base import BaseChangeset 117 from vcs.backends.base import BaseChangeset
118 from vcs.utils.lazy import LazyProperty 118 from vcs.utils.lazy import LazyProperty
119 class EmptyChangeset(BaseChangeset): 119 class EmptyChangeset(BaseChangeset):
126 Returns raw string identifing this changeset, useful for web 126 Returns raw string identifing this changeset, useful for web
127 representation. 127 representation.
128 """ 128 """
129 return '0' * 12 129 return '0' * 12
130 130
131
132 def repo2db_mapper():
133 """
134 put !
135 """
136 pass
137 #scann all dirs for .hgdbid
138 #if some dir doesn't have one generate one.
139 #
140
141
142
143
144