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 �]Lb � @ sx d dl mZ d dlZd dlZddlmZ ddlmZmZ m Z mZmZ dd� Z G dd � d e�Zd d� ZG dd � d e�ZdS )� )�absolute_importN� )�_)�error�match�pycompat�scmutil�utilc c s� � d}d}|t | �k rZ|�| |�}|sd S |�� \}}|| �d||�d 7 }| �d||�d p0|}| �d|�d p>t | �d }|d }||| || | ||� fV |t | �k sd S d S )Nr � r )�len�search�span�count�rfind�find) �body�regexp�begin�linenumr �mstart�mend�lstart�lend� r �0/usr/lib/python3/dist-packages/mercurial/grep.py� matchlines s ��r c @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S ) � linestatec C s || _ || _|| _|| _d S �N)�liner �colstart�colend)�selfr r r r r r r �__init__( s zlinestate.__init__c C s t | j�S r )�hashr )r! r r r �__hash__. s zlinestate.__hash__c C s | j |j kS r )r )r! �otherr r r �__eq__1 s zlinestate.__eq__c c sx � | j | jfV | j}|t| j�k r:|�| j|�}|sdS |�� |kr(|d7 }n |�� V |�� }|t| j�k sdS dS )z+Iterate all (start, end) indices of matchesr N)r r r r r �endr )r! r �p�mr r r �findpos4 s � �zlinestate.findposN)�__name__� __module__�__qualname__r"