Index: ../../../zorg/buildbot/process/factory.py =================================================================== --- ../../../zorg/buildbot/process/factory.py +++ ../../../zorg/buildbot/process/factory.py @@ -61,7 +61,7 @@ "%(monorepo_dir)s/build" % {'monorepo_dir' : self.monorepo_dir} # Repourl could be specified per builder. Otherwise we use github. - self.repourl = kwargs.pop('repourl', 'https://github.com/llvm/llvm-%s.git') + self.repourl_prefix = kwargs.pop('repourl', 'https://github.com/llvm/') # Default build directory. @@ -134,12 +134,9 @@ return # Checkout the monorepo. - _repourl = self.repourl - if '%' in _repourl: - _repourl = _repourl % 'project' self.addStep( Git(name='Checkout the source code', - repourl=_repourl, + repourl=self.repourl_prefix + "llvm-project.git", progress=True, workdir=WithProperties(self.monorepo_dir), **kwargs)) @@ -147,7 +144,10 @@ # Checkout a given LLVM project to the given directory. # TODO: Handle clean property and self.clean attribute. - def addGetSourcecodeForProject(self, project, srcdir=None, **kwargs): + def addGetSourcecodeForProject(self, project, src_dir=None, **kwargs): + # Remove 'is_legacy_mode' if it leaked in to kwargs. + kwargs.pop('is_legacy_mode', None) + # Bail out if we are in the legacy mode and SVN checkout is required. if self.is_legacy_mode: workdir, baseURL = svn_repos[project] @@ -154,31 +154,32 @@ # Check out to the given directory if any. # Otherwise this is a part of the unified source tree. - if srcdir is None: - srcdir = workdir % {'llvm_srcdir' : self.llvm_srcdir} + if src_dir is None: + src_dir = workdir % {'llvm_srcdir' : self.llvm_srcdir} self.addStep( SVN(name='svn-%s' % project, - workdir=workdir % {'llvm_srcdir' : srcdir}, + workdir=src_dir, baseURL=WithProperties(baseURL), **kwargs)) else: # project contains a repo name which is not a part of the monorepo. # We do not enforce it here, though. - _repourl = kwargs.pop('repourl', self.repourl) - if '%' in _repourl: - _repourl = _repourl % project + _repourl = kwargs.pop('repourl', None) + if not _repourl: + _repourl = self.repourl_prefix + "llvm-%s.git" % project # Check out to the given directory if any. # Otherwise this is a part of the unified source tree. - if srcdir is None: - srcdir = 'llvm-%s' % project + if src_dir is None: + src_dir = 'llvm-%s' % project - # Ignore workdir if given. We check out to srcdir. + # Ignore workdir if given. We check out to src_dir. kwargs.pop('workdir', None) self.addStep( Git(name='Checkout the %s' % project, + repourl=_repourl, progress=True, - workdir=WithProperties(srcdir), - **kwargs)) \ No newline at end of file + workdir=WithProperties(src_dir), + **kwargs))