'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.'

def RepositoryName(self):

    fullname = self.FullName()
    if os.path.exists(fullname):
        project_dir = os.path.dirname(fullname)
        if os.path.exists(os.path.join(project_dir, '.svn')):
            root_dir = project_dir
            one_up_dir = os.path.dirname(root_dir)
            while os.path.exists(os.path.join(one_up_dir, '.svn')):
                root_dir = os.path.dirname(root_dir)
                one_up_dir = os.path.dirname(one_up_dir)
            prefix = os.path.commonprefix([root_dir, project_dir])
            return fullname[(len(prefix) + 1):]
        root_dir = os.path.dirname(fullname)
        while ((root_dir != os.path.dirname(root_dir)) and (not os.path.exists(os.path.join(root_dir, '.git'))) and (not os.path.exists(os.path.join(root_dir, '.hg'))) and (not os.path.exists(os.path.join(root_dir, '.svn')))):
            root_dir = os.path.dirname(root_dir)
        if (os.path.exists(os.path.join(root_dir, '.git')) or os.path.exists(os.path.join(root_dir, '.hg')) or os.path.exists(os.path.join(root_dir, '.svn'))):
            prefix = os.path.commonprefix([root_dir, project_dir])
            return fullname[(len(prefix) + 1):]
    return fullname
