
    q&f                     B    d dl Z ddlmZ  G d dej                        Zy)    N   )utilc                      e Zd Z	 d(dZ ej
                  d      Z ej
                  d      Z ej
                  d      Z ej
                  d      Z	d Z
d Z ej
                  d      Z ej
                  d	      Zej                  d
        Zej                  d        Zd Zd Zd Zd)dZd Zd Zd Zd ZeZd Zd Zd Zd Zd)dZd Z d Z!d Z"d Z#d Z$d*dZ%d  Z&d)d!Z'd" Z(d# Z)d+d$Z*d% Z+d& Z,d)d'Z-y),	idirstatec                      y)zCreate a new dirstate object.

        opener is an open()-like callable that can be used to open the
        dirstate file; root is the root of the directory tracked by
        the dirstate.
        N )openeruirootvalidatesparsematchfnnodeconstantsuse_dirstate_v2use_tracked_hints           ?/usr/lib/python3/dist-packages/mercurial/interfaces/dirstate.py__init__zidirstate.__init__           zMatcher for ignored files.z True if any changes in progress.z$True if parents changes in progress.z*True if file tracking changes in progress.c                       y)z5Return a list of files containing patterns to ignore.Nr   r   r   r   _ignorefileszidirstate._ignorefiles%   r   r   c                      y)zBGiven a file `f`, return the ignore file and line that ignores it.Nr   )fs    r   _ignorefileandlinezidirstate._ignorefileandline(   r   r   zCallable for checking symlinks.z Callable for checking exec bits.c                      y)zContext manager for handling dirstate parents.

        If an exception occurs in the scope of the context manager,
        the incoherent dirstate won't be written when wlock is
        released.
        Nr   repos    r   changing_parentszidirstate.changing_parents.   r   r   c                      y)zContext manager for handling dirstate files.

        If an exception occurs in the scope of the context manager,
        the incoherent dirstate won't be written when wlock is
        released.
        Nr   r   s    r   changing_fileszidirstate.changing_files7   r   r   c                      y Nr   )ds    r   hasdirzidirstate.hasdir@       r   c                      y)aS  build a callable that returns flags associated with a filename

        The information is extracted from three possible layers:
        1. the file system if it supports the information
        2. the "fallback" information stored in the dirstate if any
        3. a more expensive mechanism inferring the flags from the parents.
        Nr   )buildfallbacks    r   flagfunczidirstate.flagfuncC   r   r   c                       y)a  Return the path from which a canonical path is calculated.

        This path should be used to resolve file patterns or to convert
        canonical paths back to file paths for display. It shouldn't be
        used to get real file paths. Use vfs functions instead.
        Nr   r   r   r   getcwdzidirstate.getcwdL   r   r   Nc                      y r!   r   )r   cwds     r   pathtozidirstate.pathtoT   r$   r   c                      y)z-return a DirstateItem for the associated pathNr   )paths    r   	get_entryzidirstate.get_entryW   r   r   c                      y)z3Check if bytestring `key` is known to the dirstate.Nr   )keys    r   __contains__zidirstate.__contains__Z   r   r   c                       y)z:Iterate the dirstate's contained filenames as bytestrings.Nr   r   r   r   __iter__zidirstate.__iter__]   r   r   c                       y)zpIterate the dirstate's entries as (filename, DirstateItem.

        As usual, filename is a bytestring.
        Nr   r   r   r   itemszidirstate.items`   r   r   c                       y r!   r   r   r   r   parentszidirstate.parentsh   r$   r   c                       y r!   r   r   r   r   p1zidirstate.p1k   r$   r   c                       y r!   r   r   r   r   p2zidirstate.p2n   r$   r   c                       y r!   r   r   r   r   branchzidirstate.branchq   r$   r   c                      y)zSet dirstate parents to p1 and p2.

        When moving from two parents to one, "merged" entries a
        adjusted to normal and previous copy records discarded and
        returned by the call.

        See localrepo.setparents()
        Nr   )r:   r<   s     r   
setparentszidirstate.setparentst   r   r   c                      y r!   r   )r>   transactions     r   	setbranchzidirstate.setbranch~   r$   r   c                       y)a  Causes the next access to reread the dirstate.

        This is different from localrepo.invalidatedirstate() because it always
        rereads the dirstate. Use localrepo.invalidatedirstate() if you want to
        check whether the dirstate has changed before rereading it.Nr   r   r   r   
invalidatezidirstate.invalidate   r   r   c                      y)z=Mark dest as a copy of source. Unmark dest if source is None.Nr   )sourcedests     r   copyzidirstate.copy   r   r   c                      y r!   r   )files    r   copiedzidirstate.copied   r$   r   c                       y r!   r   r   r   r   copieszidirstate.copies   r$   r   c                      y)aL  
        normalize the case of a pathname when on a casefolding filesystem

        isknown specifies whether the filename came from walking the
        disk, to avoid extra filesystem access.

        If ignoremissing is True, missing path are returned
        unchanged. Otherwise, we try harder to normalize possibly
        existing path components.

        The normalized case is determined based on the following precedence:

        - version of name already stored in the dirstate
        - version of name stored on disk
        - version provided via command arguments
        Nr   )r.   isknownignoremissings      r   	normalizezidirstate.normalize   r   r   c                       y r!   r   r   r   r   clearzidirstate.clear   r$   r   c                      y r!   r   )parentallfileschangedfiless      r   rebuildzidirstate.rebuild   r$   r   c                      y r!   r   )trs    r   writezidirstate.write   r$   r   c                      y)a%  add a callback to be called when the wd parents are changed

        Callback will be called with the following arguments:
            dirstate, (oldp1, oldp2), (newp1, newp2)

        Category is a unique identifier to allow overwriting an old callback
        with a newer callback.
        Nr   )categorycallbacks     r   addparentchangecallbackz!idirstate.addparentchangecallback   r   r   c                      y)a3  
        Walk recursively through the directory tree, finding all files
        matched by match.

        If full is False, maybe skip some known-clean files.

        Return a dict mapping filename to stat-like object (either
        mercurial.osutil.stat instance or return value of os.stat()).

        Nr   )matchsubreposunknownignoredfulls        r   walkzidirstate.walk   r   r   c                      y)a|  Determine the status of the working copy relative to the
        dirstate and return a pair of (unsure, status), where status is of type
        scmutil.status and:

          unsure:
            files that might have been modified since the dirstate was
            written, but need to be read to be sure (size is the same
            but mtime differs)
          status.modified:
            files that have definitely been modified since the dirstate
            was written (different size or mode)
          status.clean:
            files that have definitely not been modified since the
            dirstate was written
        Nr   )rb   rc   re   cleanrd   s        r   statuszidirstate.status   r   r   c                      y)zT
        return files in the dirstate (in whatever state) filtered by match
        Nr   )rb   s    r   matcheszidirstate.matches   r   r   c                      y)zZ
        check the dirstate contents against the parent manifest and yield errors
        Nr   )m1m2r:   narrow_matchers       r   verifyzidirstate.verify   r   r   )Fr!   )FF)T).__name__
__module____qualname__r   interfaceutil	Attribute_ignoreis_changing_anyis_changing_parentsis_changing_filesr   r   
_checklink
_checkexec
contextlibcontextmanagerr   r   r#   r'   r)   r,   r/   r2   r4   r6   	iteritemsr8   r:   r<   r>   r@   rC   rE   rI   rL   rN   rR   rT   rY   r\   r`   rg   rj   rl   rq   r   r   r   r   r      s^    & &m%%&FGG-m--.O 2-112 0//8DQ )(()NOJ((()OPJ   <BI IGL$
"
r   r   )r}    r   ru   	Interfacer   r   r   r   <module>r      s     #U'' Ur   