1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 01:06:17 +02:00

- Package.status: handle a dangling symlink more gracefully

More precisely, treat it as unversioned.
This commit is contained in:
Marcus Huewe 2016-02-07 22:58:23 +01:00
parent f3a1d12a96
commit 244a704033

View File

@ -1845,6 +1845,10 @@ class Package:
'This might be caused by an old wc format. Please backup your current\n'
'wc and checkout the package again. Afterwards copy all files (except the\n'
'.osc/ dir) into the new package wc.' % n)
elif os.path.islink(os.path.join(self.absdir, n)):
# dangling symlink, whose name is _not_ tracked: treat it
# as unversioned
state = '?'
else:
# this case shouldn't happen (except there was a typo in the filename etc.)
raise oscerr.OscIOError(None, 'osc: \'%s\' is not under version control' % n)