forked from importers/git-importer
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:
@@ -13,7 +13,10 @@ class Exporter:
|
||||
def run(self):
|
||||
db = DB()
|
||||
cur = db.cursor()
|
||||
cur.execute("SELECT * from revisions where package=%s", (self.package,))
|
||||
cur.execute(
|
||||
"SELECT * from revisions where package=%s ORDER BY project,rev",
|
||||
(self.package,),
|
||||
)
|
||||
data = {"revisions": []}
|
||||
for row in cur.fetchall():
|
||||
data["revisions"].append(DBRevision(row).as_dict(db))
|
||||
|
Reference in New Issue
Block a user