vcs: add translation of _REPO_ID into real repo name into more generic
vcs middleware.
This commit is contained in:
parent
d92e030879
commit
0a6785deab
2 changed files with 7 additions and 4 deletions
|
|
@ -242,11 +242,9 @@ class SimpleVCS(object):
|
|||
environ['pylons.status_code_redirect'] = True
|
||||
|
||||
# ======================================================================
|
||||
# EXTRACT REPOSITORY NAME FROM ENV
|
||||
# EXTRACT REPOSITORY NAME FROM ENV SET IN `class VCSMiddleware`
|
||||
# ======================================================================
|
||||
environ['PATH_INFO'] = self._get_by_id(environ['PATH_INFO'])
|
||||
repo_name = self._get_repository_name(environ)
|
||||
environ['REPO_NAME'] = repo_name
|
||||
repo_name = environ['REPO_NAME']
|
||||
log.debug('Extracted repo name is %s', repo_name)
|
||||
|
||||
# check for type, presence in database and on filesystem
|
||||
|
|
|
|||
|
|
@ -159,7 +159,12 @@ class VCSMiddleware(object):
|
|||
app = SimpleSvn(self.application, self.config, self.registry)
|
||||
|
||||
if app:
|
||||
# translate the _REPO_ID into real repo NAME for usage
|
||||
# in midddleware
|
||||
environ['PATH_INFO'] = app._get_by_id(environ['PATH_INFO'])
|
||||
repo_name = app._get_repository_name(environ)
|
||||
environ['REPO_NAME'] = repo_name
|
||||
|
||||
self.repo_vcs_config = self.vcs_config(repo_name)
|
||||
app.repo_vcs_config = self.repo_vcs_config
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue