Пример #1
0
 def getChange(self, event, project):
     if event.change_number:
         change = self._getChange(event.change_number, event.patch_number)
     elif event.ref:
         change = Ref(project)
         change.ref = event.ref
         change.oldrev = event.oldrev
         change.newrev = event.newrev
         change.url = self.getGitwebUrl(project, sha=event.newrev)
     else:
         change = NullChange(project)
     return change
Пример #2
0
 def getChange(self, event, project):
     if event.change_number:
         refresh = False
         if event._needs_refresh:
             refresh = True
             event._needs_refresh = False
         change = self._getChange(event.change_number,
                                  event.patch_number,
                                  refresh=refresh)
     elif event.ref:
         change = Ref(project)
         change.ref = event.ref
         change.oldrev = event.oldrev
         change.newrev = event.newrev
         change.url = self._getGitwebUrl(project, sha=event.newrev)
     else:
         change = NullChange(project)
     return change