
    6h$,                    z   S SK Jr  S SKrS SKrS SKrS SKrS SKJrJrJrJ	r	J
r
JrJrJrJr  \R                  (       as  SSKJrJrJr  \S\\\4   \\\4   /\4   r \r\\\   \\4   r \/ S4   r \\/\4   r \\\R8                  \4   r \R<                  r \\\\R@                     4   r!  " S S\5      r"g)	    )annotationsN)	AnyCallableDictIterableIteratorListOptionalProtocolTuple   )matcherstatustransaction	idirstateFlagFuncReturnTc                     \ rS rSr\S(S j5       r\\R                  S)S j5       5       r\\R                  S)S j5       5       r	\\R                  S)S j5       5       r
\R                  S*S j5       r\\R                  S)S j5       5       r\\R                  S)S j5       5       r\R                  \R                  S+S	 j5       5       r\R                  \R                  S+S
 j5       5       r\R                  S,S j5       r\R                  S-S j5       r\R                  S.S j5       r\R                  S/S0S jj5       r\R                  S1S j5       r\R                  S2S j5       r\R                  S3S j5       r\R                  S4S j5       r\r\R                  S5S j5       r\R                  S.S j5       r\R                  S.S j5       r\R                  S.S j5       r\R                  S/S6S jj5       r\R                        S7S j5       r \R                  S8S j5       r!\R                  S9S j5       r"\R                  S:S j5       r#\R                  S;S j5       r$\R                   S<       S=S jj5       r%\R                  S8S j5       r&\R                   S/       S>S  jj5       r'\R                  S?S! j5       r(\R                        S@S" j5       r)\R                   SA           SBS# jj5       r*\R                              SCS$ j5       r+\R                  SDS% j5       r,\R                   S/     SES& jj5       r-S'r.g)Fr   G   c                    g)zMatcher for ignored files.N selfs    ?/usr/lib/python3/dist-packages/mercurial/interfaces/dirstate.py_ignoreidirstate._ignore_           c                    g)z True if any changes in progress.Nr   r   s    r   is_changing_anyidirstate.is_changing_anyc   r   r   c                    g)z$True if parents changes in progress.Nr   r   s    r   is_changing_parentsidirstate.is_changing_parentsh   r   r   c                    g)z*True if file tracking changes in progress.Nr   r   s    r   is_changing_filesidirstate.is_changing_filesm   r   r   c                    g)zBGiven a file `f`, return the ignore file and line that ignores it.Nr   )r   fs     r   _ignorefileandlineidirstate._ignorefileandliner   r   r   c                    g)zCallable for checking symlinks.Nr   r   s    r   
_checklinkidirstate._checklinkx   r   r   c                    g)z Callable for checking exec bits.Nr   r   s    r   
_checkexecidirstate._checkexec   r   r   c                    g)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   r   repos     r   changing_parentsidirstate.changing_parents   r   r   c                    g)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   r2   s     r   changing_filesidirstate.changing_files   r   r   c                    g Nr   )r   ds     r   hasdiridirstate.hasdir       r   c                    g)a+  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   )r   buildfallbacks     r   flagfuncidirstate.flagfunc   r   r   c                    g)zReturn 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   s    r   getcwdidirstate.getcwd   r   r   Nc                    g r:   r   )r   r(   cwds      r   pathtoidirstate.pathto   r>   r   c                    g)z-return a DirstateItem for the associated pathNr   )r   paths     r   	get_entryidirstate.get_entry   r   r   c                    g)z3Check if bytestring `key` is known to the dirstate.Nr   )r   keys     r   __contains__idirstate.__contains__   r   r   c                    g)z:Iterate the dirstate's contained filenames as bytestrings.Nr   r   s    r   __iter__idirstate.__iter__   r   r   c                    g)z`Iterate the dirstate's entries as (filename, DirstateItem.

As usual, filename is a bytestring.
Nr   r   s    r   itemsidirstate.items   r   r   c                    g r:   r   r   s    r   parentsidirstate.parents   r>   r   c                    g r:   r   r   s    r   p1idirstate.p1   r>   r   c                    g r:   r   r   s    r   p2idirstate.p2   r>   r   c                    g r:   r   r   s    r   branchidirstate.branch   r>   r   c                    g)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\   r_   s      r   
setparentsidirstate.setparents   r   r   c                    g r:   r   )r   rb   r   s      r   	setbranchidirstate.setbranch   s     	r   c                    g)zCauses 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   s    r   
invalidateidirstate.invalidate   r   r   c                    g)z=Mark dest as a copy of source. Unmark dest if source is None.Nr   )r   sourcedests      r   copyidirstate.copy   r   r   c                    g r:   r   )r   files     r   copiedidirstate.copied   r>   r   c                    g r:   r   r   s    r   copiesidirstate.copies   r>   r   c                    g)a  
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   rK   isknownignoremissings       r   	normalizeidirstate.normalize   r   r   c                    g r:   r   r   s    r   clearidirstate.clear  r>   r   c                    g r:   r   )r   parentallfileschangedfiless       r   rebuildidirstate.rebuild  s     	r   c                    g r:   r   )r   trs     r   writeidirstate.write   r>   r   c                    g)zadd 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   )r   categorycallbacks      r   addparentchangecallback!idirstate.addparentchangecallback$  r   r   c                    g)a  
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   )r   matchsubreposunknownignoredfulls         r   walkidirstate.walk1  r   r   c                    g)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   )r   r   r   r   cleanr   s         r   r   idirstate.statusE  r   r   c                    g)zD
return files in the dirstate (in whatever state) filtered by match
Nr   )r   r   s     r   matchesidirstate.matches`  r   r   c                    g)zJ
check the dirstate contents against the parent manifest and yield errors
Nr   )r   m1m2r\   narrow_matchers        r   verifyidirstate.verifyh  r   r   r   )returnmatcher.IMatcher)r   bool)r(   bytesr   IgnoreFileAndLineT)r   r   )r;   r   r   r   )r@   FlagFuncFallbackTr   r   )r   r   r:   )r(   r   rG   Optional[bytes]r   r   )rK   r   r   DirstateItemT)rO   r   r   r   )r   Iterator[bytes])r   z%Iterator[Tuple[bytes, DirstateItemT]])r   zList[bytes])r\   r   r_   r   )rb   r   r   Optional[TransactionT]r   None)r   r   )rn   r   ro   r   r   r   )rs   r   r   r   )r   zDict[bytes, bytes])FF)rK   r   rz   r   r{   r   r   r   )r   r   r   Iterable[bytes]r   zOptional[Iterable[bytes]]r   r   )r   r   r   r   )r   r   r   AddParentChangeCallbackTr   r   )T)r   r   r   r   r   r   r   r   r   r   r   WalkReturnT)r   r   r   r   r   r   r   r   r   r   r   StatusReturnT)r   r   r   r   )r\   r   r   zOptional[Any]r   r   )/__name__
__module____qualname____firstlineno__propertyr   abcabstractmethodr   r"   r%   r)   r,   r/   
contextlibcontextmanagerr4   r7   r<   rA   rD   rH   rL   rP   rS   rV   	iteritemsrY   r\   r_   rb   re   rh   rk   rp   rt   rw   r|   r   r   r   r   r   r   r   r   __static_attributes__r   r   r   r   r   G   s	   0 ) ) /  / 3  3 9  9 	Q Q
 .  .
 /  /       	  	  	  	  	< < 	B B 	I I 	  I  	  	  	  	  	*@	 
 	G G 	L L 	  	  	HM$(AE	 ( 	  	
 37	 " 0	
 
  	  	

)A
	
 
 	   	
   
 & 	  	
   
 4 	  	AE1>	 r   )#
__future__r   r   r   ostypingr   r   r   r   r   r	   r
   r   r   TYPE_CHECKING r   r   istatusr   r   r   r   intr   r   r   Statusr   ITransactionTransactionTstat_resultr   r   r   r   r   <module>r      s   " 
  	 
 
 
 
   (	eCHouS#X7<  D
 MxU:; !%6!67Aw~.O1 #w~~s23M/++L uhr~~667Kg gr   