Merge "Stop showing retired repos in cgit"
diff --git a/jeepyb/cmd/create_cgitrepos.py b/jeepyb/cmd/create_cgitrepos.py
index 70cf9aa..35a65e4 100644
--- a/jeepyb/cmd/create_cgitrepos.py
+++ b/jeepyb/cmd/create_cgitrepos.py
@@ -61,9 +61,10 @@
'DEFAULT_ORG is set.' % project)
(org, name) = (DEFAULT_ORG, project)
description = entry.get('description', name)
+ retired = entry.get('acl-config', '').endswith('retired.config')
assert project not in names
names.add(project)
- gitorgs.setdefault(org, []).append((name, description))
+ gitorgs.setdefault(org, []).append((name, description, retired))
if SCRATCH_SUBPATH:
assert SCRATCH_SUBPATH not in gitorgs
scratch_path = os.path.join(REPO_PATH, SCRATCH_SUBPATH)
@@ -72,7 +73,7 @@
if not os.path.isdir(scratch_dir):
os.makedirs(scratch_dir)
projects = gitorgs[org]
- for (name, description) in projects:
+ for (name, description, retired) in projects:
scratch_repo = "%s.git" % os.path.join(scratch_dir, name)
subprocess.call(['git', 'init', '--bare', scratch_repo])
subprocess.call(['chown', '-R', '%s:%s'
@@ -89,12 +90,15 @@
org_dir = os.path.join(REPO_PATH, org)
projects = gitorgs[org]
projects.sort()
- for (name, description) in projects:
- project_repo = "%s.git" % os.path.join(org_dir, name)
- cgit_file.write('\n')
- cgit_file.write('repo.url=%s/%s\n' % (org, name))
- cgit_file.write('repo.path=%s/\n' % (project_repo))
- cgit_file.write('repo.desc=%s\n' % (clean_string(description)))
+ for (name, description, retired) in projects:
+ if not retired:
+ project_repo = "%s.git" % os.path.join(org_dir, name)
+ cgit_file.write('\n')
+ cgit_file.write('repo.url=%s/%s\n' % (org, name))
+ cgit_file.write('repo.path=%s/\n' % (project_repo))
+ cgit_file.write('repo.desc=%s\n' % (description))
+ cgit_file.write(
+ 'repo.desc=%s\n' % (clean_string(description)))
if not os.path.exists(project_repo):
subprocess.call(['git', 'init', '--bare', project_repo])
subprocess.call(['chown', '-R', '%s:%s'