#NEWLINE# def publish( self , brl_block , resource_info , version_tag = STABLE , dep_versions = None ) : #NEWLINE# #INDENT# ' make a simple publication of a single file named block_cell_name to block\n        brl_block. If block does not exist, it creates it. It mantains coherence of root Ids\n        for the find checks\n        param resource_info: {cell_name: (blob, explicits)}\n        ' #NEWLINE# try : #NEWLINE# #INDENT# block = self . store . read_block ( brl_block ) #NEWLINE# version = BlockVersion ( brl_block , ( len ( block . deltas ) - 1 ) ) #NEWLINE# #UNINDENT# except NotInStoreException : #NEWLINE# #INDENT# version = BlockVersion ( brl_block , ( - 1 ) ) #NEWLINE# #UNINDENT# publish_request = PublishRequest ( version ) #NEWLINE# publish_request . tag = version_tag #NEWLINE# block_name = brl_block . block_name #NEWLINE# for ( cell_name , ( blob , dependencies ) ) in resource_info . iteritems ( ) : #NEWLINE# #INDENT# if ( dependencies is not None ) : #NEWLINE# #INDENT# cell = SimpleCell ( ( block_name + cell_name ) ) #NEWLINE# if isinstance ( dependencies , DependencySet ) : #NEWLINE# #INDENT# cell . dependencies = dependencies #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cell . dependencies . explicit . update ( [ BlockCellName ( d ) for d in dependencies ] ) #NEWLINE# #UNINDENT# publish_request . cells . append ( cell ) #NEWLINE# #UNINDENT# if ( blob is not None ) : #NEWLINE# #INDENT# blob = ( Blob ( blob ) if isinstance ( blob , str ) else blob ) #NEWLINE# publish_request . contents [ cell_name ] = Content ( id_ = None , load = blob ) #NEWLINE# #UNINDENT# #UNINDENT# if isinstance ( dep_versions , BlockVersion ) : #NEWLINE# #INDENT# dep_versions = [ dep_versions ] #NEWLINE# #UNINDENT# publish_request . deptable = BlockVersionTable ( dep_versions ) #NEWLINE# self . service . publish ( publish_request )