def get_rev_options(url, rev):
if rev:<EOL><INDENT>rev_options = ['<STR_LIT>', rev]<EOL><DEDENT>else:<EOL><INDENT>rev_options = []<EOL><DEDENT>r = urlparse.urlsplit(url)<EOL>if hasattr(r, '<STR_LIT:username>'):<EOL><INDENT>username, password = r.username, r.password<EOL><DEDENT>else:<EOL><INDENT>netloc = r[<NUM_LIT:1>]<EOL>if '<STR_LIT:@>' in netloc:<EOL><INDENT>auth = netloc.split('<STR_LIT:@>')[<NUM_LIT:0>]<EOL>if '<STR_LIT::>' in auth:<EOL><INDENT>username, password = auth.split('<STR_LIT::>', <NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>username, password = auth, None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>username, password = None, None<EOL><DEDENT><DEDENT>if username:<EOL><INDENT>rev_options += ['<STR_LIT>', username]<EOL><DEDENT>if password:<EOL><INDENT>rev_options += ['<STR_LIT>', password]<EOL><DEDENT>return rev_options<EOL>
Return revision options.

    from pip pip.vcs.subversion.