Changeset - 164199e476e9
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-02-01 23:32:15
marcin@python-works.com
code garden, pep8
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/base.py
Show inline comments
 
@@ -30,24 +30,27 @@ log = logging.getLogger(__name__)
 

	
 
class BaseVCSController(object):
 

	
 
    def __init__(self, application, config):
 
        self.application = application
 
        self.config = config
 
        # base path of repo locations
 
        self.basepath = self.config['base_path']
 
        #authenticate this mercurial request using authfunc
 
        self.authenticate = AuthBasicAuthenticator('', authfunc)
 
        self.ipaddr = '0.0.0.0'
 

	
 
    def _handle_request(self, environ, start_response):
 
        raise NotImplementedError()
 

	
 
    def _get_by_id(self, repo_name):
 
        """
 
        Get's a special pattern _<ID> from clone url and tries to replace it
 
        with a repository_name for support of _<ID> non changable urls
 

	
 
        :param repo_name:
 
        """
 
        try:
 
            data = repo_name.split('/')
 
            if len(data) >= 2:
 
                by_id = data[1].split('_')
 
                if len(by_id) == 2 and by_id[1].isdigit():
0 comments (0 inline, 0 general)