#NEWLINE# @ util . memoized_property #NEWLINE# def _revision_map( self ) : #NEWLINE# #INDENT# map_ = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for file_ in os . listdir ( self . versions ) : #NEWLINE# #INDENT# script = Script . _from_filename ( self , self . versions , file_ ) #NEWLINE# if ( script is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( script . revision in map_ ) : #NEWLINE# #INDENT# util . warn ( ( 'Revision %s is present more than once' % script . revision ) ) #NEWLINE# #UNINDENT# map_ [ script . revision ] = rev #NEWLINE# #UNINDENT# for rev in map_ . values ( ) : #NEWLINE# #INDENT# if ( rev . down_revision is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( rev . down_revision not in map_ ) : #NEWLINE# #INDENT# util . warn ( ( 'Revision %s referenced from %s is not present' % ( rev . down_revision , rev ) ) ) #NEWLINE# rev . down_revision = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# map_ [ rev . down_revision ] . add_nextrev ( rev . revision ) #NEWLINE# #UNINDENT# #UNINDENT# map_ [ None ] = None #NEWLINE# return map_