def parse_editable(editable_req):<EOL>
url = editable_req<EOL>url_no_extras, extras = _strip_extras(url)<EOL>if os.path.isdir(url_no_extras):<EOL><INDENT>if not os.path.exists(os.path.join(url_no_extras, '<STR_LIT>')):<EOL><INDENT>msg = (<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(os.path.abspath(url_no_extras))<EOL>)<EOL>pyproject_path = make_pyproject_path(url_no_extras)<EOL>if os.path.isfile(pyproject_path):<EOL><INDENT>msg += (<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>raise InstallationError(msg)<EOL><DEDENT>url_no_extras = path_to_url(url_no_extras)<EOL><DEDENT>if url_no_extras.lower().startswith('<STR_LIT>'):<EOL><INDENT>package_name = Link(url_no_extras).egg_fragment<EOL>if extras:<EOL><INDENT>return (<EOL>package_name,<EOL>url_no_extras,<EOL>Requirement("<STR_LIT>" + extras.lower()).extras,<EOL>)<EOL><DEDENT>else:<EOL><INDENT>return package_name, url_no_extras, None<EOL><DEDENT><DEDENT>for version_control in vcs:<EOL><INDENT>if url.lower().startswith('<STR_LIT>' % version_control):<EOL><INDENT>url = '<STR_LIT>' % (version_control, url)<EOL>break<EOL><DEDENT><DEDENT>if '<STR_LIT:+>' not in url:<EOL><INDENT>raise InstallationError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>editable_req<EOL>)<EOL><DEDENT>vc_type = url.split('<STR_LIT:+>', <NUM_LIT:1>)[<NUM_LIT:0>].lower()<EOL>if not vcs.get_backend(vc_type):<EOL><INDENT>error_message = '<STR_LIT>' % editable_req +'<STR_LIT:U+002CU+0020>'.join([backend.name + '<STR_LIT>' for backend in vcs.backends]) +'<STR_LIT>'<EOL>raise InstallationError(error_message)<EOL><DEDENT>package_name = Link(url).egg_fragment<EOL>if not package_name:<EOL><INDENT>raise InstallationError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % editable_req<EOL>)<EOL><DEDENT>return package_name, url, None<EOL>
Parses an editable requirement into:
        - a requirement name
        - an URL
        - extras
        - editable options
    Accepted requirements:
        svn+http://blahblah@rev#egg=Foobar[baz]&subdirectory=version_subdir
        .[some_extra]