mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
linkdiff: Raise an exception when an added file is missing
This commit is contained in:
parent
f70b41ce32
commit
3393033887
@ -2000,6 +2000,9 @@ class Package:
|
||||
rev = 'working copy'
|
||||
diff.append(b'+++ %s\t(%s)\n' % (fname.encode(), rev.encode()))
|
||||
fname = os.path.join(self.absdir, fname)
|
||||
if not os.path.isfile(fname):
|
||||
raise oscerr.OscIOError(None, 'file \'%s\' is marked as \'A\' but does not exist\n'
|
||||
'(either add the missing file or revert it)' % fname)
|
||||
else:
|
||||
if revision:
|
||||
b_revision = str(revision).encode()
|
||||
|
Loading…
Reference in New Issue
Block a user