Mercurial > kallithea
comparison rhodecode/lib/utils.py @ 549:f99075170eb4
more renames for rhode code !!
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 06 Oct 2010 03:34:18 +0200 |
parents | b75b77ef649d |
children | 2642f128ad46 |
comparison
equal
deleted
inserted
replaced
548:b75b77ef649d | 549:f99075170eb4 |
---|---|
24 """ | 24 """ |
25 from beaker.cache import cache_region | 25 from beaker.cache import cache_region |
26 from mercurial import ui, config, hg | 26 from mercurial import ui, config, hg |
27 from mercurial.error import RepoError | 27 from mercurial.error import RepoError |
28 from rhodecode.model import meta | 28 from rhodecode.model import meta |
29 from rhodecode.model.db import Repository, User, HgAppUi, HgAppSettings, UserLog | 29 from rhodecode.model.db import Repository, User, RhodeCodeUi, RhodeCodeSettings, UserLog |
30 from vcs.backends.base import BaseChangeset | 30 from vcs.backends.base import BaseChangeset |
31 from vcs.utils.lazy import LazyProperty | 31 from vcs.utils.lazy import LazyProperty |
32 import logging | 32 import logging |
33 import datetime | 33 import datetime |
34 import os | 34 import os |
125 | 125 |
126 @cache_region('super_short_term', 'cached_hg_ui') | 126 @cache_region('super_short_term', 'cached_hg_ui') |
127 def get_hg_ui_cached(): | 127 def get_hg_ui_cached(): |
128 try: | 128 try: |
129 sa = meta.Session | 129 sa = meta.Session |
130 ret = sa.query(HgAppUi).all() | 130 ret = sa.query(RhodeCodeUi).all() |
131 finally: | 131 finally: |
132 meta.Session.remove() | 132 meta.Session.remove() |
133 return ret | 133 return ret |
134 | 134 |
135 | 135 |
136 def get_hg_settings(): | 136 def get_hg_settings(): |
137 try: | 137 try: |
138 sa = meta.Session | 138 sa = meta.Session |
139 ret = sa.query(HgAppSettings).all() | 139 ret = sa.query(RhodeCodeSettings).all() |
140 finally: | 140 finally: |
141 meta.Session.remove() | 141 meta.Session.remove() |
142 | 142 |
143 if not ret: | 143 if not ret: |
144 raise Exception('Could not get application settings !') | 144 raise Exception('Could not get application settings !') |
149 return settings | 149 return settings |
150 | 150 |
151 def get_hg_ui_settings(): | 151 def get_hg_ui_settings(): |
152 try: | 152 try: |
153 sa = meta.Session | 153 sa = meta.Session |
154 ret = sa.query(HgAppUi).all() | 154 ret = sa.query(RhodeCodeUi).all() |
155 finally: | 155 finally: |
156 meta.Session.remove() | 156 meta.Session.remove() |
157 | 157 |
158 if not ret: | 158 if not ret: |
159 raise Exception('Could not get application ui settings !') | 159 raise Exception('Could not get application ui settings !') |