From 0f73fb86a429b1c3f8a4d4b6cab8b80511def0b4 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Fri, 17 Dec 2010 23:25:50 +0100 Subject: [PATCH] - fixed #658664 ("osc: a package internal error occured") - a file was marked as 'A' but didn't exist in the wc --- osc/core.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osc/core.py b/osc/core.py index d517350e..08055273 100644 --- a/osc/core.py +++ b/osc/core.py @@ -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,