diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2010-12-18 08:44:04 -0600 |
---|---|---|
committer | Tim Laszlo <tim.laszlo@gmail.com> | 2010-12-18 09:21:08 -0600 |
commit | 09c0c0b30dc9b89c3023a1df8fc85c6e70345512 (patch) | |
tree | 29770ebac0a368815a8ee73086b99755a8f39de6 /src | |
parent | 50c759ba20f513acc9745427c1ccad4ee4227e84 (diff) | |
download | bcfg2-09c0c0b30dc9b89c3023a1df8fc85c6e70345512.tar.gz bcfg2-09c0c0b30dc9b89c3023a1df8fc85c6e70345512.tar.bz2 bcfg2-09c0c0b30dc9b89c3023a1df8fc85c6e70345512.zip |
Svn2: Add files explicitly listed which arent under control
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugins/Svn2.py | 12 |
1 files changed, 12 insertions, 0 deletions
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) |