Package buildbot :: Package changes :: Module changes :: Class Change
[frames] | no frames]

Class Change

source code

I represent a single change to the source tree. This may involve several files, but they are all changed by the same person, and there is a change comment for the group as a whole.

If the version control system supports sequential repository- (or branch-) wide change numbers (like SVN, P4, and Bzr), then revision= should be set to that number. The highest such number will be used at checkout time to get the correct set of files.

If it does not (like CVS), when= should be set to the timestamp (seconds since epoch, as returned by time.time()) when the change was made. when= will be filled in for you (to the current time) if you omit it, which is suitable for ChangeSources which have no way of getting more accurate timestamps.

The revision= and branch= values must be ASCII bytestrings, since they will eventually be used in a ShellCommand and passed to os.exec(), which requires bytestrings. These values will also be stored in a database, possibly as unicode, so they must be safely convertable back and forth. This restriction may be relaxed in the future.

Changes should be submitted to ChangeMaster.addChange() in chronologically increasing order. Out-of-order changes will probably cause the web status displays to be corrupted.

Instance Methods
__init__(self, who, files, comments, isdir=0, links=None, revision=None, when=None, branch=None, category=None, revlink='', properties={}, repository='', project='') source code
__setstate__(self, dict) source code
asText(self) source code
returns a dictonary with suitable info for html/mail rendering
source code
getShortAuthor(self) source code
getTime(self) source code
getTimes(self) source code
getText(self) source code
getLogs(self) source code
getFileContents(self) source code
getProperties(self) source code
Object Specification Descriptor
source code
Special descriptor for class __provides__
Class Variables
  number = None
  branch = None
  category = None
  revision = None
  __implemented__ = <implementedBy buildbot.changes.changes.Change>
Method Details


Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

For example:

  >>> from zope.interface import Interface
  >>> class IFooFactory(Interface):
  ...     pass
  >>> class IFoo(Interface):
  ...     pass
  >>> class C(object):
  ...     implements(IFoo)
  ...     classProvides(IFooFactory)
  >>> [i.getName() for i in C.__provides__]

  >>> [i.getName() for i in C().__provides__]