If we specify a branch, always use it

There's a check to make sure that we only run
mirroring against interesting branches by filtering
out any that aren't HEAD or don't start with
remotes/origin, but if we specify a branch on
the command line, we want that branch no matter what.
This is primarily so we can run mirroring tests
on proposed changes to openstack/requirements.

Change-Id: I19cd2b032b6219aed972abb95a180e3d402d529e
This commit is contained in:
Nikki Heald 2015-05-13 11:08:27 +01:00
parent 97304ffe34
commit 989780da2d
1 changed files with 1 additions and 1 deletions

View File

@ -233,7 +233,7 @@ class Mirror(object):
for branch in branches:
branch = branch.strip()
if (not branch.startswith("remotes/origin")
or "origin/HEAD" in branch):
or "origin/HEAD" in branch) and len(branches) > 1:
continue
print("Fetching pip requires for %s:%s" % (project, branch))
if not self.args.no_update: