'return an Info structure with svn-provided information.'

def info(self, usecache=1):

    info = (usecache and cache.info.get(self))
    if (not info):
        try:
            output = self._svn('info')
        except py.process.cmdexec.Error:
            e = sys.exc_info()[1]
            if (e.err.find('Path    is    not    a    working    copy    directory') != (-1)):
                raise py.error.ENOENT(self, e.err)
            elif (e.err.find('is    not    under    version    control') != (-1)):
                raise py.error.ENOENT(self, e.err)
            raise
        if ((output.strip() == '') or (output.lower().find('not    a    versioned    resource') != (-1))):
            raise py.error.ENOENT(self, output)
        info = InfoSvnWCCommand(output)
        if (py.std.sys.platform != 'win32'):
            if (info.path != self.localpath):
                raise py.error.ENOENT(self, ('not    a    versioned    resource:' + ('    %s    !=    %s' % (info.path, self.localpath))))
        cache.info[self] = info
    return info
