# HG changeset patch # User Marcin Kuzminski # Date 1274487626 -7200 # Node ID 3d1dd13887f9da2e20379308b5fb47fe41d5a55e # Parent 50a39f923f311da3ac493cde8094d2b41afe4104 invalidate the repo list also for online changes. Small fixes in LoginRequired decorator. Cleaned hgwebdir config. diff -r 50a39f923f31 -r 3d1dd13887f9 hgwebdir.config --- a/hgwebdir.config Sat May 22 02:00:39 2010 +0200 +++ b/hgwebdir.config Sat May 22 02:20:26 2010 +0200 @@ -10,10 +10,6 @@ push_ssl = false allow_archive = gz zip bz2 allow_push = * -templates=/home/marcink/python_workspace/hg_app/pylons_app/templates/ -style = monoblue_custom -pygments_style = trac -staticurl = /hg_static/ baseurl = / [paths] diff -r 50a39f923f31 -r 3d1dd13887f9 pylons_app/lib/auth.py --- a/pylons_app/lib/auth.py Sat May 22 02:00:39 2010 +0200 +++ b/pylons_app/lib/auth.py Sat May 22 02:20:26 2010 +0200 @@ -83,11 +83,11 @@ pass def __call__(self, func): - log.info('Checking login required') + user = session.get('hg_app_user', AuthUser()) + log.info('Checking login required for %s', user.username) @wraps(func) def _wrapper(*fargs, **fkwargs): - user = session.get('hg_app_user', AuthUser()) if user.is_authenticated: log.info('user %s is authenticated', user.username) func(*fargs) diff -r 50a39f923f31 -r 3d1dd13887f9 pylons_app/lib/simplehg.py --- a/pylons_app/lib/simplehg.py Sat May 22 02:00:39 2010 +0200 +++ b/pylons_app/lib/simplehg.py Sat May 22 02:20:26 2010 +0200 @@ -65,6 +65,7 @@ """we know that some change was made to repositories and we should invalidate the cache to see the changes right away""" invalidate_cache('full_changelog', repo_name) + invalidate_cache('cached_repo_list') return app(environ, start_response) def _make_app(self): diff -r 50a39f923f31 -r 3d1dd13887f9 pylons_app/lib/utils.py --- a/pylons_app/lib/utils.py Sat May 22 02:00:39 2010 +0200 +++ b/pylons_app/lib/utils.py Sat May 22 02:20:26 2010 +0200 @@ -91,10 +91,12 @@ return baseui def invalidate_cache(name, *args): + """Invalidates given name cache""" + from beaker.cache import region_invalidate log.info('INVALIDATING CACHE FOR %s', name) - """propaget our arguments to make sure invalidation works. First + """propagate our arguments to make sure invalidation works. First argument has to be the name of cached func name give to cache decorator without that the invalidation would not work""" tmp = [name]