From ecf88a57bc202183339225f5aa2faed347f7ece0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 10 Jul 2009 18:10:41 +0000 Subject: [PATCH] * initial support for OBS source services * TODO: local service tool calls --- NEWS | 1 + osc/core.py | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 6ff150cf..2107b841 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ (-r role) - fix and improve request list and show output - new osc rremove command for remote source files removal + - handle _service\* files correctly 0.120: - support "setlinkrev" for whole projects diff --git a/osc/core.py b/osc/core.py index 657a159c..bfaadf52 100755 --- a/osc/core.py +++ b/osc/core.py @@ -737,15 +737,16 @@ class Package: have_conflicts = False for filename in self.todo: - st = self.status(filename) - if st == 'A' or st == 'M': - self.todo_send.append(filename) - print statfrmt('Sending', os.path.join(pathn, filename)) - elif st == 'D': - self.todo_delete.append(filename) - print statfrmt('Deleting', os.path.join(pathn, filename)) - elif st == 'C': - have_conflicts = True + if not filename.startswith('_service:'): + st = self.status(filename) + if st == 'A' or st == 'M': + self.todo_send.append(filename) + print statfrmt('Sending', os.path.join(pathn, filename)) + elif st == 'D': + self.todo_delete.append(filename) + print statfrmt('Deleting', os.path.join(pathn, filename)) + elif st == 'C': + have_conflicts = True if have_conflicts or self.islinkrepair(): print 'Please resolve all conflicts before committing using "osc resolved FILE"!' @@ -812,6 +813,13 @@ class Package: self.write_deletelist() self.update_datastructs() + if self.filenamelist.count('_service'): + print 'The package contains a source service, update generated files from server...' + for filename in self.todo: + if filename.startswith('_service:') and os.path.exists(filename): + os.unlink(filename) + self.update() + def write_conflictlist(self): if len(self.in_conflict) == 0: try: