# HG changeset patch # User Mads Kiilerich # Date 1580782876 -3600 # Node ID 6db4784809cbc2ac6cf5197965e43b23efd18a4d # Parent e68c0cd1647d85fd2f8f467593f4ba8740f43ef8 vcs: drop unused utils/archivers.py Don't ever bother to try to consider maintaining it. diff -r e68c0cd1647d -r 6db4784809cb kallithea/lib/vcs/utils/archivers.py --- a/kallithea/lib/vcs/utils/archivers.py Tue Feb 04 03:07:44 2020 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -# -*- 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]()