MAJOR=4
MINOR=25
DEVNAME=tty25
  B   ˆl–Ü4ý( ©”u( 	•íÀà™S�ÿ�þcŒ¯,Ü¢#á�a	HçÇ„ià�¯Æ_ŠI|¥�+Wé3ž¯ËÊ ?÷     # Copyright (C) 2007-2011 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

"""Knit-based pack repository formats."""

from .. import (
    errors,
    transport as _mod_transport,
    )

from ..lazy_import import lazy_import
lazy_import(globals(), """
import time

from breezy import (
    controldir,
    debug,
    osutils,
    revision as _mod_revision,
    trace,
    tsort,
    ui,
    )
from breezy.bzr import (
    pack,
    xml5,
    xml6,
    xml7,
    )
from breezy.bzr.knit import (
    _KnitGraphIndex,
    KnitPlainFactory,
    KnitVersionedFiles,
    )
""")

from ..bzr import (
    btree_index,
    )
from ..bzr.index import (
    CombinedGraphIndex,
    GraphIndex,
    GraphIndexPrefixAdapter,
    InMemoryGraphIndex,
    )
from .knitrepo import (
    KnitRepository,
    )
from .pack_repo import (
    _DirectPackAccess,
    NewPack,
    RepositoryFormatPack,
    ResumedPack,
    Packer,
    PackCommitBuilder,
    PackRepository,
    RepositoryPackCollection,
    )
from ..bzr.vf_repository import (
    StreamSource,
    )


class KnitPackRepository(PackRepository, KnitRepository):

    def __init__(self, _format, a_controldir, control_files, _commit_builder_class,
                 _serializer):
        PackRepository.__init__(self, _format, a_controldir, control_files,
                                _commit_builder_class, _serializer)
        if self._format.supports_chks:
            raise AssertionError("chk not supported")
        index_transport = self._transport.clone('indices')
        self._pack_collection = KnitRepositoryPackCollection(self,
                                                             self._transport,
                                                             index_transport,
                                                             self._transport.clone(
                                                                 'upload'),
                                                             self._transport.clone(
                                                                 'packs'),
                                                             _format.index_builder_class,
                                                             _format.index_class,
                                                             use_chk_index=False,
                                                             )
        self.inventories = KnitVersionedFiles(
            _KnitGraphIndex(self._pack_collection.inventory_index.combined_index,
                            add_callback=self._pack_collection.inventory_index.add_callback,
                            deltas=True, parents=True, is_locked=self.is_locked),
            data_access=self._pack_collection.inventory_index.data_access,
            max_delta_chain=200)
        self.revisions = KnitVersionedFiles(
            _KnitGraphIndex(self._pack_collection.revision_index.combined_index,
                            add_callback=self._pack_collection.revision_index.add_callback,
                            deltas=False, parents=True, is_locked=self.is_locked,
                            track_external_parent_refs=True),
            data_access=self._pack_collection.revision_index.data_access,
            max_delta_chain=0)
        self.signatures = KnitVersionedFiles(
          