Show More
@@ -143,28 +143,9 b' class SimpleHg(object):' | |||||
143 | #invalidate cache on push |
|
143 | #invalidate cache on push | |
144 | if self.action == 'push': |
|
144 | if self.action == 'push': | |
145 | self.__invalidate_cache(repo_name) |
|
145 | self.__invalidate_cache(repo_name) | |
146 | messages = [] |
|
146 | ||
147 | messages.append('thank you for using rhodecode') |
|
147 | return app(environ, start_response) | |
148 |
|
||||
149 | return self.msg_wrapper(app, environ, start_response, messages) |
|
|||
150 | else: |
|
|||
151 | return app(environ, start_response) |
|
|||
152 |
|
||||
153 |
|
148 | |||
154 | def msg_wrapper(self, app, environ, start_response, messages=[]): |
|
|||
155 | """ |
|
|||
156 | Wrapper for custom messages that come out of mercurial respond messages |
|
|||
157 | is a list of messages that the user will see at the end of response |
|
|||
158 | from merurial protocol actions that involves remote answers |
|
|||
159 | :param app: |
|
|||
160 | :param environ: |
|
|||
161 | :param start_response: |
|
|||
162 | """ |
|
|||
163 | def custom_messages(msg_list): |
|
|||
164 | for msg in msg_list: |
|
|||
165 | yield msg + '\n' |
|
|||
166 | org_response = app(environ, start_response) |
|
|||
167 | return chain(org_response, custom_messages(messages)) |
|
|||
168 |
|
149 | |||
169 | def __make_app(self): |
|
150 | def __make_app(self): | |
170 | hgserve = hgweb(str(self.repo_path), baseui=self.baseui) |
|
151 | hgserve = hgweb(str(self.repo_path), baseui=self.baseui) |
General Comments 0
You need to be logged in to leave comments.
Login now