##// END OF EJS Templates
git+hg middleware do repo verification at earliest possible state, giving 404 as fast as possible. If repo is not found.
marcink -
r2122:c137b8a8 beta
parent child Browse files
Show More
@@ -115,6 +115,10 b' class SimpleGit(BaseVCSController):'
115 except:
115 except:
116 return HTTPInternalServerError()(environ, start_response)
116 return HTTPInternalServerError()(environ, start_response)
117
117
118 # quick check if that dir exists...
119 if is_valid_repo(repo_name, self.basepath) is False:
120 return HTTPNotFound()(environ, start_response)
121
118 #======================================================================
122 #======================================================================
119 # GET ACTION PULL or PUSH
123 # GET ACTION PULL or PUSH
120 #======================================================================
124 #======================================================================
@@ -181,10 +185,6 b' class SimpleGit(BaseVCSController):'
181 repo_path = os.path.join(safe_str(self.basepath), safe_str(repo_name))
185 repo_path = os.path.join(safe_str(self.basepath), safe_str(repo_name))
182 log.debug('Repository path is %s' % repo_path)
186 log.debug('Repository path is %s' % repo_path)
183
187
184 # quick check if that dir exists...
185 if is_valid_repo(repo_name, self.basepath) is False:
186 return HTTPNotFound()(environ, start_response)
187
188 try:
188 try:
189 #invalidate cache on push
189 #invalidate cache on push
190 if action == 'push':
190 if action == 'push':
@@ -85,6 +85,10 b' class SimpleHg(BaseVCSController):'
85 except:
85 except:
86 return HTTPInternalServerError()(environ, start_response)
86 return HTTPInternalServerError()(environ, start_response)
87
87
88 # quick check if that dir exists...
89 if is_valid_repo(repo_name, self.basepath) is False:
90 return HTTPNotFound()(environ, start_response)
91
88 #======================================================================
92 #======================================================================
89 # GET ACTION PULL or PUSH
93 # GET ACTION PULL or PUSH
90 #======================================================================
94 #======================================================================
@@ -163,10 +167,6 b' class SimpleHg(BaseVCSController):'
163 baseui = make_ui('db')
167 baseui = make_ui('db')
164 self.__inject_extras(repo_path, baseui, extras)
168 self.__inject_extras(repo_path, baseui, extras)
165
169
166 # quick check if that dir exists...
167 if is_valid_repo(repo_name, self.basepath) is False:
168 return HTTPNotFound()(environ, start_response)
169
170 try:
170 try:
171 # invalidate cache on push
171 # invalidate cache on push
172 if action == 'push':
172 if action == 'push':
General Comments 0
You need to be logged in to leave comments. Login now