def RepositoryName(self):
fullname = self.FullName()<EOL>if os.path.exists(fullname):<EOL><INDENT>project_dir = os.path.dirname(fullname)<EOL>if _repository:<EOL><INDENT>repo = FileInfo(_repository).FullName()<EOL>root_dir = project_dir<EOL>while os.path.exists(root_dir):<EOL><INDENT>if os.path.normcase(root_dir) == os.path.normcase(repo):<EOL><INDENT>return os.path.relpath(fullname, root_dir).replace('<STR_LIT:\\>', '<STR_LIT:/>')<EOL><DEDENT>one_up_dir = os.path.dirname(root_dir)<EOL>if one_up_dir == root_dir:<EOL><INDENT>break<EOL><DEDENT>root_dir = one_up_dir<EOL><DEDENT><DEDENT>if os.path.exists(os.path.join(project_dir, "<STR_LIT>")):<EOL><INDENT>root_dir = project_dir<EOL>one_up_dir = os.path.dirname(root_dir)<EOL>while os.path.exists(os.path.join(one_up_dir, "<STR_LIT>")):<EOL><INDENT>root_dir = os.path.dirname(root_dir)<EOL>one_up_dir = os.path.dirname(one_up_dir)<EOL><DEDENT>prefix = os.path.commonprefix([root_dir, project_dir])<EOL>return fullname[len(prefix) + <NUM_LIT:1>:]<EOL><DEDENT>root_dir = current_dir = os.path.dirname(fullname)<EOL>while current_dir != os.path.dirname(current_dir):<EOL><INDENT>if (os.path.exists(os.path.join(current_dir, "<STR_LIT>")) or<EOL>os.path.exists(os.path.join(current_dir, "<STR_LIT>")) or<EOL>os.path.exists(os.path.join(current_dir, "<STR_LIT>"))):<EOL><INDENT>root_dir = current_dir<EOL><DEDENT>current_dir = os.path.dirname(current_dir)<EOL><DEDENT>if (os.path.exists(os.path.join(root_dir, "<STR_LIT>")) or<EOL>os.path.exists(os.path.join(root_dir, "<STR_LIT>")) or<EOL>os.path.exists(os.path.join(root_dir, "<STR_LIT>"))):<EOL><INDENT>prefix = os.path.commonprefix([root_dir, project_dir])<EOL>return fullname[len(prefix) + <NUM_LIT:1>:]<EOL><DEDENT><DEDENT>return fullname<EOL>
r"""FullName after removing the local path to the repository.

        If we have a real absolute path name here we can try to do something smart:
        detecting the root of the checkout and truncating /path/to/checkout from
        the name so that we get header guards that don't include things like
        "C:\Documents and Settings\..." or "/home/username/..." in them and thus
        people on different computers who have checked the source out to different
        locations won't see bogus errors.