#NEWLINE# def _create_config( self , rel_path , content , message ) : #NEWLINE# #INDENT# 'Create and commit a new config file.\n\n        :rel_path: the string relative path to the config file\n        :content: the string contents of the new config file\n        :message: the string commit message for the file\n\n        ' #NEWLINE# if phlgit_diffindex . is_index_dirty ( self . _repo ) : #NEWLINE# #INDENT# raise Error ( 'git index has staged changes' ) #NEWLINE# #UNINDENT# path = self . _make_abspath ( rel_path ) #NEWLINE# if os . path . exists ( path ) : #NEWLINE# #INDENT# raise Error ( 'config already exists' ) #NEWLINE# #UNINDENT# phlsys_fs . write_text_file ( path , content ) #NEWLINE# self . _repo ( 'add' , path ) #NEWLINE# phlgit_commit . index ( self . _repo , message )