#NEWLINE# @ transaction . commit_on_success #NEWLINE# def _handle_revision( repository , commit ) : #NEWLINE# #INDENT# log . debug ( 'Handling [%s] from %s' , commit . id [ : 7 ] , repository . url ) #NEWLINE# ( ci , created ) = CodeCommit . objects . get_or_create ( revision = commit . id , repository = repository , defaults = { #NEWLINE# #INDENT# 'message' : smart_unicode ( commit . message ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# if created : #NEWLINE# #INDENT# timestamp = datetime . datetime . fromtimestamp ( time . mktime ( commit . committed_date ) ) #NEWLINE# if utils . JELLYROLL_ADJUST_DATETIME : #NEWLINE# #INDENT# return utils . utc_to_local_timestamp ( time . mktime ( commit . committed_date ) ) #NEWLINE# #UNINDENT# return Item . objects . create_or_update ( instance = ci , timestamp = timestamp , source = ( '%s:%s' % ( __name__ , repository . url ) ) )