Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgweb_mod.py @ 6797:8909070fd05e
merge another backout
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 02 Jul 2008 12:27:57 +0200 |
parents | 943f066c0d58 |
children | 95f35b553ae6 |
comparison
equal
deleted
inserted
replaced
6795:c228ae4bc89c | 6797:8909070fd05e |
---|---|
167 content = getattr(webcommands, cmd)(self, req, tmpl) | 167 content = getattr(webcommands, cmd)(self, req, tmpl) |
168 req.respond(HTTP_OK, ctype) | 168 req.respond(HTTP_OK, ctype) |
169 | 169 |
170 req.write(content) | 170 req.write(content) |
171 del tmpl | 171 del tmpl |
172 return ''.join(content), | 172 return [] |
173 | 173 |
174 except revlog.LookupError, err: | 174 except revlog.LookupError, err: |
175 req.respond(HTTP_NOT_FOUND, ctype) | 175 req.respond(HTTP_NOT_FOUND, ctype) |
176 msg = str(err) | 176 msg = str(err) |
177 if 'manifest' not in msg: | 177 if 'manifest' not in msg: |
178 msg = 'revision not found: %s' % err.name | 178 msg = 'revision not found: %s' % err.name |
179 return ''.join(tmpl('error', error=msg)), | 179 req.write(tmpl('error', error=msg)) |
180 return [] | |
180 except (RepoError, revlog.RevlogError), inst: | 181 except (RepoError, revlog.RevlogError), inst: |
181 req.respond(HTTP_SERVER_ERROR, ctype) | 182 req.respond(HTTP_SERVER_ERROR, ctype) |
182 return ''.join(tmpl('error', error=str(inst))), | 183 req.write(tmpl('error', error=str(inst))) |
184 return [] | |
183 except ErrorResponse, inst: | 185 except ErrorResponse, inst: |
184 req.respond(inst.code, ctype) | 186 req.respond(inst.code, ctype) |
185 return ''.join(tmpl('error', error=inst.message)), | 187 req.write(tmpl('error', error=inst.message)) |
188 return [] | |
186 | 189 |
187 def templater(self, req): | 190 def templater(self, req): |
188 | 191 |
189 # determine scheme, port and server name | 192 # determine scheme, port and server name |
190 # this is needed to create absolute urls | 193 # this is needed to create absolute urls |