def fetch(self, path, target, determine_wants=None, progress=None): """Fetch into a target repository. :param path: Path to fetch from :param target: Target repository to fetch into :param determine_wants: Optional function to determine what refs to fetch :param progress: Optional progress function :return: remote refs as dictionary """ from dulwich.repo import Repo r = Repo(path) return r.fetch(target, determine_wants=determine_wants, progress=progress)