##// END OF EJS Templates
html: move "Submit a bug" to make it more clear that it is for RhodeCode, not the repo...
html: move "Submit a bug" to make it more clear that it is for RhodeCode, not the repo RhodeCode _could_ contain a bug tracker and this link _could_ be for filing bugs for the hosted projects. Moving the link to the RhodeCode info makes it more clear that it is for RhodeCode bugs. The server instance is however something local, not directly related to the upstream.

File last commit:

r2007:324ac367 beta
r3779:e61a656b beta
Show More
archivers.py
67 lines | 1.2 KiB | text/x-python | PythonLexer
Added VCS into rhodecode core for faster and easier deployments of new versions
r2007 # -*- coding: utf-8 -*-
"""
vcs.utils.archivers
~~~~~~~~~~~~~~~~~~~
set of archiver functions for creating archives from repository content
:created_on: Jan 21, 2011
:copyright: (c) 2010-2011 by Marcin Kuzminski, Lukasz Balcerzak.
"""
class BaseArchiver(object):
def __init__(self):
self.archive_file = self._get_archive_file()
def addfile(self):
"""
Adds a file to archive container
"""
pass
def close(self):
"""
Closes and finalizes operation of archive container object
"""
self.archive_file.close()
def _get_archive_file(self):
"""
Returns container for specific archive
"""
raise NotImplementedError()
class TarArchiver(BaseArchiver):
pass
class Tbz2Archiver(BaseArchiver):
pass
class TgzArchiver(BaseArchiver):
pass
class ZipArchiver(BaseArchiver):
pass
def get_archiver(self, kind):
"""
Returns instance of archiver class specific to given kind
:param kind: archive kind
"""
archivers = {
'tar': TarArchiver,
'tbz2': Tbz2Archiver,
'tgz': TgzArchiver,
'zip': ZipArchiver,
}
return archivers[kind]()