diff --git a/rhodecode/lib/middleware/simplehg.py b/rhodecode/lib/middleware/simplehg.py --- a/rhodecode/lib/middleware/simplehg.py +++ b/rhodecode/lib/middleware/simplehg.py @@ -3,24 +3,24 @@ rhodecode.lib.middleware.simplehg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SimpleHG middleware for handling mercurial protocol request + SimpleHG middleware for handling mercurial protocol request (push/clone etc.). It's implemented with basic auth function - + :created_on: Apr 28, 2010 :author: marcink - :copyright: (C) 2009-2010 Marcin Kuzminski + :copyright: (C) 2009-2010 Marcin Kuzminski :license: GPLv3, see COPYING for more details. """ # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License or (at your opinion) any later version of the license. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, @@ -84,7 +84,7 @@ class SimpleHg(object): try: #================================================================== # GET REPOSITORY NAME - #================================================================== + #================================================================== self.repo_name = self.__get_repository(environ) except: return HTTPInternalServerError()(environ, start_response) @@ -106,7 +106,7 @@ class SimpleHg(object): log.debug('Anonymous access is disabled, running ' 'authentication') #============================================================== - # DEFAULT PERM FAILED OR ANONYMOUS ACCESS IS DISABLED SO WE + # DEFAULT PERM FAILED OR ANONYMOUS ACCESS IS DISABLED SO WE # NEED TO AUTHENTICATE AND ASK FOR AUTH USER PERMISSIONS #============================================================== @@ -183,7 +183,7 @@ class SimpleHg(object): def __check_permission(self, action, user, repo_name): """Checks permissions using action (push/pull) user and repository name - + :param action: push or pull action :param user: user instance :param repo_name: repository name @@ -207,7 +207,7 @@ class SimpleHg(object): def __get_repository(self, environ): """Get's repository name out of PATH_INFO header - + :param environ: environ where PATH_INFO is stored """ try: @@ -226,7 +226,7 @@ class SimpleHg(object): def __get_action(self, environ): """Maps mercurial request commands into a clone,pull or push command. This should always return a valid command string - + :param environ: """ mapping = {'changegroup': 'pull',