Commit 4b76b45a authored by Andreas Tille's avatar Andreas Tille

Inspect other branches than master for debian/ dir

parent 243892fe
......@@ -47,7 +47,7 @@ BLACKLIST = [ '1epic'
, 'papers'
, 'perl.debian.net'
, 'policy'
, 'r-bioc-000-dependency-scheme',
, 'r-bioc-000-dependency-scheme'
, 'scripts'
, 'test'
, 'website'
......@@ -98,8 +98,21 @@ def output_metadata(project, subdir, metadata):
print("%s/%s does not seem to have dir %s (%s)" % (gpath, name, subdir, str(err)), file=sys.stderr)
return None
except:
print("%s/%s does not seem to have dir %s. PLEASE VERIFY THIS SINCE IT IS SUSPICIOUS! " % (gpath, name, subdir), file=sys.stderr)
return None
branches = project.branches.list()
sid_branch = 'debian/sid'
if sid_branch in branches:
try:
items = project.repository_tree(path=subdir, recursive=False, ref=sid_branch)
except:
print("%s/%s does not seem to have dir %s. PLEASE VERIFY THIS SINCE IT IS SUSPICIOUS! Even Branch %s was inspected." % (gpath, name, subdir, sid_branch), file=sys.stderr)
else:
otherbranches = []
for b in branches:
if b in ['master', 'pristine-tar', 'upstream', sid_branch]:
continue
otherbranches.append(b)
print("%s/%s does not seem to have dir %s. PLEASE VERIFY THIS SINCE IT IS SUSPICIOUS! Available branches are: %s" % (gpath, name, subdir, str(otherbranches)), file=sys.stderr)
return None
# print("To be sure try again ... after sleeping %i" % SLEEPTIMEPROJECTS)
# time.sleep(SLEEPTIMEPROJECTS)
# project2 = gl.projects.get(gpath+'%2F'+name, lazy=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment