#NEWLINE# def retrieve_repository_metadata( changeset , repository_uri = None , encoding = 'utf-8' ) : #NEWLINE# #INDENT# '\n    Return list of dictionaris with metadata about changesets since revision to current\n    ' #NEWLINE# command = [ 'git' , 'log' , '--pretty=format:%H' ] #NEWLINE# if changeset : #NEWLINE# #INDENT# command . append ( ( '%s..' % hash ) ) #NEWLINE# #UNINDENT# proc = Popen ( command , stdout = PIPE , stderr = PIPE ) #NEWLINE# ( stdout , stderr ) = proc . communicate ( ) #NEWLINE# if ( not ( proc . returncode == 0 ) ) : #NEWLINE# #INDENT# log . error ( ( 'Cannot retrieve log: stdout: %s stderr: %s' % ( stdout , stderr ) ) ) #NEWLINE# raise CalledProcessError ( proc . returncode , command ) #NEWLINE# #UNINDENT# metadata = [ ] #NEWLINE# hashes = stdout . splitlines ( ) #NEWLINE# hashes . reverse ( ) #NEWLINE# for hash in hashes : #NEWLINE# #INDENT# metadata . append ( get_revision_metadata ( hash , repository_uri = repository_uri , encoding = encoding ) ) #NEWLINE# #UNINDENT# return metadata