def get_url_rev_and_auth(self, url):<EOL>
scheme, netloc, path, query, frag = urllib_parse.urlsplit(url)<EOL>if '<STR_LIT:+>' not in scheme:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(url)<EOL>)<EOL><DEDENT>scheme = scheme.split('<STR_LIT:+>', <NUM_LIT:1>)[<NUM_LIT:1>]<EOL>netloc, user_pass = self.get_netloc_and_auth(netloc, scheme)<EOL>rev = None<EOL>if '<STR_LIT:@>' in path:<EOL><INDENT>path, rev = path.rsplit('<STR_LIT:@>', <NUM_LIT:1>)<EOL><DEDENT>url = urllib_parse.urlunsplit((scheme, netloc, path, query, '<STR_LIT>'))<EOL>return url, rev, user_pass<EOL>
Parse the repository URL to use, and return the URL, revision,
and auth info to use.

Returns: (url, rev, (username, password)).