repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
buildbot/buildbot
worker/buildbot_worker/pb.py
Worker.gracefulShutdown
def gracefulShutdown(self): """Start shutting down""" if not self.bf.perspective: log.msg("No active connection, shutting down NOW") reactor.stop() return log.msg( "Telling the master we want to shutdown after any running builds are finished") ...
python
def gracefulShutdown(self): """Start shutting down""" if not self.bf.perspective: log.msg("No active connection, shutting down NOW") reactor.stop() return log.msg( "Telling the master we want to shutdown after any running builds are finished") ...
[ "def", "gracefulShutdown", "(", "self", ")", ":", "if", "not", "self", ".", "bf", ".", "perspective", ":", "log", ".", "msg", "(", "\"No active connection, shutting down NOW\"", ")", "reactor", ".", "stop", "(", ")", "return", "log", ".", "msg", "(", "\"Te...
Start shutting down
[ "Start", "shutting", "down" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/pb.py#L229-L249
train
Start shutting down the master.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/util/_hangcheck.py
HangCheckProtocol._startHungConnectionTimer
def _startHungConnectionTimer(self): """ Start a timer to detect if the connection is hung. """ def hungConnection(): self._hung_callback() self._hungConnectionTimer = None self.transport.loseConnection() self._hungConnectionTimer = self._react...
python
def _startHungConnectionTimer(self): """ Start a timer to detect if the connection is hung. """ def hungConnection(): self._hung_callback() self._hungConnectionTimer = None self.transport.loseConnection() self._hungConnectionTimer = self._react...
[ "def", "_startHungConnectionTimer", "(", "self", ")", ":", "def", "hungConnection", "(", ")", ":", "self", ".", "_hung_callback", "(", ")", "self", ".", "_hungConnectionTimer", "=", "None", "self", ".", "transport", ".", "loseConnection", "(", ")", "self", "...
Start a timer to detect if the connection is hung.
[ "Start", "a", "timer", "to", "detect", "if", "the", "connection", "is", "hung", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/util/_hangcheck.py#L66-L75
train
Start a timer to detect if the connection is hung.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/locks.py
BaseLock.isAvailable
def isAvailable(self, requester, access): """ Return a boolean whether the lock is available for claiming """ debuglog("%s isAvailable(%s, %s): self.owners=%r" % (self, requester, access, self.owners)) num_excl, num_counting = self._claimed_excl, self._claimed_counting ...
python
def isAvailable(self, requester, access): """ Return a boolean whether the lock is available for claiming """ debuglog("%s isAvailable(%s, %s): self.owners=%r" % (self, requester, access, self.owners)) num_excl, num_counting = self._claimed_excl, self._claimed_counting ...
[ "def", "isAvailable", "(", "self", ",", "requester", ",", "access", ")", ":", "debuglog", "(", "\"%s isAvailable(%s, %s): self.owners=%r\"", "%", "(", "self", ",", "requester", ",", "access", ",", "self", ".", "owners", ")", ")", "num_excl", ",", "num_counting...
Return a boolean whether the lock is available for claiming
[ "Return", "a", "boolean", "whether", "the", "lock", "is", "available", "for", "claiming" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/locks.py#L76-L96
train
Returns a boolean indicating whether the lock is available for claiming.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/locks.py
BaseLock.claim
def claim(self, owner, access): """ Claim the lock (lock must be available) """ debuglog("%s claim(%s, %s)" % (self, owner, access.mode)) assert owner is not None assert self.isAvailable(owner, access), "ask for isAvailable() first" assert isinstance(access, LockAccess) ...
python
def claim(self, owner, access): """ Claim the lock (lock must be available) """ debuglog("%s claim(%s, %s)" % (self, owner, access.mode)) assert owner is not None assert self.isAvailable(owner, access), "ask for isAvailable() first" assert isinstance(access, LockAccess) ...
[ "def", "claim", "(", "self", ",", "owner", ",", "access", ")", ":", "debuglog", "(", "\"%s claim(%s, %s)\"", "%", "(", "self", ",", "owner", ",", "access", ".", "mode", ")", ")", "assert", "owner", "is", "not", "None", "assert", "self", ".", "isAvailab...
Claim the lock (lock must be available)
[ "Claim", "the", "lock", "(", "lock", "must", "be", "available", ")" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/locks.py#L122-L133
train
Claim the lock.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/locks.py
BaseLock.release
def release(self, owner, access): """ Release the lock """ assert isinstance(access, LockAccess) debuglog("%s release(%s, %s)" % (self, owner, access.mode)) if not self._removeOwner(owner, access): debuglog("%s already released" % self) return self._tryW...
python
def release(self, owner, access): """ Release the lock """ assert isinstance(access, LockAccess) debuglog("%s release(%s, %s)" % (self, owner, access.mode)) if not self._removeOwner(owner, access): debuglog("%s already released" % self) return self._tryW...
[ "def", "release", "(", "self", ",", "owner", ",", "access", ")", ":", "assert", "isinstance", "(", "access", ",", "LockAccess", ")", "debuglog", "(", "\"%s release(%s, %s)\"", "%", "(", "self", ",", "owner", ",", "access", ".", "mode", ")", ")", "if", ...
Release the lock
[ "Release", "the", "lock" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/locks.py#L140-L152
train
Release the lock.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/locks.py
BaseLock.waitUntilMaybeAvailable
def waitUntilMaybeAvailable(self, owner, access): """Fire when the lock *might* be available. The caller will need to check with isAvailable() when the deferred fires. This loose form is used to avoid deadlocks. If we were interested in a stronger form, this would be named 'waitUntilAvai...
python
def waitUntilMaybeAvailable(self, owner, access): """Fire when the lock *might* be available. The caller will need to check with isAvailable() when the deferred fires. This loose form is used to avoid deadlocks. If we were interested in a stronger form, this would be named 'waitUntilAvai...
[ "def", "waitUntilMaybeAvailable", "(", "self", ",", "owner", ",", "access", ")", ":", "debuglog", "(", "\"%s waitUntilAvailable(%s)\"", "%", "(", "self", ",", "owner", ")", ")", "assert", "isinstance", "(", "access", ",", "LockAccess", ")", "if", "self", "."...
Fire when the lock *might* be available. The caller will need to check with isAvailable() when the deferred fires. This loose form is used to avoid deadlocks. If we were interested in a stronger form, this would be named 'waitUntilAvailable', and the deferred would fire after the lock ha...
[ "Fire", "when", "the", "lock", "*", "might", "*", "be", "available", ".", "The", "caller", "will", "need", "to", "check", "with", "isAvailable", "()", "when", "the", "deferred", "fires", ".", "This", "loose", "form", "is", "used", "to", "avoid", "deadloc...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/locks.py#L178-L197
train
Wait until the lock is available.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/cache.py
CacheManager.get_cache
def get_cache(self, cache_name, miss_fn): """ Get an L{AsyncLRUCache} object with the given name. If such an object does not exist, it will be created. Since the cache is permanent, this method can be called only once, e.g., in C{startService}, and it value stored indefinitely....
python
def get_cache(self, cache_name, miss_fn): """ Get an L{AsyncLRUCache} object with the given name. If such an object does not exist, it will be created. Since the cache is permanent, this method can be called only once, e.g., in C{startService}, and it value stored indefinitely....
[ "def", "get_cache", "(", "self", ",", "cache_name", ",", "miss_fn", ")", ":", "try", ":", "return", "self", ".", "_caches", "[", "cache_name", "]", "except", "KeyError", ":", "max_size", "=", "self", ".", "config", ".", "get", "(", "cache_name", ",", "...
Get an L{AsyncLRUCache} object with the given name. If such an object does not exist, it will be created. Since the cache is permanent, this method can be called only once, e.g., in C{startService}, and it value stored indefinitely. @param cache_name: name of the cache (usually the na...
[ "Get", "an", "L", "{", "AsyncLRUCache", "}", "object", "with", "the", "given", "name", ".", "If", "such", "an", "object", "does", "not", "exist", "it", "will", "be", "created", ".", "Since", "the", "cache", "is", "permanent", "this", "method", "can", "...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/cache.py#L40-L59
train
Get an object of type LUCache with the given name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/change_hook.py
ChangeHookResource.render_POST
def render_POST(self, request): """ Responds to events and starts the build process different implementations can decide on what methods they will accept :arguments: request the http request object """ try: d = self.getAndSubmitC...
python
def render_POST(self, request): """ Responds to events and starts the build process different implementations can decide on what methods they will accept :arguments: request the http request object """ try: d = self.getAndSubmitC...
[ "def", "render_POST", "(", "self", ",", "request", ")", ":", "try", ":", "d", "=", "self", ".", "getAndSubmitChanges", "(", "request", ")", "except", "Exception", ":", "d", "=", "defer", ".", "fail", "(", ")", "def", "ok", "(", "_", ")", ":", "requ...
Responds to events and starts the build process different implementations can decide on what methods they will accept :arguments: request the http request object
[ "Responds", "to", "events", "and", "starts", "the", "build", "process", "different", "implementations", "can", "decide", "on", "what", "methods", "they", "will", "accept" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/change_hook.py#L70-L102
train
Handles the POST request and returns a Deferred that fires with the response code and message.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/change_hook.py
ChangeHookResource.makeHandler
def makeHandler(self, dialect): """create and cache the handler object for this dialect""" if dialect not in self.dialects: m = "The dialect specified, '{}', wasn't whitelisted in change_hook".format(dialect) log.msg(m) log.msg( "Note: if dialect is 'b...
python
def makeHandler(self, dialect): """create and cache the handler object for this dialect""" if dialect not in self.dialects: m = "The dialect specified, '{}', wasn't whitelisted in change_hook".format(dialect) log.msg(m) log.msg( "Note: if dialect is 'b...
[ "def", "makeHandler", "(", "self", ",", "dialect", ")", ":", "if", "dialect", "not", "in", "self", ".", "dialects", ":", "m", "=", "\"The dialect specified, '{}', wasn't whitelisted in change_hook\"", ".", "format", "(", "dialect", ")", "log", ".", "msg", "(", ...
create and cache the handler object for this dialect
[ "create", "and", "cache", "the", "handler", "object", "for", "this", "dialect" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/change_hook.py#L113-L134
train
create and cache the handler object for this dialect
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/change_hook.py
ChangeHookResource.getChanges
def getChanges(self, request): """ Take the logic from the change hook, and then delegate it to the proper handler We use the buildbot plugin mechanisms to find out about dialects and call getChanges() the return value is a list of changes if DIALECT is unspec...
python
def getChanges(self, request): """ Take the logic from the change hook, and then delegate it to the proper handler We use the buildbot plugin mechanisms to find out about dialects and call getChanges() the return value is a list of changes if DIALECT is unspec...
[ "def", "getChanges", "(", "self", ",", "request", ")", ":", "uriRE", "=", "re", ".", "search", "(", "r'^/change_hook/?([a-zA-Z0-9_]*)'", ",", "bytes2unicode", "(", "request", ".", "uri", ")", ")", "if", "not", "uriRE", ":", "log", ".", "msg", "(", "\"URI...
Take the logic from the change hook, and then delegate it to the proper handler We use the buildbot plugin mechanisms to find out about dialects and call getChanges() the return value is a list of changes if DIALECT is unspecified, a sample implementation is provided
[ "Take", "the", "logic", "from", "the", "change", "hook", "and", "then", "delegate", "it", "to", "the", "proper", "handler" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/change_hook.py#L137-L168
train
Get the changes for the current node and source.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/pbutil.py
decode
def decode(data, encoding='utf-8', errors='strict'): """We need to convert a dictionary where keys and values are bytes, to unicode strings. This happens when a Python 2 worker sends a dictionary back to a Python 3 master. """ data_type = type(data) if data_type == bytes: return bytes2...
python
def decode(data, encoding='utf-8', errors='strict'): """We need to convert a dictionary where keys and values are bytes, to unicode strings. This happens when a Python 2 worker sends a dictionary back to a Python 3 master. """ data_type = type(data) if data_type == bytes: return bytes2...
[ "def", "decode", "(", "data", ",", "encoding", "=", "'utf-8'", ",", "errors", "=", "'strict'", ")", ":", "data_type", "=", "type", "(", "data", ")", "if", "data_type", "==", "bytes", ":", "return", "bytes2unicode", "(", "data", ",", "encoding", ",", "e...
We need to convert a dictionary where keys and values are bytes, to unicode strings. This happens when a Python 2 worker sends a dictionary back to a Python 3 master.
[ "We", "need", "to", "convert", "a", "dictionary", "where", "keys", "and", "values", "are", "bytes", "to", "unicode", "strings", ".", "This", "happens", "when", "a", "Python", "2", "worker", "sends", "a", "dictionary", "back", "to", "a", "Python", "3", "m...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/pbutil.py#L157-L170
train
Decode a dictionary of bytes to unicode strings.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/pbutil.py
ReconnectingPBClientFactory.failedToGetPerspective
def failedToGetPerspective(self, why): """The login process failed, most likely because of an authorization failure (bad password), but it is also possible that we lost the new connection before we managed to send our credentials. """ log.msg("ReconnectingPBClientFactory.failedTo...
python
def failedToGetPerspective(self, why): """The login process failed, most likely because of an authorization failure (bad password), but it is also possible that we lost the new connection before we managed to send our credentials. """ log.msg("ReconnectingPBClientFactory.failedTo...
[ "def", "failedToGetPerspective", "(", "self", ",", "why", ")", ":", "log", ".", "msg", "(", "\"ReconnectingPBClientFactory.failedToGetPerspective\"", ")", "if", "why", ".", "check", "(", "pb", ".", "PBConnectionLost", ")", ":", "log", ".", "msg", "(", "\"we lo...
The login process failed, most likely because of an authorization failure (bad password), but it is also possible that we lost the new connection before we managed to send our credentials.
[ "The", "login", "process", "failed", "most", "likely", "because", "of", "an", "authorization", "failure", "(", "bad", "password", ")", "but", "it", "is", "also", "possible", "that", "we", "lost", "the", "new", "connection", "before", "we", "managed", "to", ...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/pbutil.py#L142-L154
train
This method is called when the login process failed to get a new persistent key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/scripts/runner.py
CreateWorkerOptions.validateMasterArgument
def validateMasterArgument(self, master_arg): """ Parse the <master> argument. @param master_arg: the <master> argument to parse @return: tuple of master's host and port @raise UsageError: on errors parsing the argument """ if master_arg[:5] == "http:": ...
python
def validateMasterArgument(self, master_arg): """ Parse the <master> argument. @param master_arg: the <master> argument to parse @return: tuple of master's host and port @raise UsageError: on errors parsing the argument """ if master_arg[:5] == "http:": ...
[ "def", "validateMasterArgument", "(", "self", ",", "master_arg", ")", ":", "if", "master_arg", "[", ":", "5", "]", "==", "\"http:\"", ":", "raise", "usage", ".", "UsageError", "(", "\"<master> is not a URL - do not use URL\"", ")", "if", "\":\"", "not", "in", ...
Parse the <master> argument. @param master_arg: the <master> argument to parse @return: tuple of master's host and port @raise UsageError: on errors parsing the argument
[ "Parse", "the", "<master", ">", "argument", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/scripts/runner.py#L145-L172
train
Parse the master argument and return the master host and port.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/db/builds.py
BuildsConnectorComponent.setBuildProperty
def setBuildProperty(self, bid, name, value, source): """ A kind of create_or_update, that's between one or two queries per call """ def thd(conn): bp_tbl = self.db.model.build_properties self.checkLength(bp_tbl.c.name, name) self.checkLength(bp_tbl.c.source, ...
python
def setBuildProperty(self, bid, name, value, source): """ A kind of create_or_update, that's between one or two queries per call """ def thd(conn): bp_tbl = self.db.model.build_properties self.checkLength(bp_tbl.c.name, name) self.checkLength(bp_tbl.c.source, ...
[ "def", "setBuildProperty", "(", "self", ",", "bid", ",", "name", ",", "value", ",", "source", ")", ":", "def", "thd", "(", "conn", ")", ":", "bp_tbl", "=", "self", ".", "db", ".", "model", ".", "build_properties", "self", ".", "checkLength", "(", "bp...
A kind of create_or_update, that's between one or two queries per call
[ "A", "kind", "of", "create_or_update", "that", "s", "between", "one", "or", "two", "queries", "per", "call" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/builds.py#L192-L213
train
Set a build property in the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/log.py
Log._decoderFromString
def _decoderFromString(cfg): """ Return a decoder function. If cfg is a string such as 'latin-1' or u'latin-1', then we return a new lambda, s.decode(). If cfg is already a lambda or function, then we return that. """ if isinstance(cfg, (bytes, str)): ...
python
def _decoderFromString(cfg): """ Return a decoder function. If cfg is a string such as 'latin-1' or u'latin-1', then we return a new lambda, s.decode(). If cfg is already a lambda or function, then we return that. """ if isinstance(cfg, (bytes, str)): ...
[ "def", "_decoderFromString", "(", "cfg", ")", ":", "if", "isinstance", "(", "cfg", ",", "(", "bytes", ",", "str", ")", ")", ":", "return", "lambda", "s", ":", "s", ".", "decode", "(", "cfg", ",", "'replace'", ")", "return", "cfg" ]
Return a decoder function. If cfg is a string such as 'latin-1' or u'latin-1', then we return a new lambda, s.decode(). If cfg is already a lambda or function, then we return that.
[ "Return", "a", "decoder", "function", ".", "If", "cfg", "is", "a", "string", "such", "as", "latin", "-", "1", "or", "u", "latin", "-", "1", "then", "we", "return", "a", "new", "lambda", "s", ".", "decode", "()", ".", "If", "cfg", "is", "already", ...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/log.py#L42-L51
train
Return a decoder function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/changes/hgpoller.py
HgPoller._getRevDetails
def _getRevDetails(self, rev): """Return a deferred for (date, author, files, comments) of given rev. Deferred will be in error if rev is unknown. """ args = ['log', '-r', rev, os.linesep.join(( '--template={date|hgdate}', '{author}', "{files % '{file...
python
def _getRevDetails(self, rev): """Return a deferred for (date, author, files, comments) of given rev. Deferred will be in error if rev is unknown. """ args = ['log', '-r', rev, os.linesep.join(( '--template={date|hgdate}', '{author}', "{files % '{file...
[ "def", "_getRevDetails", "(", "self", ",", "rev", ")", ":", "args", "=", "[", "'log'", ",", "'-r'", ",", "rev", ",", "os", ".", "linesep", ".", "join", "(", "(", "'--template={date|hgdate}'", ",", "'{author}'", ",", "\"{files % '{file}\"", "+", "os", "."...
Return a deferred for (date, author, files, comments) of given rev. Deferred will be in error if rev is unknown.
[ "Return", "a", "deferred", "for", "(", "date", "author", "files", "comments", ")", "of", "given", "rev", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/hgpoller.py#L111-L142
train
Return a Deferred for the date author files comments of given revision.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/changes/hgpoller.py
HgPoller._isRepositoryReady
def _isRepositoryReady(self): """Easy to patch in tests.""" return os.path.exists(os.path.join(self._absWorkdir(), '.hg'))
python
def _isRepositoryReady(self): """Easy to patch in tests.""" return os.path.exists(os.path.join(self._absWorkdir(), '.hg'))
[ "def", "_isRepositoryReady", "(", "self", ")", ":", "return", "os", ".", "path", ".", "exists", "(", "os", ".", "path", ".", "join", "(", "self", ".", "_absWorkdir", "(", ")", ",", "'.hg'", ")", ")" ]
Easy to patch in tests.
[ "Easy", "to", "patch", "in", "tests", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/hgpoller.py#L144-L146
train
Easy to patch in tests.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/changes/hgpoller.py
HgPoller._initRepository
def _initRepository(self): """Have mercurial init the workdir as a repository (hg init) if needed. hg init will also create all needed intermediate directories. """ if self._isRepositoryReady(): return defer.succeed(None) log.msg('hgpoller: initializing working dir f...
python
def _initRepository(self): """Have mercurial init the workdir as a repository (hg init) if needed. hg init will also create all needed intermediate directories. """ if self._isRepositoryReady(): return defer.succeed(None) log.msg('hgpoller: initializing working dir f...
[ "def", "_initRepository", "(", "self", ")", ":", "if", "self", ".", "_isRepositoryReady", "(", ")", ":", "return", "defer", ".", "succeed", "(", "None", ")", "log", ".", "msg", "(", "'hgpoller: initializing working dir from %s'", "%", "self", ".", "repourl", ...
Have mercurial init the workdir as a repository (hg init) if needed. hg init will also create all needed intermediate directories.
[ "Have", "mercurial", "init", "the", "workdir", "as", "a", "repository", "(", "hg", "init", ")", "if", "needed", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/hgpoller.py#L148-L163
train
Initialize the workdir as a repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/changes/hgpoller.py
HgPoller._setCurrentRev
def _setCurrentRev(self, rev, branch='default'): """Return a deferred to set current revision in persistent state.""" self.lastRev[branch] = str(rev) return self.setState('lastRev', self.lastRev)
python
def _setCurrentRev(self, rev, branch='default'): """Return a deferred to set current revision in persistent state.""" self.lastRev[branch] = str(rev) return self.setState('lastRev', self.lastRev)
[ "def", "_setCurrentRev", "(", "self", ",", "rev", ",", "branch", "=", "'default'", ")", ":", "self", ".", "lastRev", "[", "branch", "]", "=", "str", "(", "rev", ")", "return", "self", ".", "setState", "(", "'lastRev'", ",", "self", ".", "lastRev", ")...
Return a deferred to set current revision in persistent state.
[ "Return", "a", "deferred", "to", "set", "current", "revision", "in", "persistent", "state", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/hgpoller.py#L198-L201
train
Set the current revision in persistent state.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/changes/hgpoller.py
HgPoller._getHead
def _getHead(self, branch): """Return a deferred for branch head revision or None. We'll get an error if there is no head for this branch, which is probably a good thing, since it's probably a misspelling (if really buildbotting a branch that does not have any changeset yet, one...
python
def _getHead(self, branch): """Return a deferred for branch head revision or None. We'll get an error if there is no head for this branch, which is probably a good thing, since it's probably a misspelling (if really buildbotting a branch that does not have any changeset yet, one...
[ "def", "_getHead", "(", "self", ",", "branch", ")", ":", "d", "=", "utils", ".", "getProcessOutput", "(", "self", ".", "hgbin", ",", "[", "'heads'", ",", "'-r'", ",", "branch", ",", "'--template={rev}'", "+", "os", ".", "linesep", "]", ",", "path", "...
Return a deferred for branch head revision or None. We'll get an error if there is no head for this branch, which is probably a good thing, since it's probably a misspelling (if really buildbotting a branch that does not have any changeset yet, one shouldn't be surprised to get errors)
[ "Return", "a", "deferred", "for", "branch", "head", "revision", "or", "None", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/hgpoller.py#L203-L237
train
Return a deferred for branch head revision or None.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/changes/hgpoller.py
HgPoller._processChanges
def _processChanges(self, unused_output): """Send info about pulled changes to the master and record current. HgPoller does the recording by moving the working dir to the head of the branch. We don't update the tree (unnecessary treatment and waste of space) instead, we simply s...
python
def _processChanges(self, unused_output): """Send info about pulled changes to the master and record current. HgPoller does the recording by moving the working dir to the head of the branch. We don't update the tree (unnecessary treatment and waste of space) instead, we simply s...
[ "def", "_processChanges", "(", "self", ",", "unused_output", ")", ":", "for", "branch", "in", "self", ".", "branches", "+", "self", ".", "bookmarks", ":", "rev", "=", "yield", "self", ".", "_getHead", "(", "branch", ")", "if", "rev", "is", "None", ":",...
Send info about pulled changes to the master and record current. HgPoller does the recording by moving the working dir to the head of the branch. We don't update the tree (unnecessary treatment and waste of space) instead, we simply store the current rev number in a file. Recall...
[ "Send", "info", "about", "pulled", "changes", "to", "the", "master", "and", "record", "current", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/hgpoller.py#L240-L254
train
Process all changes from the master and record the current revision number.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/changes/hgpoller.py
HgPoller._convertNonZeroToFailure
def _convertNonZeroToFailure(self, res): "utility method to handle the result of getProcessOutputAndValue" (stdout, stderr, code) = res if code != 0: raise EnvironmentError( 'command failed with exit code %d: %s' % (code, stderr)) return (stdout, stderr, code)
python
def _convertNonZeroToFailure(self, res): "utility method to handle the result of getProcessOutputAndValue" (stdout, stderr, code) = res if code != 0: raise EnvironmentError( 'command failed with exit code %d: %s' % (code, stderr)) return (stdout, stderr, code)
[ "def", "_convertNonZeroToFailure", "(", "self", ",", "res", ")", ":", "(", "stdout", ",", "stderr", ",", "code", ")", "=", "res", "if", "code", "!=", "0", ":", "raise", "EnvironmentError", "(", "'command failed with exit code %d: %s'", "%", "(", "code", ",",...
utility method to handle the result of getProcessOutputAndValue
[ "utility", "method", "to", "handle", "the", "result", "of", "getProcessOutputAndValue" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/hgpoller.py#L305-L311
train
utility method to handle the result of getProcessOutputAndValue
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/changes/hgpoller.py
HgPoller._stopOnFailure
def _stopOnFailure(self, f): "utility method to stop the service when a failure occurs" if self.running: d = defer.maybeDeferred(self.stopService) d.addErrback(log.err, 'while stopping broken HgPoller service') return f
python
def _stopOnFailure(self, f): "utility method to stop the service when a failure occurs" if self.running: d = defer.maybeDeferred(self.stopService) d.addErrback(log.err, 'while stopping broken HgPoller service') return f
[ "def", "_stopOnFailure", "(", "self", ",", "f", ")", ":", "if", "self", ".", "running", ":", "d", "=", "defer", ".", "maybeDeferred", "(", "self", ".", "stopService", ")", "d", ".", "addErrback", "(", "log", ".", "err", ",", "'while stopping broken HgPol...
utility method to stop the service when a failure occurs
[ "utility", "method", "to", "stop", "the", "service", "when", "a", "failure", "occurs" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/hgpoller.py#L313-L318
train
utility method to stop the service when a failure occurs
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/svn.py
SVN.purge
def purge(self, ignore_ignores): """Delete everything that shown up on status.""" command = ['status', '--xml'] if ignore_ignores: command.append('--no-ignore') d = self._dovccmd(command, collectStdout=True) @d.addCallback def parseAndRemove(stdout): ...
python
def purge(self, ignore_ignores): """Delete everything that shown up on status.""" command = ['status', '--xml'] if ignore_ignores: command.append('--no-ignore') d = self._dovccmd(command, collectStdout=True) @d.addCallback def parseAndRemove(stdout): ...
[ "def", "purge", "(", "self", ",", "ignore_ignores", ")", ":", "command", "=", "[", "'status'", ",", "'--xml'", "]", "if", "ignore_ignores", ":", "command", ".", "append", "(", "'--no-ignore'", ")", "d", "=", "self", ".", "_dovccmd", "(", "command", ",", ...
Delete everything that shown up on status.
[ "Delete", "everything", "that", "shown", "up", "on", "status", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/svn.py#L338-L366
train
Delete everything that shown up on status.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/scripts/windows_service.py
DetermineRunner
def DetermineRunner(bbdir): '''Checks if the given directory is a worker or a master and returns the appropriate run function.''' tacfile = os.path.join(bbdir, 'buildbot.tac') if not os.path.exists(tacfile): # No tac-file - use master runner by default. import buildbot.scripts.runner ...
python
def DetermineRunner(bbdir): '''Checks if the given directory is a worker or a master and returns the appropriate run function.''' tacfile = os.path.join(bbdir, 'buildbot.tac') if not os.path.exists(tacfile): # No tac-file - use master runner by default. import buildbot.scripts.runner ...
[ "def", "DetermineRunner", "(", "bbdir", ")", ":", "tacfile", "=", "os", ".", "path", ".", "join", "(", "bbdir", ",", "'buildbot.tac'", ")", "if", "not", "os", ".", "path", ".", "exists", "(", "tacfile", ")", ":", "# No tac-file - use master runner by default...
Checks if the given directory is a worker or a master and returns the appropriate run function.
[ "Checks", "if", "the", "given", "directory", "is", "a", "worker", "or", "a", "master", "and", "returns", "the", "appropriate", "run", "function", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/scripts/windows_service.py#L522-L554
train
Checks if the given directory is a worker or a master and returns the appropriate run function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/p4.py
P4.purge
def purge(self, ignore_ignores): """Delete everything that shown up on status.""" command = ['sync', '#none'] if ignore_ignores: command.append('--no-ignore') d = self._dovccmd(command, collectStdout=True) # add deferred to rm tree # then add defer to sync t...
python
def purge(self, ignore_ignores): """Delete everything that shown up on status.""" command = ['sync', '#none'] if ignore_ignores: command.append('--no-ignore') d = self._dovccmd(command, collectStdout=True) # add deferred to rm tree # then add defer to sync t...
[ "def", "purge", "(", "self", ",", "ignore_ignores", ")", ":", "command", "=", "[", "'sync'", ",", "'#none'", "]", "if", "ignore_ignores", ":", "command", ".", "append", "(", "'--no-ignore'", ")", "d", "=", "self", ".", "_dovccmd", "(", "command", ",", ...
Delete everything that shown up on status.
[ "Delete", "everything", "that", "shown", "up", "on", "status", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/p4.py#L394-L404
train
Delete everything that shown up on status.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/repo.py
Repo.filterManifestPatches
def filterManifestPatches(self): """ Patches to manifest projects are a bit special. repo does not support a way to download them automatically, so we need to implement the boilerplate manually. This code separates the manifest patches from the other patches, and generate...
python
def filterManifestPatches(self): """ Patches to manifest projects are a bit special. repo does not support a way to download them automatically, so we need to implement the boilerplate manually. This code separates the manifest patches from the other patches, and generate...
[ "def", "filterManifestPatches", "(", "self", ")", ":", "manifest_unrelated_downloads", "=", "[", "]", "manifest_related_downloads", "=", "[", "]", "for", "download", "in", "self", ".", "repoDownloads", ":", "project", ",", "ch_ps", "=", "download", ".", "split",...
Patches to manifest projects are a bit special. repo does not support a way to download them automatically, so we need to implement the boilerplate manually. This code separates the manifest patches from the other patches, and generates commands to import those manifest patches.
[ "Patches", "to", "manifest", "projects", "are", "a", "bit", "special", ".", "repo", "does", "not", "support", "a", "way", "to", "download", "them", "automatically", "so", "we", "need", "to", "implement", "the", "boilerplate", "manually", ".", "This", "code",...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/repo.py#L181-L204
train
Filter out manifest patches that are related to other projects.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/repo.py
Repo._getCleanupCommand
def _getCleanupCommand(self): """also used by tests for expectations""" return textwrap.dedent("""\ set -v if [ -d .repo/manifests ] then # repo just refuse to run if manifest is messed up # so ensure we are in a known state ...
python
def _getCleanupCommand(self): """also used by tests for expectations""" return textwrap.dedent("""\ set -v if [ -d .repo/manifests ] then # repo just refuse to run if manifest is messed up # so ensure we are in a known state ...
[ "def", "_getCleanupCommand", "(", "self", ")", ":", "return", "textwrap", ".", "dedent", "(", "\"\"\"\\\n set -v\n if [ -d .repo/manifests ]\n then\n # repo just refuse to run if manifest is messed up\n # so ensure we are in a know...
also used by tests for expectations
[ "also", "used", "by", "tests", "for", "expectations" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/repo.py#L438-L461
train
returns a command that will be run when the user does not want to delete the current version of the current version of the current version of the version of the version.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/master.py
BuildMaster.getObjectId
def getObjectId(self): """ Return the object id for this master, for associating state with the master. @returns: ID, via Deferred """ # try to get the cached value if self._object_id is not None: return defer.succeed(self._object_id) # faili...
python
def getObjectId(self): """ Return the object id for this master, for associating state with the master. @returns: ID, via Deferred """ # try to get the cached value if self._object_id is not None: return defer.succeed(self._object_id) # faili...
[ "def", "getObjectId", "(", "self", ")", ":", "# try to get the cached value", "if", "self", ".", "_object_id", "is", "not", "None", ":", "return", "defer", ".", "succeed", "(", "self", ".", "_object_id", ")", "# failing that, get it from the DB; multiple calls to this...
Return the object id for this master, for associating state with the master. @returns: ID, via Deferred
[ "Return", "the", "object", "id", "for", "this", "master", "for", "associating", "state", "with", "the", "master", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/master.py#L446-L467
train
Return the object id for this master for associating state with the master.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/master.py
BuildMaster._getState
def _getState(self, name, default=None): "private wrapper around C{self.db.state.getState}" d = self.getObjectId() @d.addCallback def get(objectid): return self.db.state.getState(objectid, name, default) return d
python
def _getState(self, name, default=None): "private wrapper around C{self.db.state.getState}" d = self.getObjectId() @d.addCallback def get(objectid): return self.db.state.getState(objectid, name, default) return d
[ "def", "_getState", "(", "self", ",", "name", ",", "default", "=", "None", ")", ":", "d", "=", "self", ".", "getObjectId", "(", ")", "@", "d", ".", "addCallback", "def", "get", "(", "objectid", ")", ":", "return", "self", ".", "db", ".", "state", ...
private wrapper around C{self.db.state.getState}
[ "private", "wrapper", "around", "C", "{", "self", ".", "db", ".", "state", ".", "getState", "}" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/master.py#L469-L476
train
private wrapper around C { self. db. state. getState
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/master.py
BuildMaster._setState
def _setState(self, name, value): "private wrapper around C{self.db.state.setState}" d = self.getObjectId() @d.addCallback def set(objectid): return self.db.state.setState(objectid, name, value) return d
python
def _setState(self, name, value): "private wrapper around C{self.db.state.setState}" d = self.getObjectId() @d.addCallback def set(objectid): return self.db.state.setState(objectid, name, value) return d
[ "def", "_setState", "(", "self", ",", "name", ",", "value", ")", ":", "d", "=", "self", ".", "getObjectId", "(", ")", "@", "d", ".", "addCallback", "def", "set", "(", "objectid", ")", ":", "return", "self", ".", "db", ".", "state", ".", "setState",...
private wrapper around C{self.db.state.setState}
[ "private", "wrapper", "around", "C", "{", "self", ".", "db", ".", "state", ".", "setState", "}" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/master.py#L478-L485
train
private wrapper around C { self. db. state. setState }
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/users/users.py
createUserObject
def createUserObject(master, author, src=None): """ Take a Change author and source and translate them into a User Object, storing the user in master.db, or returning None if the src is not specified. @param master: link to Buildmaster for database operations @type master: master.Buildmaster in...
python
def createUserObject(master, author, src=None): """ Take a Change author and source and translate them into a User Object, storing the user in master.db, or returning None if the src is not specified. @param master: link to Buildmaster for database operations @type master: master.Buildmaster in...
[ "def", "createUserObject", "(", "master", ",", "author", ",", "src", "=", "None", ")", ":", "if", "not", "src", ":", "log", ".", "msg", "(", "\"No vcs information found, unable to create User Object\"", ")", "return", "defer", ".", "succeed", "(", "None", ")",...
Take a Change author and source and translate them into a User Object, storing the user in master.db, or returning None if the src is not specified. @param master: link to Buildmaster for database operations @type master: master.Buildmaster instance @param authors: Change author if string or Authz...
[ "Take", "a", "Change", "author", "and", "source", "and", "translate", "them", "into", "a", "User", "Object", "storing", "the", "user", "in", "master", ".", "db", "or", "returning", "None", "if", "the", "src", "is", "not", "specified", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/users/users.py#L32-L61
train
Create a User Object from a Change author and source and return the User Object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/users/users.py
getUserContact
def getUserContact(master, contact_types, uid): """ This is a simple getter function that returns a user attribute that matches the contact_types argument, or returns None if no uid/match is found. @param master: BuildMaster used to query the database @type master: BuildMaster instance @pa...
python
def getUserContact(master, contact_types, uid): """ This is a simple getter function that returns a user attribute that matches the contact_types argument, or returns None if no uid/match is found. @param master: BuildMaster used to query the database @type master: BuildMaster instance @pa...
[ "def", "getUserContact", "(", "master", ",", "contact_types", ",", "uid", ")", ":", "d", "=", "master", ".", "db", ".", "users", ".", "getUser", "(", "uid", ")", "d", ".", "addCallback", "(", "_extractContact", ",", "contact_types", ",", "uid", ")", "r...
This is a simple getter function that returns a user attribute that matches the contact_types argument, or returns None if no uid/match is found. @param master: BuildMaster used to query the database @type master: BuildMaster instance @param contact_types: list of contact attributes to look for in...
[ "This", "is", "a", "simple", "getter", "function", "that", "returns", "a", "user", "attribute", "that", "matches", "the", "contact_types", "argument", "or", "returns", "None", "if", "no", "uid", "/", "match", "is", "found", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/users/users.py#L78-L98
train
This is a simple getter function that returns a user attribute that matches the contact_types argument and returns None if no match is found.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/users/users.py
encrypt
def encrypt(passwd): """ Encrypts the incoming password after adding some salt to store it in the database. @param passwd: password portion of user credentials @type passwd: string @returns: encrypted/salted string """ m = sha1() salt = hexlify(os.urandom(salt_len)) m.update(un...
python
def encrypt(passwd): """ Encrypts the incoming password after adding some salt to store it in the database. @param passwd: password portion of user credentials @type passwd: string @returns: encrypted/salted string """ m = sha1() salt = hexlify(os.urandom(salt_len)) m.update(un...
[ "def", "encrypt", "(", "passwd", ")", ":", "m", "=", "sha1", "(", ")", "salt", "=", "hexlify", "(", "os", ".", "urandom", "(", "salt_len", ")", ")", "m", ".", "update", "(", "unicode2bytes", "(", "passwd", ")", "+", "salt", ")", "crypted", "=", "...
Encrypts the incoming password after adding some salt to store it in the database. @param passwd: password portion of user credentials @type passwd: string @returns: encrypted/salted string
[ "Encrypts", "the", "incoming", "password", "after", "adding", "some", "salt", "to", "store", "it", "in", "the", "database", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/users/users.py#L155-L169
train
Encrypts the incoming password after adding some salt to store it in the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/users/users.py
check_passwd
def check_passwd(guess, passwd): """ Tests to see if the guess, after salting and hashing, matches the passwd from the database. @param guess: incoming password trying to be used for authentication @param passwd: already encrypted password from the database @returns: boolean """ m = sh...
python
def check_passwd(guess, passwd): """ Tests to see if the guess, after salting and hashing, matches the passwd from the database. @param guess: incoming password trying to be used for authentication @param passwd: already encrypted password from the database @returns: boolean """ m = sh...
[ "def", "check_passwd", "(", "guess", ",", "passwd", ")", ":", "m", "=", "sha1", "(", ")", "salt", "=", "passwd", "[", ":", "salt_len", "*", "2", "]", "# salt_len * 2 due to encode('hex_codec')", "m", ".", "update", "(", "unicode2bytes", "(", "guess", ")", ...
Tests to see if the guess, after salting and hashing, matches the passwd from the database. @param guess: incoming password trying to be used for authentication @param passwd: already encrypted password from the database @returns: boolean
[ "Tests", "to", "see", "if", "the", "guess", "after", "salting", "and", "hashing", "matches", "the", "passwd", "from", "the", "database", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/users/users.py#L172-L187
train
Tests to see if the given password is the same as the given password from the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/oauth2.py
OAuth2Auth.getLoginURL
def getLoginURL(self, redirect_url): """ Returns the url to redirect the user to for user consent """ p = Properties() p.master = self.master clientId = yield p.render(self.clientId) oauth_params = {'redirect_uri': self.loginUri, 'client_id...
python
def getLoginURL(self, redirect_url): """ Returns the url to redirect the user to for user consent """ p = Properties() p.master = self.master clientId = yield p.render(self.clientId) oauth_params = {'redirect_uri': self.loginUri, 'client_id...
[ "def", "getLoginURL", "(", "self", ",", "redirect_url", ")", ":", "p", "=", "Properties", "(", ")", "p", ".", "master", "=", "self", ".", "master", "clientId", "=", "yield", "p", ".", "render", "(", "self", ".", "clientId", ")", "oauth_params", "=", ...
Returns the url to redirect the user to for user consent
[ "Returns", "the", "url", "to", "redirect", "the", "user", "to", "for", "user", "consent" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/oauth2.py#L111-L124
train
Returns the url to redirect the user to for user consent
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/gerrit.py
_handleLegacyResult
def _handleLegacyResult(result): """ make sure the result is backward compatible """ if not isinstance(result, dict): warnings.warn('The Gerrit status callback uses the old way to ' 'communicate results. The outcome might be not what is ' 'expected.')...
python
def _handleLegacyResult(result): """ make sure the result is backward compatible """ if not isinstance(result, dict): warnings.warn('The Gerrit status callback uses the old way to ' 'communicate results. The outcome might be not what is ' 'expected.')...
[ "def", "_handleLegacyResult", "(", "result", ")", ":", "if", "not", "isinstance", "(", "result", ",", "dict", ")", ":", "warnings", ".", "warn", "(", "'The Gerrit status callback uses the old way to '", "'communicate results. The outcome might be not what is '", "'expected...
make sure the result is backward compatible
[ "make", "sure", "the", "result", "is", "backward", "compatible" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/gerrit.py#L52-L64
train
Handle legacy Gerrit status callback results.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/gerrit.py
GerritStatusPush._gerritCmd
def _gerritCmd(self, *args): '''Construct a command as a list of strings suitable for :func:`subprocess.call`. ''' if self.gerrit_identity_file is not None: options = ['-i', self.gerrit_identity_file] else: options = [] return ['ssh'] + options + [...
python
def _gerritCmd(self, *args): '''Construct a command as a list of strings suitable for :func:`subprocess.call`. ''' if self.gerrit_identity_file is not None: options = ['-i', self.gerrit_identity_file] else: options = [] return ['ssh'] + options + [...
[ "def", "_gerritCmd", "(", "self", ",", "*", "args", ")", ":", "if", "self", ".", "gerrit_identity_file", "is", "not", "None", ":", "options", "=", "[", "'-i'", ",", "self", ".", "gerrit_identity_file", "]", "else", ":", "options", "=", "[", "]", "retur...
Construct a command as a list of strings suitable for :func:`subprocess.call`.
[ "Construct", "a", "command", "as", "a", "list", "of", "strings", "suitable", "for", ":", "func", ":", "subprocess", ".", "call", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/gerrit.py#L185-L197
train
Construct a command as a list of strings suitable for gerrit.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/buildrequestdistributor.py
BuildRequestDistributor.maybeStartBuildsOn
def maybeStartBuildsOn(self, new_builders): """ Try to start any builds that can be started right now. This function returns immediately, and promises to trigger those builders eventually. @param new_builders: names of new builders that should be given the opportunity t...
python
def maybeStartBuildsOn(self, new_builders): """ Try to start any builds that can be started right now. This function returns immediately, and promises to trigger those builders eventually. @param new_builders: names of new builders that should be given the opportunity t...
[ "def", "maybeStartBuildsOn", "(", "self", ",", "new_builders", ")", ":", "if", "not", "self", ".", "running", ":", "return", "d", "=", "self", ".", "_maybeStartBuildsOn", "(", "new_builders", ")", "self", ".", "_pendingMSBOCalls", ".", "append", "(", "d", ...
Try to start any builds that can be started right now. This function returns immediately, and promises to trigger those builders eventually. @param new_builders: names of new builders that should be given the opportunity to check for new requests.
[ "Try", "to", "start", "any", "builds", "that", "can", "be", "started", "right", "now", ".", "This", "function", "returns", "immediately", "and", "promises", "to", "trigger", "those", "builders", "eventually", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/buildrequestdistributor.py#L318-L338
train
A context manager that checks if any builds can be started right now.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/worker.py
CompositeStepMixin.addLogForRemoteCommands
def addLogForRemoteCommands(self, logname): """This method must be called by user classes composite steps could create several logs, this mixin functions will write to the last one. """ self.rc_log = self.addLog(logname) return self.rc_log
python
def addLogForRemoteCommands(self, logname): """This method must be called by user classes composite steps could create several logs, this mixin functions will write to the last one. """ self.rc_log = self.addLog(logname) return self.rc_log
[ "def", "addLogForRemoteCommands", "(", "self", ",", "logname", ")", ":", "self", ".", "rc_log", "=", "self", ".", "addLog", "(", "logname", ")", "return", "self", ".", "rc_log" ]
This method must be called by user classes composite steps could create several logs, this mixin functions will write to the last one.
[ "This", "method", "must", "be", "called", "by", "user", "classes", "composite", "steps", "could", "create", "several", "logs", "this", "mixin", "functions", "will", "write", "to", "the", "last", "one", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/worker.py#L236-L242
train
This method adds a log to the logstore and returns the log object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/worker.py
CompositeStepMixin.runRemoteCommand
def runRemoteCommand(self, cmd, args, abandonOnFailure=True, evaluateCommand=lambda cmd: cmd.didFail()): """generic RemoteCommand boilerplate""" cmd = remotecommand.RemoteCommand(cmd, args) if hasattr(self, "rc_log"): cmd.useLog(self.rc_log, False) d ...
python
def runRemoteCommand(self, cmd, args, abandonOnFailure=True, evaluateCommand=lambda cmd: cmd.didFail()): """generic RemoteCommand boilerplate""" cmd = remotecommand.RemoteCommand(cmd, args) if hasattr(self, "rc_log"): cmd.useLog(self.rc_log, False) d ...
[ "def", "runRemoteCommand", "(", "self", ",", "cmd", ",", "args", ",", "abandonOnFailure", "=", "True", ",", "evaluateCommand", "=", "lambda", "cmd", ":", "cmd", ".", "didFail", "(", ")", ")", ":", "cmd", "=", "remotecommand", ".", "RemoteCommand", "(", "...
generic RemoteCommand boilerplate
[ "generic", "RemoteCommand", "boilerplate" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/worker.py#L244-L258
train
generic RemoteCommand boilerplate
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/worker.py
CompositeStepMixin.runRmdir
def runRmdir(self, dir, timeout=None, **kwargs): """ remove a directory from the worker """ cmd_args = {'dir': dir, 'logEnviron': self.logEnviron} if timeout: cmd_args['timeout'] = timeout return self.runRemoteCommand('rmdir', cmd_args, **kwargs)
python
def runRmdir(self, dir, timeout=None, **kwargs): """ remove a directory from the worker """ cmd_args = {'dir': dir, 'logEnviron': self.logEnviron} if timeout: cmd_args['timeout'] = timeout return self.runRemoteCommand('rmdir', cmd_args, **kwargs)
[ "def", "runRmdir", "(", "self", ",", "dir", ",", "timeout", "=", "None", ",", "*", "*", "kwargs", ")", ":", "cmd_args", "=", "{", "'dir'", ":", "dir", ",", "'logEnviron'", ":", "self", ".", "logEnviron", "}", "if", "timeout", ":", "cmd_args", "[", ...
remove a directory from the worker
[ "remove", "a", "directory", "from", "the", "worker" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/worker.py#L260-L265
train
remove a directory from the worker
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/worker.py
CompositeStepMixin.runRmFile
def runRmFile(self, path, timeout=None, **kwargs): """ remove a file from the worker """ cmd_args = {'path': path, 'logEnviron': self.logEnviron} if timeout: cmd_args['timeout'] = timeout if self.workerVersionIsOlderThan('rmfile', '3.1'): cmd_args['dir'] = os.path...
python
def runRmFile(self, path, timeout=None, **kwargs): """ remove a file from the worker """ cmd_args = {'path': path, 'logEnviron': self.logEnviron} if timeout: cmd_args['timeout'] = timeout if self.workerVersionIsOlderThan('rmfile', '3.1'): cmd_args['dir'] = os.path...
[ "def", "runRmFile", "(", "self", ",", "path", ",", "timeout", "=", "None", ",", "*", "*", "kwargs", ")", ":", "cmd_args", "=", "{", "'path'", ":", "path", ",", "'logEnviron'", ":", "self", ".", "logEnviron", "}", "if", "timeout", ":", "cmd_args", "["...
remove a file from the worker
[ "remove", "a", "file", "from", "the", "worker" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/worker.py#L267-L275
train
remove a file from the worker
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/worker.py
CompositeStepMixin.pathExists
def pathExists(self, path): """ test whether path exists""" def commandComplete(cmd): return not cmd.didFail() return self.runRemoteCommand('stat', {'file': path, 'logEnviron': self.logEnviron, }, aba...
python
def pathExists(self, path): """ test whether path exists""" def commandComplete(cmd): return not cmd.didFail() return self.runRemoteCommand('stat', {'file': path, 'logEnviron': self.logEnviron, }, aba...
[ "def", "pathExists", "(", "self", ",", "path", ")", ":", "def", "commandComplete", "(", "cmd", ")", ":", "return", "not", "cmd", ".", "didFail", "(", ")", "return", "self", ".", "runRemoteCommand", "(", "'stat'", ",", "{", "'file'", ":", "path", ",", ...
test whether path exists
[ "test", "whether", "path", "exists" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/worker.py#L277-L285
train
test whether path exists
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/worker.py
CompositeStepMixin.runMkdir
def runMkdir(self, _dir, **kwargs): """ create a directory and its parents""" return self.runRemoteCommand('mkdir', {'dir': _dir, 'logEnviron': self.logEnviron, }, **kwargs)
python
def runMkdir(self, _dir, **kwargs): """ create a directory and its parents""" return self.runRemoteCommand('mkdir', {'dir': _dir, 'logEnviron': self.logEnviron, }, **kwargs)
[ "def", "runMkdir", "(", "self", ",", "_dir", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "runRemoteCommand", "(", "'mkdir'", ",", "{", "'dir'", ":", "_dir", ",", "'logEnviron'", ":", "self", ".", "logEnviron", ",", "}", ",", "*", "*", ...
create a directory and its parents
[ "create", "a", "directory", "and", "its", "parents" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/worker.py#L287-L291
train
create a directory and its parents
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/worker.py
CompositeStepMixin.runGlob
def runGlob(self, path, **kwargs): """ find files matching a shell-style pattern""" def commandComplete(cmd): return cmd.updates['files'][-1] return self.runRemoteCommand('glob', {'path': path, 'logEnviron': self.logEnviron, }, ...
python
def runGlob(self, path, **kwargs): """ find files matching a shell-style pattern""" def commandComplete(cmd): return cmd.updates['files'][-1] return self.runRemoteCommand('glob', {'path': path, 'logEnviron': self.logEnviron, }, ...
[ "def", "runGlob", "(", "self", ",", "path", ",", "*", "*", "kwargs", ")", ":", "def", "commandComplete", "(", "cmd", ")", ":", "return", "cmd", ".", "updates", "[", "'files'", "]", "[", "-", "1", "]", "return", "self", ".", "runRemoteCommand", "(", ...
find files matching a shell-style pattern
[ "find", "files", "matching", "a", "shell", "-", "style", "pattern" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/worker.py#L293-L300
train
find files matching a shell - style pattern
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/worker_transition.py
_compat_name
def _compat_name(new_name, compat_name=None): """Returns old API ("slave") name for new name ("worker"). >>> assert _compat_name("Worker") == "Slave" >>> assert _compat_name("SomeWorkerStuff") == "SomeSlaveStuff" >>> assert _compat_name("SomeWorker", compat_name="SomeBuildSlave") == \ "SomeBuil...
python
def _compat_name(new_name, compat_name=None): """Returns old API ("slave") name for new name ("worker"). >>> assert _compat_name("Worker") == "Slave" >>> assert _compat_name("SomeWorkerStuff") == "SomeSlaveStuff" >>> assert _compat_name("SomeWorker", compat_name="SomeBuildSlave") == \ "SomeBuil...
[ "def", "_compat_name", "(", "new_name", ",", "compat_name", "=", "None", ")", ":", "if", "compat_name", "is", "not", "None", ":", "assert", "\"slave\"", "in", "compat_name", ".", "lower", "(", ")", "assert", "new_name", "==", "\"\"", "or", "\"worker\"", "i...
Returns old API ("slave") name for new name ("worker"). >>> assert _compat_name("Worker") == "Slave" >>> assert _compat_name("SomeWorkerStuff") == "SomeSlaveStuff" >>> assert _compat_name("SomeWorker", compat_name="SomeBuildSlave") == \ "SomeBuildSlave" If `compat_name` is not specified old na...
[ "Returns", "old", "API", "(", "slave", ")", "name", "for", "new", "name", "(", "worker", ")", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker_transition.py#L37-L74
train
Returns old API name for new name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/worker_transition.py
reportDeprecatedWorkerNameUsage
def reportDeprecatedWorkerNameUsage(message, stacklevel=None, filename=None, lineno=None): """Hook that is ran when old API name is used. :param stacklevel: stack level relative to the caller's frame. Defaults to caller of the caller of this function. """ if fil...
python
def reportDeprecatedWorkerNameUsage(message, stacklevel=None, filename=None, lineno=None): """Hook that is ran when old API name is used. :param stacklevel: stack level relative to the caller's frame. Defaults to caller of the caller of this function. """ if fil...
[ "def", "reportDeprecatedWorkerNameUsage", "(", "message", ",", "stacklevel", "=", "None", ",", "filename", "=", "None", ",", "lineno", "=", "None", ")", ":", "if", "filename", "is", "None", ":", "if", "stacklevel", "is", "None", ":", "# Warning will refer to t...
Hook that is ran when old API name is used. :param stacklevel: stack level relative to the caller's frame. Defaults to caller of the caller of this function.
[ "Hook", "that", "is", "ran", "when", "old", "API", "name", "is", "used", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker_transition.py#L102-L128
train
Hook that is ran when old API name is used.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/worker_transition.py
setupWorkerTransition
def setupWorkerTransition(): """Hook Twisted deprecation machinery to use custom warning class for Worker API deprecation warnings.""" default_warn_method = getWarningMethod() def custom_warn_method(message, category, stacklevel): if stacklevel is not None: stacklevel += 1 ...
python
def setupWorkerTransition(): """Hook Twisted deprecation machinery to use custom warning class for Worker API deprecation warnings.""" default_warn_method = getWarningMethod() def custom_warn_method(message, category, stacklevel): if stacklevel is not None: stacklevel += 1 ...
[ "def", "setupWorkerTransition", "(", ")", ":", "default_warn_method", "=", "getWarningMethod", "(", ")", "def", "custom_warn_method", "(", "message", ",", "category", ",", "stacklevel", ")", ":", "if", "stacklevel", "is", "not", "None", ":", "stacklevel", "+=", ...
Hook Twisted deprecation machinery to use custom warning class for Worker API deprecation warnings.
[ "Hook", "Twisted", "deprecation", "machinery", "to", "use", "custom", "warning", "class", "for", "Worker", "API", "deprecation", "warnings", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker_transition.py#L131-L150
train
Hook Twisted deprecation machinery to use custom warning class for Worker API deprecation warnings.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/git.py
Git._fetchOrFallback
def _fetchOrFallback(self, _=None): """ Handles fallbacks for failure of fetch, wrapper for self._fetch """ res = yield self._fetch(None) if res == RC_SUCCESS: return res elif self.retryFetch: yield self._fetch(None) elif self.clobb...
python
def _fetchOrFallback(self, _=None): """ Handles fallbacks for failure of fetch, wrapper for self._fetch """ res = yield self._fetch(None) if res == RC_SUCCESS: return res elif self.retryFetch: yield self._fetch(None) elif self.clobb...
[ "def", "_fetchOrFallback", "(", "self", ",", "_", "=", "None", ")", ":", "res", "=", "yield", "self", ".", "_fetch", "(", "None", ")", "if", "res", "==", "RC_SUCCESS", ":", "return", "res", "elif", "self", ".", "retryFetch", ":", "yield", "self", "."...
Handles fallbacks for failure of fetch, wrapper for self._fetch
[ "Handles", "fallbacks", "for", "failure", "of", "fetch", "wrapper", "for", "self", ".", "_fetch" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/git.py#L348-L361
train
Handles fetch failure of fetch and fallback for failure of fetch
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/git.py
Git._clone
def _clone(self, shallowClone): """Retry if clone failed""" command = ['clone'] switchToBranch = False if self.supportsBranch and self.branch != 'HEAD': if self.branch.startswith('refs/'): # we can't choose this branch from 'git clone' directly; we ...
python
def _clone(self, shallowClone): """Retry if clone failed""" command = ['clone'] switchToBranch = False if self.supportsBranch and self.branch != 'HEAD': if self.branch.startswith('refs/'): # we can't choose this branch from 'git clone' directly; we ...
[ "def", "_clone", "(", "self", ",", "shallowClone", ")", ":", "command", "=", "[", "'clone'", "]", "switchToBranch", "=", "False", "if", "self", ".", "supportsBranch", "and", "self", ".", "branch", "!=", "'HEAD'", ":", "if", "self", ".", "branch", ".", ...
Retry if clone failed
[ "Retry", "if", "clone", "failed" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/git.py#L364-L411
train
Do a shallow clone of the current object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/git.py
Git._fullClone
def _fullClone(self, shallowClone=False): """Perform full clone and checkout to the revision if specified In the case of shallow clones if any of the step fail abort whole build step. """ res = yield self._clone(shallowClone) if res != RC_SUCCESS: return res ...
python
def _fullClone(self, shallowClone=False): """Perform full clone and checkout to the revision if specified In the case of shallow clones if any of the step fail abort whole build step. """ res = yield self._clone(shallowClone) if res != RC_SUCCESS: return res ...
[ "def", "_fullClone", "(", "self", ",", "shallowClone", "=", "False", ")", ":", "res", "=", "yield", "self", ".", "_clone", "(", "shallowClone", ")", "if", "res", "!=", "RC_SUCCESS", ":", "return", "res", "# If revision specified checkout that revision", "if", ...
Perform full clone and checkout to the revision if specified In the case of shallow clones if any of the step fail abort whole build step.
[ "Perform", "full", "clone", "and", "checkout", "to", "the", "revision", "if", "specified", "In", "the", "case", "of", "shallow", "clones", "if", "any", "of", "the", "step", "fail", "abort", "whole", "build", "step", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/git.py#L414-L434
train
Perform full clone and checkout to the revision if specified.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/git.py
Git._fullCloneOrFallback
def _fullCloneOrFallback(self): """Wrapper for _fullClone(). In the case of failure, if clobberOnFailure is set to True remove the build directory and try a full clone again. """ res = yield self._fullClone() if res != RC_SUCCESS: if not self.clobberOnFailure: ...
python
def _fullCloneOrFallback(self): """Wrapper for _fullClone(). In the case of failure, if clobberOnFailure is set to True remove the build directory and try a full clone again. """ res = yield self._fullClone() if res != RC_SUCCESS: if not self.clobberOnFailure: ...
[ "def", "_fullCloneOrFallback", "(", "self", ")", ":", "res", "=", "yield", "self", ".", "_fullClone", "(", ")", "if", "res", "!=", "RC_SUCCESS", ":", "if", "not", "self", ".", "clobberOnFailure", ":", "raise", "buildstep", ".", "BuildStepFailed", "(", ")",...
Wrapper for _fullClone(). In the case of failure, if clobberOnFailure is set to True remove the build directory and try a full clone again.
[ "Wrapper", "for", "_fullClone", "()", ".", "In", "the", "case", "of", "failure", "if", "clobberOnFailure", "is", "set", "to", "True", "remove", "the", "build", "directory", "and", "try", "a", "full", "clone", "again", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/git.py#L437-L447
train
Wrapper for _fullCloneOrFallback.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/source/git.py
Git._doClobber
def _doClobber(self): """Remove the work directory""" rc = yield self.runRmdir(self.workdir, timeout=self.timeout) if rc != RC_SUCCESS: raise RuntimeError("Failed to delete directory") return rc
python
def _doClobber(self): """Remove the work directory""" rc = yield self.runRmdir(self.workdir, timeout=self.timeout) if rc != RC_SUCCESS: raise RuntimeError("Failed to delete directory") return rc
[ "def", "_doClobber", "(", "self", ")", ":", "rc", "=", "yield", "self", ".", "runRmdir", "(", "self", ".", "workdir", ",", "timeout", "=", "self", ".", "timeout", ")", "if", "rc", "!=", "RC_SUCCESS", ":", "raise", "RuntimeError", "(", "\"Failed to delete...
Remove the work directory
[ "Remove", "the", "work", "directory" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/git.py#L450-L455
train
Remove the work directory and return the rc
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/hooks/bitbucket.py
BitBucketHandler.getChanges
def getChanges(self, request): """Catch a POST request from BitBucket and start a build process Check the URL below if you require more information about payload https://confluence.atlassian.com/display/BITBUCKET/POST+Service+Management :param request: the http request Twisted object ...
python
def getChanges(self, request): """Catch a POST request from BitBucket and start a build process Check the URL below if you require more information about payload https://confluence.atlassian.com/display/BITBUCKET/POST+Service+Management :param request: the http request Twisted object ...
[ "def", "getChanges", "(", "self", ",", "request", ")", ":", "event_type", "=", "request", ".", "getHeader", "(", "_HEADER_EVENT", ")", "event_type", "=", "bytes2unicode", "(", "event_type", ")", "payload", "=", "json", ".", "loads", "(", "bytes2unicode", "("...
Catch a POST request from BitBucket and start a build process Check the URL below if you require more information about payload https://confluence.atlassian.com/display/BITBUCKET/POST+Service+Management :param request: the http request Twisted object :param options: additional options
[ "Catch", "a", "POST", "request", "from", "BitBucket", "and", "start", "a", "build", "process" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/hooks/bitbucket.py#L32-L69
train
Catch a POST request from BitBucket and start a build process
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/data/buildrequests.py
Db2DataMixin._generate_filtered_properties
def _generate_filtered_properties(self, props, filters): """ This method returns Build's properties according to property filters. :param props: Properties as a dict (from db) :param filters: Desired properties keys as a list (from API URI) """ # by default no properties...
python
def _generate_filtered_properties(self, props, filters): """ This method returns Build's properties according to property filters. :param props: Properties as a dict (from db) :param filters: Desired properties keys as a list (from API URI) """ # by default no properties...
[ "def", "_generate_filtered_properties", "(", "self", ",", "props", ",", "filters", ")", ":", "# by default no properties are returned", "if", "props", "and", "filters", ":", "return", "(", "props", "if", "'*'", "in", "filters", "else", "dict", "(", "(", "(", "...
This method returns Build's properties according to property filters. :param props: Properties as a dict (from db) :param filters: Desired properties keys as a list (from API URI)
[ "This", "method", "returns", "Build", "s", "properties", "according", "to", "property", "filters", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/data/buildrequests.py#L28-L39
train
This method returns Build s properties according to property filters.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/secrets/providers/vault.py
HashiCorpVaultSecretProvider.get
def get(self, entry): """ get the value from vault secret backend """ if self.apiVersion == 1: path = self.secretsmount + '/' + entry else: path = self.secretsmount + '/data/' + entry # note that the HTTP path contains v1 for both versions of the ...
python
def get(self, entry): """ get the value from vault secret backend """ if self.apiVersion == 1: path = self.secretsmount + '/' + entry else: path = self.secretsmount + '/data/' + entry # note that the HTTP path contains v1 for both versions of the ...
[ "def", "get", "(", "self", ",", "entry", ")", ":", "if", "self", ".", "apiVersion", "==", "1", ":", "path", "=", "self", ".", "secretsmount", "+", "'/'", "+", "entry", "else", ":", "path", "=", "self", ".", "secretsmount", "+", "'/data/'", "+", "en...
get the value from vault secret backend
[ "get", "the", "value", "from", "vault", "secret", "backend" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/secrets/providers/vault.py#L59-L82
train
Get the value of a key from vault secret backend
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/gerrit_verify_status.py
GerritVerifyStatusPush.createStatus
def createStatus(self, change_id, revision_id, name, value, abstain=None, rerun=None, comment=None, url=None, reporter=None, ...
python
def createStatus(self, change_id, revision_id, name, value, abstain=None, rerun=None, comment=None, url=None, reporter=None, ...
[ "def", "createStatus", "(", "self", ",", "change_id", ",", "revision_id", ",", "name", ",", "value", ",", "abstain", "=", "None", ",", "rerun", "=", "None", ",", "comment", "=", "None", ",", "url", "=", "None", ",", "reporter", "=", "None", ",", "cat...
Abstract the POST REST api documented here: https://gerrit.googlesource.com/plugins/verify-status/+/master/src/main/resources/Documentation/rest-api-changes.md :param change_id: The change_id for the change tested (can be in the long form e.g: myProject~master~I8473b95934b5732ac55d26311a706...
[ "Abstract", "the", "POST", "REST", "api", "documented", "here", ":", "https", ":", "//", "gerrit", ".", "googlesource", ".", "com", "/", "plugins", "/", "verify", "-", "status", "/", "+", "/", "master", "/", "src", "/", "main", "/", "resources", "/", ...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/gerrit_verify_status.py#L82-L149
train
Create a status object for a specific job.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/gerrit_verify_status.py
GerritVerifyStatusPush.formatDuration
def formatDuration(self, duration): """Format the duration. This method could be overridden if really needed, as the duration format in gerrit is an arbitrary string. :param duration: duration in timedelta """ days = duration.days hours, remainder = divmod(durati...
python
def formatDuration(self, duration): """Format the duration. This method could be overridden if really needed, as the duration format in gerrit is an arbitrary string. :param duration: duration in timedelta """ days = duration.days hours, remainder = divmod(durati...
[ "def", "formatDuration", "(", "self", ",", "duration", ")", ":", "days", "=", "duration", ".", "days", "hours", ",", "remainder", "=", "divmod", "(", "duration", ".", "seconds", ",", "3600", ")", "minutes", ",", "seconds", "=", "divmod", "(", "remainder"...
Format the duration. This method could be overridden if really needed, as the duration format in gerrit is an arbitrary string. :param duration: duration in timedelta
[ "Format", "the", "duration", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/gerrit_verify_status.py#L151-L166
train
Format the duration in gerrit
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/gerrit_verify_status.py
GerritVerifyStatusPush.getGerritChanges
def getGerritChanges(props): """ Get the gerrit changes This method could be overridden if really needed to accommodate for other custom steps method for fetching gerrit changes. :param props: an IProperty :return: (optionally via deferred) a list of dictionary...
python
def getGerritChanges(props): """ Get the gerrit changes This method could be overridden if really needed to accommodate for other custom steps method for fetching gerrit changes. :param props: an IProperty :return: (optionally via deferred) a list of dictionary...
[ "def", "getGerritChanges", "(", "props", ")", ":", "if", "'gerrit_changes'", "in", "props", ":", "return", "props", ".", "getProperty", "(", "'gerrit_changes'", ")", "if", "'event.change.number'", "in", "props", ":", "return", "[", "{", "'change_id'", ":", "pr...
Get the gerrit changes This method could be overridden if really needed to accommodate for other custom steps method for fetching gerrit changes. :param props: an IProperty :return: (optionally via deferred) a list of dictionary with at list change_id, ...
[ "Get", "the", "gerrit", "changes" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/gerrit_verify_status.py#L169-L190
train
Get the gerrit changes for a specific object
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/scripts/windows_service.py
DetermineRunner
def DetermineRunner(bbdir): '''Checks if the given directory is a buildbot worker or a master and returns the appropriate run function.''' try: import buildbot_worker.scripts.runner tacfile = os.path.join(bbdir, 'buildbot.tac') if os.path.exists(tacfile): with open(tacfi...
python
def DetermineRunner(bbdir): '''Checks if the given directory is a buildbot worker or a master and returns the appropriate run function.''' try: import buildbot_worker.scripts.runner tacfile = os.path.join(bbdir, 'buildbot.tac') if os.path.exists(tacfile): with open(tacfi...
[ "def", "DetermineRunner", "(", "bbdir", ")", ":", "try", ":", "import", "buildbot_worker", ".", "scripts", ".", "runner", "tacfile", "=", "os", ".", "path", ".", "join", "(", "bbdir", ",", "'buildbot.tac'", ")", "if", "os", ".", "path", ".", "exists", ...
Checks if the given directory is a buildbot worker or a master and returns the appropriate run function.
[ "Checks", "if", "the", "given", "directory", "is", "a", "buildbot", "worker", "or", "a", "master", "and", "returns", "the", "appropriate", "run", "function", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/scripts/windows_service.py#L584-L602
train
Checks if the given directory is a buildbot worker or a master and returns the appropriate run function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/db/logs.py
LogsConnectorComponent._splitBigChunk
def _splitBigChunk(self, content, logid): """ Split CONTENT on a line boundary into a prefix smaller than 64k and a suffix containing the remainder, omitting the splitting newline. """ # if it's small enough, just return it if len(content) < self.MAX_CHUNK_SIZE: ...
python
def _splitBigChunk(self, content, logid): """ Split CONTENT on a line boundary into a prefix smaller than 64k and a suffix containing the remainder, omitting the splitting newline. """ # if it's small enough, just return it if len(content) < self.MAX_CHUNK_SIZE: ...
[ "def", "_splitBigChunk", "(", "self", ",", "content", ",", "logid", ")", ":", "# if it's small enough, just return it", "if", "len", "(", "content", ")", "<", "self", ".", "MAX_CHUNK_SIZE", ":", "return", "content", ",", "None", "# find the last newline before the l...
Split CONTENT on a line boundary into a prefix smaller than 64k and a suffix containing the remainder, omitting the splitting newline.
[ "Split", "CONTENT", "on", "a", "line", "boundary", "into", "a", "prefix", "smaller", "than", "64k", "and", "a", "suffix", "containing", "the", "remainder", "omitting", "the", "splitting", "newline", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/logs.py#L220-L249
train
Split the content into smaller than self. MAX_CHUNK_SIZE and return the remainder of the next line.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/service.py
BuildbotSession.updateSession
def updateSession(self, request): """ Update the cookie after session object was modified @param request: the request object which should get a new cookie """ # we actually need to copy some hardcoded constants from twisted :-( # Make sure we aren't creating a secure ses...
python
def updateSession(self, request): """ Update the cookie after session object was modified @param request: the request object which should get a new cookie """ # we actually need to copy some hardcoded constants from twisted :-( # Make sure we aren't creating a secure ses...
[ "def", "updateSession", "(", "self", ",", "request", ")", ":", "# we actually need to copy some hardcoded constants from twisted :-(", "# Make sure we aren't creating a secure session on a non-secure page", "secure", "=", "request", ".", "isSecure", "(", ")", "if", "not", "secu...
Update the cookie after session object was modified @param request: the request object which should get a new cookie
[ "Update", "the", "cookie", "after", "session", "object", "was", "modified" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/service.py#L91-L108
train
Update the cookie after the session object was modified.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/service.py
BuildbotSession.uid
def uid(self): """uid is now generated automatically according to the claims. This should actually only be used for cookie generation """ exp = datetime.datetime.utcnow() + self.expDelay claims = { 'user_info': self.user_info, # Note that we use JWT stand...
python
def uid(self): """uid is now generated automatically according to the claims. This should actually only be used for cookie generation """ exp = datetime.datetime.utcnow() + self.expDelay claims = { 'user_info': self.user_info, # Note that we use JWT stand...
[ "def", "uid", "(", "self", ")", ":", "exp", "=", "datetime", ".", "datetime", ".", "utcnow", "(", ")", "+", "self", ".", "expDelay", "claims", "=", "{", "'user_info'", ":", "self", ".", "user_info", ",", "# Note that we use JWT standard 'exp' field to implemen...
uid is now generated automatically according to the claims. This should actually only be used for cookie generation
[ "uid", "is", "now", "generated", "automatically", "according", "to", "the", "claims", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/service.py#L122-L134
train
Returns the uid of the current user
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/scripts/create_worker.py
_makeBaseDir
def _makeBaseDir(basedir, quiet): """ Make worker base directory if needed. @param basedir: worker base directory relative path @param quiet: if True, don't print info messages @raise CreateWorkerError: on error making base directory """ if os.path.exists(basedir): if not quiet: ...
python
def _makeBaseDir(basedir, quiet): """ Make worker base directory if needed. @param basedir: worker base directory relative path @param quiet: if True, don't print info messages @raise CreateWorkerError: on error making base directory """ if os.path.exists(basedir): if not quiet: ...
[ "def", "_makeBaseDir", "(", "basedir", ",", "quiet", ")", ":", "if", "os", ".", "path", ".", "exists", "(", "basedir", ")", ":", "if", "not", "quiet", ":", "print", "(", "\"updating existing installation\"", ")", "return", "if", "not", "quiet", ":", "pri...
Make worker base directory if needed. @param basedir: worker base directory relative path @param quiet: if True, don't print info messages @raise CreateWorkerError: on error making base directory
[ "Make", "worker", "base", "directory", "if", "needed", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/scripts/create_worker.py#L77-L98
train
Make base directory if needed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/scripts/create_worker.py
_makeBuildbotTac
def _makeBuildbotTac(basedir, tac_file_contents, quiet): """ Create buildbot.tac file. If buildbot.tac file already exists with different contents, create buildbot.tac.new instead. @param basedir: worker base directory relative path @param tac_file_contents: contents of buildbot.tac file to write ...
python
def _makeBuildbotTac(basedir, tac_file_contents, quiet): """ Create buildbot.tac file. If buildbot.tac file already exists with different contents, create buildbot.tac.new instead. @param basedir: worker base directory relative path @param tac_file_contents: contents of buildbot.tac file to write ...
[ "def", "_makeBuildbotTac", "(", "basedir", ",", "tac_file_contents", ",", "quiet", ")", ":", "tacfile", "=", "os", ".", "path", ".", "join", "(", "basedir", ",", "\"buildbot.tac\"", ")", "if", "os", ".", "path", ".", "exists", "(", "tacfile", ")", ":", ...
Create buildbot.tac file. If buildbot.tac file already exists with different contents, create buildbot.tac.new instead. @param basedir: worker base directory relative path @param tac_file_contents: contents of buildbot.tac file to write @param quiet: if True, don't print info messages @raise Creat...
[ "Create", "buildbot", ".", "tac", "file", ".", "If", "buildbot", ".", "tac", "file", "already", "exists", "with", "different", "contents", "create", "buildbot", ".", "tac", ".", "new", "instead", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/scripts/create_worker.py#L101-L139
train
Create buildbot. tac file. If buildbot. tac file already exists with different contents create buildbot. tac. new instead.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/scripts/create_worker.py
_makeInfoFiles
def _makeInfoFiles(basedir, quiet): """ Create info/* files inside basedir. @param basedir: worker base directory relative path @param quiet: if True, don't print info messages @raise CreateWorkerError: on error making info directory or writing info files """ ...
python
def _makeInfoFiles(basedir, quiet): """ Create info/* files inside basedir. @param basedir: worker base directory relative path @param quiet: if True, don't print info messages @raise CreateWorkerError: on error making info directory or writing info files """ ...
[ "def", "_makeInfoFiles", "(", "basedir", ",", "quiet", ")", ":", "def", "createFile", "(", "path", ",", "file", ",", "contents", ")", ":", "filepath", "=", "os", ".", "path", ".", "join", "(", "path", ",", "file", ")", "if", "os", ".", "path", ".",...
Create info/* files inside basedir. @param basedir: worker base directory relative path @param quiet: if True, don't print info messages @raise CreateWorkerError: on error making info directory or writing info files
[ "Create", "info", "/", "*", "files", "inside", "basedir", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/scripts/create_worker.py#L142-L195
train
Create info files inside a worker base directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/bitbucket.py
BitbucketStatusPush.get_owner_and_repo
def get_owner_and_repo(repourl): """ Takes a git repository URL from Bitbucket and tries to determine the owner and repository name :param repourl: Bitbucket git repo in the form of git@bitbucket.com:OWNER/REPONAME.git https://bitbucket.com/OWNER/REPONAME....
python
def get_owner_and_repo(repourl): """ Takes a git repository URL from Bitbucket and tries to determine the owner and repository name :param repourl: Bitbucket git repo in the form of git@bitbucket.com:OWNER/REPONAME.git https://bitbucket.com/OWNER/REPONAME....
[ "def", "get_owner_and_repo", "(", "repourl", ")", ":", "parsed", "=", "urlparse", "(", "repourl", ")", "if", "parsed", ".", "scheme", ":", "path", "=", "parsed", ".", "path", "[", "1", ":", "]", "else", ":", "# we assume git@host:owner/repo.git here", "path"...
Takes a git repository URL from Bitbucket and tries to determine the owner and repository name :param repourl: Bitbucket git repo in the form of git@bitbucket.com:OWNER/REPONAME.git https://bitbucket.com/OWNER/REPONAME.git ssh://git@bitbucket.com/OWNER...
[ "Takes", "a", "git", "repository", "URL", "from", "Bitbucket", "and", "tries", "to", "determine", "the", "owner", "and", "repository", "name", ":", "param", "repourl", ":", "Bitbucket", "git", "repo", "in", "the", "form", "of", "git" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/bitbucket.py#L103-L129
train
Takes a git repository URL and tries to determine the owner and repository name of the repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/db/changes.py
ChangesConnectorComponent.pruneChanges
def pruneChanges(self, changeHorizon): """ Called periodically by DBConnector, this method deletes changes older than C{changeHorizon}. """ if not changeHorizon: return None def thd(conn): changes_tbl = self.db.model.changes # First,...
python
def pruneChanges(self, changeHorizon): """ Called periodically by DBConnector, this method deletes changes older than C{changeHorizon}. """ if not changeHorizon: return None def thd(conn): changes_tbl = self.db.model.changes # First,...
[ "def", "pruneChanges", "(", "self", ",", "changeHorizon", ")", ":", "if", "not", "changeHorizon", ":", "return", "None", "def", "thd", "(", "conn", ")", ":", "changes_tbl", "=", "self", ".", "db", ".", "model", ".", "changes", "# First, get the list of chang...
Called periodically by DBConnector, this method deletes changes older than C{changeHorizon}.
[ "Called", "periodically", "by", "DBConnector", "this", "method", "deletes", "changes", "older", "than", "C", "{", "changeHorizon", "}", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/changes.py#L309-L341
train
Prune all changes older than the given changeHorizon.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/scripts/base.py
checkPidFile
def checkPidFile(pidfile): """ mostly comes from _twistd_unix.py which is not twisted public API :-/ except it returns an exception instead of exiting """ if os.path.exists(pidfile): try: with open(pidfile) as f: pid = int(f.read()) except ValueError: ...
python
def checkPidFile(pidfile): """ mostly comes from _twistd_unix.py which is not twisted public API :-/ except it returns an exception instead of exiting """ if os.path.exists(pidfile): try: with open(pidfile) as f: pid = int(f.read()) except ValueError: ...
[ "def", "checkPidFile", "(", "pidfile", ")", ":", "if", "os", ".", "path", ".", "exists", "(", "pidfile", ")", ":", "try", ":", "with", "open", "(", "pidfile", ")", "as", "f", ":", "pid", "=", "int", "(", "f", ".", "read", "(", ")", ")", "except...
mostly comes from _twistd_unix.py which is not twisted public API :-/ except it returns an exception instead of exiting
[ "mostly", "comes", "from", "_twistd_unix", ".", "py", "which", "is", "not", "twisted", "public", "API", ":", "-", "/" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/scripts/base.py#L44-L66
train
checks if a pidfile exists and if it exists kills it if it exists
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/scripts/base.py
SubcommandOptions.loadOptionsFile
def loadOptionsFile(self, _here=None): """Find the .buildbot/options file. Crawl from the current directory up towards the root, and also look in ~/.buildbot . The first directory that's owned by the user and has the file we're looking for wins. Windows skips the owned-by-user test. ...
python
def loadOptionsFile(self, _here=None): """Find the .buildbot/options file. Crawl from the current directory up towards the root, and also look in ~/.buildbot . The first directory that's owned by the user and has the file we're looking for wins. Windows skips the owned-by-user test. ...
[ "def", "loadOptionsFile", "(", "self", ",", "_here", "=", "None", ")", ":", "here", "=", "_here", "or", "os", ".", "path", ".", "abspath", "(", "os", ".", "getcwd", "(", ")", ")", "if", "runtime", ".", "platformType", "==", "'win32'", ":", "# never t...
Find the .buildbot/options file. Crawl from the current directory up towards the root, and also look in ~/.buildbot . The first directory that's owned by the user and has the file we're looking for wins. Windows skips the owned-by-user test. @rtype: dict @return: a dictionary o...
[ "Find", "the", ".", "buildbot", "/", "options", "file", ".", "Crawl", "from", "the", "current", "directory", "up", "towards", "the", "root", "and", "also", "look", "in", "~", "/", ".", "buildbot", ".", "The", "first", "directory", "that", "s", "owned", ...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/scripts/base.py#L205-L264
train
Load the options file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/pbutil.py
AutoLoginPBFactory.failedToGetPerspective
def failedToGetPerspective(self, why, broker): """The login process failed, most likely because of an authorization failure (bad password), but it is also possible that we lost the new connection before we managed to send our credentials. """ log.msg("ReconnectingPBClientFactory....
python
def failedToGetPerspective(self, why, broker): """The login process failed, most likely because of an authorization failure (bad password), but it is also possible that we lost the new connection before we managed to send our credentials. """ log.msg("ReconnectingPBClientFactory....
[ "def", "failedToGetPerspective", "(", "self", ",", "why", ",", "broker", ")", ":", "log", ".", "msg", "(", "\"ReconnectingPBClientFactory.failedToGetPerspective\"", ")", "# put something useful in the logs", "if", "why", ".", "check", "(", "pb", ".", "PBConnectionLost...
The login process failed, most likely because of an authorization failure (bad password), but it is also possible that we lost the new connection before we managed to send our credentials.
[ "The", "login", "process", "failed", "most", "likely", "because", "of", "an", "authorization", "failure", "(", "bad", "password", ")", "but", "it", "is", "also", "possible", "that", "we", "lost", "the", "new", "connection", "before", "we", "managed", "to", ...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/pbutil.py#L84-L103
train
This function is called when the client attempts to get a new persistent key from the broker.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/gitlab.py
GitLabStatusPush.createStatus
def createStatus(self, project_id, branch, sha, state, target_url=None, description=None, context=None): """ :param project_id: Project ID from GitLab :param branch: Branch name to create the status for. :param sha: Full sha to create the status ...
python
def createStatus(self, project_id, branch, sha, state, target_url=None, description=None, context=None): """ :param project_id: Project ID from GitLab :param branch: Branch name to create the status for. :param sha: Full sha to create the status ...
[ "def", "createStatus", "(", "self", ",", "project_id", ",", "branch", ",", "sha", ",", "state", ",", "target_url", "=", "None", ",", "description", "=", "None", ",", "context", "=", "None", ")", ":", "payload", "=", "{", "'state'", ":", "state", ",", ...
:param project_id: Project ID from GitLab :param branch: Branch name to create the status for. :param sha: Full sha to create the status for. :param state: one of the following 'pending', 'success', 'failed' or 'cancelled'. :param target_url: Target url to associate...
[ ":", "param", "project_id", ":", "Project", "ID", "from", "GitLab", ":", "param", "branch", ":", "Branch", "name", "to", "create", "the", "status", "for", ".", ":", "param", "sha", ":", "Full", "sha", "to", "create", "the", "status", "for", ".", ":", ...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/gitlab.py#L63-L91
train
Creates a status for a branch.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/buildrequest.py
BuildRequest.fromBrdict
def fromBrdict(cls, master, brdict): """ Construct a new L{BuildRequest} from a dictionary as returned by L{BuildRequestsConnectorComponent.getBuildRequest}. This method uses a cache, which may result in return of stale objects; for the most up-to-date information, use the datab...
python
def fromBrdict(cls, master, brdict): """ Construct a new L{BuildRequest} from a dictionary as returned by L{BuildRequestsConnectorComponent.getBuildRequest}. This method uses a cache, which may result in return of stale objects; for the most up-to-date information, use the datab...
[ "def", "fromBrdict", "(", "cls", ",", "master", ",", "brdict", ")", ":", "cache", "=", "master", ".", "caches", ".", "get_cache", "(", "\"BuildRequests\"", ",", "cls", ".", "_make_br", ")", "return", "cache", ".", "get", "(", "brdict", "[", "'buildreques...
Construct a new L{BuildRequest} from a dictionary as returned by L{BuildRequestsConnectorComponent.getBuildRequest}. This method uses a cache, which may result in return of stale objects; for the most up-to-date information, use the database connector methods. @param master: cu...
[ "Construct", "a", "new", "L", "{", "BuildRequest", "}", "from", "a", "dictionary", "as", "returned", "by", "L", "{", "BuildRequestsConnectorComponent", ".", "getBuildRequest", "}", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/buildrequest.py#L196-L211
train
Construct a new build request from a dictionary as returned by .
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/buildrequest.py
BuildRequest.canBeCollapsed
def canBeCollapsed(master, br1, br2): """ Returns true if both buildrequest can be merged, via Deferred. This implements Buildbot's default collapse strategy. """ # short-circuit: if these are for the same buildset, collapse away if br1['buildsetid'] == br2['buildsetid']...
python
def canBeCollapsed(master, br1, br2): """ Returns true if both buildrequest can be merged, via Deferred. This implements Buildbot's default collapse strategy. """ # short-circuit: if these are for the same buildset, collapse away if br1['buildsetid'] == br2['buildsetid']...
[ "def", "canBeCollapsed", "(", "master", ",", "br1", ",", "br2", ")", ":", "# short-circuit: if these are for the same buildset, collapse away", "if", "br1", "[", "'buildsetid'", "]", "==", "br2", "[", "'buildsetid'", "]", ":", "return", "True", "# get the buidlsets fo...
Returns true if both buildrequest can be merged, via Deferred. This implements Buildbot's default collapse strategy.
[ "Returns", "true", "if", "both", "buildrequest", "can", "be", "merged", "via", "Deferred", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/buildrequest.py#L253-L309
train
Returns True if both buildrequests can be merged via Deferred.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/buildrequest.py
BuildRequest.mergeSourceStampsWith
def mergeSourceStampsWith(self, others): """ Returns one merged sourcestamp for every codebase """ # get all codebases from all requests all_codebases = set(self.sources) for other in others: all_codebases |= set(other.sources) all_merged_sources = {} # walk ...
python
def mergeSourceStampsWith(self, others): """ Returns one merged sourcestamp for every codebase """ # get all codebases from all requests all_codebases = set(self.sources) for other in others: all_codebases |= set(other.sources) all_merged_sources = {} # walk ...
[ "def", "mergeSourceStampsWith", "(", "self", ",", "others", ")", ":", "# get all codebases from all requests", "all_codebases", "=", "set", "(", "self", ".", "sources", ")", "for", "other", "in", "others", ":", "all_codebases", "|=", "set", "(", "other", ".", ...
Returns one merged sourcestamp for every codebase
[ "Returns", "one", "merged", "sourcestamp", "for", "every", "codebase" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/buildrequest.py#L311-L334
train
Returns a list of sources that are merged with the sources of all the others.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/buildrequest.py
BuildRequest.mergeReasons
def mergeReasons(self, others): """Return a reason for the merged build request.""" reasons = [] for req in [self] + others: if req.reason and req.reason not in reasons: reasons.append(req.reason) return ", ".join(reasons)
python
def mergeReasons(self, others): """Return a reason for the merged build request.""" reasons = [] for req in [self] + others: if req.reason and req.reason not in reasons: reasons.append(req.reason) return ", ".join(reasons)
[ "def", "mergeReasons", "(", "self", ",", "others", ")", ":", "reasons", "=", "[", "]", "for", "req", "in", "[", "self", "]", "+", "others", ":", "if", "req", ".", "reason", "and", "req", ".", "reason", "not", "in", "reasons", ":", "reasons", ".", ...
Return a reason for the merged build request.
[ "Return", "a", "reason", "for", "the", "merged", "build", "request", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/buildrequest.py#L336-L342
train
Return a reason for the merged build request.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/compat.py
bytes2NativeString
def bytes2NativeString(x, encoding='utf-8'): """ Convert C{bytes} to a native C{str}. On Python 3 and higher, str and bytes are not equivalent. In this case, decode the bytes, and return a native string. On Python 2 and lower, str and bytes are equivalent. In this case, just just ret...
python
def bytes2NativeString(x, encoding='utf-8'): """ Convert C{bytes} to a native C{str}. On Python 3 and higher, str and bytes are not equivalent. In this case, decode the bytes, and return a native string. On Python 2 and lower, str and bytes are equivalent. In this case, just just ret...
[ "def", "bytes2NativeString", "(", "x", ",", "encoding", "=", "'utf-8'", ")", ":", "if", "isinstance", "(", "x", ",", "bytes", ")", "and", "str", "!=", "bytes", ":", "return", "x", ".", "decode", "(", "encoding", ")", "return", "x" ]
Convert C{bytes} to a native C{str}. On Python 3 and higher, str and bytes are not equivalent. In this case, decode the bytes, and return a native string. On Python 2 and lower, str and bytes are equivalent. In this case, just just return the native string. @param x: a string of type C{...
[ "Convert", "C", "{", "bytes", "}", "to", "a", "native", "C", "{", "str", "}", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/compat.py#L38-L56
train
Convert a bytes object to a native string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/compat.py
unicode2bytes
def unicode2bytes(x, encoding='utf-8', errors='strict'): """ Convert a unicode string to C{bytes}. @param x: a unicode string, of type C{unicode} on Python 2, or C{str} on Python 3. @param encoding: an optional codec, default: 'utf-8' @param errors: error handling scheme, default 'str...
python
def unicode2bytes(x, encoding='utf-8', errors='strict'): """ Convert a unicode string to C{bytes}. @param x: a unicode string, of type C{unicode} on Python 2, or C{str} on Python 3. @param encoding: an optional codec, default: 'utf-8' @param errors: error handling scheme, default 'str...
[ "def", "unicode2bytes", "(", "x", ",", "encoding", "=", "'utf-8'", ",", "errors", "=", "'strict'", ")", ":", "if", "isinstance", "(", "x", ",", "text_type", ")", ":", "x", "=", "x", ".", "encode", "(", "encoding", ",", "errors", ")", "return", "x" ]
Convert a unicode string to C{bytes}. @param x: a unicode string, of type C{unicode} on Python 2, or C{str} on Python 3. @param encoding: an optional codec, default: 'utf-8' @param errors: error handling scheme, default 'strict' @return: a string of type C{bytes}
[ "Convert", "a", "unicode", "string", "to", "C", "{", "bytes", "}", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/compat.py#L59-L71
train
Convert a unicode string to bytes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
worker/buildbot_worker/compat.py
bytes2unicode
def bytes2unicode(x, encoding='utf-8', errors='strict'): """ Convert a C{bytes} to a unicode string. @param x: a unicode string, of type C{unicode} on Python 2, or C{str} on Python 3. @param encoding: an optional codec, default: 'utf-8' @param errors: error handling scheme, default 's...
python
def bytes2unicode(x, encoding='utf-8', errors='strict'): """ Convert a C{bytes} to a unicode string. @param x: a unicode string, of type C{unicode} on Python 2, or C{str} on Python 3. @param encoding: an optional codec, default: 'utf-8' @param errors: error handling scheme, default 's...
[ "def", "bytes2unicode", "(", "x", ",", "encoding", "=", "'utf-8'", ",", "errors", "=", "'strict'", ")", ":", "if", "isinstance", "(", "x", ",", "(", "text_type", ",", "type", "(", "None", ")", ")", ")", ":", "return", "x", "return", "text_type", "(",...
Convert a C{bytes} to a unicode string. @param x: a unicode string, of type C{unicode} on Python 2, or C{str} on Python 3. @param encoding: an optional codec, default: 'utf-8' @param errors: error handling scheme, default 'strict' @return: a unicode string of type C{unicode} on Python 2, ...
[ "Convert", "a", "C", "{", "bytes", "}", "to", "a", "unicode", "string", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/compat.py#L74-L87
train
Convert a C { bytes object to a unicode string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/package/rpm/mock.py
Mock.start
def start(self): """ Try to remove the old mock logs first. """ if self.resultdir: for lname in self.mock_logfiles: self.logfiles[lname] = self.build.path_module.join(self.resultdir, lname) ...
python
def start(self): """ Try to remove the old mock logs first. """ if self.resultdir: for lname in self.mock_logfiles: self.logfiles[lname] = self.build.path_module.join(self.resultdir, lname) ...
[ "def", "start", "(", "self", ")", ":", "if", "self", ".", "resultdir", ":", "for", "lname", "in", "self", ".", "mock_logfiles", ":", "self", ".", "logfiles", "[", "lname", "]", "=", "self", ".", "build", ".", "path_module", ".", "join", "(", "self", ...
Try to remove the old mock logs first.
[ "Try", "to", "remove", "the", "old", "mock", "logs", "first", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/package/rpm/mock.py#L87-L110
train
Start the mock log files.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/worker/docker.py
_handle_stream_line
def _handle_stream_line(line): """\ Input is the json representation of: {'stream': "Content\ncontent"} Output is a generator yield "Content", and then "content" """ # XXX This necessary processing is probably a bug from docker-py, # hence, might break if the bug is fixed, i.e. we should get dec...
python
def _handle_stream_line(line): """\ Input is the json representation of: {'stream': "Content\ncontent"} Output is a generator yield "Content", and then "content" """ # XXX This necessary processing is probably a bug from docker-py, # hence, might break if the bug is fixed, i.e. we should get dec...
[ "def", "_handle_stream_line", "(", "line", ")", ":", "# XXX This necessary processing is probably a bug from docker-py,", "# hence, might break if the bug is fixed, i.e. we should get decoded JSON", "# directly from the API.", "line", "=", "json", ".", "loads", "(", "line", ")", "i...
\ Input is the json representation of: {'stream': "Content\ncontent"} Output is a generator yield "Content", and then "content"
[ "\\", "Input", "is", "the", "json", "representation", "of", ":", "{", "stream", ":", "Content", "\\", "ncontent", "}", "Output", "is", "a", "generator", "yield", "Content", "and", "then", "content" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/docker.py#L45-L60
train
Handles a single line from the Docker API.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/words.py
Contact.shouldReportBuild
def shouldReportBuild(self, builder, buildnum): """Returns True if this build should be reported for this contact (eliminating duplicates), and also records the report for later""" for w, b, n in self.reported_builds: if b == builder and n == buildnum: return False ...
python
def shouldReportBuild(self, builder, buildnum): """Returns True if this build should be reported for this contact (eliminating duplicates), and also records the report for later""" for w, b, n in self.reported_builds: if b == builder and n == buildnum: return False ...
[ "def", "shouldReportBuild", "(", "self", ",", "builder", ",", "buildnum", ")", ":", "for", "w", ",", "b", ",", "n", "in", "self", ".", "reported_builds", ":", "if", "b", "==", "builder", "and", "n", "==", "buildnum", ":", "return", "False", "self", "...
Returns True if this build should be reported for this contact (eliminating duplicates), and also records the report for later
[ "Returns", "True", "if", "this", "build", "should", "be", "reported", "for", "this", "contact", "(", "eliminating", "duplicates", ")", "and", "also", "records", "the", "report", "for", "later" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/words.py#L249-L263
train
Returns True if this build should be reported for this contact and also records the report for later
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/words.py
Contact.splitArgs
def splitArgs(self, args): """Returns list of arguments parsed by shlex.split() or raise UsageError if failed""" try: return shlex.split(args) except ValueError as e: raise UsageError(e)
python
def splitArgs(self, args): """Returns list of arguments parsed by shlex.split() or raise UsageError if failed""" try: return shlex.split(args) except ValueError as e: raise UsageError(e)
[ "def", "splitArgs", "(", "self", ",", "args", ")", ":", "try", ":", "return", "shlex", ".", "split", "(", "args", ")", "except", "ValueError", "as", "e", ":", "raise", "UsageError", "(", "e", ")" ]
Returns list of arguments parsed by shlex.split() or raise UsageError if failed
[ "Returns", "list", "of", "arguments", "parsed", "by", "shlex", ".", "split", "()", "or", "raise", "UsageError", "if", "failed" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/words.py#L265-L271
train
Returns list of arguments parsed by shlex. split
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/reporters/words.py
StatusBot.getContact
def getContact(self, user=None, channel=None): """ get a Contact instance for ``user`` on ``channel`` """ try: return self.contacts[(channel, user)] except KeyError: new_contact = self.contactClass(self, user=user, channel=channel) self.contacts[(channel, user...
python
def getContact(self, user=None, channel=None): """ get a Contact instance for ``user`` on ``channel`` """ try: return self.contacts[(channel, user)] except KeyError: new_contact = self.contactClass(self, user=user, channel=channel) self.contacts[(channel, user...
[ "def", "getContact", "(", "self", ",", "user", "=", "None", ",", "channel", "=", "None", ")", ":", "try", ":", "return", "self", ".", "contacts", "[", "(", "channel", ",", "user", ")", "]", "except", "KeyError", ":", "new_contact", "=", "self", ".", ...
get a Contact instance for ``user`` on ``channel``
[ "get", "a", "Contact", "instance", "for", "user", "on", "channel" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/words.py#L1032-L1040
train
get a Contact instance for user on channel
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/subunit.py
SubunitLogObserver.issue
def issue(self, test, err): """An issue - failing, erroring etc test.""" self.step.setProgress('tests failed', len(self.failures) + len(self.errors))
python
def issue(self, test, err): """An issue - failing, erroring etc test.""" self.step.setProgress('tests failed', len(self.failures) + len(self.errors))
[ "def", "issue", "(", "self", ",", "test", ",", "err", ")", ":", "self", ".", "step", ".", "setProgress", "(", "'tests failed'", ",", "len", "(", "self", ".", "failures", ")", "+", "len", "(", "self", ".", "errors", ")", ")" ]
An issue - failing, erroring etc test.
[ "An", "issue", "-", "failing", "erroring", "etc", "test", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/subunit.py#L79-L82
train
An issue - failing erroring etc test
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/hooks/gitlab.py
GitLabHandler._process_change
def _process_change(self, payload, user, repo, repo_url, event, codebase=None): """ Consumes the JSON as a python object and actually starts the build. :arguments: payload Python Object that represents the JSON sent by GitLab Service ...
python
def _process_change(self, payload, user, repo, repo_url, event, codebase=None): """ Consumes the JSON as a python object and actually starts the build. :arguments: payload Python Object that represents the JSON sent by GitLab Service ...
[ "def", "_process_change", "(", "self", ",", "payload", ",", "user", ",", "repo", ",", "repo_url", ",", "event", ",", "codebase", "=", "None", ")", ":", "changes", "=", "[", "]", "refname", "=", "payload", "[", "'ref'", "]", "# project name from http header...
Consumes the JSON as a python object and actually starts the build. :arguments: payload Python Object that represents the JSON sent by GitLab Service Hook.
[ "Consumes", "the", "JSON", "as", "a", "python", "object", "and", "actually", "starts", "the", "build", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/hooks/gitlab.py#L35-L97
train
Processes a single change from GitLab Service and returns a list of dictionaries that represents the changes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/hooks/gitlab.py
GitLabHandler._process_merge_request_change
def _process_merge_request_change(self, payload, event, codebase=None): """ Consumes the merge_request JSON as a python object and turn it into a buildbot change. :arguments: payload Python Object that represents the JSON sent by GitLab Service Hook. ...
python
def _process_merge_request_change(self, payload, event, codebase=None): """ Consumes the merge_request JSON as a python object and turn it into a buildbot change. :arguments: payload Python Object that represents the JSON sent by GitLab Service Hook. ...
[ "def", "_process_merge_request_change", "(", "self", ",", "payload", ",", "event", ",", "codebase", "=", "None", ")", ":", "attrs", "=", "payload", "[", "'object_attributes'", "]", "commit", "=", "attrs", "[", "'last_commit'", "]", "when_timestamp", "=", "date...
Consumes the merge_request JSON as a python object and turn it into a buildbot change. :arguments: payload Python Object that represents the JSON sent by GitLab Service Hook.
[ "Consumes", "the", "merge_request", "JSON", "as", "a", "python", "object", "and", "turn", "it", "into", "a", "buildbot", "change", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/hooks/gitlab.py#L99-L154
train
Processes a merge request change and returns a list of buildbot change objects.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/www/hooks/gitlab.py
GitLabHandler.getChanges
def getChanges(self, request): """ Reponds only to POST events and starts the build process :arguments: request the http request object """ expected_secret = isinstance(self.options, dict) and self.options.get('secret') if expected_secret: ...
python
def getChanges(self, request): """ Reponds only to POST events and starts the build process :arguments: request the http request object """ expected_secret = isinstance(self.options, dict) and self.options.get('secret') if expected_secret: ...
[ "def", "getChanges", "(", "self", ",", "request", ")", ":", "expected_secret", "=", "isinstance", "(", "self", ".", "options", ",", "dict", ")", "and", "self", ".", "options", ".", "get", "(", "'secret'", ")", "if", "expected_secret", ":", "received_secret...
Reponds only to POST events and starts the build process :arguments: request the http request object
[ "Reponds", "only", "to", "POST", "events", "and", "starts", "the", "build", "process" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/hooks/gitlab.py#L157-L202
train
Returns a generator that yields the changes from the gitlab event.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/monkeypatches/__init__.py
onlyOnce
def onlyOnce(fn): 'Set up FN to only run once within an interpreter instance' def wrap(*args, **kwargs): if hasattr(fn, 'called'): return fn.called = 1 return fn(*args, **kwargs) util.mergeFunctionMetadata(fn, wrap) return wrap
python
def onlyOnce(fn): 'Set up FN to only run once within an interpreter instance' def wrap(*args, **kwargs): if hasattr(fn, 'called'): return fn.called = 1 return fn(*args, **kwargs) util.mergeFunctionMetadata(fn, wrap) return wrap
[ "def", "onlyOnce", "(", "fn", ")", ":", "def", "wrap", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "hasattr", "(", "fn", ",", "'called'", ")", ":", "return", "fn", ".", "called", "=", "1", "return", "fn", "(", "*", "args", ",", ...
Set up FN to only run once within an interpreter instance
[ "Set", "up", "FN", "to", "only", "run", "once", "within", "an", "interpreter", "instance" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/monkeypatches/__init__.py#L21-L29
train
Set up FN to only run once within an interpreter instance
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/data/connector.py
DataConnector.allEndpoints
def allEndpoints(self): """return the full spec of the connector as a list of dicts """ paths = [] for k, v in sorted(self.matcher.iterPatterns()): paths.append(dict(path="/".join(k), plural=str(v.rtype.plural), type...
python
def allEndpoints(self): """return the full spec of the connector as a list of dicts """ paths = [] for k, v in sorted(self.matcher.iterPatterns()): paths.append(dict(path="/".join(k), plural=str(v.rtype.plural), type...
[ "def", "allEndpoints", "(", "self", ")", ":", "paths", "=", "[", "]", "for", "k", ",", "v", "in", "sorted", "(", "self", ".", "matcher", ".", "iterPatterns", "(", ")", ")", ":", "paths", ".", "append", "(", "dict", "(", "path", "=", "\"/\"", ".",...
return the full spec of the connector as a list of dicts
[ "return", "the", "full", "spec", "of", "the", "connector", "as", "a", "list", "of", "dicts" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/data/connector.py#L138-L147
train
return the full spec of the connector as a list of dicts
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/scripts/runner.py
validateMasterOption
def validateMasterOption(master): """ Validate master (-m, --master) command line option. Checks that option is a string of the 'hostname:port' form, otherwise raises an UsageError exception. @type master: string @param master: master option @raise usage.UsageError: on invalid master opt...
python
def validateMasterOption(master): """ Validate master (-m, --master) command line option. Checks that option is a string of the 'hostname:port' form, otherwise raises an UsageError exception. @type master: string @param master: master option @raise usage.UsageError: on invalid master opt...
[ "def", "validateMasterOption", "(", "master", ")", ":", "try", ":", "hostname", ",", "port", "=", "master", ".", "split", "(", "\":\"", ")", "port", "=", "int", "(", "port", ")", "except", "(", "TypeError", ",", "ValueError", ")", ":", "raise", "usage"...
Validate master (-m, --master) command line option. Checks that option is a string of the 'hostname:port' form, otherwise raises an UsageError exception. @type master: string @param master: master option @raise usage.UsageError: on invalid master option
[ "Validate", "master", "(", "-", "m", "--", "master", ")", "command", "line", "option", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/scripts/runner.py#L38-L54
train
Validate master option.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/steps/vstudio.py
addEnvPath
def addEnvPath(env, name, value): """ concat a path for this name """ try: oldval = env[name] if not oldval.endswith(';'): oldval = oldval + ';' except KeyError: oldval = "" if not value.endswith(';'): value = value + ';' env[name] = oldval + value
python
def addEnvPath(env, name, value): """ concat a path for this name """ try: oldval = env[name] if not oldval.endswith(';'): oldval = oldval + ';' except KeyError: oldval = "" if not value.endswith(';'): value = value + ';' env[name] = oldval + value
[ "def", "addEnvPath", "(", "env", ",", "name", ",", "value", ")", ":", "try", ":", "oldval", "=", "env", "[", "name", "]", "if", "not", "oldval", ".", "endswith", "(", "';'", ")", ":", "oldval", "=", "oldval", "+", "';'", "except", "KeyError", ":", ...
concat a path for this name
[ "concat", "a", "path", "for", "this", "name" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/vstudio.py#L29-L39
train
concat a path for this name
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/process/workerforbuilder.py
AbstractWorkerForBuilder.ping
def ping(self, status=None): """Ping the worker to make sure it is still there. Returns a Deferred that fires with True if it is. @param status: if you point this at a BuilderStatus, a 'pinging' event will be pushed. """ newping = not self.ping_watchers ...
python
def ping(self, status=None): """Ping the worker to make sure it is still there. Returns a Deferred that fires with True if it is. @param status: if you point this at a BuilderStatus, a 'pinging' event will be pushed. """ newping = not self.ping_watchers ...
[ "def", "ping", "(", "self", ",", "status", "=", "None", ")", ":", "newping", "=", "not", "self", ".", "ping_watchers", "d", "=", "defer", ".", "Deferred", "(", ")", "self", ".", "ping_watchers", ".", "append", "(", "d", ")", "if", "newping", ":", "...
Ping the worker to make sure it is still there. Returns a Deferred that fires with True if it is. @param status: if you point this at a BuilderStatus, a 'pinging' event will be pushed.
[ "Ping", "the", "worker", "to", "make", "sure", "it", "is", "still", "there", ".", "Returns", "a", "Deferred", "that", "fires", "with", "True", "if", "it", "is", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/workerforbuilder.py#L116-L129
train
Ping the worker to make sure it is still there. Returns a Deferred that fires with True if it is there.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/util/httpclientservice.py
HTTPClientService.checkAvailable
def checkAvailable(from_module): """Call me at checkConfig time to properly report config error if neither txrequests or treq is installed """ if txrequests is None and treq is None: config.error("neither txrequests nor treq is installed, but {} is requiring it\n\n{}".form...
python
def checkAvailable(from_module): """Call me at checkConfig time to properly report config error if neither txrequests or treq is installed """ if txrequests is None and treq is None: config.error("neither txrequests nor treq is installed, but {} is requiring it\n\n{}".form...
[ "def", "checkAvailable", "(", "from_module", ")", ":", "if", "txrequests", "is", "None", "and", "treq", "is", "None", ":", "config", ".", "error", "(", "\"neither txrequests nor treq is installed, but {} is requiring it\\n\\n{}\"", ".", "format", "(", "from_module", "...
Call me at checkConfig time to properly report config error if neither txrequests or treq is installed
[ "Call", "me", "at", "checkConfig", "time", "to", "properly", "report", "config", "error", "if", "neither", "txrequests", "or", "treq", "is", "installed" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/httpclientservice.py#L107-L113
train
Check that the user has a valid connection.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/util/__init__.py
flattened_iterator
def flattened_iterator(l, types=(list, tuple)): """ Generator for a list/tuple that potentially contains nested/lists/tuples of arbitrary nesting that returns every individual non-list/tuple element. In other words, [(5, 6, [8, 3]), 2, [2, 1, (3, 4)]] will yield 5, 6, 8, 3, 2, 2, 1, 3, 4 This is s...
python
def flattened_iterator(l, types=(list, tuple)): """ Generator for a list/tuple that potentially contains nested/lists/tuples of arbitrary nesting that returns every individual non-list/tuple element. In other words, [(5, 6, [8, 3]), 2, [2, 1, (3, 4)]] will yield 5, 6, 8, 3, 2, 2, 1, 3, 4 This is s...
[ "def", "flattened_iterator", "(", "l", ",", "types", "=", "(", "list", ",", "tuple", ")", ")", ":", "if", "not", "isinstance", "(", "l", ",", "types", ")", ":", "yield", "l", "return", "for", "element", "in", "l", ":", "for", "sub_element", "in", "...
Generator for a list/tuple that potentially contains nested/lists/tuples of arbitrary nesting that returns every individual non-list/tuple element. In other words, [(5, 6, [8, 3]), 2, [2, 1, (3, 4)]] will yield 5, 6, 8, 3, 2, 2, 1, 3, 4 This is safe to call on something not a list/tuple - the original inp...
[ "Generator", "for", "a", "list", "/", "tuple", "that", "potentially", "contains", "nested", "/", "lists", "/", "tuples", "of", "arbitrary", "nesting", "that", "returns", "every", "individual", "non", "-", "list", "/", "tuple", "element", ".", "In", "other", ...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/__init__.py#L59-L73
train
Generator for a list or tuple that potentially contains nested lists and tuples of arbitrary nesting.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/util/__init__.py
flatten
def flatten(l, types=(list, )): """ Given a list/tuple that potentially contains nested lists/tuples of arbitrary nesting, flatten into a single dimension. In other words, turn [(5, 6, [8, 3]), 2, [2, 1, (3, 4)]] into [5, 6, 8, 3, 2, 2, 1, 3, 4] This is safe to call on something not a list/tuple -...
python
def flatten(l, types=(list, )): """ Given a list/tuple that potentially contains nested lists/tuples of arbitrary nesting, flatten into a single dimension. In other words, turn [(5, 6, [8, 3]), 2, [2, 1, (3, 4)]] into [5, 6, 8, 3, 2, 2, 1, 3, 4] This is safe to call on something not a list/tuple -...
[ "def", "flatten", "(", "l", ",", "types", "=", "(", "list", ",", ")", ")", ":", "# For backwards compatibility, this returned a list, not an iterable.", "# Changing to return an iterable could break things.", "if", "not", "isinstance", "(", "l", ",", "types", ")", ":", ...
Given a list/tuple that potentially contains nested lists/tuples of arbitrary nesting, flatten into a single dimension. In other words, turn [(5, 6, [8, 3]), 2, [2, 1, (3, 4)]] into [5, 6, 8, 3, 2, 2, 1, 3, 4] This is safe to call on something not a list/tuple - the original input is returned as a list
[ "Given", "a", "list", "/", "tuple", "that", "potentially", "contains", "nested", "lists", "/", "tuples", "of", "arbitrary", "nesting", "flatten", "into", "a", "single", "dimension", ".", "In", "other", "words", "turn", "[", "(", "5", "6", "[", "8", "3", ...
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/__init__.py#L76-L88
train
Given a list or tuple that potentially contains nested lists or tuples of arbitrary nesting flatten into a single dimension.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/util/__init__.py
human_readable_delta
def human_readable_delta(start, end): """ Return a string of human readable time delta. """ start_date = datetime.datetime.fromtimestamp(start) end_date = datetime.datetime.fromtimestamp(end) delta = end_date - start_date result = [] if delta.days > 0: result.append('%d days' % ...
python
def human_readable_delta(start, end): """ Return a string of human readable time delta. """ start_date = datetime.datetime.fromtimestamp(start) end_date = datetime.datetime.fromtimestamp(end) delta = end_date - start_date result = [] if delta.days > 0: result.append('%d days' % ...
[ "def", "human_readable_delta", "(", "start", ",", "end", ")", ":", "start_date", "=", "datetime", ".", "datetime", ".", "fromtimestamp", "(", "start", ")", "end_date", "=", "datetime", ".", "datetime", ".", "fromtimestamp", "(", "end", ")", "delta", "=", "...
Return a string of human readable time delta.
[ "Return", "a", "string", "of", "human", "readable", "time", "delta", "." ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/__init__.py#L274-L298
train
Return a string of human readable time delta.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/util/__init__.py
in_reactor
def in_reactor(f): """decorate a function by running it with maybeDeferred in a reactor""" def wrap(*args, **kwargs): from twisted.internet import reactor, defer result = [] def _async(): d = defer.maybeDeferred(f, *args, **kwargs) @d.addErrback def ...
python
def in_reactor(f): """decorate a function by running it with maybeDeferred in a reactor""" def wrap(*args, **kwargs): from twisted.internet import reactor, defer result = [] def _async(): d = defer.maybeDeferred(f, *args, **kwargs) @d.addErrback def ...
[ "def", "in_reactor", "(", "f", ")", ":", "def", "wrap", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "from", "twisted", ".", "internet", "import", "reactor", ",", "defer", "result", "=", "[", "]", "def", "_async", "(", ")", ":", "d", "=",...
decorate a function by running it with maybeDeferred in a reactor
[ "decorate", "a", "function", "by", "running", "it", "with", "maybeDeferred", "in", "a", "reactor" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/__init__.py#L309-L332
train
decorate a function by running it with maybeDeferred in a reactor
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
buildbot/buildbot
master/buildbot/util/__init__.py
dictionary_merge
def dictionary_merge(a, b): """merges dictionary b into a Like dict.update, but recursive """ for key, value in b.items(): if key in a and isinstance(a[key], dict) and isinstance(value, dict): dictionary_merge(a[key], b[key]) continue a[key] = b[key] return...
python
def dictionary_merge(a, b): """merges dictionary b into a Like dict.update, but recursive """ for key, value in b.items(): if key in a and isinstance(a[key], dict) and isinstance(value, dict): dictionary_merge(a[key], b[key]) continue a[key] = b[key] return...
[ "def", "dictionary_merge", "(", "a", ",", "b", ")", ":", "for", "key", ",", "value", "in", "b", ".", "items", "(", ")", ":", "if", "key", "in", "a", "and", "isinstance", "(", "a", "[", "key", "]", ",", "dict", ")", "and", "isinstance", "(", "va...
merges dictionary b into a Like dict.update, but recursive
[ "merges", "dictionary", "b", "into", "a", "Like", "dict", ".", "update", "but", "recursive" ]
5df3cfae6d760557d99156633c32b1822a1e130c
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/__init__.py#L454-L463
train
merges dictionary b into a
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...