Fix git depth issues

Defaulting a getdepth to 1 makes it difficult to switch branches if
the branch is not available in the shallow clone, so make this
optional. Also, instantiate OpenstackGitRepo properly: depth is not
the fourth parameter.
This commit is contained in:
Craig Tracey 2015-10-14 21:06:46 -04:00
parent 5e3769d1e3
commit c188d6238a
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ class PackageBuilder(Builder):
def _clone_project(self, giturl, name, gitref, depth, path):
LOG.info("Fetching source code for '%s'", name)
repo = OpenstackGitRepo(giturl, name, gitref, depth)
repo = OpenstackGitRepo(giturl, name, gitref, depth=depth)
repo.clone(path)
return repo

View File

@ -32,7 +32,7 @@ TEMPLATE_VARS = ('name', 'version', 'gitref', 'stackforge')
class OpenstackProject(object):
def __init__(self, settings, name, version=None, gitref=None, giturl=None,
gitdepth=1, venv_command=None, install_command=None,
gitdepth=None, venv_command=None, install_command=None,
install_path=None, package_name=None, stackforge=False,
system_dependencies=[], pip_dependencies=[],
postinstall_dependencies=[]):