Skip to content

Commit

Permalink
- Package.status: handle a dangling symlink more gracefully
Browse files Browse the repository at this point in the history
More precisely, treat it as unversioned.
  • Loading branch information
marcus-h committed Feb 7, 2016
1 parent f3a1d12 commit 244a704
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions osc/core.py
Expand Up @@ -1845,6 +1845,10 @@ def status(self, 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'
'.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)
Expand Down

0 comments on commit 244a704

Please sign in to comment.