403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/tree.cpython-313.pyc
�

p��g�����SrSrSSKJr SSKJrJrJrJr SSK	J
r
JrJrJ
r
 SSK	Jr SSKJr "S	S
\
R$5r"SS\
R$5r"S
S5r"SS\5r"SS\5r"SS\5r"SS\5r"SS5r"SS5r"SS\\5rS&S\S\S\\S \S!\\\\44
S"jjr S&S#jr!S$r"g%)'z6Tree classes, representing directory at point in time.�google�)�Iterator)�
TYPE_CHECKING�Optional�Union�cast�)�errors�lock�osutils�trace)�revision)�InterObjectc�"�\rSrSrSrSrSrSrg)�FileTimestampUnavailable�z,The filestamp for %(path)s is not available.Tc��Xlg�N��path��selfrs  �-/usr/lib/python3/dist-packages/breezy/tree.py�__init__�!FileTimestampUnavailable.__init__"����	�rN)�__name__�
__module__�__qualname__�__firstlineno__�_fmt�internal_errorr�__static_attributes__�rrrrs��9�D��N�rrc��\rSrSrSrSrSrg)�MissingNestedTree�&z1The nested tree for %(path)s can not be resolved.c��Xlgrrrs  rr�MissingNestedTree.__init__)rrrN)rrr r!r"rr$r%rrr'r'&s��>�D�rr'c�J�\rSrSr%Sr/r\\\S'Sr	\\S'Sr
SrSrg	)
�	TreeEntry�-z@An entry that implements the minimum interface used by commands.�	__slots__c�b�[U[5=(a URUR:H$r)�
isinstancer,�	__class__�r�others  r�__eq__�TreeEntry.__eq__2s!���%��+�Q����4�>�>�0Q�Qr�kindc��g)Nz???r%�rs r�kind_character�TreeEntry.kind_character8���rc��g)z�Does this entry reference the same entry?

This is mostly the same as __eq__, but returns False
for entries without enough information (i.e. revision is None)
Fr%r2s  r�
is_unmodified�TreeEntry.is_unmodified;s��rr%N)
rrr r!�__doc__r.�list�str�__annotations__r4r9r=r$r%rrr,r,-s*��J��I�t�C�y��R��I��rr,c�8�\rSrSr%Sr/r\\\S'Sr	Sr
Srg)�
TreeDirectory�Dz5See TreeEntry. This is a directory in a working tree.r.�	directoryc��g)N�/r%r8s rr9�TreeDirectory.kind_characterK���rr%N�rrr r!r?r.r@rArBr6r9r$r%rrrDrDDs��?��I�t�C�y���D�rrDc�8�\rSrSr%Sr/r\\\S'Sr	Sr
Srg)�TreeFile�Oz8See TreeEntry. This is a regular file in a working tree.r.�filec��g�N�r%r8s rr9�TreeFile.kind_characterV���rr%NrKr%rrrMrMOs��B��I�t�C�y���D�rrMc�8�\rSrSr%Sr/r\\\S'Sr	Sr
Srg)�TreeLink�Zz3See TreeEntry. This is a symlink in a working tree.r.�symlinkc��grQr%r8s rr9�TreeLink.kind_characterarTrr%NrKr%rrrVrVZs��=��I�t�C�y���D�rrVc�8�\rSrSr%Sr/r\\\S'Sr	Sr
Srg)�
TreeReference�ezFSee TreeEntry. This is a reference to a nested tree in a working tree.r.�tree-referencec��g)N�+r%r8s rr9�TreeReference.kind_characterlrJrr%NrKr%rrr\r\es��P��I�t�C�y���D�rr\c�f�\rSrSrSr/SQrSSjrSrSrSr	Sr
S	r\S
5r
SrSrSrg
)�
TreeChange�pzCDescribes the changes between the same item in two different trees.)�changed_content�copied�
executabler6�namer�	versionedc�X�XlX lX0lX@lXPlX`lXplgr�rrerirhr6rgrf)rrrerirhr6rgrfs        rr�TreeChange.__init__}s(���	�.��"���	��	�$���rc�j�SRURRUR55$)Nz{}{!r})�formatr1r�	_as_tupler8s r�__repr__�TreeChange.__repr__�s$�����t�~�~�6�6����8H�I�Irc��URURURURURUR
UR4$rrkr8s rro�TreeChange._as_tuple�s?���I�I�� � ��N�N��I�I��I�I��O�O��K�K�
�	
rc��[U[5(a!UR5UR5:H$[U[5(aUR5U:H$g�NF)r0rcro�tupler2s  rr4�TreeChange.__eq__�sJ���e�Z�(�(��>�>�#�u���'8�8�8��e�U�#�#��>�>�#�u�,�,�rc�D�UR5UR5:$r)ror2s  r�__lt__�TreeChange.__lt__�s���~�~��%�/�/�"3�3�3rc�b�URS:XaURSURS:g$g)N)TTrr	F)rirgr8s r�
meta_modified�TreeChange.meta_modified�s.���>�>�\�)��?�?�1�%�����);�;�;�rc��UR(+=(a5 SUR;=(a URSURS:g$�Nrr	)rfrhrr8s r�renamed�TreeChange.renamed�s;�����O�V��D�I�I� 5�V�$�)�)�A�,�$�)�)�TU�,�:V�	
rc��[R"URS5[R"URS5:g$r)r�dirnamerr8s r�
is_reparented�TreeChange.is_reparented�s/�����t�y�y��|�,�����	�	�!��0M�M�Mrc
���URURSS4URURSS4URSS4UR
SS4URSS4SS9$)NrF)rf)r1rrerirhr6rgr8s r�discard_new�TreeChange.discard_new�sv���~�~�
�Y�Y�q�\�4� �� � �
�^�^�A�
��%�
�Y�Y�q�\�4� �
�Y�Y�q�\�4� �
�_�_�Q�
��&���
�	
rN)F)rrr r!r?r.rrpror4ryr|�propertyr�r�r�r$r%rrrcrcpsQ��M��I�PU�	�J�	
��4��
�
��
�
N�	
rrcc�V�\rSrSrSrSrSrSrSrSr	\
S5rSCS
jrSDSjr
SrS
rSrSrSrS\\4SjrSES\\\S\4SjjrSrSFSjrSrSrSrSrSr Sr!Sr"Sr#S r$S!r%S"r&S#r'SGS$jr(SGS%jr)S&r*S'r+S(r,S)r-S*r.\/R`4S+jr1S,\S\4S-jr2SHS.jr3S/r4S0r5S\\4S1jr6S2r7S3r8SIS4jr9S5r:SGS6jr;S7r<SJS8jr=S9r>SKS:\S;\S<\S=\\S>\\?\@\A4S\S\\B4S?jjrC\DS@5rESGSAjrFSBrGg	)L�Tree�aAbstract file tree.

There are several subclasses:

* `WorkingTree` exists as files on disk editable by the user.

* `RevisionTree` is a tree as recorded at some point in the past.

Trees can be compared, etc, regardless of whether they are working
trees or versioned trees.
c��g)zvWhether this tree supports rename tracking.

This defaults to True, but some implementations may want to override
it.
Tr%r8s r�supports_rename_tracking�Tree.supports_rename_tracking����rc��g)z�Whether this tree can contain explicitly versioned directories.

This defaults to True, but some implementations may want to override
it.
Tr%r8s r�has_versioned_directories�Tree.has_versioned_directories�r�rc�,�[UR5er)�NotImplementedError�supports_tree_referencer8s rr��Tree.supports_tree_reference�s��!�$�">�">�?�?rc��g)z&Does this tree support symbolic links?Tr%r8s r�supports_symlinks�Tree.supports_symlinks�s��rc��g)z)Is the specified path special to the VCS.Fr%rs  r�is_special_path�Tree.is_special_path�s��rc�,�[UR5e)z Does this tree support file ids?)r��supports_file_idsr8s rr��Tree.supports_file_ids�s��"�$�"8�"8�9�9rNc	�P�[RX5RUUUUUUS9$)a�Return a TreeDelta of the changes from other to this tree.

Args:
  other: A tree to compare with.
  specific_files: An optional list of file paths to restrict the
    comparison to. When mapping filenames to ids, all matches in all
    trees (including optional extra_trees) are used, and all children of
    matched directories are included.
  want_unchanged: An optional boolean requesting the inclusion of
    unchanged entries in the result.
  extra_trees: An optional list of additional trees to use when
    mapping the contents of specific_files (paths) to their identities.
  require_versioned: An optional boolean (defaults to False). When
    supplied and True all the 'specific_files' must be versioned, or
    a PathsNotVersionedError will be thrown.
  want_unversioned: Scan for unversioned paths.

The comparison will be performed by an InterTree object looked up on
self and other.
)�want_unchanged�specific_files�extra_trees�require_versioned�include_root�want_unversioned)�	InterTree�get�compare)rr3r�r�r�r�r�r�s        r�changes_from�Tree.changes_from�s8��B�}�}�U�)�1�1�)�)�#�/�%�-�
2�
�	
rc	�T�[RX5nURUUUUUUS9$)zSee InterTree.iter_changes.)r�)r�r��iter_changes)	r�	from_tree�include_unchangedr��pbr�r�r��	intertrees	         rr��Tree.iter_changess<���M�M�)�2�	��%�%������-�
&�
�	
rc�.�SSKJn UR5$)zeGet a list of the conflicts in the tree.

Each conflict is an instance of breezy.conflicts.Conflict.
r	)�	conflicts)rRr��ConflictList)r�_mod_conflictss  rr��Tree.conflicts&s��
	2��*�*�,�,rc��/$)zAFor trees that can have unversioned files, return all such paths.r%r8s r�extras�Tree.extras/s���	rc�,�[UR5e)z�Get the parent ids for this tree.

Returns: a list of parent ids. [] is returned to indicate
a tree with no parents.

Raises:
  BzrError: if the parents are not known.
)r��get_parent_idsr8s rr��Tree.get_parent_ids3s��"�$�"5�"5�6�6rc�,�[UR5e)z$True if the tree has given filename.)r��has_filename�r�filenames  rr��Tree.has_filename>s��!�$�"3�"3�4�4rc��g)z�Check whether the filename is ignored by this tree.

Args:
  filename: The relative filename within the tree.
Returns: True if the filename is ignored.
Fr%r�s  r�
is_ignored�Tree.is_ignoredBs��r�returnc�,�[UR5e)z=Iterate through all paths, including paths for missing files.)r��all_versioned_pathsr8s rr��Tree.all_versioned_pathsKs��!�$�":�":�;�;rr��recurse_nestedc�,�[UR5e)a�Walk the tree in 'by_dir' order.

This will yield each entry in the tree as a (path, entry) tuple.
The order that they are yielded is:

Directories are walked in a depth-first lexicographical order,
however, whenever a directory is reached, all of its direct child
nodes are yielded in  lexicographical order before yielding the
grandchildren.

For example, in the tree::

   a/
     b/
       c
     d/
       e
   f/
     g

The yield order (ignoring root) would be::

  a, f, a/b, a/d, a/b/c, a/d/e, f/g

If recurse_nested is enabled then nested trees are included as if
they were a part of the tree. If is disabled then TreeReference
objects (without any children) are yielded.
)r��iter_entries_by_dir)rr�r�s   rr��Tree.iter_entries_by_dirOs��>"�$�":�":�;�;rc�,�[UR5e)z�Iterate over the children of a directory or tree reference.

Args:
  path: Path of the directory
Raises:
  NoSuchFile: When the path does not exist
Returns: Iterator over entries in the directory
)r��iter_child_entriesrs  rr��Tree.iter_child_entriesps��"�$�"9�"9�:�:rc�,�[UR5e)a5List all files in this tree.

Args:
  include_root: Whether to include the entry for the tree root
  from_dir: Directory under which to list files
  recursive: Whether to list files recursively
  recurse_nested: enter nested trees
Returns: iterator over tuples of
    (path, versioned, kind, inventory entry)
)r��
list_files)rr��from_dir�	recursiver�s     rr��Tree.list_files{s��"�$�/�/�2�2rc#�# �UR5(a0UR5HupURS:XdMUv� M gg7f)Nr^)r�r�r6)rr�entrys   r�iter_references�Tree.iter_references�s@����'�'�)�)�#�7�7�9����:�:�!1�1��J� :�*�s
�9A	�
A	c��UR5H@nUS-
nURU5(dM URU5nX1[U5S4s $ g)znFind the nested tree that contains a path.

Returns: tuple with (nested tree and path inside the nested tree)
rHN�NN)r��
startswith�get_nested_tree�len)rr�nested_path�nested_trees    r�get_containing_nested_tree�Tree.get_containing_nested_tree�s[��
 �/�/�1�K��3��K����{�+�+�"�2�2�;�?��"��[�)9�);�$<�<�<�	2�rc�,�[UR5e)z�Open the nested tree at the specified path.

Args:
  path: Path from which to resolve tree reference.
Returns: A Tree object for the nested tree
Raises:
  MissingNestedTree: If the nested tree can not be resolved
)r�r�rs  rr��Tree.get_nested_tree�s��"�$�"6�"6�7�7rc�^�[SRURR55e)Nz$Tree subclass {} must implement kind�r�rnr1rrs  rr6�	Tree.kind�s'��!�2�9�9�$�.�.�:Q�:Q�R�
�	
rc�$�URU5$)z�File kind stored for this path.

May not match kind on disk for working trees.  Always available
for versioned files, even when the file itself is missing.
)r6rs  r�stored_kind�Tree.stored_kind�s���y�y���rc�,�[UR5e)a�Get a summary of the information about path.

All the attributes returned are for the canonical form, not the
convenient form (if content filters are in use.)

Args:
  path: A relative path within the tree.
Returns: A tuple containing kind, size, exec, sha1-or-link.
    Kind is always present (see tree.kind()).
    size is present if kind is file and the size of the
        canonical form can be cheaply determined, None otherwise.
    exec is None unless kind is file and the platform supports the 'x'
        bit.
    sha1-or-link is the link target if kind is symlink, or the sha1 if
        it can be obtained without reading the file.
)r��path_content_summaryrs  rr��Tree.path_content_summary�s��""�$�";�";�<�<rc�^�[SRURR55e)Nz6Tree subclass {} must implement get_reference_revisionr�rs  r�get_reference_revision�Tree.get_reference_revision�s*��!�D�K�K����'�'�
�
�	
rc�,�[UR5e)aReturn a tuple of kind, executable, stat_value for a file.

entry may be None if there is no inventory entry for the file, but
path must always be supplied.

kind is None if there is no file present (even if an inventory id is
present).  executable is False for non-file entries.
)r��_comparison_data)rr�rs   rr��Tree._comparison_data�s��"�$�"7�"7�8�8rc�,�[UR5e)z3Return a file object for the file path in the tree.)r��get_filers  rr��
Tree.get_file�s��!�$�-�-�0�0rc�(�URU5S4$)aoGet a file handle and stat object for path.

The default implementation returns (self.get_file, None) for backwards
compatibility.

Args:
  path: The path of the file.
Returns: A tuple (file_handle, stat_value_or_None). If the tree has
    no stat facility, or need for a stat cache feedback during commit,
    it may return None for the second element of the tuple.
N)r�rs  r�get_file_with_stat�Tree.get_file_with_stat�s���
�
�d�#�T�*�*rc�z�URU5nUR5sSSS5 $!,(df   g=f)z{Return the byte content of a file.

Args:
  path: The path of the file.

Returns: A single byte string for the whole file.
N)r��read)rr�my_files   r�
get_file_text�Tree.get_file_text�s'���]�]�4�
 �G��<�<�>�!�
 �
 �s�,�
:c�L�[R"URU55$)zMReturn the content of a file, as lines.

Args:
  path: The path of the file.
)r�split_linesr�rs  r�get_file_lines�Tree.get_file_lines�s ���"�"�4�#5�#5�d�#;�<�<rc�$�SURXS94$)aReturn a verifier for a file.

The default implementation returns a sha1.

Args:
  path: The path that this file can be found at.
    These must point to the same object.
  stat_value: Optional stat value for the object
Returns: Tuple with verifier name and verifier data
�SHA1)�
stat_value)�
get_file_sha1�rrrs   r�get_file_verifier�Tree.get_file_verifier�s����*�*�4�*�G�H�Hrc�,�[UR5e)a3Return the SHA1 file for a file.

:note: callers should use get_file_verifier instead
    where possible, as the underlying repository implementation may
    have quicker access to a non-sha1 verifier.

Args:
  path: The path that this file can be found at.
  stat_value: Optional stat value for the object
)r�rrs   rr�Tree.get_file_sha1s��"�$�"4�"4�5�5rc�,�[UR5e)zaReturn the modification time for a file.

Args:
  path: The path that this file can be found at.
)r��get_file_mtimers  rr�Tree.get_file_mtimes��"�$�"5�"5�6�6rc�,�[UR5e)z�Return the size of a file in bytes.

This applies only to regular files.  If invoked on directories or
symlinks, it will return None.
)r��
get_file_sizers  rr�Tree.get_file_size!���"�$�"4�"4�5�5rc�,�[UR5e)zWCheck if a file is executable.

Args:
  path: The path that this file can be found at.
)r��
is_executablers  rr�Tree.is_executable)rrc#�P# �UHup#URU54nX44v� M g7f)a�Iterate through file contents.

Files will not necessarily be returned in the order they occur in
desired_files.  No specific order is guaranteed.

Yields pairs of identifier, bytes_iterator.  identifier is an opaque
value supplied by the caller as part of desired_files.  It should
uniquely identify the file version in the caller's context.  (Examples:
an index number or a TreeTransform trans_id.)

bytes_iterator is an iterable of bytestrings for the file.  The
kind of iterable and length of the bytestrings are unspecified, but for
this implementation, it is a tuple containing a single bytestring with
the complete text of the file.

Args:
  desired_files: a list of (path, identifier) pairs
N)r�)r�
desired_filesr�
identifier�cur_files     r�iter_files_bytes�Tree.iter_files_bytes1s2���&!.��D�
�*�*�4�0�2�H��&�&�
!.�s�$&c�,�[UR5e)z�Get the target for a given path.

It is assumed that the caller already knows that path is referencing
a symlink.

Args:
  path: The path of the file.
Returns: The path the symlink points to.
)r��get_symlink_targetrs  rr�Tree.get_symlink_targetLs��"�$�"9�"9�:�:rc�,�[UR5e)a�Return an iterator of revision_id, line tuples.

For working trees (and mutable trees in general), the special
revision_id 'current:' will be used for lines that are new in this
tree, e.g. uncommitted changes.

Args;
  path: The file to produce an annotated version from
  default_revision: For lines that don't match a basis, mark them
    with this revision id. Not all implementations will make use of
    this value.
)r��
annotate_iter)rr�default_revisions   rr!�Tree.annotate_iterXs��"�$�"4�"4�5�5rrc�,�[UR5e)zOCheck whether path is versioned.

Args:
  path: Path to check
Returns: boolean
)r��is_versionedrs  rr%�Tree.is_versionedgs��"�$�"3�"3�4�4rc�,�[UR5e)a�Find related paths in tree corresponding to specified filenames in any
of `lookup_trees`.

All matches in all trees will be used, and all children of matched
directories will be used.

Args:
  paths: The filenames to find related paths for (if None, returns
    None)
  trees: The trees to find file_ids within
  require_versioned: if true, all specified filenames must occur in
    at least one tree.
Returns: a set of paths for the specified filenames and their children
    in `tree`
)r��find_related_paths_across_trees)r�paths�treesr�s    rr(�$Tree.find_related_paths_across_treesps��$"�$�"F�"F�G�Grc�B�[R"UR5$)z]Lock this tree for multiple read only operations.

Returns: A breezy.lock.LogicalLockResult.
)r�LogicalLockResult�unlockr8s r�	lock_read�Tree.lock_read�s��
�%�%�d�k�k�2�2rc�.�[R"X5e)aObtain a revision tree for the revision revision_id.

The intention of this method is to allow access to possibly cached
tree data. Implementors of this method should raise NoSuchRevision if
the tree is not locally available, even if they could obtain the
tree via a repository or some other means. Callers are responsible
for finding the ultimate source for a revision tree.

Args:
  revision_id: The revision_id of the requested tree.
Returns: A Tree.

Raises:
  NoSuchRevision: if the tree cannot be obtained.
)r
�NoSuchRevisionInTree)r�revision_ids  r�
revision_tree�Tree.revision_tree�s�� �)�)�$�<�<rc��[/5$)z_What files are present in this tree and unknown.

Returns: an iterator over the unknown files.
)�iterr8s r�unknowns�
Tree.unknowns�s
��
�B�x�rc��grr%r8s rr.�Tree.unlock�s��rc�`�UVs1sHo RU5(aMUiM sn$s snf)z=Filter out paths that are versioned.

Returns: set of paths.
)r%)rr)�ps   r�filter_unversioned_files�Tree.filter_unversioned_files�s'��!�=�5�a�(9�(9�!�(<��5�=�=��=s�+�+c�,�[UR5e)a�Walk the contents of this tree from path down.

This yields all the data about the contents of a directory at a time.
After each directory has been yielded, if the caller has mutated the
list to exclude some directories, they are then not descended into.

The data yielded is of the form:
(directory-relpath,
[(relpath, basename, kind, lstat, path_from_tree_root,
  versioned_kind), ...]),
 - directory-path-from-root is the containing dirs path from /
 - relpath is the relative path within the subtree being walked.
 - basename is the basename
 - kind is the kind of the file now. If unknonwn then the file is not
   present within the tree - but it may be recorded as versioned. See
   versioned_kind.
 - lstat is the stat data *if* the file was statted.
 - path_from_tree_root is the path from the root of the tree.
 - versioned_kind is the kind of the file as last recorded in the
   versioning system. If 'unknown' the file is not versioned.
One of 'kind' and 'versioned_kind' must not be 'unknown'.

Args:
  prefix: Start walking from prefix within the tree rather than
    at the root. This allows one to walk a subtree but get paths that are
    relative to a tree rooted higher up.
Returns: an iterator over the directory data.
)r��walkdirs)r�prefixs  rrA�
Tree.walkdirs�s��:"�$�-�-�0�0rc��grur%r8s r�supports_content_filtering�Tree.supports_content_filtering�r;rc��SSKJnJn UR5n[	U5S:Xa/$[UR
U/U55nURU5nSUR;a&[R"S5RXU5 U$)aYThe stack of content filters for a path if filtering is supported.

Readers will be applied in first-to-last order.
Writers will be applied in last-to-first order.
Either the path or the file-id needs to be provided.

Args:
  path: path relative to the root of the tree
    or None if unknown
Returns: the list of filters - [] if there are none
r	)�debug�filtersrrIz$*** {0} content-filter: {1} => {2!r})rRrHrI�_get_registered_namesr��next�iter_search_rules�_get_filter_stack_for�debug_flagsr
�notern)rrrHrI�filter_pref_names�prefs�stks       r�_content_filter_stack�Tree._content_filter_stack�s���	%�#�9�9�;��� �!�Q�&��I��T�+�+�T�F�4E�F�G���+�+�E�2����)�)�)��J�J�=�>�E�E�d�SV�W��
rc�F�UR5(aUR$g)z�A function that returns a stack of ContentFilters.

The function takes a path (relative to the top of the tree) and a
file-id as parameters.

Returns: None if content filtering is not supported by this tree.
N)rErSr8s r�_content_filter_stack_provider�#Tree._content_filter_stack_provider�s"���*�*�,�,��-�-�-�rc#��# �SSKJn UcURnURU5nUb=UbUHnUR	Xb5v� M gUHnURU5v� M gg7f)a�Find the preferences for filenames in a tree.

Args:
  path_names: an iterable of paths to find attributes for.
  Paths are given relative to the root of the tree.
  pref_names: the list of preferences to lookup - None for all
  _default_searcher: private parameter to assist testing - don't use
Returns: an iterator of tuple sequences, one per path-name.
  See _RulesSearcher.get_items for details on the tuple sequence.
r	)�rulesN)rRrY�_per_user_searcher�_get_rules_searcher�get_selected_items�	get_items)r�
path_names�
pref_names�_default_searcherrY�searcherrs       rrL�Tree.iter_search_rules�sv���	��$� %� 8� 8���+�+�,=�>�����%�&�D�"�5�5�d�G�G�'�'�D�"�,�,�T�2�2�'� �s�A(A*c�
�UnU$)z:Get the RulesSearcher for this tree given the default one.r%)r�default_searcherras   rr[�Tree._get_rules_searchers��#���rrnrh�root�subdir�force_mtimec�|�SSKJn UR5 U"UUUUUUUS9sSSS5 $!,(df   g=f)z�Create an archive of this tree.

Args:
  format: Format name (e.g. 'tar')
  name: target file name
  root: Root directory name (or None)
  subdir: Subdirectory to export (or None)
Returns: Iterator over archive chunks
r	)�create_archive)rhr�N)�archiverjr/)rrnrhrfrgrhr�rjs        rrk�Tree.archives:��$	,�
�^�^�
�!������'�-���
�
�s�-�
;c��US;$)z;Check if this tree support versioning a specific file kind.)rOrFrXr^r%)�clsr6s  r�versionable_kind�Tree.versionable_kind3s���I�I�Irc�,�[UR5e)zObtain a transform object.)r��preview_transform)rr�s  rrr�Tree.preview_transform8s��!�$�"8�"8�9�9rr%�FNNFFF�FNNNTFru)FNTFr�NT)rRr�)rRNNF)Hrrr r!r?r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrAr�rr@�boolr�r�r�r�r�r�r6r�r�r�r�r�r�r�rr	rrrrrr�
_mod_revision�CURRENT_REVISIONr!r%r(r/r4r8r.r>rArErSrVrLr[r�int�float�bytesrk�classmethodrorrr$r%rrr�r��s!��
���@����:��:�������(
�Z ������
�*-��	7�5��<�X�c�]�<�
RW�<�&�t�C�y�1�<�JN�<�B	;�QV�
3���	8�
�
�=�&
�	9�1�+�	"�=�I�6�7�6�6�'�6
;�4A�3Q�3Q�
6�5��5��5�48�H�(3�=�$�(�3�-��
�>�1�>��.�3�0�� $�37�$�������	�
��
���e�C��J�/�0�
���
�%���>�J��J�:rr�c
��^�\rSrSr%Sr\(aSSKJr Sr\	S\
S'Sr\	S\
S'/r\
S	5r\
S
\S\SS4U4S
jj5rS"S\S\	\\S\	\\S\S\S\4SjjrS#S\S\	\\S\	\\S\S\4
SjjrS$S\S\4SjjrS%S\S\S\	\4SjjrS%S\S\S\	\4SjjrS%S\\S\\\	\44SjjrS%S\\S\S\\\	\44S jjrS!rU=r$)&r�i=a�This class represents operations taking place between two Trees.

Its instances have methods like 'compare' and contain references to the
source and target trees these operations are to be carried out on.

Clients of breezy should not need to use InterTree directly, rather they
should use the convenience methods on Tree such as 'Tree.compare()' which
will pass through to InterTree as appropriate.
r	)�WorkingTreeFormatNr�_matching_from_tree_format�_matching_to_tree_formatc��grvr%)�kls�source�targets   r�
is_compatible�InterTree.is_compatibleRs��rr�r�r�c�>>�[[[TU]
X55$r)rr��superr�)rnr�r�r1s   �rr��
InterTree.getXs����I�u�w�{�6�:�;�;rr�r�r�r�r�r�c���SSKJn UR/nUbX�-nUR5 UR	URUR
UUUUUUS9sSSS5 $!,(df   g=f)a	Return the changes from source to target.

Returns: A TreeDelta.

Args:
  specific_files: An optional list of file paths to restrict the
    comparison to. When mapping filenames to ids, all matches in all
    trees (including optional extra_trees) are used, and all children of
    matched directories are included.
  want_unchanged: An optional boolean requesting the inclusion of
    unchanged entries in the result.
  extra_trees: An optional list of additional trees to use when
    mapping the contents of specific_files (paths) to file_ids.
  require_versioned: An optional boolean (defaults to False). When
    supplied and True all the 'specific_files' must be versioned, or
    a PathsNotVersionedError will be thrown.
  want_unversioned: Scan for unversioned paths.
r	)�deltaN)r�r�r�)rRr�r�r/�_compare_treesr�)	rr�r�r�r�r�r�r�r*s	         rr��InterTree.compare\si��6	����
���"��'�E�
�^�^�
��'�'����������'�"3�!1�(�	��
�
�s�*A�
A-r�c�,�[UR5e)aJGenerate an iterator of changes between trees.

A TreeChange object is returned.

Changed_content is True if the file's content has changed.  This
includes changes to its kind, and to a symlink's target.

versioned, parent, name, kind, executable are tuples of (from, to).
If a file is missing in a tree, its kind is None.

Iteration is done in parent-to-child order, relative to the target
tree.

There is no guarantee that all paths are in sorted order: the
requirement to expand the search due to renames may result in children
that should be found early being found late in the search, after
lexically later results have been returned.

Args:
  require_versioned: Raise errors.PathsNotVersionedError if a
    path in the specific_files list is not versioned in one of
    source, target or extra_trees.
  specific_files: An optional list of file paths to restrict the
    comparison to. When mapping filenames to ids, all matches in all
    trees (including optional extra_trees) are used, and all children
    of matched directories are included. The parents in the target tree
    of the specific files up to and including the root of the tree are
    always evaluated for changes too.
  want_unversioned: Should unversioned files be returned in the
    output. An unversioned file is defined as one with (False, False)
    for the versioned pair.
)r�r�)rr�r�r�r�r�r�s       rr��InterTree.iter_changes�s��R"�$�"3�"3�4�4r�source_path�target_pathc��UR5 URRX5upVURRX$5upxXW:Xa
Xh:HsSSS5 $US:waURR	X5n	OUn	US:waURR	X$5n
OUn
X�:HsSSS5 $!,(df   g=f)a�Check if two files are the same in the source and target trees.

This only checks that the contents of the files are the same,
it does not touch anything else.

Args:
  source_path: Path of the file in the source tree
  target_path: Path of the file in the target tree
  source_stat: Optional stat value of the file in the source tree
  target_stat: Optional stat value of the file in the target tree
Returns: Boolean indicating whether the files have the same contents
Nr)r/r�r	r�r)rr�r��source_stat�target_stat�source_verifier_kind�source_verifier_data�target_verifier_kind�target_verifier_data�source_sha1�target_sha1s           r�file_content_matches�InterTree.file_content_matches�s����^�^�
�9=���9V�9V��:�6� �:>���9V�9V��:�6� �$�;�+�C��
�$�v�-�"�k�k�7�7��Q��2��#�v�-�"�k�k�7�7��Q��2���-�%�
�
�s�AB3�AB3�3
Cr�recursec�,�[UR5e)z�Find target tree path.

Args:
  path: Path to search for (exists in source)
Returns: path in target, or None if there is no equivalent path.

Raises:
  NoSuchFile: If the path doesn't exist in source
)r��find_target_path�rrr�s   rr��InterTree.find_target_path����"�$�"7�"7�8�8rc�,�[UR5e)z�Find the source tree path.

Args:
  path: Path to search for (exists in target)
Returns: path in source, or None if there is no equivalent path.

Raises:
  NoSuchFile: if the path doesn't exist in target
)r��find_source_pathr�s   rr��InterTree.find_source_path�r�rr)c�>�0nUHnURXBS9X4'M U$)z�Find target tree paths.

Args:
  paths: Iterable over paths in target to search for
Returns: Dictionary mapping from source paths to paths in target , or
    None if there is no equivalent path.
�r�)r��rr)r��retrs     r�find_target_paths�InterTree.find_target_paths��-�����D��-�-�d�-�D�C�I���
rc�>�0nUHnURXBS9X4'M U$)z�Find source tree paths.

Args:
  paths: Iterable over paths in target to search for
Returns: Dictionary mapping from target paths to paths in source, or
    None if there is no equivalent path.
r�)r�r�s     r�find_source_paths�InterTree.find_source_paths�r�rr%rtrur���none)rrr r!r?r�workingtreerr�rrBr��_optimisersr}r�r�r�rwr@rAr�r�r�r�r��dictr�r�r$�
__classcell__)r1s@rr�r�=s������2�@D���)<� =�D�>B��h�':�;�B��K�����
�<��<�t�<��<��<�
 %�.2�,0�"'�"�!&�*��*�!��c��+�*��d�4�j�)�	*�
 �*��
*��*�\#(�.2��,0�"&�!&�)5��)5�!��c��+�)5�
�d�4�j�)�)5� �
)5��)5�XQU�!.��!.�-0�!.�F
9�S�
9�3�
9�H�S�M�
9�
9�S�
9�3�
9�H�S�M�
9�)/�
��#�Y�
�	
�c�8�C�=� �	!�
� 06�
��#�Y�
�),�
�	
�c�8�C�=� �	!�
�
rr�r��to_treer)r�r�c�F�[RX5RX#S9$)z�Find previous tree paths.

Args:
  from_tree: From tree
  to_tree: To tree
  paths: Iterable over paths in from_tree to search for
Returns: Dictionary mapping from from_tree paths to paths in to_tree, or
    None if there is no equivalent path.
r�)r�r�r�)r�r�r)r�s    r�find_previous_pathsr�
s!���=�=��,�>�>�u�>�V�Vrc�F�[RX5RX#S9$)z�Find previous tree path.

Args:
  from_tree: From tree
  to_tree: To tree
  path: Path to search for (exists in from_tree)
Returns: path in to_tree, or None if there is no equivalent path.

Raises:
  NoSuchFile: If the path doesn't exist in from_tree
r�)r�r�r�)r�r�rr�s    r�find_previous_pathr�s!���=�=��,�=�=�d�=�T�Trc�B�Sn[URS55nUH�nU(dMU"U5nSnURU5HnnURU:Xa"[R
"X8R5n O=U"UR5U:Xa"[R
"X8R5nMnMp U(aUnM�[R
"X5/[U5Q76n U$ U$![Ra M�f=f![Ra Ncf=f)z�Find the canonical path of an item, ignoring case.

Args:
  tree: Tree to traverse
  path: Case-insensitive path to look up
  normalize: Function to normalize a filename for comparison
Returns: The canonical path
rRrHN)
r7�splitr�rhr�pathjoinr
�NoSuchId�
NotADirectoryr@)	�treer�	normalize�cur_path�bit_iter�elt�lelt�new_path�childs	         r�get_canonical_pathr�+s���H��D�J�J�s�O�$�H�������~����	��0�0��:����z�z�S�(�
$+�#3�#3�H�j�j�#I���"�5�:�:�.�$�6�#*�#3�#3�H�j�j�#I��7�;� ��H��'�'��G��X��G�H���O�;�:�O����������#�#�	��	�sA�D�0C,�;D�=6C,�3D�,D�D�D�D�D�DNr�)#r?�
__docformat__�collections.abcr�typingrrrrrRr
rrr
rrx�interr�BzrErrorrr'r,rDrMrVr\rcr�r�r@rAr�r�r�r�r%rr�<module>r�s��"=��
�$�7�7�*�*�'���v�����������.�I���y���y���I��G
�G
�T@
:�@
:�FM��D�!�M�bFL�W��W�"�W�+/��9�W�?B�W�	�#�x��}�
��W�U�)r

Youez - 2016 - github.com/yon3zu
LinuXploit