diff 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
line wrap: on
line diff
--- a/pylons_app/lib/utils.py	Tue Jun 01 22:19:03 2010 +0200
+++ b/pylons_app/lib/utils.py	Thu Jun 03 00:04:48 2010 +0200
@@ -107,11 +107,11 @@
     args = tuple(tmp)
     
     if name == 'cached_repo_list':
-        from pylons_app.lib.base import _get_repos_cached
+        from pylons_app.model.hg_model import _get_repos_cached
         region_invalidate(_get_repos_cached, None, *args)
         
     if name == 'full_changelog':
-        from pylons_app.lib.base import _full_changelog_cached
+        from pylons_app.model.hg_model import _full_changelog_cached
         region_invalidate(_full_changelog_cached, None, *args)
         
 from vcs.backends.base import BaseChangeset
@@ -128,3 +128,17 @@
         """
         return '0' * 12
 
+
+def repo2db_mapper():
+    """
+    put !
+    """
+    pass
+    #scann all dirs for .hgdbid
+    #if some dir doesn't have one generate one.
+    #
+    
+    
+    
+    
+