Make it possible to use a regular zuul-cloner.

Testing locally with a pip installed zuul is easy with this new option
- --zc zuul-cloner and the zuul-cloner from the PATH is user.

Change-Id: Ib0c97df4be9c378bab4ff98f06c27ff771810ce9
This commit is contained in:
Robert Collins 2015-06-26 12:26:13 +12:00
parent 31b68d0bdb
commit ef696e4ef6

View File

@ -110,6 +110,7 @@ def grab_args():
help='check local changes (not yet in git)')
parser.add_argument('branch', nargs='?', default='master',
help='target branch for diffs')
parser.add_argument('--zc', help='what zuul cloner to call')
return parser.parse_args()
@ -139,11 +140,16 @@ def main():
# openstack/requirements project so we can match them to the changes
reqroot = tempfile.mkdtemp()
reqdir = os.path.join(reqroot, "openstack/requirements")
out, err = run_command("/usr/zuul-env/bin/zuul-cloner "
if args.zc is not None:
zc = args.zc
else:
zc = '/usr/zuul-env/bin/zuul-cloner'
out, err = run_command("%(zc)s "
"--cache-dir /opt/git "
"--workspace %s "
"--workspace %(root)s "
"git://git.openstack.org "
"openstack/requirements" % reqroot)
"openstack/requirements"
% dict(zc=zc, root=reqroot))
print out
print err
os.chdir(reqdir)