Mercurial > public > src > rhodecode
comparison pylons_app/lib/middleware/simplehg.py @ 350:4c9a295d80a4
added new command mappings for mercurial 1.6
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 01 Jul 2010 20:02:06 +0200 |
parents | c961b78ff0a0 |
children | a9a6c74ad2a6 |
comparison
equal
deleted
inserted
replaced
348:aafd9a98ea58 | 350:4c9a295d80a4 |
---|---|
147 def __get_action(self, environ): | 147 def __get_action(self, environ): |
148 """ | 148 """ |
149 Maps mercurial request commands into a pull or push command. | 149 Maps mercurial request commands into a pull or push command. |
150 @param environ: | 150 @param environ: |
151 """ | 151 """ |
152 mapping = { | 152 mapping = {'changegroup': 'pull', |
153 'changegroup': 'pull', | 153 'changegroupsubset': 'pull', |
154 'changegroupsubset': 'pull', | 154 'stream_out': 'pull', |
155 'unbundle': 'push', | 155 'listkeys': 'pull', |
156 'stream_out': 'pull', | 156 'unbundle': 'push', |
157 } | 157 'pushkey': 'push', } |
158 | |
158 for qry in environ['QUERY_STRING'].split('&'): | 159 for qry in environ['QUERY_STRING'].split('&'): |
159 if qry.startswith('cmd'): | 160 if qry.startswith('cmd'): |
160 cmd = qry.split('=')[-1] | 161 cmd = qry.split('=')[-1] |
161 if mapping.has_key(cmd): | 162 if mapping.has_key(cmd): |
162 return mapping[cmd] | 163 return mapping[cmd] |