def get_transport_and_path_from_url(url, config=None, **kwargs):
 parsed = urlparse.urlparse(url)
 if (parsed.scheme == 'git'):
  return (TCPGitClient.from_parsedurl(parsed, **kwargs), parsed.path)
 elif (parsed.scheme in ('git+ssh', 'ssh')):
  path = parsed.path
  if path.startswith('/'):
   path = parsed.path[1:]
  return (SSHGitClient.from_parsedurl(parsed, **kwargs), path)
 elif (parsed.scheme in ('http', 'https')):
  return (HttpGitClient.from_parsedurl(parsed, config=config, **kwargs), parsed.path)
 elif (parsed.scheme == 'file'):
  return (default_local_git_client_cls.from_parsedurl(parsed, **kwargs), parsed.path)
 raise ValueError(("unknown scheme '%s'" % parsed.scheme))

def get_transport_and_path_from_url ( url , config = None , ** kwargs ) : parsed = urlparse . urlparse ( url ) if ( parsed . scheme == 'git' ) : return ( TCPGitClient . from_parsedurl ( parsed , ** kwargs ) , parsed . path ) elif ( parsed . scheme in ( 'git+ssh' , 'ssh' ) ) : path = parsed . path if path . startswith ( '/' ) : path = parsed . path [ 1 : ] return ( SSHGitClient . from_parsedurl ( parsed , ** kwargs ) , path ) elif ( parsed . scheme in ( 'http' , 'https' ) ) : return ( HttpGitClient . from_parsedurl ( parsed , config = config , ** kwargs ) , parsed . path ) elif ( parsed . scheme == 'file' ) : return ( default_local_git_client_cls . from_parsedurl ( parsed , ** kwargs ) , parsed . path ) raise ValueError ( ( "unknown scheme '%s'" % parsed . scheme ) )
obtain a git client from a url .