Use the overrided protocol elsewhere than in the cloning too
authorDaniel Bainton <daniel.bainton@movial.com>
Tue, 24 Mar 2009 11:35:32 +0000 (13:35 +0200)
committerDaniel Bainton <daniel.bainton@movial.com>
Tue, 24 Mar 2009 11:35:32 +0000 (13:35 +0200)
matrix/git.py

index 2a17432..111d5d2 100644 (file)
@@ -133,6 +133,8 @@ def call_output(args, workdir=None, fd=None, lines=True, wait=True, any=False,
                        return contents
 
 def url_exists(url):
+       if config.protocol:
+               url = re.sub(".*://", config.protocol + "://", url)
        return call_output(['ls-remote', '-h', url], any=True, quiet=True,
                           fail=False)
 
@@ -173,7 +175,9 @@ def pull(name, url=None, refspec=None):
        if url is None and refspec is None:
                cmd = ['pull']
        else:
-               cmd = ['pull',url,refspec]
+               if config.protocol:
+                       url = re.sub(".*://", config.protocol + "://", url)
+               cmd = ['pull', url, refspec]
        if call(cmd, workdir=name) != 0:
                raise Error(cmd, name)