#NEWLINE# def source( repository , **kwargs ) : #NEWLINE# #INDENT# if ( not kwargs . get ( 'revision_sha' ) ) : #NEWLINE# #INDENT# kwargs [ 'revision_sha' ] = revision ( repository , author ( ) ) . sha #NEWLINE# #UNINDENT# source = Source ( repository = repository , ** repository ) #NEWLINE# db . session . add ( source ) #NEWLINE# return source