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