Changeset - 4c9a295d80a4
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-07-01 20:02:06
marcin@python-works.com
added new command mappings for mercurial 1.6
1 file changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
pylons_app/lib/middleware/simplehg.py
Show inline comments
 
@@ -146,18 +146,19 @@ class SimpleHg(object):
 
        
 
    def __get_action(self, environ):
 
        """
 
        Maps mercurial request commands into a pull or push command.
 
        @param environ:
 
        """
 
        mapping = {
 
            'changegroup': 'pull',
 
        mapping = {'changegroup': 'pull',
 
            'changegroupsubset': 'pull',
 
                   'stream_out': 'pull',
 
                   'listkeys': 'pull',
 
            'unbundle': 'push',
 
            'stream_out': 'pull',
 
        }                    
 
                   'pushkey': 'push', }
 
        
 
        for qry in environ['QUERY_STRING'].split('&'):
 
            if qry.startswith('cmd'):
 
                cmd = qry.split('=')[-1]
 
                if mapping.has_key(cmd):
 
                    return mapping[cmd]
 
    
0 comments (0 inline, 0 general)