def serialize(self): d = self.__dict__ d['desc'] = self.getDescription() d['date'] = self.date if self.parent and self.parent.repo: d['parent'] = self.parent.repo.name return serialize(d)
def handle_addSubmodule(repo, **kwargs): """:return: repo.addSubmodule()""" log.info('addSubmodule: %s %s' %(repo, kwargs)) try: proxy = repo.addSubmodule(**kwargs) return [serialize(proxy, type='submodule', url=proxy.url)] except RepoError, e: raise
def serialize(self): d = self.__dict__ d['desc'] = self.comment return serialize(d)
def serialize(self): d = self.__dict__ d['desc'] = self.comment if self.parent and self.parent.repo: d['parent'] = self.parent.repo.name return serialize(d)
def handle_submodules(repo, **kwargs): """:return: repo.submodules()""" log.info('submodules: %s %s' %(repo, kwargs)) return [serialize(s, type='submodule', url=s.url) for s in repo.submodules(**kwargs)]