def get_transport_and_path(location, **kwargs):
 try:
  return get_transport_and_path_from_url(location, **kwargs)
 except ValueError:
  pass
 if ((sys.platform == 'win32') and location[0].isalpha() and (location[1:3] == ':\\')):
  return (default_local_git_client_cls(**kwargs), location)
 if ((':' in location) and (not ('@' in location))):
  (hostname, path) = location.split(':', 1)
  return (SSHGitClient(hostname, **kwargs), path)
 elif (':' in location):
  (user_host, path) = location.split(':', 1)
  if ('@' in user_host):
   (user, host) = user_host.rsplit('@', 1)
  else:
   user = None
   host = user_host
  return (SSHGitClient(host, username=user, **kwargs), path)
 return (default_local_git_client_cls(**kwargs), location)

def get_transport_and_path ( location , ** kwargs ) : try : return get_transport_and_path_from_url ( location , ** kwargs ) except ValueError : pass if ( ( sys . platform == 'win32' ) and location [ 0 ] . isalpha ( ) and ( location [ 1 : 3 ] == ':\\' ) ) : return ( default_local_git_client_cls ( ** kwargs ) , location ) if ( ( ':' in location ) and ( not ( '@' in location ) ) ) : ( hostname , path ) = location . split ( ':' , 1 ) return ( SSHGitClient ( hostname , ** kwargs ) , path ) elif ( ':' in location ) : ( user_host , path ) = location . split ( ':' , 1 ) if ( '@' in user_host ) : ( user , host ) = user_host . rsplit ( '@' , 1 ) else : user = None host = user_host return ( SSHGitClient ( host , username = user , ** kwargs ) , path ) return ( default_local_git_client_cls ( ** kwargs ) , location )
obtain a git client from a url .