#NEWLINE# def source( self ) : #NEWLINE# #INDENT# firstCommit = self . args [ 0 ] #NEWLINE# lastCommit = self . args [ 1 ] #NEWLINE# ref = lastCommit . args [ 2 ] #NEWLINE# if ( ref . find ( 'refs/heads/' ) == 0 ) : #NEWLINE# #INDENT# branch = ref [ 11 : ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# syslog ( LOG_WARNING , ( "Branch name could not be parsed from '%s' for '%s'" % ( ref , self . config . repoPath ) ) ) #NEWLINE# return [ ] #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . config . branches [ branch ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# syslog ( LOG_INFO , ( "No section in config for branch '%s' in '%s'" % ( branch , self . config . repoPath ) ) ) #NEWLINE# return [ ] #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# gitRepo = git . Git ( self . config . repoPath ) #NEWLINE# commits = gitRepo . getLog ( since = firstCommit , until = lastCommit , branch = branch ) #NEWLINE# #UNINDENT# except git . GitException as e : #NEWLINE# #INDENT# syslog ( LOG_WARNING , ( "Git log could not be fetched: '%s'" % ( e , ) ) ) #NEWLINE# return [ ] #NEWLINE# #UNINDENT# for commit in commits : #NEWLINE# #INDENT# commit . status = 'deployment_queued' #NEWLINE# #UNINDENT# return commits