comparison pylons_app/lib/middleware/simplehg.py @ 241:48727add84c9

Made repos path config configurable from pylons app configs. update Readme
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 30 May 2010 22:08:21 +0200
parents a0116e944da1
children fb7f066126cc
comparison
equal deleted inserted replaced
240:7c4fa2a66195 241:48727add84c9
54 except: 54 except:
55 return HTTPNotFound()(environ, start_response) 55 return HTTPNotFound()(environ, start_response)
56 56
57 #since we wrap into hgweb, just reset the path 57 #since we wrap into hgweb, just reset the path
58 environ['PATH_INFO'] = '/' 58 environ['PATH_INFO'] = '/'
59 self.baseui = make_ui() 59 self.baseui = make_ui(self.config['hg_app_repo_conf'])
60 self.basepath = self.baseui.configitems('paths')[0][1]\ 60 self.basepath = self.baseui.configitems('paths')[0][1]\
61 .replace('*', '') 61 .replace('*', '')
62 self.repo_path = os.path.join(self.basepath, repo_name) 62 self.repo_path = os.path.join(self.basepath, repo_name)
63 try: 63 try:
64 app = wsgiapplication(self.__make_app) 64 app = wsgiapplication(self.__make_app)