"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "buildbot/steps/source/repo.py" between
buildbot-3.0.2.tar.gz and buildbot-3.1.0.tar.gz

About: Buildbot is a continuous integration testing framework (Python-based). It supports also automation of complex build systems, application deployment, and management of sophisticated software-release processes.

repo.py  (buildbot-3.0.2):repo.py  (buildbot-3.1.0)
skipping to change at line 97 skipping to change at line 97
change.properties["event.chan ge.number"], change.properties["event.chan ge.number"],
change.properties["event.patc hSet.number"])) change.properties["event.patc hSet.number"]))
return downloads return downloads
class Repo(Source): class Repo(Source):
""" Class for Repo with all the smarts """ """ Class for Repo with all the smarts """
name = 'repo' name = 'repo'
renderables = ["manifestURL", "manifestBranch", "manifestFile", "tarball", " jobs", renderables = ["manifestURL", "manifestBranch", "manifestFile", "tarball", " jobs",
"syncAllBranches", "updateTarballAge", "manifestOverrideUrl", "syncAllBranches", "updateTarballAge", "manifestOverrideUrl",
"repoDownloads", "depth"] "repoDownloads", "depth", "submodules"]
ref_not_found_re = re.compile(r"fatal: Couldn't find remote ref") ref_not_found_re = re.compile(r"fatal: Couldn't find remote ref")
cherry_pick_error_re = re.compile(r"|".join([r"Automatic cherry-pick failed" , cherry_pick_error_re = re.compile(r"|".join([r"Automatic cherry-pick failed" ,
r"error: " r"error: "
r"fatal: " r"fatal: "
r"possibly due to conflict reso lution."])) r"possibly due to conflict reso lution."]))
re_change = re.compile(r".* refs/changes/\d\d/(\d+)/(\d+) -> FETCH_HEAD$") re_change = re.compile(r".* refs/changes/\d\d/(\d+)/(\d+) -> FETCH_HEAD$")
re_head = re.compile(r"^HEAD is now at ([0-9a-f]+)...") re_head = re.compile(r"^HEAD is now at ([0-9a-f]+)...")
# number of retries, if we detect mirror desynchronization # number of retries, if we detect mirror desynchronization
mirror_sync_retry = 10 mirror_sync_retry = 10
skipping to change at line 122 skipping to change at line 122
manifestURL=None, manifestURL=None,
manifestBranch="master", manifestBranch="master",
manifestFile="default.xml", manifestFile="default.xml",
tarball=None, tarball=None,
jobs=None, jobs=None,
syncAllBranches=False, syncAllBranches=False,
updateTarballAge=7 * 24.0 * 3600.0, updateTarballAge=7 * 24.0 * 3600.0,
manifestOverrideUrl=None, manifestOverrideUrl=None,
repoDownloads=None, repoDownloads=None,
depth=0, depth=0,
submodules=False,
syncQuietly=False, syncQuietly=False,
**kwargs): **kwargs):
""" """
@type manifestURL: string @type manifestURL: string
@param manifestURL: The URL which points at the repo manifests repositor y. @param manifestURL: The URL which points at the repo manifests repositor y.
@type manifestBranch: string @type manifestBranch: string
@param manifestBranch: The manifest branch to check out by default. @param manifestBranch: The manifest branch to check out by default.
@type manifestFile: string @type manifestFile: string
skipping to change at line 154 skipping to change at line 155
@param manifestOverrideUrl: optional http URL for overriding the manifes t @param manifestOverrideUrl: optional http URL for overriding the manifes t
usually coming from Property setup by a Forc eScheduler usually coming from Property setup by a Forc eScheduler
@type repoDownloads: list of strings @type repoDownloads: list of strings
@param repoDownloads: optional repo download to perform after the repo s ync @param repoDownloads: optional repo download to perform after the repo s ync
@type depth: integer @type depth: integer
@param depth: optional depth parameter to repo init. @param depth: optional depth parameter to repo init.
If specified, create a shallow clone with given depth. If specified, create a shallow clone with given depth.
@type submodules: string
@param submodules: optional submodules parameter to repo init.
@type syncQuietly: bool. @type syncQuietly: bool.
@param syncQuietly: true, then suppress verbose output from repo sync. @param syncQuietly: true, then suppress verbose output from repo sync.
""" """
self.manifestURL = manifestURL self.manifestURL = manifestURL
self.manifestBranch = manifestBranch self.manifestBranch = manifestBranch
self.manifestFile = manifestFile self.manifestFile = manifestFile
self.tarball = tarball self.tarball = tarball
self.jobs = jobs self.jobs = jobs
self.syncAllBranches = syncAllBranches self.syncAllBranches = syncAllBranches
self.updateTarballAge = updateTarballAge self.updateTarballAge = updateTarballAge
self.manifestOverrideUrl = manifestOverrideUrl self.manifestOverrideUrl = manifestOverrideUrl
if repoDownloads is None: if repoDownloads is None:
repoDownloads = [] repoDownloads = []
self.repoDownloads = repoDownloads self.repoDownloads = repoDownloads
self.depth = depth self.depth = depth
self.submodules = submodules
self.syncQuietly = syncQuietly self.syncQuietly = syncQuietly
super().__init__(**kwargs) super().__init__(**kwargs)
assert self.manifestURL is not None assert self.manifestURL is not None
def computeSourceRevision(self, changes): def computeSourceRevision(self, changes):
if not changes: if not changes:
return None return None
return changes[-1].revision return changes[-1].revision
skipping to change at line 281 skipping to change at line 286
yield self.maybeExtractTarball() yield self.maybeExtractTarball()
@defer.inlineCallbacks @defer.inlineCallbacks
def doRepoSync(self, forceClobber=False): def doRepoSync(self, forceClobber=False):
updatable = yield self.sourcedirIsUpdateable() updatable = yield self.sourcedirIsUpdateable()
if not updatable or forceClobber: if not updatable or forceClobber:
# no need to re-clobber in case of failure # no need to re-clobber in case of failure
self.willRetryInCaseOfFailure = False self.willRetryInCaseOfFailure = False
yield self.doClobberStart() yield self.doClobberStart()
yield self.doCleanup() yield self.doCleanup()
yield self._repoCmd(['init', command = ['init',
'-u', self.manifestURL, '-u', self.manifestURL,
'-b', self.manifestBranch, '-b', self.manifestBranch,
'-m', self.manifestFile, '-m', self.manifestFile,
'--depth', str(self.depth)]) '--depth', str(self.depth)]
if self.submodules:
command.append('--submodules')
yield self._repoCmd(command)
if self.manifestOverrideUrl: if self.manifestOverrideUrl:
msg = "overriding manifest with {}\n".format(self.manifestOverrideUr l) msg = "overriding manifest with {}\n".format(self.manifestOverrideUr l)
yield self.stdio_log.addHeader(msg) yield self.stdio_log.addHeader(msg)
local_path = self.build.path_module.join(self.workdir, self.manifest OverrideUrl) local_path = self.build.path_module.join(self.workdir, self.manifest OverrideUrl)
local_file = yield self.pathExists(local_path) local_file = yield self.pathExists(local_path)
if local_file: if local_file:
yield self._Cmd(["cp", "-f", self.manifestOverrideUrl, "manifest _override.xml"]) yield self._Cmd(["cp", "-f", self.manifestOverrideUrl, "manifest _override.xml"])
else: else:
 End of changes. 5 change blocks. 
6 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)