From f06658a6e38c68c4dd55791094769daa7002ee48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Neveu?= Date: Mon, 4 Oct 2021 22:33:32 +0200 Subject: [PATCH] remove --mirror for release otherwise I have bugs after init/pushing --- travo/course.py | 4 ++-- travo/jupyter_course.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/travo/course.py b/travo/course.py index 9f8549f3..edaad29c 100644 --- a/travo/course.py +++ b/travo/course.py @@ -392,7 +392,7 @@ Tapez «{self.script}» pour de l'aide. except RuntimeError: pass self.log.info(f"- Publishing to {path}.") - self.forge.git(["push", "--mirror", project.http_url_to_repo]) + self.forge.git(["push", project.http_url_to_repo]) if self.student_groups is None: return @@ -413,7 +413,7 @@ Tapez «{self.script}» pour de l'aide. fork.unprotect_branch("master") except RuntimeError: pass - self.forge.git(["push", "--mirror", fork.http_url_to_repo]) + self.forge.git(["push", fork.http_url_to_repo]) def remove_assignment(self, assignment: str) -> None: """ diff --git a/travo/jupyter_course.py b/travo/jupyter_course.py index 404257e1..b62413d0 100644 --- a/travo/jupyter_course.py +++ b/travo/jupyter_course.py @@ -257,6 +257,7 @@ class JupyterCourse(Course): os.rename(tmpgitdir, gitdir) else: run(["git", "init"], cwd=target_path) + self.forge.git(["remote", "add", "origin", self.http_url_to_repo], cwd=target_path) os.rename(tmpdb, db) if add_gitlab_ci: io.open(os.path.join(target_path, ".gitlab-ci.yml"), "w").write( -- GitLab