Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/mercurial/__pycache__/ |
Upload File : |
o �]LbV � @ s� d dl mZ d dlZd dlZddlmZ ddlmZ ddlm Z m Z ddlmZm ZmZmZmZmZmZmZ ddlmZmZ dd lmZ ejZd d� Zdd � ZG dd� dejj�Ze� ej!�G dd� de"��Z#e� ej$ej%�G dd� dej&��Z'dS )� )�absolute_importN� )�_)�bin)�getattr�setattr)�bundle2�changegroup�encoding�error�pushkey�pycompat�util�wireprototypes)� repositoryr )�hashutilc s* � fdd�}t |d� � t |d� j� |S )a� annotation for batchable methods Such methods must implement a coroutine as follows: @batchable def sample(self, one, two=None): # Build list of encoded arguments suitable for your wire protocol: encoded_args = [('one', encode(one),), ('two', encode(two),)] # Return it, along with a function that will receive the result # from the batched request. return encoded_args, decode The decorator returns a function which wraps this coroutine as a plain method, but adds the original method as an attribute called "batchable", which is used by remotebatch to split the call into separate encoding and decoding phases. c sB � | i |��\}}|s |S | d }t �� j�}|�||�}||�S )Nr )r �bytesurl�__name__� _submitone)�args�opts�encoded_args_or_res�decode�self�cmd�encoded_res��f� �;/usr/lib/python3/dist-packages/mercurial/wireprotov1peer.py�plain9 s zbatchable.<locals>.plain� batchabler )r r )r r r r r r! &