2 # -*- coding: utf-8 -*-
3 #################################################################################
4 # LAYMAN SVN OVERLAY HANDLER
5 #################################################################################
8 # Handles subversion overlays
11 # (c) 2005 - 2008 Gunnar Wrobel
12 # Distributed under the terms of the GNU General Public License v2
15 # Gunnar Wrobel <wrobel@gentoo.org>
17 ''' Subversion overlay support.'''
19 __version__
= "$Id: svn.py 236 2006-09-05 20:39:37Z wrobel $"
21 #===============================================================================
25 #-------------------------------------------------------------------------------
27 from layman
.utils
import path
28 from layman
.overlays
.overlay
import Overlay
30 #===============================================================================
34 #-------------------------------------------------------------------------------
36 class SvnOverlay(Overlay
):
37 ''' Handles subversion overlays.'''
41 binary
= '/usr/bin/svn'
43 def add(self
, base
, quiet
= False):
48 Overlay
.add(self
, base
)
55 return self
.cmd(self
.binary
+ ' co ' + quiet_option
+ '"' + self
.src
+ '/" "' +
56 path([base
, self
.name
]) + '"')
58 def sync(self
, base
, quiet
= False):
68 return self
.cmd(self
.binary
+ ' up ' + quiet_option
+ '"' + path([base
, self
.name
]) +
72 '''Overlay type supported?'''
74 return Overlay
.supported(self
, [(self
.binary
, 'svn',
75 'dev-util/subversion'),])