Reset branch if the devel branch is based on Factory

This happens in packages that change their devel project over time. Then
the commit in the devel project no longer has the parent in the devel branch
but is based on factory
This commit is contained in:
Stephan Kulow
2022-11-03 10:37:26 +01:00
parent f5b3e42165
commit ed4b7367eb
5 changed files with 50 additions and 48 deletions

View File

@@ -184,6 +184,9 @@ class Git:
def branch_head(self, branch):
return self.repo.references["refs/heads/" + branch].target
def set_branch_head(self, branch, commit):
self.repo.references["refs/heads/" + branch].set_target(commit)
def gc(self):
logging.info(f"Garbage recollect and repackage {self.path}")
subprocess.run(