From f462dd82ac62d97e0b085ae8cd826661a547866a Mon Sep 17 00:00:00 2001 From: lrossett Date: Apr 22 2021 12:17:06 +0000 Subject: fetch remote forked repo --- diff --git a/src/centpkg/utils.py b/src/centpkg/utils.py index cf98c1c..0a6a007 100644 --- a/src/centpkg/utils.py +++ b/src/centpkg/utils.py @@ -111,6 +111,15 @@ def do_add_remote(base_url, remote_base_url, repo, repo_path, remote_name): error_msg = "During create remote:\n {0}\n {1}".format( " ".join(e.command), e.stderr) raise rpkgError(error_msg) + + try: + remote = [r for r in repo.remotes if r.name == remote_name][0] + remote.fetch() + except git.exc.GitCommandError as e: + error_msg = "During fetch remote:\n {0}\n {1}".format( + " ".join(e.command), e.stderr) + raise rpkgError(error_msg) + return True