summaryrefslogtreecommitdiffstats
path: root/layman/overlays/svn.py
diff options
context:
space:
mode:
Diffstat (limited to 'layman/overlays/svn.py')
-rw-r--r--layman/overlays/svn.py31
1 files changed, 21 insertions, 10 deletions
diff --git a/layman/overlays/svn.py b/layman/overlays/svn.py
index 2a30198..69d7b05 100644
--- a/layman/overlays/svn.py
+++ b/layman/overlays/svn.py
@@ -1,8 +1,8 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-#################################################################################
+###############################################################################
# LAYMAN SVN OVERLAY HANDLER
-#################################################################################
+###############################################################################
# File: svn.py
#
# Handles subversion overlays
@@ -18,20 +18,20 @@
__version__ = "$Id: svn.py 236 2006-09-05 20:39:37Z wrobel $"
-#===============================================================================
+#==============================================================================
#
# Dependencies
#
-#-------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
from layman.utils import path
from layman.overlays.source import OverlaySource, require_supported
-#===============================================================================
+#==============================================================================
#
# Class SvnOverlay
#
-#-------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
class SvnOverlay(OverlaySource):
''' Handles subversion overlays.'''
@@ -39,9 +39,11 @@ class SvnOverlay(OverlaySource):
type = 'Subversion'
type_key = 'svn'
- def __init__(self, parent, xml, config, _location, ignore = 0, quiet = False):
+ def __init__(self, parent, xml, config, _location,
+ ignore = 0, quiet = False):
- super(SvnOverlay, self).__init__(parent, xml, config, _location, ignore, quiet)
+ super(SvnOverlay, self).__init__(
+ parent, xml,config, _location, ignore, quiet)
def add(self, base, quiet = False):
'''Add overlay.'''
@@ -50,9 +52,13 @@ class SvnOverlay(OverlaySource):
super(SvnOverlay, self).add(base)
+ cfg_opts = self.config["svn_addopts"]
+
args = ['co']
if quiet:
args.append('-q')
+ if cfg_opts:
+ args.append(cfg_opts)
args.append(self.src + '/@')
args.append(path([base, self.parent.name]))
@@ -71,10 +77,14 @@ class SvnOverlay(OverlaySource):
repo_part = repo_part + '@'
return path([base, repo_part])
+ cfg_opts = self.config["svn_syncopts"]
+
# svn up [-q] TARGET
args = ['up']
if quiet:
args.append('-q')
+ if cfg_opts:
+ args.append(cfg_opts)
args.append(checkout_location())
return self.run_command(*args)
@@ -82,5 +92,6 @@ class SvnOverlay(OverlaySource):
def supported(self):
'''Overlay type supported?'''
- return require_supported([(self.command(), 'svn',
- 'dev-vcs/subversion'),])
+ return require_supported(
+ [(self.command(), 'svn','dev-vcs/subversion'),]
+ )