diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -47,15 +47,26 @@ cache_dir = %(here)s/data #################################### ### BEAKER CACHE #### #################################### -beaker.cache.data_dir=/%(here)s/data/cache/data -beaker.cache.lock_dir=/%(here)s/data/cache/lock -beaker.cache.regions=super_short_term,short_term,long_term -beaker.cache.long_term.type=memory -beaker.cache.long_term.expire=36000 -beaker.cache.short_term.type=memory -beaker.cache.short_term.expire=60 -beaker.cache.super_short_term.type=memory -beaker.cache.super_short_term.expire=10 + beaker.cache.data_dir=/%(here)s/data/cache/data + beaker.cache.lock_dir=/%(here)s/data/cache/lock + beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long + beaker.cache.long_term.type=memory + beaker.cache.long_term.expire=36000 + + beaker.cache.short_term.type=memory + beaker.cache.short_term.expire=60 + + beaker.cache.super_short_term.type=memory + beaker.cache.super_short_term.expire=10 + + beaker.cache.sql_cache_short.type=memory + beaker.cache.sql_cache_short.expire=5 + + beaker.cache.sql_cache_med.type=memory + beaker.cache.sql_cache_med.expire=360 + + beaker.cache.sql_cache_long.type=file + beaker.cache.sql_cache_long.expire=3600 #################################### ### BEAKER SESSION #### diff --git a/docs/changelog.rst b/docs/changelog.rst --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -3,12 +3,17 @@ Changelog ========= +1.0.0rc4 (**2010-10-12**) -1.0.0rc3 (**tip**) +- fixed python2.5 missing simplejson imports (thanks to Jens Bäckman) +- removed cache_manager settings from sqlalchemy meta +- added sqlalchemy cache settings to ini files + +1.0.0rc3 (**2010-10-11**) - fixed i18n during installation. -1.0.0rc2 (**tip**) +1.0.0rc2 (**2010-10-11**) - Disabled dirsize in file browser, it's causing nasty bug when dir renames occure. After vcs is fixed it'll be put back again. diff --git a/docs/setup.rst b/docs/setup.rst --- a/docs/setup.rst +++ b/docs/setup.rst @@ -26,7 +26,7 @@ Setting up the application - Remember that the given path for mercurial_ repositories must be write accessible for the application. It's very important since RhodeCode web interface will work even without such an access but, when trying to do a push it'll - eventually faile with permission denied errors. + eventually fail with permission denied errors. - Run :: @@ -35,15 +35,12 @@ Setting up the application - This command runs the rhodecode server the app should be available at the 127.0.0.1:5000. This ip and port is configurable via the production.ini - file created in previos step + file created in previous step - Use admin account you created to login. - Default permissions on each repository is read, and owner is admin. So - remember to update these. - -- All needed configs are inside rhodecode sources ie. celeryconfig.py, - development.ini, production.ini You can configure the email, ports, loggers, - workers from there. + remember to update these if needed. + Setting up Whoosh ----------------- @@ -51,7 +48,7 @@ Setting up Whoosh :: - python /var/www/rhodecode/rhodecode/lib/indexers/daemon.py incremental + python /var/www/rhodecode//lib/indexers/daemon.py incremental When using incremental mode whoosh will check last modification date of each file and add it to reindex if newer file is available. Also indexing daemon checks @@ -69,7 +66,7 @@ Sample config for nginx:: listen 80; server_name hg.myserver.com; access_log /var/log/nginx/rhodecode.access.log; - error_log /var/log/nginx/rhodecode.error.log; + error_log /var/log/nginx/rhodecode.error.log; location / { root /var/www/rhodecode/rhodecode/public/; if (!-f $request_filename){ @@ -81,7 +78,7 @@ Sample config for nginx:: } } -Here's the proxy.conf. It's tunned so it'll not timeout on long +Here's the proxy.conf. It's tuned so it'll not timeout on long pushes and also on large pushes:: proxy_redirect off; @@ -111,7 +108,7 @@ in production.ini file:: lang=en cache_dir = %(here)s/data -To not have the statics served by the application. +To not have the statics served by the application. And improve speed. Other configuration files diff --git a/production.ini b/production.ini --- a/production.ini +++ b/production.ini @@ -47,21 +47,32 @@ cache_dir = %(here)s/data #################################### ### BEAKER CACHE #### #################################### -beaker.cache.data_dir=/%(here)s/data/cache/data -beaker.cache.lock_dir=/%(here)s/data/cache/lock -beaker.cache.regions=super_short_term,short_term,long_term -beaker.cache.long_term.type=memory -beaker.cache.long_term.expire=36000 -beaker.cache.short_term.type=memory -beaker.cache.short_term.expire=60 -beaker.cache.super_short_term.type=memory -beaker.cache.super_short_term.expire=10 + beaker.cache.data_dir=/%(here)s/data/cache/data + beaker.cache.lock_dir=/%(here)s/data/cache/lock + beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long + beaker.cache.long_term.type=memory + beaker.cache.long_term.expire=36000 + + beaker.cache.short_term.type=memory + beaker.cache.short_term.expire=60 + + beaker.cache.super_short_term.type=memory + beaker.cache.super_short_term.expire=10 + + beaker.cache.sql_cache_short.type=memory + beaker.cache.sql_cache_short.expire=5 + + beaker.cache.sql_cache_med.type=memory + beaker.cache.sql_cache_med.expire=360 + + beaker.cache.sql_cache_long.type=file + beaker.cache.sql_cache_long.expire=3600 #################################### ### BEAKER SESSION #### #################################### ## Type of storage used for the session, current types are -## dbm, file, memcached, database, and memory. +## "dbm", "file", "memcached", "database", and "memory". ## The storage uses the Container API ##that is also used by the cache system. beaker.session.type = file diff --git a/rhodecode/__init__.py b/rhodecode/__init__.py --- a/rhodecode/__init__.py +++ b/rhodecode/__init__.py @@ -24,7 +24,7 @@ versioning implementation: http://semver @author: marcink """ -VERSION = (1, 0, 0, 'rc3') +VERSION = (1, 0, 0, 'rc4') __version__ = '.'.join((str(each) for each in VERSION[:4])) diff --git a/rhodecode/config/deployment.ini_tmpl b/rhodecode/config/deployment.ini_tmpl --- a/rhodecode/config/deployment.ini_tmpl +++ b/rhodecode/config/deployment.ini_tmpl @@ -48,21 +48,32 @@ app_instance_uuid = ${app_instance_uuid} #################################### ### BEAKER CACHE #### #################################### -beaker.cache.data_dir=/%(here)s/data/cache/data -beaker.cache.lock_dir=/%(here)s/data/cache/lock -beaker.cache.regions=super_short_term,short_term,long_term -beaker.cache.long_term.type=memory -beaker.cache.long_term.expire=36000 -beaker.cache.short_term.type=memory -beaker.cache.short_term.expire=60 -beaker.cache.super_short_term.type=memory -beaker.cache.super_short_term.expire=10 + beaker.cache.data_dir=/%(here)s/data/cache/data + beaker.cache.lock_dir=/%(here)s/data/cache/lock + beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long + beaker.cache.long_term.type=memory + beaker.cache.long_term.expire=36000 + + beaker.cache.short_term.type=memory + beaker.cache.short_term.expire=60 + + beaker.cache.super_short_term.type=memory + beaker.cache.super_short_term.expire=10 + + beaker.cache.sql_cache_short.type=memory + beaker.cache.sql_cache_short.expire=5 + + beaker.cache.sql_cache_med.type=memory + beaker.cache.sql_cache_med.expire=360 + + beaker.cache.sql_cache_long.type=file + beaker.cache.sql_cache_long.expire=3600 #################################### ### BEAKER SESSION #### #################################### ## Type of storage used for the session, current types are -## dbm, file, memcached, database, and memory. +## "dbm", "file", "memcached", "database", and "memory". ## The storage uses the Container API ##that is also used by the cache system. beaker.session.type = file diff --git a/rhodecode/controllers/changelog.py b/rhodecode/controllers/changelog.py --- a/rhodecode/controllers/changelog.py +++ b/rhodecode/controllers/changelog.py @@ -22,7 +22,7 @@ Created on April 21, 2010 changelog controller for pylons @author: marcink """ -from json import dumps + from mercurial.graphmod import colored, CHANGESET, revisions as graph_rev from pylons import request, session, tmpl_context as c from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator @@ -32,6 +32,12 @@ from webhelpers.paginate import Page import logging log = logging.getLogger(__name__) +try: + import json +except ImportError: + #python 2.5 compatibility + import simplejson as json + class ChangelogController(BaseController): @LoginRequired() @@ -69,7 +75,7 @@ class ChangelogController(BaseController def _graph(self, repo, size, p): revcount = size - if not repo.revisions:return dumps([]), 0 + if not repo.revisions:return json.dumps([]), 0 max_rev = repo.revisions[-1] offset = 1 if p == 1 else ((p - 1) * revcount + 1) @@ -86,5 +92,5 @@ class ChangelogController(BaseController continue data.append(('', vtx, edges)) - c.jsdata = dumps(data) + c.jsdata = json.dumps(data) diff --git a/rhodecode/controllers/summary.py b/rhodecode/controllers/summary.py --- a/rhodecode/controllers/summary.py +++ b/rhodecode/controllers/summary.py @@ -35,7 +35,11 @@ from datetime import datetime, timedelta from time import mktime import calendar import logging -import json +try: + import json +except ImportError: + #python 2.5 compatibility + import simplejson as json log = logging.getLogger(__name__) class SummaryController(BaseController): diff --git a/rhodecode/model/meta.py b/rhodecode/model/meta.py --- a/rhodecode/model/meta.py +++ b/rhodecode/model/meta.py @@ -3,9 +3,6 @@ from sqlalchemy.ext.declarative import d from sqlalchemy.orm import scoped_session, sessionmaker from rhodecode.model import caching_query from beaker import cache -import os -from os.path import join as jn, dirname as dn, abspath -import time # Beaker CacheManager. A home base for cache configurations. cache_manager = cache.CacheManager() @@ -25,39 +22,5 @@ Base = declarative_base() #For another db... #Base2 = declarative_base() -#=============================================================================== -# CACHE OPTIONS -#=============================================================================== -cache_base = jn(dn(dn(dn(abspath(__file__)))), 'data') -cache_dir = jn(cache_base, 'cache') - -if not os.path.isdir(cache_base): - os.mkdir(cache_base) - -if not os.path.isdir(cache_dir): - os.mkdir(cache_dir) -# set start_time to current time -# to re-cache everything -# upon application startup -start_time = time.time() -# configure the "sqlalchemy" cache region. -cache_manager.regions['sql_cache_short'] = { - 'type':'memory', - 'data_dir':cache_dir, - 'expire':10, - 'start_time':start_time - } -cache_manager.regions['sql_cache_med'] = { - 'type':'memory', - 'data_dir':cache_dir, - 'expire':360, - 'start_time':start_time - } -cache_manager.regions['sql_cache_long'] = { - 'type':'file', - 'data_dir':cache_dir, - 'expire':3600, - 'start_time':start_time - } #to use cache use this in query #.options(FromCache("sqlalchemy_cache_type", "cachekey")) diff --git a/setup.cfg b/setup.cfg --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [egg_info] -tag_build = rc3 +tag_build = rc4 tag_svn_revision = true [easy_install] @@ -32,3 +32,11 @@ domain = rhodecode input_file = rhodecode/i18n/rhodecode.pot output_dir = rhodecode/i18n previous = true + +[build_sphinx] +source-dir = docs/ +build-dir = docs/_build +all_files = 1 + +[upload_sphinx] +upload-dir = docs/_build/html \ No newline at end of file