summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Svn.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2014-11-11 14:50:22 -0600
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2014-11-11 14:50:22 -0600
commit77cf4a56b3b7ff8cd466705b968abb539efa703f (patch)
tree9769d560cce0dacda0360dfc434f33774cb01f5e /src/lib/Bcfg2/Server/Plugins/Svn.py
parent389ce1a86b704222ddc9458cd49c281e7601b803 (diff)
parent30634d07d5489f260f37cc86d150315f02c40865 (diff)
downloadbcfg2-77cf4a56b3b7ff8cd466705b968abb539efa703f.tar.gz
bcfg2-77cf4a56b3b7ff8cd466705b968abb539efa703f.tar.bz2
bcfg2-77cf4a56b3b7ff8cd466705b968abb539efa703f.zip
Merge pull request #211 from stpierre/options-unit-tests
Options unit tests
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Svn.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Svn.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Svn.py b/src/lib/Bcfg2/Server/Plugins/Svn.py
index b752650f0..2ca518e53 100644
--- a/src/lib/Bcfg2/Server/Plugins/Svn.py
+++ b/src/lib/Bcfg2/Server/Plugins/Svn.py
@@ -18,12 +18,6 @@ class Svn(Bcfg2.Server.Plugin.Version):
"""Svn is a version plugin for dealing with Bcfg2 repos."""
options = Bcfg2.Server.Plugin.Version.options + [
Bcfg2.Options.Option(
- cf=("svn", "conflict_resolution"), dest="svn_conflict_resolution",
- type=lambda v: v.replace("-", "_"),
- choices=dir(pysvn.wc_conflict_choice), # pylint: disable=E1101
- default=pysvn.wc_conflict_choice.postpone, # pylint: disable=E1101
- help="SVN conflict resolution method"),
- Bcfg2.Options.Option(
cf=("svn", "user"), dest="svn_user", help="SVN username"),
Bcfg2.Options.Option(
cf=("svn", "password"), dest="svn_password", help="SVN password"),
@@ -31,6 +25,18 @@ class Svn(Bcfg2.Server.Plugin.Version):
cf=("svn", "always_trust"), dest="svn_trust_ssl",
help="Always trust SSL certs from SVN server")]
+ if HAS_SVN:
+ options.append(
+ Bcfg2.Options.Option(
+ cf=("svn", "conflict_resolution"),
+ dest="svn_conflict_resolution",
+ type=lambda v: v.replace("-", "_"),
+ # pylint: disable=E1101
+ choices=dir(pysvn.wc_conflict_choice),
+ default=pysvn.wc_conflict_choice.postpone,
+ # pylint: enable=E1101
+ help="SVN conflict resolution method"))
+
__author__ = 'bcfg-dev@mcs.anl.gov'
__vcs_metadata_path__ = ".svn"
if HAS_SVN: