示例#1
0
def is_gitlab_url( destination ):
    ""
    if os.path.exists( destination ):
        return False
    elif gitinterface.repository_url_match( destination ):
        return True
    else:
        return False
示例#2
0
def make_absolute_url_path(url):
    ""
    if gititf.repository_url_match(url):
        if url == 'file://':
            raise MRGitExitError('invalid URL: ' + repr(url))
        elif url.startswith('file://'):
            tail = url[7:]
            absurl = 'file://' + abspath(tail)
        else:
            absurl = url
    else:
        absurl = abspath(url)

    return absurl
示例#3
0
def parse_url_list(args):
    ""
    directory = None

    if len( args ) <= 1 or \
       gititf.repository_url_match( args[-1] ) or \
       gititf.is_a_local_repository( args[-1] ) or \
       gititf.is_a_local_repository( args[-1]+'/.mrgit' ):
        urls = list(args)
    else:
        directory = args[-1]
        urls = args[:-1]

    urls = abspath_local_repository_urls(urls)

    return urls, directory
示例#4
0
def specifies_a_repository(url):
    ""
    return gititf.repository_url_match( url ) or \
           gititf.is_a_local_repository( url ) or \
           gititf.is_a_local_repository( url+'/.mrgit' )