コード例 #1
0
ファイル: trait.py プロジェクト: BackupTheBerlios/paella-svn
 def backup_scripts(self, bkup_path):
     makepaths(join(bkup_path, 'scripts'))
     for row in self.scripts():
         npath = join(bkup_path, 'scripts', row.script)
         nfile = self.scriptfile(row.script)
         filecopy(nfile, npath)
         nfile.close()
コード例 #2
0
ファイル: trait.py プロジェクト: pombredanne/paella-svn
 def export_scripts(self, bkup_path):
     makepaths(join(bkup_path, 'scripts'))
     for row in self.scripts():
         npath = join(bkup_path, 'scripts', row.script)
         nfile = self.scriptfile(row.script)
         filecopy(nfile, npath)
         nfile.close()
コード例 #3
0
ファイル: trait.py プロジェクト: BackupTheBerlios/paella-svn
 def backup_templates(self, bkup_path):
     makepaths(join(bkup_path, 'templates'))
     for t in self.templates():
         npath = join(bkup_path, 'templates', t.package, t.template)
         tfile = self.templatefile(t.package, t.template)
         makepaths(dirname(npath))
         filecopy(tfile, npath + '.template')
         tfile.close()
コード例 #4
0
ファイル: trait.py プロジェクト: pombredanne/paella-svn
 def export_templates(self, bkup_path):
     makepaths(join(bkup_path, 'templates'))
     for t in self.templates():
         npath = join(bkup_path, 'templates', t.package, t.template)
         tfile = self.templatefile(t.package, t.template)
         makepaths(dirname(npath))
         filecopy(tfile, npath + '.template')
         tfile.close()
コード例 #5
0
 def export_templates(self, bkup_path):
     n = 0
     for t in self.templates():
         npath = join(bkup_path, 'template-%d' % n)
         tfile = self.templatefile(t.package, t.template)
         filecopy(tfile, npath)
         tfile.close()
         n += 1
コード例 #6
0
ファイル: trait.py プロジェクト: BackupTheBerlios/paella-svn
 def export_templates(self, bkup_path):
     n = 0
     for t in self.templates():
         npath = join(bkup_path, 'template-%d' % n)
         tfile = self.templatefile(t.package, t.template)
         filecopy(tfile, npath)
         tfile.close()
         n += 1
コード例 #7
0
 def _update_section_(self, section, release=False):
     rpath = self.release.path(section, release=release)
     localpath = pjoin(self.local.source.distpath, rpath)
     url = pjoin(self.source.distpath, rpath)
     status = self.local.check_section(section, release=release)
     if status == 'missing':
         makepaths(dirname(localpath))
         rfile = get_url(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = get_url(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
コード例 #8
0
 def _update_section_(self, section, release=False):
     rpath = self.release.path(section, release=release)
     localpath = path.join(self.backup.source.distpath, rpath)
     url = path.join(self.local.source.distpath, rpath)
     status = self.backup.check_section(section, release=release)
     if status == 'missing':
         makepaths(path.dirname(localpath))
         rfile = file(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = file(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
コード例 #9
0
ファイル: repos.py プロジェクト: BackupTheBerlios/paella-svn
 def update_flatrepos(self):
     rpath = self.release.path(section, release=release)
     localpath = pjoin(self.local.source.distpath, rpath)
     url = pjoin(self.source.distpath, rpath)
     status = self.local.check_section(section, release=release)
     if status == 'missing':
         makepaths(dirname(localpath))
         rfile = get_url(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = get_url(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
コード例 #10
0
 def update_flatrepos(self):
     rpath = self.release.path(section, release=release)
     localpath = path.join(self.backup.source.distpath, rpath)
     url = path.join(self.local.source.distpath, rpath)
     status = self.backup.check_section(section, release=release)
     if status == 'missing':
         makepaths(path.dirname(localpath))
         rfile = get_url(url)
         filecopy(rfile, localpath)
     elif status == 'corrupt':
         rfile = get_url(url)
         filecopy(rfile, localpath)
     else:
         print localpath, status
コード例 #11
0
 def _update_section_(self, section, release=False):
     
     rpath = self.release.path(section, release=release)
     localpath = join(self.local_src.distpath, rpath)
     url = join(self.remote_src.distpath, rpath)
     status = self.local.check_dist_section(section, release=release)
     please_insert = False
     if not self.local._section_.count_rows(section) and not release:
             please_insert = True
     while status in ['missing', 'corrupt']:
         if status == 'missing':
             makepaths(dirname(localpath))
         rfile = get_url(url)
         filecopy(rfile, localpath)
         print localpath, status
         status = self.local.check_dist_section(section, release=release)
     print localpath, status
     if please_insert:
         self.insert_section_data(section)
     elif status == 'corrupt':
         self.insert_section_data(section)
コード例 #12
0
 def export_scripts(self, bkup_path):
     for row in self.scripts():
         npath = join(bkup_path, 'script-%s' % row.script)
         nfile = self.scriptfile(row.script)
         filecopy(nfile, npath)
         nfile.close()
コード例 #13
0
ファイル: trait.py プロジェクト: BackupTheBerlios/paella-svn
 def export_scripts(self, bkup_path):
     for row in self.scripts():
         npath = join(bkup_path, 'script-%s' % row.script)
         nfile = self.scriptfile(row.script)
         filecopy(nfile, npath)
         nfile.close()