From 4c32be112ca5b02a1b33d3ea456726609702c1a8 Mon Sep 17 00:00:00 2001 From: proletarius101 Date: Sat, 6 Apr 2024 17:09:31 +0800 Subject: [PATCH] test --- fdroidserver/deploy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fdroidserver/deploy.py b/fdroidserver/deploy.py index 2dcfb4d9..8ef4181d 100644 --- a/fdroidserver/deploy.py +++ b/fdroidserver/deploy.py @@ -703,7 +703,7 @@ def update_servergitmirrors(servergitmirrors, repo_section): branch_name = 'full' if not branch_name in repo.heads: repo.create_head(branch_name, initial_branch_ref) - repo.heads[branch_name].checkout() + repo.head.reference = repo.heads[branch_name] remote_url = d['url'] name = REMOTE_HOSTNAME_REGEX.sub(r'\1', remote_url) @@ -740,6 +740,9 @@ def update_servergitmirrors(servergitmirrors, repo_section): % (common.GITLAB_COM_PAGES_MAX_SIZE / 1000000000) ) + # Test + print(repo.head.log()) + # push. This will overwrite the git history remote = repo.remote(name) if remote.name == 'gitlab': @@ -794,7 +797,6 @@ def update_servergitmirrors(servergitmirrors, repo_section): repo.head.reference = initial_branch_ref repo.head.reset(index=True, working_tree=False) repo.delete_head(repo.branches[branch_name], force=True) - if progress: progressbar.done()