From 09c0c0b30dc9b89c3023a1df8fc85c6e70345512 Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Sat, 18 Dec 2010 08:44:04 -0600 Subject: Svn2: Add files explicitly listed which arent under control --- src/lib/Server/Plugins/Svn2.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/lib/Server/Plugins/Svn2.py b/src/lib/Server/Plugins/Svn2.py index 6c04d528a..875e9e6a6 100644 --- a/src/lib/Server/Plugins/Svn2.py +++ b/src/lib/Server/Plugins/Svn2.py @@ -55,6 +55,18 @@ class Svn2(Bcfg2.Server.Plugin.Plugin, """Commit changes into the repository""" if not comment: comment = 'Svn2: autocommit' + + # First try to update + if not self.Update(): + self.logger.error("Failed to update svn repository, refusing to commit changes") + return + + #FIXME - look for conflicts? + + for file in file_list: + stat = self.client.status(file) + self.client.add([f.path for f in stat \ + if f.text_status == pysvn.wc_status_kind.unversioned]) try: self.revision = self.client.checkin([self.datastore], comment, recurse=True) -- cgit v1.2.3-1-g7c22