##// END OF EJS Templates
Fixed journal action loggin doubled messages.
marcink -
r606:f31f1327 default
parent child Browse files
Show More
@@ -102,6 +102,7 class SimpleHg(object):
102 return HTTPForbidden()(environ, start_response)
102 return HTTPForbidden()(environ, start_response)
103
103
104 #log action
104 #log action
105 if action in ('push', 'pull', 'clone'):
105 proxy_key = 'HTTP_X_REAL_IP'
106 proxy_key = 'HTTP_X_REAL_IP'
106 def_key = 'REMOTE_ADDR'
107 def_key = 'REMOTE_ADDR'
107 ipaddr = environ.get(proxy_key, environ.get(def_key, '0.0.0.0'))
108 ipaddr = environ.get(proxy_key, environ.get(def_key, '0.0.0.0'))
@@ -165,14 +166,14 class SimpleHg(object):
165
166
166 def __get_action(self, environ):
167 def __get_action(self, environ):
167 """
168 """
168 Maps mercurial request commands into a pull or push command.
169 Maps mercurial request commands into a clone,pull or push command.
169 This should return generally always something
170 This should always return a valid command string
170 :param environ:
171 :param environ:
171 """
172 """
172 mapping = {'changegroup': 'pull',
173 mapping = {'changegroup': 'pull',
173 'changegroupsubset': 'pull',
174 'changegroupsubset': 'pull',
174 'stream_out': 'pull',
175 'stream_out': 'pull',
175 'listkeys': 'pull',
176 #'listkeys': 'pull',
176 'unbundle': 'push',
177 'unbundle': 'push',
177 'pushkey': 'push', }
178 'pushkey': 'push', }
178 for qry in environ['QUERY_STRING'].split('&'):
179 for qry in environ['QUERY_STRING'].split('&'):
General Comments 0
You need to be logged in to leave comments. Login now