Mercurial > kallithea
comparison rhodecode/lib/middleware/simplehg.py @ 3960:5293d4bbb1ea
Merged dev into stable/default/master branch
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 07 Jun 2013 00:31:11 +0200 |
parents | 3563bb7b4b82 3208aaefc9ca |
children | a5888ca796b5 |
comparison
equal
deleted
inserted
replaced
3879:51596d9ef2f8 | 3960:5293d4bbb1ea |
---|---|
26 | 26 |
27 import os | 27 import os |
28 import logging | 28 import logging |
29 import traceback | 29 import traceback |
30 | 30 |
31 from mercurial.error import RepoError | |
32 from mercurial.hgweb import hgweb_mod | |
33 | 31 |
34 from paste.httpheaders import REMOTE_USER, AUTH_TYPE | 32 from paste.httpheaders import REMOTE_USER, AUTH_TYPE |
35 from webob.exc import HTTPNotFound, HTTPForbidden, HTTPInternalServerError, \ | 33 from webob.exc import HTTPNotFound, HTTPForbidden, HTTPInternalServerError, \ |
36 HTTPBadRequest, HTTPNotAcceptable | 34 HTTPBadRequest, HTTPNotAcceptable |
37 | 35 |
39 _set_extras | 37 _set_extras |
40 from rhodecode.lib.base import BaseVCSController | 38 from rhodecode.lib.base import BaseVCSController |
41 from rhodecode.lib.auth import get_container_username | 39 from rhodecode.lib.auth import get_container_username |
42 from rhodecode.lib.utils import make_ui, is_valid_repo, ui_sections | 40 from rhodecode.lib.utils import make_ui, is_valid_repo, ui_sections |
43 from rhodecode.lib.compat import json | 41 from rhodecode.lib.compat import json |
42 from rhodecode.lib.vcs.utils.hgcompat import RepoError, hgweb_mod | |
44 from rhodecode.model.db import User | 43 from rhodecode.model.db import User |
45 from rhodecode.lib.exceptions import HTTPLockedRC | 44 from rhodecode.lib.exceptions import HTTPLockedRC |
46 | 45 |
47 | 46 |
48 log = logging.getLogger(__name__) | 47 log = logging.getLogger(__name__) |
183 ) | 182 ) |
184 # store the make_lock for later evaluation in hooks | 183 # store the make_lock for later evaluation in hooks |
185 extras.update({'make_lock': make_lock, | 184 extras.update({'make_lock': make_lock, |
186 'locked_by': locked_by}) | 185 'locked_by': locked_by}) |
187 | 186 |
188 # set the environ variables for this request | |
189 os.environ['RC_SCM_DATA'] = json.dumps(extras) | |
190 fix_PATH() | 187 fix_PATH() |
191 log.debug('HOOKS extras is %s' % extras) | 188 log.debug('HOOKS extras is %s' % extras) |
192 baseui = make_ui('db') | 189 baseui = make_ui('db') |
193 self.__inject_extras(repo_path, baseui, extras) | 190 self.__inject_extras(repo_path, baseui, extras) |
194 | 191 |