Skip to content
Commits on Source (2)
......@@ -88,7 +88,7 @@ def get_blends_groups():
blends_groups.append(group)
return blends_groups
def output_metadata(subdir, metadata):
def output_metadata(project, subdir, metadata):
try:
items = project.repository_tree(path=subdir)
except gitlab.exceptions.GitlabGetError as err:
......@@ -125,7 +125,7 @@ LAST_ACTIVITY_LENGTH=len(LAST_ACTIVITY)
blends_groups = get_blends_groups()
for group in blends_groups:
unchanged, changed, new, ignored = (0, 0, 0, 0)
gpath = group.attributes['path']
gpath = group.path
blend = BLENDSGROUPS[group.name]
projects = group.projects.list(all=True, order_by='name', sort='asc')
# DEBUG : only few projects to be faster
......@@ -175,8 +175,9 @@ for group in blends_groups:
# be friendly to Salsa and add some delay timr before real reading of data
# see thread around https://lists.debian.org/debian-devel/2018/07/msg00125.html
time.sleep(SLEEPTIMEFILES)
if output_metadata('debian', debianmetadata):
output_metadata('debian/upstream', upstreammetadata)
pr = gl.projects.get(project.id, lazy=True)
if output_metadata(pr, 'debian', debianmetadata):
output_metadata(pr, 'debian/upstream', upstreammetadata)
print("In %s %i repositories changed, %i remained unchanged, %i were new and %i were ignored." % (blend, changed, unchanged, new, ignored))
# os.system("tar --exclude=*README.Debian -caf %s %s" % (MACHINEREADABLEARCHIVE, TARGETDIR))
......