Fix specs repo location calculation

The launchpad project and specs repository may have different names,
especially for a project like Oslo with many launchpad projects.

Change-Id: I4091e7719395378978a101e9c905da84080ad371
This commit is contained in:
Doug Hellmann 2014-11-19 11:45:51 -05:00
parent 6d3e508038
commit affe11ba77
1 changed files with 2 additions and 1 deletions

View File

@ -44,11 +44,12 @@ m = re.match(r".*/(\w+)-specs/(.+)/(.+).rst", os.path.abspath(args.specfile))
if m is None:
parser.error("%s has not a recognized spec pattern" % args.specfile)
projname = m.group(1)
specs_repo = '%s-specs' % projname
if projname == 'oslo':
projname = 'oslo-incubator'
if args.lp_project:
projname = args.lp_project
repoloc = "openstack/%s-specs/plain/%s" % (projname, m.group(2))
repoloc = "openstack/%s/plain/%s" % (specs_repo, m.group(2))
bpname = m.group(3)
# Check that spec was approved (merged in specs repository)