
    6h0             
         S SK J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  SSKJr  SSKJr  \R"                  (       a  S SKJr  SS	KJrJr  SS
KJrJrJr  \rSrSrSrSr Sr!Sr"Sr#Sr$Sr%Sr&\#\$-  \%-  \&-  r'Sr(Sr)Sr*Sr+Sr,Sr-Sr.Sr/Sr0Sr1Sr2S r3S!r4S"r5\-1r6\-\,\/\3\.\1\0\2\4\51
r7\7Rq                  5       r9\9Ru                  \15        \9Ru                  \35         " S# S$\5      r; " S% S&\5      r< " S' S(\5      r= " S) S*\5      r> " S+ S,\5      r? " S- S.\5      r@ " S/ S0\;\<\@5      rA " S1 S2\5      rB " S3 S4\5      rC " S5 S6\5      rD " S7 S8\5      rE " S9 S:\5      rF " S; S<\5      rG " S= S>\E\F\G\5      rH " S? S@\5      rI " SA SB\5      rJ " SC SD\5      rK " SE SF\K\5      rL " SG SH\K\5      rM " SI SJ\5      rN " SK SL\5      rO " SM SN\5      rP " SO SP\5      rQ " SQ SR\Q\P\5      rR " SS ST\5      rSg)U    )annotationsN)	AnyCallable
CollectionIterableIteratorMappingOptionalProtocolSet   )_)error)
ByteString   )UiTVfsT)dirstatematchermiscs   revlogfilestorages   sharedstores   lfss   streamclones	   side-datas   shallowfilestoragei   i @  i    i   s   defaults   previouss   fulltexts   p1s   branchmap-alls   branchmap-serveds   changelog-caches   branchmap-detect-pure-topos   full-manifests   file-node-tagss   manifestlog-caches   rev-branch-caches   tags-defaults   tags-servedc                      \ rS rSr% SrS\S'    S\S'    \R                  S 5       r\R                  S 5       r	\R                  S	 5       r
\R                  S
 5       rSrg)_ipeerconnection   a  Represents a "connection" to a repository.

This is the base interface for representing a connection to a repository.
It holds basic properties and methods applicable to all peer types.

This is not a complete interface definition and should not be used
outside of this module.
UiuizOptional[misc.IPath]pathc                    g)aR  Returns a URL string representing this peer.

Currently, implementations expose the raw URL used to construct the
instance. It may contain credentials as part of the URL. The
expectations of the value aren't well-defined and this could lead to
data leakage.

TODO audit/clean consumers and more clearly define the contents of this
value.
N selfs    A/usr/lib/python3/dist-packages/mercurial/interfaces/repository.pyurl_ipeerconnection.url           c                    g)zReturns a local repository instance.

If the peer represents a local repository, returns an object that
can be used to interface with it. Otherwise returns ``None``.
Nr   r   s    r!   local_ipeerconnection.local   r$   r%   c                    g)z;Returns a boolean indicating if this peer can be pushed to.Nr   r   s    r!   canpush_ipeerconnection.canpush   r$   r%   c                    g)zClose the connection to this peer.

This is called when the peer will no longer be used. Resources
associated with the peer should be cleaned up.
Nr   r   s    r!   close_ipeerconnection.close   r$   r%   r   N)__name__
__module____qualname____firstlineno____doc____annotations__abcabstractmethodr"   r'   r*   r-   __static_attributes__r   r%   r!   r   r      s     	F
)
 
 	  	J J 	 r%   r   c                      \ rS rSrSr\R                  SS j5       r\R                  S	S j5       r\R                  S
S j5       r	Sr
g)ipeercapabilities   z+Peer sub-interface related to capabilities.c                    g)a  Determine support for a named capability.

Returns ``False`` if capability not supported.

Returns ``True`` if boolean capability is supported. Returns a string
if capability support is non-boolean.

Capability strings may or may not map to wire protocol capabilities.
Nr   )r    names     r!   capableipeercapabilities.capable   r$   r%   c                    g)zHObtain capabilities of the peer.

Returns a set of string capabilities.
Nr   r   s    r!   capabilitiesipeercapabilities.capabilities   r$   r%   c                    g)zcRequire a capability to be present.

Raises a ``CapabilityError`` if the capability isn't present.
Nr   r    r<   purposes      r!   
requirecapipeercapabilities.requirecap   r$   r%   r   Nr<   bytesreturnzbool | bytesrI   z
Set[bytes]r<   rH   rD   rH   rI   None)r/   r0   r1   r2   r3   r5   r6   r=   r@   rE   r7   r   r%   r!   r9   r9      sQ    5	 	 	  	 r%   r9   c                     \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  SS j5       r
\R                  S 5       r\R                  S	 5       r\R                  S
 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       rSrg)ipeercommands   zClient-side interface for communicating over the wire protocol.

This interface is used as a gateway to the Mercurial wire protocol.
methods commonly call wire protocol commands of the same name.
c                    g)z{Obtain heads in named branches.

Returns a dict mapping branch name to an iterable of nodes that are
heads on that branch.
Nr   r   s    r!   	branchmapipeercommands.branchmap   r$   r%   c                    g)z?Retrieve a clonebundle across the wire.

Returns a chunkbuffer
Nr   r    r   s     r!   get_cached_bundle_inline&ipeercommands.get_cached_bundle_inline   r$   r%   c                    g)zZObtains the clone bundles manifest for the repo.

Returns the manifest as unparsed bytes.
Nr   r   s    r!   clonebundlesipeercommands.clonebundles   r$   r%   Nc                    g)z?Used to facilitate debugging of arguments passed over the wire.Nr   r    onetwothreefourfives         r!   debugwireargsipeercommands.debugwireargs   r$   r%   c                    g)zObtain remote repository data as a bundle.

This command is how the bulk of repository data is transferred from
the peer to the local repository

Returns a generator of bundle data.
Nr   )r    sourcekwargss      r!   	getbundleipeercommands.getbundle   r$   r%   c                    g)zVDetermine all known head revisions in the peer.

Returns an iterable of binary nodes.
Nr   r   s    r!   headsipeercommands.heads  r$   r%   c                    g)zDetermine whether multiple nodes are known.

Accepts an iterable of nodes whose presence to check for.

Returns an iterable of booleans indicating of the corresponding node
at that index is known to the peer.
Nr   r    nodess     r!   knownipeercommands.known  r$   r%   c                    g)zKObtain all keys in a pushkey namespace.

Returns an iterable of key names.
Nr   r    	namespaces     r!   listkeysipeercommands.listkeys  r$   r%   c                    g)zaResolve a value to a known revision.

Returns a binary node of the resolved revision on success.
Nr   r    keys     r!   lookupipeercommands.lookup  r$   r%   c                    g)zSet a value using the ``pushkey`` protocol.

Arguments correspond to the pushkey namespace and key to operate on and
the old and new values for that key.

Returns a string with the peer result. The value inside varies by the
namespace.
Nr   r    rr   rw   oldnews        r!   pushkeyipeercommands.pushkey   r$   r%   c                    g)zVObtain streaming clone data.

Successful result should be a generator of data chunks.
Nr   r   s    r!   
stream_outipeercommands.stream_out+  r$   r%   c                    g)zTransfer repository data to the peer.

This is how the bulk of data during a push is transferred.

Returns the integer number of heads added to the peer.
Nr   )r    bundleri   r"   s       r!   unbundleipeercommands.unbundle2  r$   r%   r   NNN)r/   r0   r1   r2   r3   r5   r6   rQ   rU   rX   ra   rf   ri   rn   rs   rx   r~   r   r   r7   r   r%   r!   rN   rN      sA    	  	  	  	N N 	  	  	  	  	  	  	  	 r%   rN   c                      \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
Srg)	ipeerlegacycommandsi<  zInterface for implementing support for legacy wire protocol commands.

Wire protocol commands transition to legacy status when they are no longer
used by modern clients. To facilitate identifying which commands are
legacy, the interfaces are split.
c                    g)zObtain nodes between pairs of nodes.

``pairs`` is an iterable of node pairs.

Returns an iterable of iterables of nodes corresponding to each
requested pair.
Nr   r    pairss     r!   betweenipeerlegacycommands.betweenD  r$   r%   c                    g)zObtain ancestor changesets of specific nodes back to a branch point.

For each requested node, the peer finds the first ancestor node that is
a DAG root or is a merge.

Returns an iterable of iterables with the resolved values for each node.
Nr   rl   s     r!   branchesipeerlegacycommands.branchesN  r$   r%   c                    g)zBObtain a changegroup with data for descendants of specified nodes.Nr   )r    rm   rd   s      r!   changegroupipeerlegacycommands.changegroupX  r$   r%   c                    g Nr   )r    basesri   rd   s       r!   changegroupsubset%ipeerlegacycommands.changegroupsubset\      r%   r   N)r/   r0   r1   r2   r3   r5   r6   r   r   r   r   r7   r   r%   r!   r   r   <  sq     	  	  	Q Q 	 r%   r   c                      \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	Sr
g)ipeercommandexecutoria  a0  Represents a mechanism to execute remote commands.

This is the primary interface for requesting that wire protocol commands
be executed. Instances of this interface are active in a context manager
and have a well-defined lifetime. When the context manager exits, all
outstanding requests are waited on.
c                    g)aB  Request that a named command be executed.

Receives the command name and a dictionary of command arguments.

Returns a ``concurrent.futures.Future`` that will resolve to the
result of that command request. That exact value is left up to
the implementation and possibly varies by command.

Not all commands can coexist with other commands in an executor
instance: it depends on the underlying wire protocol transport being
used and the command itself.

Implementations MAY call ``sendcommands()`` automatically if the
requested command can not coexist with other commands in this executor.

Implementations MAY call ``sendcommands()`` automatically when the
future's ``result()`` is called. So, consumers using multiple
commands with an executor MUST ensure that ``result()`` is not called
until all command requests have been issued.
Nr   )r    r<   argss      r!   callcommand ipeercommandexecutor.callcommandj  r$   r%   c                    g)a:  Trigger submission of queued command requests.

Not all transports submit commands as soon as they are requested to
run. When called, this method forces queued command requests to be
issued. It will no-op if all commands have already been sent.

When called, no more new commands may be issued with this executor.
Nr   r   s    r!   sendcommands!ipeercommandexecutor.sendcommands  r$   r%   c                    g)a)  Signal that this command request is finished.

When called, no more new commands may be issued. All outstanding
commands that have previously been issued are waited on before
returning. This not only includes waiting for the futures to resolve,
but also waiting for all response data to arrive. In other words,
calling this waits for all on-wire state for issued command requests
to finish.

When used as a context manager, this method is called when exiting the
context manager.

This method may call ``sendcommands()`` if there are buffered commands.
Nr   r   s    r!   r-   ipeercommandexecutor.close  r$   r%   r   N)r/   r0   r1   r2   r3   r5   r6   r   r   r-   r7   r   r%   r!   r   r   a  sU     	 , 	  	 r%   r   c                  J    \ rS rSr% SrS\S'    \R                  S 5       rSr	g)ipeerrequestsi  z+Interface for executing commands on a peer.boollimitedargumentsc                    g)a  A context manager that resolves to an ipeercommandexecutor.

The object this resolves to can be used to issue command requests
to the peer.

Callers should call its ``callcommand`` method to issue command
requests.

A new executor should be obtained for each distinct set of commands
(possibly just a single command) that the consumer wants to execute
as part of a single operation or round trip. This is because some
peers are half-duplex and/or don't support persistent connections.
e.g. in the case of HTTP peers, commands sent to an executor represent
a single HTTP request. While some peers may support multiple command
sends over the wire per executor, consumers need to code to the least
capable peer. So it should be assumed that command executors buffer
called commands until they are told to send them and that each
command executor could result in a new connection or wire-level request
being issued.
Nr   r   s    r!   commandexecutoripeerrequests.commandexecutor  r$   r%   r   N)
r/   r0   r1   r2   r3   r4   r5   r6   r   r7   r   r%   r!   r   r     s&    5L r%   r   c                  p    \ rS rSr% SrSrS\S'   S\S'   S\S	'     S       SS jjrSS jrSS jr	Sr
g
)peeri  z]Unified interface for peer repositories.

All peer instances must conform to this interface.
Fr   r   misc.IPath | Noner   r   r   Nc                    Xl         X l        g r   )r   r   )r    r   r   remotehiddens       r!   __init__peer.__init__  s     	r%   c                    U R                  5       nX;   a  gSU-  nU H)  nUR                  U5      (       d  M  U[        U5      S  s  $    g)NTs   %s=F)r@   
startswithlen)r    r<   capscaps       r!   r=   peer.capable  sP      "<}C~~d##3t9;''  r%   c                v    U R                  U5      (       a  g [        R                  " [        S5      X!4-  5      e)NsA   cannot %s; remote repository does not support the '%s' capability)r=   r   CapabilityErrorr   rC   s      r!   rE   peer.requirecap  s@    <<##% o	
 	
r%   )r   r   NF)r   r   r   r   r   r   rI   rL   rG   rK   )r/   r0   r1   r2   r3   r   r4   r   r=   rE   r7   r   r%   r!   r   r     s\    
 #d"

F
 #'"	   	
 



r%   r   c                  <    \ rS rSr% SrS\S'    S\S'    S\S'   Srg)	iverifyproblemi  zRepresents a problem with the integrity of the repository.

Instances of this interface are emitted to describe an integrity issue
with a repository (e.g. corrupt storage, missing data, etc).

Instances are essentially messages associated with severity.
bytes | Nonewarningr   noder   Nr/   r0   r1   r2   r3   r4   r7   r   r%   r!   r   r     s&     1-
r%   r   c                      \ rS rSr% SrS\S'    S\S'    S\S'    S\S'    S	\S
'    S\S'    S\S'    S\S'    S\S'    S\S'    S	\S'   Srg)irevisiondeltai  ad  Represents a delta between one revision and another.

Instances convey enough information to allow a revision to be exchanged
with another repository.

Instances represent the fulltext revision data or a delta against
another revision. Therefore the ``revision`` and ``delta`` attributes
are mutually exclusive.

Typically used for changegroup generation.
rH   r   p1nodep2noder   linknodeintflagsbasenodez
int | Nonebaserevisionsizerevisiondeltasidedataprotocol_flagsr   Nr   r   r%   r!   r   r     s{    
 K(M6M6 HJ
 O !  6
 4r%   r   c                      \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
Srg)	ifilerevisionssequenceiA  a  Contains index data for all revisions of a file.

Types implementing this behave like lists of tuples. The index
in the list corresponds to the revision number. The values contain
index metadata.

The *null* revision (revision number -1) is always the last item
in the index.
c                    g)zThe total number of revisions.Nr   r   s    r!   __len__ifilerevisionssequence.__len__L  r$   r%   c                    g)a)  Returns the object having a specific revision number.

Returns an 8-tuple with the following fields:

offset+flags
   Contains the offset and flags for the revision. 64-bit unsigned
   integer where first 6 bytes are the offset and the next 2 bytes
   are flags. The offset can be 0 if it is not used by the store.
compressed size
    Size of the revision data in the store. It can be 0 if it isn't
    needed by the store.
uncompressed size
    Fulltext size. It can be 0 if it isn't needed by the store.
base revision
    Revision number of revision the delta for storage is encoded
    against. -1 indicates not encoded against a base revision.
link revision
    Revision number of changelog revision this entry is related to.
p1 revision
    Revision number of 1st parent. -1 if no 1st parent.
p2 revision
    Revision number of 2nd parent. -1 if no 1st parent.
node
    Binary node value for this revision number.

Negative values should index off the end of the sequence. ``-1``
should return the null revision. ``-2`` should return the most
recent revision.
Nr   r    revs     r!   __getitem__"ifilerevisionssequence.__getitem__P  r$   r%   c                    g)z!Whether a revision number exists.Nr   r   s     r!   __contains__#ifilerevisionssequence.__contains__p  r$   r%   c                    g)z.Add an item to the index at specific revision.Nr   )r    ientrys      r!   insertifilerevisionssequence.insertt  r$   r%   r   N)r/   r0   r1   r2   r3   r5   r6   r   r   r   r   r7   r   r%   r!   r   r   A  so     	- - 	 > 	0 0 	= =r%   r   c                  R   \ rS rSr% SrS\S'    \R                  SS j5       r\R                  SS j5       r	\R                  S 5       r
\R                  SS	 j5       r\R                  S
 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  SS j5       r\R                  S 5       rSrg)
ifileindexiy  ai  Storage interface for index data of a single file.

File storage data is divided into index metadata and data storage.
This interface defines the index portion of the interface.

The index logically consists of:

* A mapping between revision numbers and nodes.
* DAG data (storing and querying the relationship between nodes).
* Metadata to facilitate storage.
rH   nullidc                    g)z4Obtain the number of revisions stored for this file.Nr   r   s    r!   r   ifileindex.__len__  r$   r%   c                    g)z,Iterate over revision numbers for this file.Nr   r   s    r!   __iter__ifileindex.__iter__  r$   r%   c                    g)zReturns a bool indicating if a node is known to this store.

Implementations must only return True for full, binary node values:
hex nodes, revision numbers, and partial node matches must be
rejected.

The null node is never present.
Nr   r    r   s     r!   hasnodeifileindex.hasnode  r$   r%   Nc                    g)z:Iterate over revision numbers for this file, with control.Nr   r    startstops      r!   revsifileindex.revs  r$   r%   c                    g)zeReturns a 2-tuple of parent nodes for a revision.

Values will be ``nullid`` if the parent is empty.
Nr   r   s     r!   parentsifileindex.parents  r$   r%   c                    gz0Like parents() but operates on revision numbers.Nr   r   s     r!   
parentrevsifileindex.parentrevs  r$   r%   c                    g)zaObtain the revision number given a node.

Raises ``error.LookupError`` if the node is not known.
Nr   r   s     r!   r   ifileindex.rev  r$   r%   c                    g)z`Obtain the node value given a revision number.

Raises ``IndexError`` if the node is not known.
Nr   r   s     r!   r   ifileindex.node  r$   r%   c                    g)zAttempt to resolve a value to a node.

Value can be a binary node, hex node, revision number, or a string
that can be converted to an integer.

Raises ``error.LookupError`` if a node could not be resolved.
Nr   r   s     r!   rx   ifileindex.lookup  r$   r%   c                    gz=Obtain the changeset revision number a revision is linked to.Nr   r   s     r!   linkrevifileindex.linkrev  r$   r%   c                    g)z6Return whether a revision's content has been censored.Nr   r   s     r!   
iscensoredifileindex.iscensored  r$   r%   c                    g)zlObtain an iterable of nodes containing heads of common ancestors.

See ``ancestor.commonancestorsheads()``.
Nr   )r    node1node2s      r!   commonancestorsheadsifileindex.commonancestorsheads  r$   r%   c                    g)zObtain descendant revision numbers for a set of revision numbers.

If ``nullrev`` is in the set, this is equivalent to ``revs()``.
Nr   )r    r   s     r!   descendantsifileindex.descendants  r$   r%   c                    g)a7  Obtain a list of nodes that are DAG heads, with control.

The set of revisions examined can be limited by specifying
``start`` and ``stop``. ``start`` is a node. ``stop`` is an
iterable of nodes. DAG traversal starts at earlier revision
``start`` and iterates forward until any node in ``stop`` is
encountered.
Nr   r   s      r!   ri   ifileindex.heads  r$   r%   c                    g)zDObtain nodes that are children of a node.

Returns a list of nodes.
Nr   r   s     r!   childrenifileindex.children  r$   r%   r   rI   r   )rI   zIterator[int])r   NNN)r/   r0   r1   r2   r3   r4   r5   r6   r   r   r   r   r   r   r   r   rx   r  r  r  r  ri   r  r7   r   r%   r!   r   r   y  s   
 M;C C 	; ; 	  	I I 	  	? ? 	  	  	  	L L 	E E 	  	  	  	 r%   r   c                      \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
\R                  S 5       r\R                  S 5       r\R                  S	S
S
\4S j5       rSrg	)	ifiledatai  zStorage interface for data storage of a specific file.

This complements ``ifileindex`` and provides an interface for accessing
data for a tracked file.
c                    g)zYObtain the fulltext size of file data.

Any metadata is excluded from size measurements.
Nr   r   s     r!   sizeifiledata.size  r$   r%   c                    g)a:  Obtain fulltext data for a node.

By default, any storage transformations are applied before the data
is returned. If ``raw`` is True, non-raw storage transformations
are not applied.

The fulltext data may contain a header containing metadata. Most
consumers should use ``read()`` to obtain the actual file data.
Nr   r   s     r!   r   ifiledata.revision  r$   r%   c                    gzObtain raw data for a node.Nr   r   s     r!   rawdataifiledata.rawdata  r$   r%   c                    g)ztResolve file fulltext data.

This is similar to ``revision()`` except any metadata in the data
headers is stripped.
Nr   r   s     r!   readifiledata.read
  r$   r%   c                    g)zObtain copy metadata for a node.

Returns ``False`` if no copy metadata is stored or a 2-tuple of
(path, node) from which this revision was copied.
Nr   r   s     r!   renamedifiledata.renamed  r$   r%   c                    g)zCompare fulltext to another revision.

Returns True if the fulltext is different from what is stored.

This takes copy metadata into account.

TODO better document the copy metadata and censoring logic.
Nr   r    r   fulltexts      r!   cmpifiledata.cmp  r$   r%   NFc                    g)a  Produce ``irevisiondelta`` for revisions.

Given an iterable of nodes, emits objects conforming to the
``irevisiondelta`` interface that describe revisions in storage.

This method is a generator.

The input nodes may be unordered. Implementations must ensure that a
node's parents are emitted before the node itself. Transitively, this
means that a node may only be emitted once all its ancestors in
``nodes`` have also been emitted.

By default, emits "index" data (the ``node``, ``p1node``, and
``p2node`` attributes). If ``revisiondata`` is set, revision data
will also be present on the emitted objects.

With default argument values, implementations can choose to emit
either fulltext revision data or a delta. When emitting deltas,
implementations must consider whether the delta's base revision
fulltext is available to the receiver.

The base revision fulltext is guaranteed to be available if any of
the following are met:

* Its fulltext revision was emitted by this method call.
* A delta for that revision was emitted by this method call.
* ``assumehaveparentrevisions`` is True and the base revision is a
  parent of the node.

``nodesorder`` can be used to control the order that revisions are
emitted. By default, revisions can be reordered as long as they are
in DAG topological order (see above). If the value is ``nodes``,
the iteration order from ``nodes`` should be used. If the value is
``storage``, then the native order from the backing storage layer
is used. (Not all storage layers will have strong ordering and behavior
of this mode is storage-dependent.) ``nodes`` ordering can force
revisions to be emitted before their ancestors, so consumers should
use it with care.

The ``linknode`` attribute on the returned ``irevisiondelta`` may not
be set and it is the caller's responsibility to resolve it, if needed.

If ``deltamode`` is CG_DELTAMODE_PREV and revision data is requested,
all revision data should be emitted as deltas against the revision
emitted just prior. The initial revision should be a delta against its
1st parent.
Nr   )r    rm   
nodesorderrevisiondataassumehaveparentrevisions	deltamodes         r!   emitrevisionsifiledata.emitrevisions%  r$   r%   r   )r/   r0   r1   r2   r3   r5   r6   r  r   r!  r$  r'  r,  CG_DELTAMODE_STDr3  r7   r   r%   r!   r  r    s     	  		 	 	* * 	  	  	  	 "'"6 6r%   r  c                     \ rS rSrSr\R                  S 5       r\R                     SS j5       r\R                     SS j5       r	\R                  SS j5       r
\R                  S 5       r\R                  S	 5       rS
rg)ifilemutationi_  z8Storage interface for mutation events of a tracked file.c                    g)zAdd a new revision to the store.

Takes file data, dictionary of metadata, a transaction, linkrev,
and parent nodes.

Returns the node that was added.

May no-op if a revision matching the supplied data is already stored.
Nr   )r    filedatametatransactionr  p1p2s          r!   addifilemutation.addb  r$   r%   Nc	                    g)ab  Add a new revision to the store and return its number.

This is similar to ``add()`` except it operates at a lower level.

The data passed in already contains a metadata header, if any.

``node`` and ``flags`` can be used to define the expected node and
the flags to use with storage. ``flags`` is a bitwise value composed
of the various ``REVISION_FLAG_*`` constants.

``add()`` is usually called when adding files from e.g. the working
directory. ``addrevision()`` is often called by ``add()`` and for
scenarios where revision data has already been computed, such as when
applying raw data from a peer repo.
Nr   )	r    r0  r;  r  r<  r=  r   r   
cachedeltas	            r!   addrevisionifilemutation.addrevisionn  r$   r%   c                    g)aQ  Process a series of deltas for storage.

``deltas`` is an iterable of 7-tuples of
(node, p1, p2, linknode, deltabase, delta, flags) defining revisions
to add.

The ``delta`` field contains ``mpatch`` data to apply to a base
revision, identified by ``deltabase``. The base node can be
``nullid``, in which case the header from the delta can be ignored
and the delta used as the fulltext.

``alwayscache`` instructs the lower layers to cache the content of the
newly added revision, even if it needs to be explicitly computed.
This used to be the default when ``addrevisioncb`` was provided up to
Mercurial 5.8.

``addrevisioncb`` should be called for each new rev as it is committed.
``duplicaterevisioncb`` should be called for all revs with a
pre-existing node.

``maybemissingparents`` is a bool indicating whether the incoming
data may reference parents/ancestor revisions that aren't present.
This flag is set when receiving data into a "shallow" store that
doesn't hold all history.

Returns a list of nodes that were processed. A node will be in the list
even if it existed in the store previously.
Nr   )r    deltas
linkmapperr;  addrevisioncbduplicaterevisioncbmaybemissingparentss          r!   addgroupifilemutation.addgroup  r$   r%   c                    g)aL  Remove the content of a single revision.

The specified ``node`` will have its content purged from storage.
Future attempts to access the revision data for this node will
result in failure.

A ``tombstone`` message can optionally be stored. This message may be
displayed to users when they attempt to access the missing revision
data.

Storage backends may have stored deltas against the previous content
in this revision. As part of censoring a revision, these storage
backends are expected to rewrite any internally stored deltas such
that they no longer reference the deleted content.
Nr   )r    trr   	tombstones       r!   censorrevisionifilemutation.censorrevision  r$   r%   c                    g)aG  Find the minimum revision that must be stripped to strip a linkrev.

Returns a 2-tuple containing the minimum revision number and a set
of all revisions numbers that would be broken by this strip.

TODO this is highly revlog centric and should be abstracted into
a higher-level deletion API. ``repair.strip()`` relies on this.
Nr   r    minlinks     r!   getstrippointifilemutation.getstrippoint  r$   r%   c                    g)a  Remove storage of items starting at a linkrev.

This uses ``getstrippoint()`` to determine the first node to remove.
Then it effectively truncates storage for all revisions after that.

TODO this is highly revlog centric and should be abstracted into a
higher-level deletion API.
Nr   r    rS  r;  s      r!   stripifilemutation.strip  r$   r%   r   )Nr   NNNF)r%   )r/   r0   r1   r2   r3   r5   r6   r>  rB  rJ  rO  rT  rX  r7   r   r%   r!   r7  r7  _  s    B	 	 	  6 	  !$ $L 	 " 	  	 r%   r7  c                      \ rS rSrSr\R                  S 5       r\R                       SS j5       r\R                  S	S j5       r	Sr
g)
ifilestoragei  z5Complete storage interface for a single tracked file.c                    g)zObtain paths that are backing storage for this file.

TODO this is used heavily by verify code and there should probably
be a better API for that.
Nr   r   s    r!   filesifilestorage.files  r$   r%   c                    g)af  Obtain information about storage for this file's data.

Returns a dict describing storage for this tracked path. The keys
in the dict map to arguments of the same. The arguments are bools
indicating whether to calculate and obtain that data.

exclusivefiles
   Iterable of (vfs, path) describing files that are exclusively
   used to back storage for this tracked path.

sharedfiles
   Iterable of (vfs, path) describing files that are used to back
   storage for this tracked path. Those files may also provide storage
   for other stored entities.

revisionscount
   Number of revisions available for retrieval.

trackedsize
   Total size in bytes of all tracked revisions. This is a sum of the
   length of the fulltext of all revisions.

storedsize
   Total size in bytes used to store data for all tracked revisions.
   This is commonly less than ``trackedsize`` due to internal usage
   of deltas rather than fulltext revisions.

Not all storage backends may support all queries are have a reasonable
value to use. In that case, the value should be set to ``None`` and
callers are expected to handle this special value.
Nr   r    exclusivefilessharedfilesrevisionscounttrackedsize
storedsizes         r!   storageinfoifilestorage.storageinfo  r$   r%   c                    g)aK  Verifies the integrity of file storage.

``state`` is a dict holding state of the verifier process. It can be
used to communicate data between invocations of multiple storage
primitives.

If individual revisions cannot have their revision content resolved,
the method is expected to set the ``skipread`` key to a set of nodes
that encountered problems.  If set, the method can also add the node(s)
to ``safe_renamed`` in order to indicate nodes that may perform the
rename checks with currently accessible data.

The method yields objects conforming to the ``iverifyproblem``
interface.
Nr   r    states     r!   verifyintegrityifilestorage.verifyintegrity  r$   r%   r   NFFFFF)rI   zIterable[iverifyproblem])r/   r0   r1   r2   r3   r5   r6   r^  rg  rl  r7   r   r%   r!   r\  r\    sc    ?  	 & &P 	 r%   r\  c                      \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
Srg)	idirsi!  zInterface representing a collection of directories from paths.

This interface is essentially a derived data structure representing
directories from a collection of paths.
c                    g)z\Add a path to the collection.

All directories in the path will be added to the collection.
Nr   rT   s     r!   addpathidirs.addpath(  r$   r%   c                    g)zRemove a path from the collection.

If the removal was the last path in a particular directory, the
directory is removed from the collection.
Nr   rT   s     r!   delpathidirs.delpath/  r$   r%   c                    g)z9Iterate over the directories in this collection of paths.Nr   r   s    r!   r   idirs.__iter__7  r$   r%   c                    g)z3Whether a specific directory is in this collection.Nr   rT   s     r!   r   idirs.__contains__;  r$   r%   r   N)r/   r0   r1   r2   r3   r5   r6   rr  ru  r   r   r7   r   r%   r!   rp  rp  !  ss     	  	  	H H 	B Br%   rp  c                  .   \ rS rSrSr\R                  SS j5       r\R                  SS j5       r\R                  S S j5       r	\R                  S!S j5       r
\
r\R                  S"S j5       r\R                  S#S j5       r\R                  S$S	 j5       r\R                  S%S
 j5       r\R                  S&S j5       r\R                  S&S j5       r\R                  S'S j5       r\R                  S(S)S jj5       r\R                  S*S j5       r\R                  S+S j5       r\R                  S,S j5       r\R                    S-       S.S j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                  S3S j5       r\R                  S4S j5       r\R                  S5S j5       r\R                        S6S j5       r Sr!g)7imanifestdicti@  zInterface representing a manifest data structure.

A manifest is effectively a dict mapping paths to entries. Each entry
consists of a binary node and extra flags affecting that entry.
c                    g)zReturns the binary node value for a path in the manifest.

Raises ``KeyError`` if the path does not exist in the manifest.

Equivalent to ``self.find(path)[0]``.
Nr   rv   s     r!   r   imanifestdict.__getitem__G  r$   r%   c                    g)zReturns the entry for a path in the manifest.

Returns a 2-tuple of (node, flags).

Raises ``KeyError`` if the path does not exist in the manifest.
Nr   rT   s     r!   findimanifestdict.findP  r$   r%   c                    g)z-Return the number of entries in the manifest.Nr   r   s    r!   r   imanifestdict.__len__Y  r$   r%   c                    g)z:Returns True if the manifest has entries, False otherwise.Nr   r   s    r!   __nonzero__imanifestdict.__nonzero__]  r$   r%   c                    g)zDefine the node value and flags for a path in the manifest.

Equivalent to __setitem__ followed by setflag, but can be more efficient.
Nr   )r    r   r   r   s       r!   setimanifestdict.setc  r$   r%   c                    g)zDefine the node value for a path in the manifest.

If the path is already in the manifest, its flags will be copied to
the new entry.
Nr   )r    r   r   s      r!   __setitem__imanifestdict.__setitem__j  r$   r%   c                    g)z&Whether a path exists in the manifest.Nr   rT   s     r!   r   imanifestdict.__contains__r  r$   r%   c                    g)zZRemove a path from the manifest.

Raises ``KeyError`` if the path is not in the manifest.
Nr   rT   s     r!   __delitem__imanifestdict.__delitem__v  r$   r%   c                    gz#Iterate over paths in the manifest.Nr   r   s    r!   r   imanifestdict.__iter__}  r$   r%   c                    gr  r   r   s    r!   iterkeysimanifestdict.iterkeys  r$   r%   c                    g)z'Obtain a list of paths in the manifest.Nr   r   s    r!   keysimanifestdict.keys  r$   r%   Nc                    g)zObtain the set of paths in this manifest but not in another.

``match`` is an optional matcher function to be applied to both
manifests.

Returns a set of paths.
Nr   )r    othermatchs      r!   
filesnotinimanifestdict.filesnotin  r$   r%   c                    g)z7Returns an object implementing the ``idirs`` interface.Nr   r   s    r!   dirsimanifestdict.dirs  r$   r%   c                    g)z=Returns a bool indicating if a directory is in this manifest.Nr   )r    dirs     r!   hasdirimanifestdict.hasdir  r$   r%   c                    g)zGenerator of paths in manifest satisfying a matcher.

If the matcher has explicit files listed and they don't exist in
the manifest, ``match.bad()`` is called for each missing file.
Nr   )r    r  s     r!   walkimanifestdict.walk  r$   r%   c                    g)a*  Find differences between this manifest and another.

This manifest is compared to ``other``.

If ``match`` is provided, the two manifests are filtered against this
matcher and only entries satisfying the matcher are compared.

If ``clean`` is True, unchanged files are included in the returned
object.

Returns a dict with paths as keys and values of 2-tuples of 2-tuples of
the form ``((node1, flag1), (node2, flag2))`` where ``(node1, flag1)``
represents the node and flags for this manifest and ``(node2, flag2)``
are the same for the other manifest.
Nr   )r    r  r  cleans       r!   diffimanifestdict.diff  r$   r%   c                    g)zfSet the flag value for a given path.

Raises ``KeyError`` if the path is not already in the manifest.
Nr   )r    r   flags      r!   setflagimanifestdict.setflag  r$   r%   c                    g)z?Obtain the node value for a path or a default value if missing.Nr   )r    r   defaults      r!   getimanifestdict.get  r$   r%   c                    g)z>Return the flags value for a path (default: empty bytestring).Nr   rT   s     r!   r   imanifestdict.flags  r$   r%   c                    g)zReturn a copy of this manifest.Nr   r   s    r!   copyimanifestdict.copy  r$   r%   c                    g)z?Returns an iterable of (path, node) for items in this manifest.Nr   r   s    r!   itemsimanifestdict.items  r$   r%   c                    g)zIdentical to items().Nr   r   s    r!   	iteritemsimanifestdict.iteritems  r$   r%   c                    g)zReturns an iterable of (path, node, flags) for this manifest.

Similar to ``iteritems()`` except items are a 3-tuple and include
flags.
Nr   r   s    r!   iterentriesimanifestdict.iterentries  r$   r%   c                    g)zeObtain the raw data representation for this manifest.

Result is used to create a manifest revision.
Nr   r   s    r!   textimanifestdict.text  r$   r%   c                    g)a  Obtain a delta between this manifest and another given changes.

``base`` in the raw data representation for another manifest.

``changes`` is an iterable of ``(path, to_delete)``.

Returns a 2-tuple containing ``bytearray(self.text())`` and the
delta between ``base`` and this manifest.

If this manifest implementation can't support ``fastdelta()``,
raise ``mercurial.manifest.FastdeltaUnavailable``.
Nr   )r    basechangess      r!   	fastdeltaimanifestdict.fastdelta  r$   r%   r   )rw   rH   rI   rH   )r   rH   rI   tuple[bytes, bytes]r  )rI   r   )r   rH   r   rH   r   rH   rI   rL   )r   rH   r   rH   rI   rL   )r   rH   rI   r   )r   rH   rI   rL   )rI   Iterator[bytes])rI   list[bytes]r   rJ   )rI   z
misc.IDirs)r  rH   rI   r   )r  zmatcher.IMatcherrI   r  r   )r  r   r  zmatcher.IMatcher | Noner  r   rI   zQdict[bytes, tuple[tuple[bytes | None, bytes], tuple[bytes | None, bytes]] | None])r   rH   r  rH   rI   rL   )r   rH   rI   r   )r   rH   rI   rH   )rI   r|  )rI   zIterator[tuple[bytes, bytes]])rI   z$Iterator[tuple[bytes, bytes, bytes]])rI   r   )r  r   r  zIterable[tuple[bytes, bool]]rI   ztuple[ByteString, ByteString])"r/   r0   r1   r2   r3   r5   r6   r   r  r   r  __bool__r  r  r   r  r   r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r7   r   r%   r!   r|  r|  @  s    	  	  	< < 	I I H  	  	5 5 	  	2 2 	2 2 	6 6 	  	F F 	L L 	  	 *.	 ' 	

 2 	  	N N 	M M 	. . 	N N 	$ $ 	  	  	)E	& r%   r|  c                  `    \ rS rSrSr\R                  S 5       r\R                  S 5       rSr	g)imanifestrevisionbasei  zBase interface representing a single revision of a manifest.

Should not be used as a primary interface: should always be inherited
as part of a larger interface.
c                    g)zObtain a copy of this manifest instance.

Returns an object conforming to the ``imanifestrevisionwritable``
interface. The instance will be associated with the same
``imanifestlog`` collection as this instance.
Nr   r   s    r!   r  imanifestrevisionbase.copy   r$   r%   c                    g)zmObtain the parsed manifest data structure.

The returned object conforms to the ``imanifestdict`` interface.
Nr   r   s    r!   r$  imanifestrevisionbase.read	  r$   r%   r   N)
r/   r0   r1   r2   r3   r5   r6   r  r$  r7   r   r%   r!   r  r    s;     	  	 r%   r  c                  l   \ rS rSr% Sr\R                  SS j5       rS\S'    \R                  SSS jj5       r	\R                   SSS	.   SS
 jjj5       r
\R                  SSS.SS jj5       r\R                  SS	.SS jj5       r\R                  SSS jj5       r\R                  SS j5       rSrg)imanifestrevisionstoredi  z@Interface representing a manifest revision committed to storage.c                    g)z"The binary node for this manifest.Nr   r   s    r!   r   imanifestrevisionstored.node  r$   r%   r  r   Fc                    g)aM  Obtain the manifest data structure representing changes from parent.

This manifest is compared to its 1st parent. A new manifest
representing those differences is constructed.

If `shallow` is True, this will read the delta for this directory,
without recursively reading subdirectory manifests. Instead, any
subdirectory entry will be reported as it appears in the manifest, i.e.
the subdirectory will be reported among files and distinguished only by
its 't' flag. This only apply if the underlying manifest support it.

The returned object conforms to the ``imanifestdict`` interface.
Nr   r    shallows     r!   	readdelta!imanifestrevisionstored.readdelta  r$   r%   N)r  c                   g)a  read some manifest information as fast if possible

This might return a "delta", a manifest object containing only file
changed compared to another revisions. The `valid_bases` argument
control the set of revision that might be used as a base.

If no delta can be retrieved quickly, a full read of the manifest will
be performed instead.

The function return a tuple with two elements. The first one is the
delta base used (or None if we did a full read), the second one is the
manifest information.

If `shallow` is True, this will read the delta for this directory,
without recursively reading subdirectory manifests. Instead, any
subdirectory entry will be reported as it appears in the manifest, i.e.
the subdirectory will be reported among files and distinguished only by
its 't' flag. This only apply if the underlying manifest support it.

The returned object conforms to the ``imanifestdict`` interface.
Nr   )r    valid_basesr  s      r!   read_any_fast_delta+imanifestrevisionstored.read_any_fast_delta+  r$   r%   T)r  exactc                   g)aZ  return a diff from this revision against both parents.

If `exact` is False, this might return a superset of the diff, containing
files that are actually present as is in one of the parents.

If `shallow` is True, this will read the delta for this directory,
without recursively reading subdirectory manifests. Instead, any
subdirectory entry will be reported as it appears in the manifest, i.e.
the subdirectory will be reported among files and distinguished only by
its 't' flag. This only apply if the underlying manifest support it.

The returned object conforms to the ``imanifestdict`` interface.Nr   )r    r  r  s      r!   read_delta_parents*imanifestrevisionstored.read_delta_parentsH  r$   r%   c                   g)a  Return a manifest containing just the entries that might be new to
the repository.

This is often equivalent to a diff against both parents, but without
garantee. For performance reason, It might contains more files in some cases.

If `shallow` is True, this will read the delta for this directory,
without recursively reading subdirectory manifests. Instead, any
subdirectory entry will be reported as it appears in the manifest, i.e.
the subdirectory will be reported among files and distinguished only by
its 't' flag. This only apply if the underlying manifest support it.

The returned object conforms to the ``imanifestdict`` interface.Nr   r  s     r!   read_delta_new_entries.imanifestrevisionstored.read_delta_new_entriesW  r$   r%   c                    g)zVCalls either ``read()`` or ``readdelta()``.

The faster of the two options is called.
Nr   r  s     r!   readfast imanifestrevisionstored.readfastg  r$   r%   c                    g)zaCalls ``self.read().find(key)``.

Returns a 2-tuple of ``(node, flags)`` or raises ``KeyError``.
Nr   rv   s     r!   r  imanifestrevisionstored.findn  r$   r%   r   )rI   rH   F)r  r   r   )r  zCollection[int] | Noner  r   )r  r   r  r   )rw   rH   rI   r  )r/   r0   r1   r2   r3   r5   r6   r   r4   r  r  r  r  r  r  r7   r   r%   r!   r  r    s    J1 1 K  	 /3 	+ 	 8 	49 L L 	8= L L 	  	 r%   r  c                  B    \ rS rSrSr\R                   SS j5       rSrg)imanifestrevisionwritableiv  zAInterface representing a manifest revision that can be committed.Nc                    g)a  Add this revision to storage.

Takes a transaction object, the changeset revision number it will
be associated with, its parent nodes, and lists of added and
removed paths.

If match is provided, storage can choose not to inspect or write out
items that do not match. Storage is still required to be able to provide
the full manifest in the future for any directories written (these
manifests should not be "narrowed on disk").

Returns the binary node of the created revision.
Nr   )r    r;  r  r   r   addedremovedr  s           r!   writeimanifestrevisionwritable.writey  r$   r%   r   r   )	r/   r0   r1   r2   r3   r5   r6   r  r7   r   r%   r!   r  r  v  s     KJN r%   r  c                  *   \ rS rSr% SrS\S'    S\S'    S\S'    S	\S
'    S\S'    \R                  S 5       r\R                  S 5       r	\R                  S 5       r
\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                     S)S j5       r\R                    S*S j5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S  5       r\R                  S! 5       r\R                  S" 5       r\R                  S+S# j5       r\R                  S$ 5       r\R                    S*S% j5       r\R                       S,S& j5       r \R                  S' 5       r!S(r"g)-imanifeststoragei  z$Storage interface for manifest data.NodeConstantsnodeconstantsrH   treer   indexVfsopenerdictfulltextcachec                    g)z8Obtain the number of revisions stored for this manifest.Nr   r   s    r!   r   imanifeststorage.__len__  r$   r%   c                    g)z0Iterate over revision numbers for this manifest.Nr   r   s    r!   r   imanifeststorage.__iter__  r$   r%   c                    g)zhObtain the revision number given a binary node.

Raises ``error.LookupError`` if the node is not known.
Nr   r   s     r!   r   imanifeststorage.rev  r$   r%   c                    g)zkObtain the node value given a revision number.

Raises ``error.LookupError`` if the revision is not known.
Nr   r   s     r!   r   imanifeststorage.node  r$   r%   c                    g)zAttempt to resolve a value to a node.

Value can be a binary node, hex node, revision number, or a bytes
that can be converted to an integer.

Raises ``error.LookupError`` if a ndoe could not be resolved.
Nr   )r    values     r!   rx   imanifeststorage.lookup  r$   r%   c                    g)zaReturns a 2-tuple of parent nodes for a node.

Values will be ``nullid`` if the parent is empty.
Nr   r   s     r!   r   imanifeststorage.parents  r$   r%   c                    gr   r   r   s     r!   r   imanifeststorage.parentrevs  r$   r%   c                    gr  r   r   s     r!   r  imanifeststorage.linkrev  r$   r%   c                    g)z Obtain fulltext data for a node.Nr   r   s     r!   r   imanifeststorage.revision  r$   r%   c                    gr   r   r   s     r!   r!  imanifeststorage.rawdata  r$   r%   c                    g)z}Obtain a delta between two revision numbers.

The returned data is the result of ``bdiff.bdiff()`` on the raw
revision data.
Nr   )r    rev1rev2s      r!   revdiffimanifeststorage.revdiff  r$   r%   c                    g)zfCompare fulltext to another revision.

Returns True if the fulltext is different from what is stored.
Nr   r*  s      r!   r,  imanifeststorage.cmp  r$   r%   Nc                    g)zdProduce ``irevisiondelta`` describing revisions.

See the documentation for ``ifiledata`` for more.
Nr   )r    rm   r/  r0  r1  s        r!   r3  imanifeststorage.emitrevisions  r$   r%   c                    g)z^Process a series of deltas for storage.

See the documentation in ``ifilemutation`` for more.
Nr   )r    rE  rF  r;  rG  rH  s         r!   rJ  imanifeststorage.addgroup  r$   r%   c                    g)zObtain the size of tracked data.

Is equivalent to ``len(m.rawdata(node))``.

TODO this method is only used by upgrade code and may be removed.
Nr   r   s     r!   rawsizeimanifeststorage.rawsize	  r$   r%   c                    g)zvFind minimum revision that must be stripped to strip a linkrev.

See the documentation in ``ifilemutation`` for more.
Nr   rR  s     r!   rT  imanifeststorage.getstrippoint  r$   r%   c                    g)zeRemove storage of items starting at a linkrev.

See the documentation in ``ifilemutation`` for more.
Nr   rW  s      r!   rX  imanifeststorage.strip  r$   r%   c                    g)zuObtain the expected sizes of backing files.

TODO this is used by verify and it should not be part of the interface.
Nr   r   s    r!   	checksizeimanifeststorage.checksize   r$   r%   c                    g)zObtain paths that are backing storage for this manifest.

TODO this is used by verify and there should probably be a better API
for this functionality.
Nr   r   s    r!   r^  imanifeststorage.files'  r$   r%   c                    g)zObtain the revision that a revision is delta'd against.

TODO delta encoding is an implementation detail of storage and should
not be exposed to the storage interface.
Nr   r   s     r!   deltaparentimanifeststorage.deltaparent/  r$   r%   c                    g)zClone this instance to another.Nr   )r    rM  destre   s       r!   cloneimanifeststorage.clone7  r$   r%   c                    g)z/Clear any caches associated with this instance.Nr   r    clear_persisted_datas     r!   clearcachesimanifeststorage.clearcaches;  r$   r%   c                    g)z.Obtain a manifest storage instance for a tree.Nr   )r    ds     r!   dirlogimanifeststorage.dirlog?  r$   r%   c
                    g)a  Add a revision to storage.

``m`` is an object conforming to ``imanifestdict``.

``link`` is the linkrev revision number.

``p1`` and ``p2`` are the parent revision numbers.

``added`` and ``removed`` are iterables of added and removed paths,
respectively.

``readtree`` is a function that can be used to read the child tree(s)
when recursively writing the full tree structure when using
treemanifets.

``match`` is a matcher that can be used to hint to storage that not all
paths must be inspected; this is an optimization and can be safely
ignored. Note that the storage must still be able to reproduce a full
manifest including files that did not match.
Nr   )
r    mr;  linkr<  r=  r  r  readtreer  s
             r!   r>  imanifeststorage.addC  r$   r%   c                    g)zObtain information about storage for this manifest's data.

See ``ifilestorage.storageinfo()`` for a description of this method.
This one behaves the same way, except for manifest data.
Nr   ra  s         r!   rg  imanifeststorage.storageinfoe  r$   r%   c                    g)zreturn an actual revlog instance if any

This exist because a lot of code leverage the fact the underlying
storage is a revlog for optimization, so giving simple way to access
the revlog instance helps such code.
Nr   r   s    r!   
get_revlogimanifeststorage.get_revlogt  r$   r%   r   )NFFr  r  rn  )#r/   r0   r1   r2   r3   r4   r5   r6   r   r   r   r   rx   r   r   r  r   r!  r  r,  r3  rJ  r"  rT  rX  r)  r^  r.  r2  r7  r;  r>  rg  rE  r7   r   r%   r!   r  r    s   .  7
K
 "!1K 
 	G G 	? ? 	  	  	  	  	? ? 	L L 	/ / 	* * 	  	  	 "'
 
 	    	  	  	  	  	  	  	. . 	> > 	= = 	  B 	   	 r%   r  c                     \ rS rSr% SrS\S'    S\S'    \R                  S 5       r\R                  SS j5       r	\R                  S	 5       r
\R                  SSS
 jj5       r\R                  S 5       r\R                  S 5       rSrg)imanifestlogi~  zInterface representing a collection of manifest snapshots.

Represents the root manifest in a repository.

Also serves as a means to access nested tree manifests and to cache
tree manifests.
r  r  r   narrowedc                    g)zObtain a manifest instance for a given binary node.

Equivalent to calling ``self.get('', node)``.

The returned object conforms to the ``imanifestrevisionstored``
interface.
Nr   r   s     r!   r   imanifestlog.__getitem__  r$   r%   c                    g)a  Retrieve the manifest instance for a given directory and binary node.

``node`` always refers to the node of the root manifest (which will be
the only manifest if flat manifests are being used).

If ``tree`` is the empty string, the root manifest is returned.
Otherwise the manifest for the specified directory will be returned
(requires tree manifests).

If ``verify`` is True, ``LookupError`` is raised if the node is not
known.

The returned object conforms to the ``imanifestrevisionstored``
interface.
Nr   )r    r  r   verifys       r!   r  imanifestlog.get  r$   r%   c                    g)zRetrieve an interface to storage for a particular tree.

If ``tree`` is the empty bytestring, storage for the root manifest will
be returned. Otherwise storage for a tree manifest is returned.

TODO formalize interface for returned object.
Nr   )r    r  s     r!   
getstorageimanifestlog.getstorage  r$   r%   c                    g)z-Clear caches associated with this collection.Nr   r5  s     r!   r7  imanifestlog.clearcaches  r$   r%   c                    g)zfObtain the revision number for a binary node.

Raises ``error.LookupError`` if the node is not known.
Nr   r   s     r!   r   imanifestlog.rev  r$   r%   c                    g)z8update whatever cache are relevant for the used storage.Nr   )r    r;  s     r!   update_cachesimanifestlog.update_caches  r$   r%   r   N)Tr  )r6  r   rI   rL   )r/   r0   r1   r2   r3   r4   r5   r6   r   r  rP  r7  r   rW  r7   r   r%   r!   rH  rH  ~  s     ! 7N8  	 " 	  	< < 	  	G Gr%   rH  c                  <    \ rS rSrSr\R                  S 5       rSrg)ilocalrepositoryfilestoragei  zLocal repository sub-interface providing access to tracked file storage.

This interface defines how a repository accesses storage for a single
tracked file path.
c                    g)zdObtain a filelog for a tracked path.

The returned type conforms to the ``ifilestorage`` interface.
Nr   )r    fs     r!   file ilocalrepositoryfilestorage.file  r$   r%   r   N)	r/   r0   r1   r2   r3   r5   r6   r]  r7   r   r%   r!   rZ  rZ    s!     	 r%   rZ  c                     \ rS rSr% SrS\S'    S\S'    S\S'    S\S	'    S\S
'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S'    S\S '    S\S!'    S\S"'    S\S#'    S\S$'    \R                  S% 5       r\R                  S|S' j5       r	\R                  S( 5       r
\R                  S|S) j5       rS\S*'    S\S+'    S,\S-'    S.\S/'    S\S0'    \R                  S}S1 j5       r\R                  S2 5       r\R                  S3 5       r\R                  S4 5       r\R                  S5 5       r\r\R                  S6 5       r\R                  S7 5       r\R                  S8 5       r\R                  S9 5       r\R                  S~S: j5       r\R                  S; 5       r\R                  SS< j5       r\R                  S= 5       r\R                  S> 5       r\R                  S? 5       r\R                  S@ 5       r\R                  SA 5       r\R                  SB 5       r\R                  SC 5       r\R                  SD 5       r \R                  SSE j5       r!\R                  SF 5       r"\R                  SG 5       r#\R                  SH 5       r$\R                  SI 5       r%\R                  SJ 5       r&\R                  SK 5       r'\R                  SL 5       r(\R                  SM 5       r)\R                  SN 5       r*\R                  SSO j5       r+\R                  SP 5       r,\R                  S|SQ j5       r-\R                  SR 5       r.\R                  SS 5       r/\R                  SST j5       r0\R                  SU 5       r1\R                  SV 5       r2\R                  S|SW j5       r3\R                  SX 5       r4\R                  SY 5       r5\R                  SSZ j5       r6\R                  SS[ j5       r7\R                  S\ 5       r8\R                  S] 5       r9\R                  S^ 5       r:\R                  SS_ j5       r;\R                  S` 5       r<\R                  SSa j5       r=\R                  Sb 5       r>\R                  SSc j5       r?\R                  Sd 5       r@\R                  Se 5       rA\R                         SSf j5       rB\R                  S~Sg j5       rC\R                  Sh 5       rD\R                  Si 5       rE\R                         SSj j5       rF\R                  Sk 5       rG\R                  Sl 5       rH\R                  Sm 5       rI\R                  S|Sn j5       rJ\R                  SSo j5       rK\R                  Sp 5       rL\R                  Sq 5       rM\R                  Sr 5       rNSs\St'    \R                  Su 5       rO\R                  Sv 5       rP\R                  SSw j5       rQ\R                  Sx 5       rR\R                   SSy j5       rS\R                  Sz 5       rTS{rUg&)ilocalrepositorymaini  zrMain interface for local repositories.

This currently captures the reality of things - not how things should be.
r  r  rH   r   z
set[bytes]	supportedrequirementsfeatures
filternamezMapping[bytes, Vfs]vfs_mapr  wvfsvfssvfsrootr   origrootr   auditornofsauditorr   baseuir   
sharedpathstorespathr   sjoincachevfs	wcachevfsfilteredrevcachenamesfilecopiesmodec                    g)z$Close the handle on this repository.Nr   r   s    r!   r-   ilocalrepositorymain.closeJ  r$   r%   Nc                    g)z6Obtain an object conforming to the ``peer`` interface.Nr   rT   s     r!   r   ilocalrepositorymain.peerN  r$   r%   c                    g)z+Obtain an unfiltered/raw view of this repo.Nr   r   s    r!   
unfilteredilocalrepositorymain.unfilteredR  r$   r%   c                    g)z'Obtain a named view of this repository.Nr   )r    r<   visibilityexceptionss      r!   filteredilocalrepositorymain.filteredV  r$   r%   obsstore	changelogrH  manifestlogzintdirstate.idirstater   
narrowpatsc                    g)z$Obtain a matcher for the narrowspec.Nr   )r    r  includeexacts      r!   narrowmatch ilocalrepositorymain.narrowmatchl  r$   r%   c                    g)z*Define the narrowspec for this repository.Nr   )r    newincludesnewexcludess      r!   setnarrowpats"ilocalrepositorymain.setnarrowpatsp  r$   r%   c                    g)zTry to resolve a changectx.Nr   r    changeids     r!   r    ilocalrepositorymain.__getitem__t  r$   r%   c                    g)zWhether a changeset exists.Nr   r  s     r!   r   !ilocalrepositorymain.__contains__x  r$   r%   c                    g)zAlways returns True.Tr   r   s    r!   r   ilocalrepositorymain.__nonzero__|       r%   c                    g)z-Returns the number of changesets in the repo.Nr   r   s    r!   r   ilocalrepositorymain.__len__  r$   r%   c                    g)z(Iterate over revisions in the changelog.Nr   r   s    r!   r   ilocalrepositorymain.__iter__  r$   r%   c                    g)z%Evaluate a revset.

Emits revisions.
Nr   r    exprr   s      r!   r   ilocalrepositorymain.revs  r$   r%   c                    g)z/Evaluate a revset.

Emits changectx instances.
Nr   r  s      r!   r  ilocalrepositorymain.set  r$   r%   c                    g)z1Find revisions matching one of the given revsets.Nr   )r    specsuser
localaliass       r!   anyrevsilocalrepositorymain.anyrevs  r$   r%   c                    g)z8Returns a string representing the location of this repo.Nr   r   s    r!   r"   ilocalrepositorymain.url  r$   r%   c                    g)zCall a hook.Nr   )r    r<   throwr   s       r!   hookilocalrepositorymain.hook  r$   r%   c                    g)z Return a mapping of tag to node.Nr   r   s    r!   tagsilocalrepositorymain.tags  r$   r%   c                    g)zReturn the type of a given tag.Nr   )r    tagnames     r!   tagtypeilocalrepositorymain.tagtype  r$   r%   c                    g)z*Return a list of tags ordered by revision.Nr   r   s    r!   tagslistilocalrepositorymain.tagslist  r$   r%   c                    g)z'Return the tags associated with a node.Nr   r   s     r!   nodetagsilocalrepositorymain.nodetags  r$   r%   c                    g)z<Return the list of bookmarks pointing to the specified node.Nr   r   s     r!   nodebookmarks"ilocalrepositorymain.nodebookmarks  r$   r%   c                    g)z3Return a mapping of branch to heads in that branch.Nr   r   s    r!   rQ   ilocalrepositorymain.branchmap  r$   r%   c                    g r   r   r   s    r!   revbranchcache#ilocalrepositorymain.revbranchcache  r   r%   c                    g)zExtension point for caches for new nodes.

Multiple consumers are expected to need parts of the changelogrevision,
so it is provided as optimization to avoid duplicate lookups. A simple
cache would be fragile when other revisions are accessed, too.Nr   )r    r   changelogrevisions      r!   register_changeset'ilocalrepositorymain.register_changeset  s     	r%   c                    g)z'Return the tip node for a given branch.Nr   )r    	branchtipignoremissings      r!   r  ilocalrepositorymain.branchtip  r$   r%   c                    g)z Resolve the node for a revision.Nr   rv   s     r!   rx   ilocalrepositorymain.lookup  r$   r%   c                    g)z=Look up the branch name of the given revision or branch name.Nr   rv   s     r!   lookupbranch!ilocalrepositorymain.lookupbranch  r$   r%   c                    g)zHDetermine whether a series of nodes is known.

Returns a list of bools.
Nr   rl   s     r!   rn   ilocalrepositorymain.known  r$   r%   c                    g)z Whether the repository is local.Tr   r   s    r!   r'   ilocalrepositorymain.local  r  r%   c                    g)z2Whether the repository is a publishing repository.Nr   r   s    r!   
publishingilocalrepositorymain.publishing  r$   r%   c                    g r   r   r   s    r!   cancopyilocalrepositorymain.cancopy  r   r%   c                    g)z&The type of shared repository or None.Nr   r   s    r!   sharedilocalrepositorymain.shared  r$   r%   c                    g)z.Calls self.vfs.reljoin(self.root, f, *insidef)Nr   )r    r\  insidefs      r!   wjoinilocalrepositorymain.wjoin  r$   r%   c                    g)z.Set the parent nodes of the working directory.Nr   )r    r<  r=  s      r!   
setparentsilocalrepositorymain.setparents  r$   r%   c                    g)z-Obtain a filectx for the given file revision.Nr   )r    r   r  fileids       r!   filectxilocalrepositorymain.filectx  r$   r%   c                    g)z7Obtain the current working directory from the dirstate.Nr   r   s    r!   getcwdilocalrepositorymain.getcwd  r$   r%   c                    g)z#Obtain the relative path to a file.Nr   )r    r\  cwds      r!   pathtoilocalrepositorymain.pathto  r$   r%   c                    g r   r   )r    r<   fltrs      r!   adddatafilter"ilocalrepositorymain.adddatafilter  r   r%   c                    g)z*Read a file from wvfs, using data filters.Nr   )r    filenames     r!   wreadilocalrepositorymain.wread  r$   r%   c                    g)z5Write data to a file in the wvfs, using data filters.Nr   )r    r  datar   backgroundclosere   s         r!   wwriteilocalrepositorymain.wwrite
  r$   r%   c                    g)z9Resolve data for writing to the wvfs, using data filters.Nr   )r    r  r  s      r!   
wwritedatailocalrepositorymain.wwritedata  r$   r%   c                    g)z0Obtain the current transaction instance or None.Nr   r   s    r!   currenttransaction'ilocalrepositorymain.currenttransaction  r$   r%   c                    g)z2Open a new transaction to write to the repository.Nr   )r    descreports      r!   r;   ilocalrepositorymain.transaction  r$   r%   c                    g)z=Returns a list of (vfs, path) for files to undo transactions.Nr   r   s    r!   	undofilesilocalrepositorymain.undofiles  r$   r%   c                    g)z%Roll back an interrupted transaction.Nr   r   s    r!   recoverilocalrepositorymain.recover  r$   r%   c                    g)z'Undo the last transaction.

DANGEROUS.
Nr   )r    dryrunforces      r!   rollbackilocalrepositorymain.rollback"  r$   r%   c                    g)zWarm repo caches.Nr   )r    rM  fullcachess       r!   updatecaches!ilocalrepositorymain.updatecaches)  r$   r%   c                    g)z6Invalidate cached data due to the repository mutating.Nr   r   s    r!   invalidatecaches%ilocalrepositorymain.invalidatecaches-  r$   r%   c                    g r   r   r   s    r!   invalidatevolatilesets+ilocalrepositorymain.invalidatevolatilesets1  r   r%   c                    g)zInvalidate the dirstate.Nr   r   s    r!   invalidatedirstate'ilocalrepositorymain.invalidatedirstate5  r$   r%   c                    g r   r   )r    clearfilecaches     r!   
invalidateilocalrepositorymain.invalidate9  r   r%   c                    g r   r   r   s    r!   invalidateall"ilocalrepositorymain.invalidateall=  r   r%   c                    g)a  Lock the repository store and return a lock instance.

If another lock object is specified through the "steal_from" argument,
the new lock will reuse the on-disk lock of that "stolen" lock instead
of creating its own. The "stolen" lock is no longer usable for any
purpose and won't execute its release callback.

That steal_from argument is used during local clone when reloading a
repository. If we could remove the need for this during copy clone, we
could remove this function.
Nr   r    wait
steal_froms      r!   lockilocalrepositorymain.lockA  r$   r%   c                    g)z%Return the lock if it's held or None.Nr   r   s    r!   currentlock ilocalrepositorymain.currentlockO  r$   r%   c                    g)a  Lock the non-store parts of the repository.

If another lock object is specified through the "steal_from" argument,
the new lock will reuse the on-disk lock of that "stolen" lock instead
of creating its own. The "stolen" lock is no longer usable for any
purpose and won't execute its release callback.

That steal_from argument is used during local clone when reloading a
repository. If we could remove the need for this during copy clone, we
could remove this function.
Nr   r'  s      r!   wlockilocalrepositorymain.wlockS  r$   r%   c                    g)z&Return the wlock if it's held or None.Nr   r   s    r!   currentwlock!ilocalrepositorymain.currentwlocka  r$   r%   c                    g r   r   )r    wctxr  statusfails        r!   checkcommitpatterns(ilocalrepositorymain.checkcommitpatternse  r   r%   c                    g)z%Add a new revision to the repository.Nr   )r    r  r  dater  r  editorextras           r!   commitilocalrepositorymain.commiti  r$   r%   c                    g)z.Commit a commitctx instance to the repository.Nr   )r    ctxr   origctxs       r!   	commitctxilocalrepositorymain.commitctxv  r$   r%   c                    g)z;Inform the repository that nodes are about to be destroyed.Nr   r   s    r!   
destroyingilocalrepositorymain.destroyingz  r$   r%   c                    g)z5Inform the repository that nodes have been destroyed.Nr   r   s    r!   	destroyedilocalrepositorymain.destroyed~  r$   r%   c                    g)z,Convenience method to call repo[x].status().Nr   )r    r
  r  r  ignoredr  unknownlistsubreposs           r!   r7  ilocalrepositorymain.status  r$   r%   c                    g r   r   )r    pss     r!   addpostdsstatus$ilocalrepositorymain.addpostdsstatus  r   r%   c                    g r   r   r   s    r!   postdsstatus!ilocalrepositorymain.postdsstatus  r   r%   c                    g r   r   r   s    r!   clearpostdsstatus&ilocalrepositorymain.clearpostdsstatus  r   r%   c                    g)z(Obtain list of nodes that are DAG heads.Nr   )r    r   s     r!   ri   ilocalrepositorymain.heads  r$   r%   c                    g r   r   )r    branchr   closeds       r!   branchheads ilocalrepositorymain.branchheads  r   r%   c                    g r   r   rl   s     r!   r   ilocalrepositorymain.branches  r   r%   c                    g r   r   r   s     r!   r   ilocalrepositorymain.between  r   r%   c                    g r   r   )r    pushops     r!   	checkpushilocalrepositorymain.checkpush  r   r%   zmisc.IHooksprepushoutgoinghooksc                    g r   r   r{   s        r!   r~   ilocalrepositorymain.pushkey  r   r%   c                    g r   r   rq   s     r!   rs   ilocalrepositorymain.listkeys  r   r%   c                    g r   r   r[   s         r!   ra   "ilocalrepositorymain.debugwireargs  r   r%   c                    g r   r   )r    r  s     r!   savecommitmessage&ilocalrepositorymain.savecommitmessage  r   r%   c                    g r   r   )r    kindcategoryr  computerr   replaces          r!   register_sidedata_computer/ilocalrepositorymain.register_sidedata_computer  s     	r%   c                    g r   r   )r    rv  s     r!   register_wanted_sidedata-ilocalrepositorymain.register_wanted_sidedata  r   r%   r   r   r   )FNr  r  )FF)NFN)TN)r%   NNNFFN)   .NNFFFFrZ  r   )Vr/   r0   r1   r2   r3   r4   r5   r6   r-   r   r|  r  r  r  r   r   r  r  r   r   r   r  r  r"   r  r  r  r  r  r  rQ   r  r  r  rx   r  rn   r'   r  r  r  r  r  r  r  r  r  r  r  r  r   r;  r  r
  r  r  r  r  r  r!  r$  r*  r-  r0  r3  r9  r?  rD  rG  rJ  r7  rS  rV  rY  ri   r`  r   r   rh  r~   rs   ra   rr  ry  r|  r7   r   r%   r!   r`  r`    s@	   
 ! KMEC-" ;  D
I3	H
 I K4
K$OBL 
 J7
F-JJLO#M
 N
 1J$A3 3 	E E 	: : 	6 6 M'N+
 $#"O<3 3 	9 9 	* * 	* * 	  H< < 	7 7 	  	  	@ @ 	G G 	  	/ / 	. . 	9 9 	6 6 	K K 	B B 	  	  	6 6 	/ / 	L L 	  	  	A A 	  	5 5 	= = 	= = 	< < 	F F 	2 2 	  	9 9 	D D 	H H 	? ? 	A A 	L L 	4 4 	  	    	E E 	  	' ' 	  	  	  	4 4 	  	5 5 	  	 
4 
4 	= = 	J J 	D D 	 
; 
; 	  	  	  	7 7 	  	  	  	  &%  	  	  	  	=B 
 	 r%   r`  c                      \ rS rSrSrSrg)completelocalrepositoryi  z*Complete interface for a local repository.r   N)r/   r0   r1   r2   r3   r7   r   r%   r!   r  r    s    
 5r%   r  c                     \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
\R                  S 5       r\R                  S 5       r\R                  S	 5       rS
rg)iwireprotocolcommandcacheri  a  Represents a caching backend for wire protocol commands.

Wire protocol version 2 supports transparent caching of many commands.
To leverage this caching, servers can activate objects that cache
command responses. Objects handle both cache writing and reading.
This interface defines how that response caching mechanism works.

Wire protocol version 2 commands emit a series of objects that are
serialized and sent to the client. The caching layer exists between
the invocation of the command function and the sending of its output
objects to an output layer.

Instances of this interface represent a binding to a cache that
can serve a response (in place of calling a command function) and/or
write responses to a cache for subsequent use.

When a command request arrives, the following happens with regards
to this interface:

1. The server determines whether the command request is cacheable.
2. If it is, an instance of this interface is spawned.
3. The cacher is activated in a context manager (``__enter__`` is called).
4. A cache *key* for that request is derived. This will call the
   instance's ``adjustcachekeystate()`` method so the derivation
   can be influenced.
5. The cacher is informed of the derived cache key via a call to
   ``setcachekey()``.
6. The cacher's ``lookup()`` method is called to test for presence of
   the derived key in the cache.
7. If ``lookup()`` returns a hit, that cached result is used in place
   of invoking the command function. ``__exit__`` is called and the instance
   is discarded.
8. The command function is invoked.
9. ``onobject()`` is called for each object emitted by the command
   function.
10. After the final object is seen, ``onfinished()`` is called.
11. ``__exit__`` is called to signal the end of use of the instance.

Cache *key* derivation can be influenced by the instance.

Cache keys are initially derived by a deterministic representation of
the command request. This includes the command name, arguments, protocol
version, etc. This initial key derivation is performed by CBOR-encoding a
data structure and feeding that output into a hasher.

Instances of this interface can influence this initial key derivation
via ``adjustcachekeystate()``.

The instance is informed of the derived cache key via a call to
``setcachekey()``. The instance must store the key locally so it can
be consulted on subsequent operations that may require it.

When constructed, the instance has access to a callable that can be used
for encoding response objects. This callable receives as its single
argument an object emitted by a command function. It returns an iterable
of bytes chunks representing the encoded object. Unless the cacher is
caching native Python objects in memory or has a way of reconstructing
the original Python objects, implementations typically call this function
to produce bytes from the output objects and then store those bytes in
the cache. When it comes time to re-emit those bytes, they are wrapped
in a ``wireprototypes.encodedresponse`` instance to tell the output
layer that they are pre-encoded.

When receiving the objects emitted by the command function, instances
can choose what to do with those objects. The simplest thing to do is
re-emit the original objects. They will be forwarded to the output
layer and will be processed as if the cacher did not exist.

Implementations could also choose to not emit objects - instead locally
buffering objects or their encoded representation. They could then emit
a single "coalesced" object when ``onfinished()`` is called. In
this way, the implementation would function as a filtering layer of
sorts.

When caching objects, typically the encoded form of the object will
be stored. Keep in mind that if the original object is forwarded to
the output layer, it will need to be encoded there as well. For large
output, this redundant encoding could add overhead. Implementations
could wrap the encoded object data in ``wireprototypes.encodedresponse``
instances to avoid this overhead.
c                    g)z3Marks the instance as active.

Should return self.
Nr   r   s    r!   	__enter__$iwireprotocolcommandcacher.__enter__(	  r$   r%   c                    g)zCalled when cacher is no longer used.

This can be used by implementations to perform cleanup actions (e.g.
disconnecting network sockets, aborting a partially cached response.
Nr   )r    exctypeexcvalueexctbs       r!   __exit__#iwireprotocolcommandcacher.__exit__/	  r$   r%   c                    g)aB  Influences cache key derivation by adjusting state to derive key.

A dict defining the state used to derive the cache key is passed.

Implementations can modify this dict to record additional state that
is wanted to influence key derivation.

Implementations are *highly* encouraged to not modify or delete
existing keys.
Nr   rj  s     r!   adjustcachekeystate.iwireprotocolcommandcacher.adjustcachekeystate7	  r$   r%   c                    g)aF  Record the derived cache key for this request.

Instances may mutate the key for internal usage, as desired. e.g.
instances may wish to prepend the repo name, introduce path
components for filesystem or URL addressing, etc. Behavior is up to
the cache.

Returns a bool indicating if the request is cacheable by this
instance.
Nr   rv   s     r!   setcachekey&iwireprotocolcommandcacher.setcachekeyD	  r$   r%   c                    g)a:  Attempt to resolve an entry in the cache.

The instance is instructed to look for the cache key that it was
informed about via the call to ``setcachekey()``.

If there's no cache hit or the cacher doesn't wish to use the cached
entry, ``None`` should be returned.

Else, a dict defining the cached result should be returned. The
dict may have the following keys:

objs
   An iterable of objects that should be sent to the client. That
   iterable of objects is expected to be what the command function
   would return if invoked or an equivalent representation thereof.
Nr   r   s    r!   rx   !iwireprotocolcommandcacher.lookupQ	  r$   r%   c                    g)a  Called when a new object is emitted from the command function.

Receives as its argument the object that was emitted from the
command function.

This method returns an iterator of objects to forward to the output
layer. The easiest implementation is a generator that just
``yield obj``.
Nr   )r    objs     r!   onobject#iwireprotocolcommandcacher.onobjectd	  r$   r%   c                    g)zCalled after all objects have been emitted from the command function.

Implementations should return an iterator of objects to forward to
the output layer.

This method can be a generator.
Nr   r   s    r!   
onfinished%iwireprotocolcommandcacher.onfinishedp	  r$   r%   r   N)r/   r0   r1   r2   r3   r5   r6   r  r  r  r  rx   r  r  r7   r   r%   r!   r  r    s    Pd 	  	  	
 
 	
 
 	 $ 		 	 	 r%   r  )T
__future__r   r5   typingr   r   r   r   r   r	   r
   r   r   i18nr    r   TYPE_CHECKINGr   
_basetypesr   r   r   r  r   intdirstater   r   r   REPO_FEATURE_REVLOG_FILE_STORAGEREPO_FEATURE_SHARED_STORAGEREPO_FEATURE_LFSREPO_FEATURE_STREAM_CLONEREPO_FEATURE_SIDE_DATA!REPO_FEATURE_SHALLOW_FILE_STORAGEREVISION_FLAG_CENSOREDREVISION_FLAG_ELLIPSISREVISION_FLAG_EXTSTOREDREVISION_FLAG_HASCOPIESINFOREVISION_FLAGS_KNOWNr5  CG_DELTAMODE_PREVCG_DELTAMODE_FULLCG_DELTAMODE_P1CACHE_BRANCHMAP_ALLCACHE_BRANCHMAP_SERVEDCACHE_CHANGELOG_CACHE CACHE_BRANCHMAP_DETECT_PURE_TOPOCACHE_FULL_MANIFESTCACHE_FILE_NODE_TAGSCACHE_MANIFESTLOG_CACHECACHE_REV_BRANCHCACHE_TAGS_DEFAULTCACHE_TAGS_SERVEDCACHES_DEFAULT
CACHES_ALLr  CACHES_POST_CLONEdiscardr   r9   rN   r   r   r   r   r   r   r   r   r  r7  r\  rp  r|  r  r  r  r  rH  rZ  r`  r  r  r   r%   r!   <module>r     s   # 
 
 
 
  	
  M $8  ,  * % $9 !    ! %   ""      ' , * #@  & ( . & $ " 
  $
 OO%    . /   * +/x /d <cH cL"( "J:8 :zH >)
. )
XX ,?X ?D5=X 5=pp pfp pfxH xvD:y- DNBH B>vH vrH 0b3X bJ 5x ,ox odBG8 BGJ( x8 xv55c cr%   