mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 06:46:13 +01:00
Merge pull request #1033 from dmach/linkdiff-missing-added-file
linkdiff: Raise an exception when an added file is missing
This commit is contained in:
commit
ed78dcbfd2
@ -2000,6 +2000,9 @@ class Package:
|
|||||||
rev = 'working copy'
|
rev = 'working copy'
|
||||||
diff.append(b'+++ %s\t(%s)\n' % (fname.encode(), rev.encode()))
|
diff.append(b'+++ %s\t(%s)\n' % (fname.encode(), rev.encode()))
|
||||||
fname = os.path.join(self.absdir, fname)
|
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:
|
else:
|
||||||
if revision:
|
if revision:
|
||||||
b_revision = str(revision).encode()
|
b_revision = str(revision).encode()
|
||||||
|
Loading…
Reference in New Issue
Block a user