3
# Copyright (C) 2013 Tim Marston <tim@edm.am>
5
# This file is part of stdhome (hereafter referred to as "this program").
6
# See http://ed.am/dev/stdhome for more information.
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation, either version 3 of the License, or
11
# (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
31
# initialise the file list
33
if not os.path.exists( the.repo.expanded_dir ):
38
assert False # not implemented
41
def load_file_list( self ):
43
# if no file list, don't load one
52
# check we don't already have a file list
53
if self.file_list is not None:
54
raise the.FatalError( 'deployment in progress; ' + \
55
'see "%s resolve --help" for information' % the.program.name )
57
assert False # not implemented
61
if self.pre_copy_out_list is None:
64
print "deploying files"
67
for ( repodir, directories, files ) in os.walk( the.repo.expanded_dir ):
68
assert path[ : len( the.repo.expanded_dir ) ] == \
70
relative_path = path[ len( the.repo.expanded_dir ) : ]
71
fsdir = the.expanded_fsdir + relative_path
76
for dir in directories:
77
if os.path.exists( fsdir + dir ) and \
78
not os.path.isdir( fsdir + dir ):
82
# if exists in repo as directory and also in fs as non-directory
83
if os.path.isdir( the.repo.expnaded_dir + relative_path +