Create fake revisions for every commit in the base of a linked package

This is a rather complex operation, but whenever a package changes in
Factory, the inherited package gets a shadow revision consisting of the
3-way merge. If this happens due to a request being accepted, this is
actually in most cases also commited by 'buildservice-autocommit',
so we're making sure this is always happening (and are actually
duplicating revisions in cases that we filter out later as empty
commits).

To differenciate the fake revisions from the real revisions, I add
a fraction part
This commit is contained in:
Stephan Kulow
2022-10-24 20:21:53 +02:00
parent d17e60a608
commit 2784171f75
8 changed files with 24958 additions and 18353 deletions

View File

@@ -12,10 +12,10 @@ class TreeBuilder:
ret = []
prev = None
for rev in revisions:
print(rev, rev.files_hash(self.db))
print(rev, rev.files_hash)
if rev.broken:
continue
if prev and prev.files_hash(self.db) == rev.files_hash(self.db):
if prev and prev.files_hash == rev.files_hash:
continue
ret.append(rev)
prev = rev
@@ -25,7 +25,7 @@ class TreeBuilder:
factory_revisions = self.filtered_revisions("openSUSE:Factory", package)
source_revisions = dict()
for rev in factory_revisions:
print(rev, rev.files_hash(self.db))
print(rev, rev.files_hash)
if rev.request_id:
req = Request.find(self.db, rev.request_id)
print(" ", req)
@@ -35,5 +35,5 @@ class TreeBuilder:
req.source_project, req.source_package
)
for rev2 in source_revisions.get(key):
if rev2.files_hash(self.db) == rev.files_hash(self.db):
if rev2.files_hash == rev.files_hash:
print(" ", rev2)