HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/hgext/infinitepush/__pycache__/indexapi.cpython-310.pyc
o

�]LbB�@s0ddlmZGdd�de�ZGdd�de�ZdS)�)�absolute_importc@speZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�indexapiaClass that manages access to infinitepush index.

    This class is a context manager and all write operations (like
    deletebookmarks, addbookmark etc) should use `with` statement:

      with index:
          index.deletebookmarks(...)
          ...
    cC�dS)z*Initializes the metadata store connection.N���selfrr�=/usr/lib/python3/dist-packages/hgext/infinitepush/indexapi.py�__init__�zindexapi.__init__cCr)z(Cleans up the metadata store connection.Nrrrrr�closer
zindexapi.closecCs|S�Nrrrrr�	__enter__�zindexapi.__enter__cCsdSrr)r�exc_type�exc_val�exc_tbrrr�__exit__rzindexapi.__exit__cC�t��)zcTakes a bundleid and a list of node contexts for each node
        in that bundle and records that.��NotImplementedError)r�bundleid�nodesctxrrr�	addbundle"�zindexapi.addbundlecCr)zRTakes a bookmark name and hash, and records mapping in the metadata
        store.r)r�bookmark�noderrr�addbookmark'rzindexapi.addbookmarkcCr)zbTakes a dict with mapping from bookmark to hash and records mapping
        in the metadata store.r)r�	bookmarksrrr�addmanybookmarks,rzindexapi.addmanybookmarkscCr)z+Accepts list of bookmarks and deletes them.r)r�patternsrrr�deletebookmarks1�zindexapi.deletebookmarkscCr)zAReturns the bundleid for the bundle that contains the given node.r)rrrrr�	getbundle5r!zindexapi.getbundlecCr)zBReturns the node for the given bookmark. None if it doesn't exist.r)rrrrr�getnode9r!zindexapi.getnodecCr)z&Returns bookmarks that match the queryr)r�queryrrr�getbookmarks=r!zindexapi.getbookmarkscCr)z(Saves optional metadata for a given noder)rr�jsonmetadatarrr�saveoptionaljsonmetadataAr!z!indexapi.saveoptionaljsonmetadataN)�__name__�
__module__�__qualname__�__doc__r	rr
rrrrr r"r#r%r'rrrrrs
rc@seZdZdS)�indexexceptionN)r(r)r*rrrrr,Fsr,N)�
__future__r�objectr�	Exceptionr,rrrr�<module>s;