From 989780da2dfe26d63eac49a09cec5164febbad14 Mon Sep 17 00:00:00 2001 From: Nikki Heald Date: Wed, 13 May 2015 11:08:27 +0100 Subject: [PATCH] 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 --- pypi_mirror/cmd/run_mirror.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypi_mirror/cmd/run_mirror.py b/pypi_mirror/cmd/run_mirror.py index 1361d94..fc62cf3 100644 --- a/pypi_mirror/cmd/run_mirror.py +++ b/pypi_mirror/cmd/run_mirror.py @@ -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: