#NEWLINE# def _get_file_url( self , repository , revision , base_commit_id = None , path = None ) : #NEWLINE# #INDENT# 'Get the URL for accessing the contents of a file.\n\n        A revision or a base commit id, path pair is expected to be provided.\n        By default, this will return the URL based on the revision, if both\n        are provided.\n        ' #NEWLINE# if revision : #NEWLINE# #INDENT# return ( '%s/repos/%s/file/%s' % ( self . account . hosting_url , repository . extra_data [ 'rbgateway_repo_name' ] , revision ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( '%s/repos/%s/commits/%s/path/%s' % ( self . account . hosting_url , repository . extra_data [ 'rbgateway_repo_name' ] , base_commit_id , path ) )