##// END OF EJS Templates
merge with default
marcink -
r863:4c123ade merge default
parent child Browse files
Show More
@@ -1,9 +1,10 b''
1 1 # -*- coding: utf-8 -*-
2 2 """
3 package.rhodecode.controllers.admin.ldap_settings
4 ~~~~~~~~~~~~~~
3 rhodecode.controllers.admin.ldap_settings
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 5
6 6 ldap controller for RhodeCode
7
7 8 :created_on: Nov 26, 2010
8 9 :author: marcink
9 10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
@@ -64,9 +65,7 b' class LdapSettingsController(BaseControl'
64 65 force_defaults=True,)
65 66
66 67 def ldap_settings(self):
67 """
68 POST ldap create and store ldap settings
69 """
68 """POST ldap create and store ldap settings"""
70 69
71 70 settings_model = SettingsModel()
72 71 _form = LdapSettingsForm()()
@@ -100,7 +99,7 b' class LdapSettingsController(BaseControl'
100 99 encoding="UTF-8")
101 100 except Exception:
102 101 log.error(traceback.format_exc())
103 h.flash(_('error occured during update of ldap settings'),
102 h.flash(_('error occurred during update of ldap settings'),
104 103 category='error')
105 104
106 105 return redirect(url('ldap_home'))
@@ -120,7 +120,7 b' class PermissionsController(BaseControll'
120 120 encoding="UTF-8")
121 121 except Exception:
122 122 log.error(traceback.format_exc())
123 h.flash(_('error occured during update of permissions'),
123 h.flash(_('error occurred during update of permissions'),
124 124 category='error')
125 125
126 126 return redirect(url('edit_permission', id=id))
@@ -107,7 +107,7 b' class ReposController(BaseController):'
107 107
108 108 except Exception:
109 109 log.error(traceback.format_exc())
110 msg = _('error occured during creation of repository %s') \
110 msg = _('error occurred during creation of repository %s') \
111 111 % form_result.get('repo_name')
112 112 h.flash(msg, category='error')
113 113 if request.POST.get('user_created'):
@@ -206,7 +206,7 b' class ReposController(BaseController):'
206 206
207 207 except Exception, e:
208 208 log.error(traceback.format_exc())
209 h.flash(_('An error occured during deletion of %s') % repo_name,
209 h.flash(_('An error occurred during deletion of %s') % repo_name,
210 210 category='error')
211 211
212 212 return redirect(url('repos'))
@@ -222,7 +222,7 b' class ReposController(BaseController):'
222 222 repo_model = RepoModel()
223 223 repo_model.delete_perm_user(request.POST, repo_name)
224 224 except Exception, e:
225 h.flash(_('An error occured during deletion of repository user'),
225 h.flash(_('An error occurred during deletion of repository user'),
226 226 category='error')
227 227 raise HTTPInternalServerError()
228 228
@@ -237,14 +237,14 b' class ReposController(BaseController):'
237 237 repo_model = RepoModel()
238 238 repo_model.delete_stats(repo_name)
239 239 except Exception, e:
240 h.flash(_('An error occured during deletion of repository stats'),
240 h.flash(_('An error occurred during deletion of repository stats'),
241 241 category='error')
242 242 return redirect(url('edit_repo', repo_name=repo_name))
243 243
244 244 @HasPermissionAllDecorator('hg.admin')
245 245 def repo_cache(self, repo_name):
246 246 """
247 INVALIDATE exisitings repository cache
247 INVALIDATE existing repository cache
248 248 :param repo_name:
249 249 """
250 250
@@ -1,7 +1,8 b''
1 1 # -*- coding: utf-8 -*-
2 2 """
3 package.rhodecode.controllers.admin.settings
4 ~~~~~~~~~~~~~~
3 rhodecode.controllers.admin.settings
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
5 6 settings controller for rhodecode admin
6 7
7 8 :created_on: Jul 14, 2010
@@ -87,7 +87,7 b' class UsersController(BaseController):'
87 87 encoding="UTF-8")
88 88 except Exception:
89 89 log.error(traceback.format_exc())
90 h.flash(_('error occured during creation of user %s') \
90 h.flash(_('error occurred during creation of user %s') \
91 91 % request.POST.get('username'), category='error')
92 92 return redirect(url('users'))
93 93
@@ -144,7 +144,7 b' class UsersController(BaseController):'
144 144 except (UserOwnsReposException, DefaultUserException), e:
145 145 h.flash(str(e), category='warning')
146 146 except Exception:
147 h.flash(_('An error occured during deletion of user'),
147 h.flash(_('An error occurred during deletion of user'),
148 148 category='error')
149 149 return redirect(url('users'))
150 150
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # branches controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5 #
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.branches
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 branches controller for rhodecode
7
8 :created_on: Apr 21, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,23 +24,23 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on April 21, 2010
22 branches controller for pylons
23 @author: marcink
24 """
27
28 import logging
29
25 30 from pylons import tmpl_context as c
31
26 32 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
27 33 from rhodecode.lib.base import BaseController, render
28 34 from rhodecode.lib.utils import OrderedDict
29 35 from rhodecode.model.scm import ScmModel
30 import logging
36
31 37 log = logging.getLogger(__name__)
32 38
33 39 class BranchesController(BaseController):
34 40
35 41 @LoginRequired()
36 @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', 'repository.admin')
42 @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
43 'repository.admin')
37 44 def __before__(self):
38 45 super(BranchesController, self).__before__()
39 46
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # changelog controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5 #
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.changelog
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 changelog controller for rhodecode
7
8 :created_on: Apr 21, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,24 +24,24 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on April 21, 2010
22 changelog controller for pylons
23 @author: marcink
24 """
27
28 import logging
25 29
26 30 try:
27 31 import json
28 32 except ImportError:
29 33 #python 2.5 compatibility
30 34 import simplejson as json
35
31 36 from mercurial.graphmod import colored, CHANGESET, revisions as graph_rev
32 37 from pylons import request, session, tmpl_context as c
38
33 39 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
34 40 from rhodecode.lib.base import BaseController, render
35 41 from rhodecode.model.scm import ScmModel
42
36 43 from webhelpers.paginate import Page
37 import logging
44
38 45 log = logging.getLogger(__name__)
39 46
40 47 class ChangelogController(BaseController):
@@ -1,7 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """
3 package.rhodecode.controllers.error
4 ~~~~~~~~~~~~~~
3 rhodecode.controllers.error
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 5
6 6 RhodeCode error controller
7 7
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # feed controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.feed
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~
5 5
6 Feed controller for rhodecode
7
8 :created_on: Apr 23, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,21 +24,24 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on April 23, 2010
22 feed controller for pylons
23 @author: marcink
24 """
25 from pylons import tmpl_context as c, url, response
26 from rhodecode.lib.base import BaseController, render
27
28 import logging
29
30 from pylons import url, response
31
32 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
33 from rhodecode.lib.base import BaseController
27 34 from rhodecode.model.scm import ScmModel
35
28 36 from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed
29 import logging
37
30 38 log = logging.getLogger(__name__)
31 39
32 40 class FeedController(BaseController):
33 41
34 #secure it or not ?
42 @LoginRequired()
43 @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
44 'repository.admin')
35 45 def __before__(self):
36 46 super(FeedController, self).__before__()
37 47 #common values for feeds
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # hg controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5 #
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.home
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 Home controller for Rhodecode
7
8 :created_on: Feb 18, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,17 +24,16 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on February 18, 2010
22 hg controller for pylons
23 @author: marcink
24 """
27
28 import logging
25 29 from operator import itemgetter
30
26 31 from pylons import tmpl_context as c, request
32
27 33 from rhodecode.lib.auth import LoginRequired
28 34 from rhodecode.lib.base import BaseController, render
29 35 from rhodecode.model.scm import ScmModel
30 import logging
36
31 37 log = logging.getLogger(__name__)
32 38
33 39 class HomeController(BaseController):
@@ -51,8 +57,10 b' class HomeController(BaseController):'
51 57
52 58 sort_key = current_sort_slug + '_sort'
53 59 if c.sort_by.startswith('-'):
54 c.repos_list = sorted(cached_repo_list, key=itemgetter(sort_key), reverse=True)
60 c.repos_list = sorted(cached_repo_list, key=itemgetter(sort_key),
61 reverse=True)
55 62 else:
56 c.repos_list = sorted(cached_repo_list, key=itemgetter(sort_key), reverse=False)
63 c.repos_list = sorted(cached_repo_list, key=itemgetter(sort_key),
64 reverse=False)
57 65
58 66 return render('/index.html')
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # journal controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5 #
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.journal
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 Journal controller for pylons
7
8 :created_on: Nov 21, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,22 +24,19 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on November 21, 2010
22 journal controller for pylons
23 @author: marcink
24 """
27
28 import logging
29 from sqlalchemy import or_
25 30
26 31 from pylons import request, response, session, tmpl_context as c, url
27 from pylons.controllers.util import abort, redirect
32
28 33 from rhodecode.lib.auth import LoginRequired, NotAnonymous
29 34 from rhodecode.lib.base import BaseController, render
30 35 from rhodecode.lib.helpers import get_token
31 36 from rhodecode.model.db import UserLog, UserFollowing
32 37 from rhodecode.model.scm import ScmModel
33 from sqlalchemy import or_
34 import logging
35 from paste.httpexceptions import HTTPInternalServerError, HTTPNotFound
38
39 from paste.httpexceptions import HTTPInternalServerError
36 40
37 41 log = logging.getLogger(__name__)
38 42
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # login controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5 #
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.login
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 Login controller for rhodeocode
7
8 :created_on: Apr 22, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -18,22 +25,21 b''
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 27
21 """
22 Created on April 22, 2010
23 login controller for pylons
24 @author: marcink
25 """
28 import logging
29 import formencode
30
26 31 from formencode import htmlfill
32
33 from pylons.i18n.translation import _
34 from pylons.controllers.util import abort, redirect
27 35 from pylons import request, response, session, tmpl_context as c, url
28 from pylons.controllers.util import abort, redirect
36
37 import rhodecode.lib.helpers as h
29 38 from rhodecode.lib.auth import AuthUser, HasPermissionAnyDecorator
30 39 from rhodecode.lib.base import BaseController, render
31 import rhodecode.lib.helpers as h
32 from pylons.i18n.translation import _
33 40 from rhodecode.model.forms import LoginForm, RegisterForm, PasswordResetForm
34 41 from rhodecode.model.user import UserModel
35 import formencode
36 import logging
42
37 43
38 44 log = logging.getLogger(__name__)
39 45
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # search controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5 #
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.search
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 Search controller for rhodecode
7
8 :created_on: Aug 7, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,24 +24,23 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on Aug 7, 2010
22 search controller for pylons
23 @author: marcink
24 """
27 import logging
28 import traceback
29
30 from pylons.i18n.translation import _
25 31 from pylons import request, response, config, session, tmpl_context as c, url
26 32 from pylons.controllers.util import abort, redirect
33
27 34 from rhodecode.lib.auth import LoginRequired
28 35 from rhodecode.lib.base import BaseController, render
29 36 from rhodecode.lib.indexers import SCHEMA, IDX_NAME, ResultWrapper
37
30 38 from webhelpers.paginate import Page
31 39 from webhelpers.util import update_params
32 from pylons.i18n.translation import _
40
33 41 from whoosh.index import open_dir, EmptyIndexError
34 42 from whoosh.qparser import QueryParser, QueryParserError
35 43 from whoosh.query import Phrase
36 import logging
37 import traceback
38 44
39 45 log = logging.getLogger(__name__)
40 46
@@ -107,7 +113,8 b' class SearchController(BaseController):'
107 113 except (EmptyIndexError, IOError):
108 114 log.error(traceback.format_exc())
109 115 log.error('Empty Index data')
110 c.runtime = _('There is no index to search in. Please run whoosh indexer')
116 c.runtime = _('There is no index to search in. '
117 'Please run whoosh indexer')
111 118
112 119 # Return a rendered template
113 120 return render('/search/search.html')
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # settings controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5 #
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.settings
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 Settings controller for rhodecode
7
8 :created_on: Jun 30, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,24 +24,23 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on June 30, 2010
22 settings controller for pylons
23 @author: marcink
24 """
27
28 import logging
29 import traceback
30
31 import formencode
25 32 from formencode import htmlfill
33
26 34 from pylons import tmpl_context as c, request, url
27 35 from pylons.controllers.util import redirect
28 36 from pylons.i18n.translation import _
37
38 import rhodecode.lib.helpers as h
29 39 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAllDecorator
30 40 from rhodecode.lib.base import BaseController, render
31 41 from rhodecode.lib.utils import invalidate_cache, action_logger
32 42 from rhodecode.model.forms import RepoSettingsForm, RepoForkForm
33 43 from rhodecode.model.repo import RepoModel
34 import formencode
35 import logging
36 import rhodecode.lib.helpers as h
37 import traceback
38 44
39 45 log = logging.getLogger(__name__)
40 46
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # shortlog controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.shortlog
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 5
6 Shortlog controller for rhodecode
7
8 :created_on: Apr 18, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,17 +24,17 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on April 18, 2010
22 shortlog controller for pylons
23 @author: marcink
24 """
27
28 import logging
29
25 30 from pylons import tmpl_context as c, request
31
32 from webhelpers.paginate import Page
33
26 34 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
27 35 from rhodecode.lib.base import BaseController, render
28 36 from rhodecode.model.scm import ScmModel
29 from webhelpers.paginate import Page
30 import logging
37
31 38 log = logging.getLogger(__name__)
32 39
33 40 class ShortlogController(BaseController):
@@ -1,7 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """
3 package.rhodecode.controllers.summary
4 ~~~~~~~~~~~~~~
3 rhodecode.controllers.summary
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 5
6 6 Summary controller for Rhodecode
7 7
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # tags controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
5 #
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.tags
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 Tags controller for rhodecode
7
8 :created_on: Apr 21, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
@@ -17,23 +24,22 b''
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on April 21, 2010
22 tags controller for pylons
23 @author: marcink
24 """
27 import logging
28
25 29 from pylons import tmpl_context as c
30
26 31 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
27 32 from rhodecode.lib.base import BaseController, render
28 33 from rhodecode.lib.utils import OrderedDict
29 34 from rhodecode.model.scm import ScmModel
30 import logging
35
31 36 log = logging.getLogger(__name__)
32 37
33 38 class TagsController(BaseController):
34 39
35 40 @LoginRequired()
36 @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', 'repository.admin')
41 @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
42 'repository.admin')
37 43 def __before__(self):
38 44 super(TagsController, self).__before__()
39 45
@@ -424,7 +424,7 b' def action_parser(user_log):'
424 424
425 425 def get_cs_links():
426 426 if action == 'push':
427 revs_limit = 5
427 revs_limit = 1000
428 428 revs = action_params.split(',')
429 429 cs_links = " " + ', '.join ([link(rev,
430 430 url('changeset_home',
@@ -113,6 +113,7 b' def action_logger(user, action, repo, ip'
113 113 def get_repos(path, recursive=False, initial=False):
114 114 """
115 115 Scans given path for repos and return (name,(type,path)) tuple
116
116 117 :param prefix:
117 118 :param path:
118 119 :param recursive:
@@ -137,7 +138,7 b' def get_repos(path, recursive=False, ini'
137 138
138 139 def check_repo_fast(repo_name, base_path):
139 140 """
140 Check given path for existance of directory
141 Check given path for existence of directory
141 142 :param repo_name:
142 143 :param base_path:
143 144
@@ -233,8 +234,8 b" def make_ui(read_from='file', path=None,"
233 234
234 235
235 236 def set_rhodecode_config(config):
236 """
237 Updates pylons config with new settings from database
237 """Updates pylons config with new settings from database
238
238 239 :param config:
239 240 """
240 241 from rhodecode.model.settings import SettingsModel
@@ -244,10 +245,10 b' def set_rhodecode_config(config):'
244 245 config[k] = v
245 246
246 247 def invalidate_cache(cache_key, *args):
247 """
248 Puts cache invalidation task into db for
248 """Puts cache invalidation task into db for
249 249 further global cache invalidation
250 250 """
251
251 252 from rhodecode.model.scm import ScmModel
252 253
253 254 if cache_key.startswith('get_repo_cached_'):
@@ -269,10 +270,10 b' class EmptyChangeset(BaseChangeset):'
269 270
270 271 @LazyProperty
271 272 def raw_id(self):
272 """
273 Returns raw string identifying this changeset, useful for web
273 """Returns raw string identifying this changeset, useful for web
274 274 representation.
275 275 """
276
276 277 return self._empty_cs
277 278
278 279 @LazyProperty
@@ -289,8 +290,7 b' class EmptyChangeset(BaseChangeset):'
289 290 return 0
290 291
291 292 def repo2db_mapper(initial_repo_list, remove_obsolete=False):
292 """
293 maps all found repositories into db
293 """maps all found repositories into db
294 294 """
295 295
296 296 sa = meta.Session()
@@ -443,10 +443,10 b' def add_cache(settings):'
443 443 beaker.cache.cache_regions[region] = region_settings
444 444
445 445 def get_current_revision():
446 """
447 Returns tuple of (number, id) from repository containing this package
446 """Returns tuple of (number, id) from repository containing this package
448 447 or None if repository could not be found.
449 448 """
449
450 450 try:
451 451 from vcs import get_repo
452 452 from vcs.utils.helpers import get_scm
General Comments 0
You need to be logged in to leave comments. Login now