def skip_file(overwrite, repo, path, prev_url, source_files=None, repo_server=None): if overwrite: return False if prev_url is None: return False r, p = decompose_url(prev_url) p = rpath.absolute(p) path = rpath.absolute(path) if repo.name() != r or path != p: return False if repo.exists(path): #TODO compare source mtime with path ctime #TODO check whether it is partial or completed return True return False
def from_url(self, url): repo_name, path = decompose_url(url) return (self.repository(repo_name), path)