Beispiel #1
0
 def __init__(self, who, revision_delta, revision_id, comments, files=[],  isdir=0, links=[],
              revision=None, when=None, branch=None):
     self.files_added = [f[0] for f in revision_delta.added]
     self.files_modified = [f[0] for f in revision_delta.modified]
     self.files_renamed = [(f[0],f[1]) for f in revision_delta.renamed]
     self.files_removed = [f[0] for f in revision_delta.removed]
     self.ch = revision_delta
     self.revision_id = revision_id
     files =  self.files_added + self.files_modified + [f[1] for f in self.files_renamed] + self.files_removed
     Change.__init__(self, who=who, files=files, comments=comments, isdir=isdir, links=links,revision=revision, when=when, branch=branch)
Beispiel #2
0
 def __init__(self, **kwargs):
     self.branch_id = kwargs.pop('branch_id')
     self.filesb = kwargs.pop('filesb',[])
     self.hash = kwargs.pop('hash', None)
     self.number = kwargs.pop('id', None)
     self.authors = kwargs.pop('authors', [])
     files = kwargs.pop('files', False)
     if not files:
         files = [ x['filename'] for x in self.filesb ]
     who = kwargs.pop('who', '')
     comments = kwargs.pop('comments', '')
     # self.all_modules = list(set([ x.split('/')[0] for x in files]))
     Change.__init__(self, who, files, comments, **kwargs)