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

- fixed #658664 ("osc: a package internal error occured")

- a file was marked as 'A' but didn't exist in the wc
This commit is contained in:
Marcus Huewe 2010-12-17 23:25:50 +01:00
parent 70e43a87c2
commit 0f73fb86a4

View File

@ -1177,6 +1177,9 @@ class Package:
real_send.append(filename)
print statfrmt('Sending', os.path.join(pathn, filename))
elif st in (' ', '!', 'S'):
if st == '!' and filename in self.to_be_added:
print 'file \'%s\' is marked as \'A\' but does not exist' % filename
return 1
f = self.findfilebyname(filename)
if f is None:
raise oscerr.PackageInternalError(self.prjname, self.name,
@ -1187,6 +1190,9 @@ class Package:
todo_delete.append(filename)
print statfrmt('Deleting', os.path.join(pathn, filename))
elif st in ('R', 'M', 'D', ' ', '!', 'S'):
# ignore missing new file (it's not part of the current commit)
if st == '!' and filename in self.to_be_added:
continue
f = self.findfilebyname(filename)
if f is None:
raise oscerr.PackageInternalError(self.prjname, self.name,