4
  7   ˆl–ß=¿J	Å4Ÿº‚ œPÜ.	õ1hß‘äÇò 8àDðÙuÁG(?ŸÀƒh¹Ã¿Æ      1
     ˆÅÄÃ584Â¿Æ H    ‹      Õ–QoÚ0Çßû)<?ì(CS2uiheš¦iB&6Ä"±#ûBÊ>ý’	Ú�¶Ië¤<$>_þöÝïì$ö^ÓÁâËlH>,îÇdöéýx4 ´ðùz ,‚òA·Ùj'”Ð1½Èó¼™_7µÙÀb&q,b“#§þ•Wøü+âE‚q×%ÆÂ).‰^ÐZÉ…··ÀÅN†Â6ŠÂ4+®¬¥IrfÄRi. �öV†,.{Å­‰H´Ùw»�ê\Ê0.0T‘½•æû"¡öËw1¨luÈ¡0�ïaDv,–Õ§¨Sê{2ÙkÂ>jea3µmnäšcŸ~¦ßœ0*Fû#‘ë>}7èOn§ý€ú–ØyÍ½ÓÜQÌ,’Ds¹–‚_?”âùýò„A©	„�LQju”‚C<EulSæXß8‚ÈœªJ	ÿ]5Xø¤³»ùp²Fó²$¼˜â˜Ý?_JêÏœP!	¤!:gÅZ~­V6½ýÙ%‰‘›©OHƒœUþ~¦¶Jçê´®ºgÙ™Ý«�ú‡æ4ÉgYuZ�^£Ýntz¤õö¦Ý"ä‚Ð½çÿgúj›ÙT(¾ä"fûebÍoáœ�Ž©_5D0™B™ˆ%QîÄr+¹[ž3Îú£ö/h…]c4¡Š¿?bUŽ#Yd˜�ìÁ²_g ò;'ø³øÔ_cÀÌ²Í	×¡ûò8x�êœæÁáˆèAyfýJBög    C   ˆl–Ü4ý( ©”u( 	•íÀà™S�ÿ�þBô¯Ê³rˆ�†A„% ?ŸÁ„ÈÄ_ŠI|¥�+Wé3ž¯ÁÈ ?÷     # Copyright (C) 2007-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

"""WorkingTree4 format and implementation.

WorkingTree4 provides the dirstate based working tree logic.

To get a WorkingTree, call bzrdir.open_workingtree() or
WorkingTree.open(dir).
"""

from io import BytesIO
import os

from ..lazy_import import lazy_import
lazy_import(globals(), """
import contextlib
import errno
import stat

from breezy import (
    branch as _mod_branch,
    cache_utf8,
    controldir,
    debug,
    filters as _mod_filters,
    osutils,
    revisiontree,
    trace,
    views,
    )
from breezy.bzr import (
    generate_ids,
    transform as bzr_transform,
    )
""")

from .. import (
    errors,
    revision as _mod_revision,
    )
from ..lock import LogicalLockResult
from ..lockable_files import LockableFiles
from ..lockdir import LockDir
from .inventorytree import (
    InventoryTree,
    InterInventoryTree,
    InventoryRevisionTree,
    )
from ..mutabletree import (
    BadReferenceTarget,
    MutableTree,
    )
from ..osutils import (
    file_kind,
    isdir,
    pathjoin,
    realpath,
    safe_unicode,
    )
from ..transport import get_transport_from_path, NoSuchFile
from ..transport.local import LocalTransport
from ..tree import (
    FileTimestampUnavailable,
    InterTree,
    MissingNestedTree,
    )
from ..workingtree import (
    WorkingTree,
    )
from .inventory import Inventory, ROOT_ID, entry_factory
from .workingtree import (
    InventoryWorkingTree,
    WorkingTreeFormatMetaDir,
    )
from . import dirstate


class DirStateWorkingTree(InventoryWorkingTree):

    def __init__(self, basedir,
                 branch,
                 _control_files=None,
                 _format=None,
                 _controldir=None):
        """Construct a WorkingTree for basedir.

        If the branch is not supplied, it is opened automatically.
        If the branch is supplied, it must be the branch for this basedir.
        (branch.base is not cross checked, because for remote branches that
        would be meaningless).
        """
        self._format = _format
        self.controldir = _controldir
        basedir = safe_unicode(basedir)
        trace.mutter("opening working tree %r", basedir)
        self._branch = branch
        self.basedir = realpath(basedir)
        # if branch is at our basedir and is a format 6 or less
        # assume all other formats have their own control files.
        self._control_files = _control_files
        self._transport = self._control_files._transport
        self._dirty = None
        # -------------
        # during a read or write lock these objects a