@path_required<EOL><INDENT>def get_repository_state(self, relaPath=None):<DEDENT>
state = []<EOL>def _walk_dir(relaPath, dirList):<EOL><INDENT>dirDict = {'<STR_LIT:type>':'<STR_LIT>',<EOL>'<STR_LIT>':os.path.isdir(os.path.join(self.__path,relaPath)),<EOL>'<STR_LIT>':os.path.isfile(os.path.join(self.__path,relaPath,self.__dirInfo)),<EOL>}<EOL>state.append({relaPath:dirDict})<EOL>for fname in sorted([f for f in dirList if isinstance(f, basestring)]):<EOL><INDENT>relaFilePath = os.path.join(relaPath,fname)<EOL>realFilePath = os.path.join(self.__path,relaFilePath)<EOL>fileDict = {'<STR_LIT:type>':'<STR_LIT:file>',<EOL>'<STR_LIT>':os.path.isfile(realFilePath),<EOL>'<STR_LIT>':os.path.isfile(os.path.join(self.__path,relaPath,self.__fileInfo%fname)),<EOL>}<EOL>state.append({relaFilePath:fileDict})<EOL><DEDENT>for ddict in sorted([d for d in dirList if isinstance(d, dict)], key=lambda k: list(k)[<NUM_LIT:0>]):<EOL><INDENT>dirname = list(ddict)[<NUM_LIT:0>]<EOL>_walk_dir(relaPath=os.path.join(relaPath,dirname), dirList=ddict[dirname])<EOL><DEDENT><DEDENT>if relaPath is None:<EOL><INDENT>_walk_dir(relaPath='<STR_LIT>', dirList=self.__repo['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>assert isinstance(relaPath, basestring), "<STR_LIT>"<EOL>relaPath = self.to_repo_relative_path(path=relaPath, split=False)<EOL>spath    = relaPath.split(os.sep)<EOL>dirList  = self.__repo['<STR_LIT>']<EOL>while len(spath):<EOL><INDENT>dirname = spath.pop(<NUM_LIT:0>)<EOL>dList   = [d for d in dirList if isinstance(d, dict)]<EOL>if not len(dList):<EOL><INDENT>dirList = None<EOL>break<EOL><DEDENT>cDict = [d for d in dList if dirname in d]<EOL>if not len(cDict):<EOL><INDENT>dirList = None<EOL>break<EOL><DEDENT>dirList = cDict[<NUM_LIT:0>][dirname]<EOL><DEDENT>if dirList is not None:<EOL><INDENT>_walk_dir(relaPath=relaPath, dirList=dirList)<EOL><DEDENT><DEDENT>return state<EOL>
Get a list representation of repository state along with useful
information. List state is ordered relativeley to directories level

:Parameters:
    #. relaPath (None, str): relative directory path from where to
       start. If None all repository representation is returned.

:Returns:
    #. state (list): List representation of the repository.
       List items are all dictionaries. Every dictionary has a single
       key which is the file or the directory name and the value is a
       dictionary of information including:

           * 'type': the type of the tracked whether it's file, dir, or objectdir
           * 'exists': whether file or directory actually exists on disk
           * 'pyrepfileinfo': In case of a file or an objectdir whether .%s_pyrepfileinfo exists
           * 'pyrepdirinfo': In case of a directory whether .pyrepdirinfo exists