def info(self, usecache=1): |
""" return an Info structure with svn-provided information. """ |
-> info = usecache and cache.info.get(self) |
if not info: |
try: |
output = self._svn('info') |
except py.process.cmdexec.Error, e: |
if e.err.find('Path is not a working copy directory') != -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 |
self.rev = info.rev |
return info |