Allow projects that only differ by org
It's entirely possible that sometimes, you might want to have two
different repos that share the same second part. However, we're
actually asserting out if we find this. Don't assert out, but instead
make our duplicate entry check check for the full two-part name.
Change-Id: Id373cce6b0c16d7c5a07536788dcb3954b1529e2
diff --git a/jeepyb/cmd/create_cgitrepos.py b/jeepyb/cmd/create_cgitrepos.py
index bda452f..c13ef1f 100644
--- a/jeepyb/cmd/create_cgitrepos.py
+++ b/jeepyb/cmd/create_cgitrepos.py
@@ -43,10 +43,11 @@
gitorgs = {}
names = set()
for entry in config:
- (org, name) = entry['project'].split('/')
+ project = entry['project']
+ (org, name) = project.split('/')
description = entry.get('description', name)
- assert name not in names
- names.add(name)
+ assert project not in names
+ names.add(project)
gitorgs.setdefault(org, []).append((name, description))
if SCRATCH_SUBPATH:
assert SCRATCH_SUBPATH not in gitorgs