forked from importers/git-importer
Import file list of revisions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import functools
|
||||
import logging
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from lib.binary import is_binary_or_large
|
||||
from lib.db import DB
|
||||
@@ -154,9 +155,22 @@ class Importer:
|
||||
self.update_db_package(db, lproject, lpackage)
|
||||
|
||||
for rev in DBRevision.all_revisions(db, project, self.package):
|
||||
print(rev, rev.linked_rev(db))
|
||||
if rev.broken or rev.expanded_srcmd5:
|
||||
continue
|
||||
linked_rev = rev.linked_rev(db)
|
||||
if linked_rev:
|
||||
linked_rev = linked_rev.unexpanded_srcmd5
|
||||
list = self.obs.list(
|
||||
project, self.package, rev.unexpanded_srcmd5, linked_rev
|
||||
)
|
||||
if list:
|
||||
print(ET.tostring(list).decode("utf-8"))
|
||||
rev.import_dir_list(db, list)
|
||||
else:
|
||||
rev.set_broken(db)
|
||||
|
||||
cur.close()
|
||||
db.conn.commit()
|
||||
|
||||
def import_all_revisions(self, gc):
|
||||
# Fetch all the requests and sort them. Ideally we should
|
||||
|
Reference in New Issue
Block a user