mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-23 21:36:13 +01:00
- Package.status: handle a dangling symlink more gracefully
More precisely, treat it as unversioned.
This commit is contained in:
parent
f3a1d12a96
commit
244a704033
@ -1845,6 +1845,10 @@ class Package:
|
|||||||
'This might be caused by an old wc format. Please backup your current\n'
|
'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'
|
'wc and checkout the package again. Afterwards copy all files (except the\n'
|
||||||
'.osc/ dir) into the new package wc.' % 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:
|
else:
|
||||||
# this case shouldn't happen (except there was a typo in the filename etc.)
|
# 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)
|
raise oscerr.OscIOError(None, 'osc: \'%s\' is not under version control' % n)
|
||||||
|
Loading…
Reference in New Issue
Block a user