Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Try to identify the URL as a git or mercurial repo and return a
namedtuple `(type url)` if have success.

        def get_vcs_from_url(url):
    """Try to identify the URL as a git or mercurial repo and return a
    namedtuple `(type url)` if have success.
    """
    match = rx_vcs.match(url)
    if match:
        vcs_type = match.group(1)
        vcs_url = normalize_url(url)
    elif url.endswith('.git'):
        vcs_type = 'git'
        vcs_url = url
    else:
        return
    return VCS(vcs_type, vcs_url)
        


src/v/o/Voodoo-1.3.5/voodoo/main.py   Voodoo(Download)
from ._compat import to_unicode
from .cli import prompt_bool, prompt
from .vcs import get_vcs_from_url, clone
from .helpers import (
    pformat, make_dirs, create_file, copy_file, unormalize, read_file,
    """
    src_path = to_unicode(src_path)
    vcs = get_vcs_from_url(src_path)
    try:
        if vcs:

src/v/o/Voodoo-HEAD/voodoo/main.py   Voodoo(Download)
from ._compat import to_unicode
from .cli import prompt_bool, prompt
from .vcs import get_vcs_from_url, clone
from .helpers import (
    pformat, make_dirs, create_file, copy_file, unormalize, read_file,
    """
    src_path = to_unicode(src_path)
    vcs = get_vcs_from_url(src_path)
    try:
        if vcs: