def watdarepo(repo_url, mode='<STR_LIT:d>', guess=False, repo_aliases=REPO_ALIASES, hosting_services=HOSTING_SERVICES):
repo_url = unicode(repo_url)<EOL>repo_data = {'<STR_LIT>': repo_url}<EOL>try:<EOL><INDENT>repo_data['<STR_LIT>'] = identify_vcs(repo_url, repo_aliases=repo_aliases)<EOL><DEDENT>except UnknownVCS:<EOL><INDENT>repo_data['<STR_LIT>'] = None<EOL><DEDENT>try:<EOL><INDENT>repo_data['<STR_LIT>'] = identify_hosting_service(repo_url, hosting_services=hosting_services)<EOL><DEDENT>except UnknownHostingService:<EOL><INDENT>repo_data['<STR_LIT>'] = None<EOL><DEDENT>if mode in ('<STR_LIT:c>', '<STR_LIT:o>'):<EOL><INDENT>Repo = type(str('<STR_LIT>'), (object,), repo_data)<EOL>return Repo()<EOL><DEDENT>return repo_data<EOL>
Gets vcs and hosting service for repo_urls
:param repo_url: Repo URL of unknown type.
:param mode: Return dictionary (default) or object
:param guess: Whether or not to make guesses
:returns: Hosting service or raises UnknownHostingService exception.