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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user