none
      ˆÂ‘äÇò 8à@ãÌ¾ä€¿ÏÁƒh¹À¿¾       1
      ˆÂ‘äÇò 8à@ãÌ¾ä€¿ÏÁƒh¹À¿¾      none
  6   ˆl–ßi~”Ji?u8 Z¸®2â˜´o�þB gpR4ÓïµüÿÂƒh¹ÁÀ¿      serio:ty06pr00id00ex00
  5   	ˆl–ßi~”Ji?u8 Z¸'nÅ1hß�þB gx-2Ë¡kùÃƒh¹ÂÁÀ      	disabled
  /   ˆ{‹„„-i[D<†ªoZƒ›Ù«Ä406_‘I|¥‰ÓMdœv ©ƒ†ü+=ÄÃ –    ‹      ¥’QOÛ0Çßù7?ðÖˆîe8ž ©´J¥­J¦iB{pm'±–Ä‘}ÐuŸ§éH 	ñä³ýóÿî>þ)_eÅÏõ¾7X¿^Ì3`Äb^äãÅ49;Gœ-°š¨ÿ‚¸Ûí’ÝEâ|…Åkj›)òVQ¢I3qÂ‡3q¼6RÇ8YjŒ˜wÚüWº{
V›)öÞ)¤ÚGpLS¢wŽÐßw¨ÝƒQ16mO{Ž£BÔÄ£(ß:½r�H7>?(·ù!ô‚S²±U—2r=Ü¶¯R†V¹.à¶‘Ýï¤²%ÙPÊîæÙêWäbÎáµàbò2e_³ty¹Js&–²5åëÌMd®˜XÈ@Ð:mKkô›ðíßÚ¿oæ#“› ¼íÉºî	Åhñ¹UåšÐËèõstPûçÔˆèÿuCªÍX_mfË"ŸoÆ–èAâ©º÷ükéMG�[o9¿?Ú5O»mè/ÿmáX¤·UML LàUò=þñ8óÆqœíGó<¤>    5   ˆl–ßi~”Ji?u8 Z¸'nõ1hß�þB gx.ˆŒ´?çÇƒh¹ÆÅÄ      disabled
  N   ˆl–ßi~”Ji?u8 Z¸'n4â˜´o‘äÇò 8à@ãÌ¾BFà¿ŸÈƒh¹Ça–ßi~”Ji?u8 Z¸'n4â˜´oÆ      disabled
     ˆÃÂÈ473Á¾Æ Ù    ‹      ­“]oÚ0†ïû+Î|±;r ejO]‚4$
ˆfš¦iNì«ÁŽl³´ûõ3„©l‚}iW‰}žœ÷}�cú,[¤ùÇåÞå·3X¾;›¦@ˆ.SÄ,ÏúÂ8Ž's¤ö¾½Bìº.ê.#c×˜¯°ö›fŒÎ[UúHxAØÝí± µä"<�zåÉ¦ZÈ0 Ùz§„ckM‰¾¶8ÙTh�ñ¸u]Í­DÊmÝ†ZÙ¨åß´�tûŽA"´0âq§=ú¯:¡Ý> /ör»WË¨¯áoÔZ'Ä›–0ª6kp¶LªÒh‡EÃõ}´VÞø„|š¦‹Ï�v_3Ê!˜©ò&Mæ×‹$#lÎ7’"?ÍÜæ†°w6F¨JIq¾ëá;õõ|Ã¬g2éJ«Z¯Œ~B1D<ŽZšÆµ<d}Ôö˜êñ»iðò‡a,oV“yžMWýHÄ®Å“»>5Â–aW{È”•¥7öñ�©x®×^_ÂÁ±UëÚ0€“ä_ÄÜê{m:}œ4LñdFÓJí\•º"ìhqlø'‡ñ0Fñ ~ÃWWñK€3àh8þE”?<W<üñ÷÷Šb§¿´7È°6    B   ˆl–Ü4ý( ©”u( 	•íÀà™S�ÿ�þ]–@¬Ü¢#á�a	HçÊ„dNˆ?É_ŠI|¥�+Wé3ž¯ÀÈ ?÷     # Copyright (C) 2009-2018 Jelmer Vernooij <jelmer@jelmer.uk>
# Copyright (C) 2012 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

"""Map from Git sha's to Bazaar objects."""

from typing import Iterator, List, Dict, Iterable

from dulwich.objects import (
    ShaFile,
    Blob,
    Commit,
    Tree,
    sha_to_hex,
    ZERO_SHA,
    ObjectID,
    )
from dulwich.object_store import (
    BaseObjectStore,
    )
from dulwich.pack import (
    pack_objects_to_data,
    PackData,
    Pack,
    )

from .. import (
    errors,
    lru_cache,
    trace,
    osutils,
    ui,
    )
from ..lock import LogicalLockResult
from ..revision import (
    NULL_REVISION,
    )
from ..tree import InterTree
from ..bzr.testament import (
    StrictTestament3,
    )

from .cache import (
    from_repository as cache_from_repository,
    )
from .mapping import (
    default_mapping,
    encode_git_path,
    entry_mode,
    extract_unusual_modes,
    mapping_registry,
    symlink_to_blob,
    )
from .unpeel_map import (
    UnpeelMap,
    )

import posixpath
import stat


BANNED_FILENAMES = ['.git']


def get_object_store(repo, mapping=None):
    git = getattr(repo, "_git", None)
    if git is not None:
        git.object_store.unlock = lambda: None
        git.object_store.lock_read = lambda: LogicalLockResult(lambda: None)
        git.object_store.lock_write = lambda: LogicalLockResult(lambda: None)
        return git.object_store
    return BazaarObjectStore(repo, mapping)


MAX_TREE_CACHE_SIZE = 50 * 1024 * 1024


class LRUTreeCache:

    def __init__(self, repository):
        def approx_tree_size(tree):
            # Very rough estimate, 250 per inventory entry
            return len(tree.root_inventory) * 250
        self.repository = repository
        self._cache = lru_cache.LRUSizeCache(
            max_size=MAX_TREE_CACHE_SIZE, after_cleanup_size=None,
            compute_si