If the mirrored repo has a remote, try mirroring the changes pulled to it
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
a25e830b8d
commit
ebd553f405
1 changed files with 10 additions and 0 deletions
|
@ -107,6 +107,16 @@ class MirrorFromPagure(object):
|
|||
cmd = ["git", "-c", "transfer.fsckObjects=1", "fetch"]
|
||||
run_command(cmd, cwd=dest_folder)
|
||||
|
||||
cmd = ["git", "remote"]
|
||||
output = run_command(cmd, cwd=dest_folder).decode("utf-8").strip()
|
||||
if output:
|
||||
for remote in output.split("\n"):
|
||||
_log.info(" Running git push --mirror against %s", remote)
|
||||
cmd = ["git", "push", "--mirror", remote]
|
||||
run_command(cmd, cwd=dest_folder)
|
||||
else:
|
||||
_log.info(" No remotes found")
|
||||
|
||||
except Exception:
|
||||
_log.exception("Something happened while calling git")
|
||||
if cnt >= 3:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue