def is_gitlab_url( destination ): "" if os.path.exists( destination ): return False elif gitinterface.repository_url_match( destination ): return True else: return False
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
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
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' )