Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.9/site-packages/mercurial/utils/__pycache__/ |
Upload File : |
a �+�bAw � @ s� d dl Z d dlZd dlZddlmZ ddlmZmZ ddl m Z mZmZmZ ddl m Z ejrjd dlmZ ejZd d � ZG dd� de�Zd d� Zdd� Zdd� Zdd� Zdd� Zdd� ZdBdd�Zdd� Zdd� Zdd � ZdCd!d"�ZdDd$d%�Z dEd&d'�Z!dFd(d)�Z"G d*d+� d+e#�Z$i Z%d,d-� Z&e&d.d/�d0d1� �Z'e&d2d2�d3d4� �Z(h d5�Z)e&d6d7�d8d9� �Z*e&d:d;�d<d=� �Z+d>d?� Z,G d@dA� dAe�Z-dS )G� N� )�_)�getattr�setattr)�encoding�error�pycompat�urllibcompat� )� stringutil)�Unionc C s\ z t | �W S ty Y n0 zt�t�| ��W S tjyV t�td�| ��Y n0 dS )z�Return the port for a given network service. If port is an integer, it's returned as is. If it's a string, it's looked up using socket.getservbyname(). If there's no matching service, error.Abort is raised. s+ no port number associated with service '%s'N) �int� ValueError�socketZ getservbynamer Zsysstrr �Abortr )�port� r �=/usr/lib64/python3.9/site-packages/mercurial/utils/urlutil.py�getport$ s �r c @ sv e Zd ZdZdZdZe�d�jZ ddd�Z dd � Zej d d� �Zdd � Ze� e�Zdd� Zdd� Zdd� Zdd� ZdS )�urla� Reliable URL parser. This parses URLs and provides attributes for the following components: <scheme>://<user>:<passwd>@<host>:<port>/<path>?<query>#<fragment> Missing components are set to None. The only exception is fragment, which is set to '' if present but empty. If parsefragment is False, fragment is included in query. If parsequery is False, query is included in path. If both are False, both fragment and query are included in path. See http://www.ietf.org/rfc/rfc2396.txt for more information. Note that for backward compatibility reasons, bundle URLs do not take host names. That means 'bundle://../' has a path of '../'. Examples: >>> url(b'http://www.ietf.org/rfc/rfc2396.txt') <url scheme: 'http', host: 'www.ietf.org', path: 'rfc/rfc2396.txt'> >>> url(b'ssh://[::1]:2200//home/joe/repo') <url scheme: 'ssh', host: '[::1]', port: '2200', path: '/home/joe/repo'> >>> url(b'file:///home/joe/repo') <url scheme: 'file', path: '/home/joe/repo'> >>> url(b'file:///c:/temp/foo/') <url scheme: 'file', path: 'c:/temp/foo/'> >>> url(b'bundle:foo') <url scheme: 'bundle', path: 'foo'> >>> url(b'bundle://../foo') <url scheme: 'bundle', path: '../foo'> >>> url(br'c:\foo\bar') <url path: 'c:\\foo\\bar'> >>> url(br'\\blah\blah\blah') <url path: '\\\\blah\\blah\\blah'> >>> url(br'\\blah\blah\blah#baz') <url path: '\\\\blah\\blah\\blah', fragment: 'baz'> >>> url(br'file:///C:\users\me') <url scheme: 'file', path: 'C:\\users\\me'> Authentication credentials: >>> url(b'ssh://joe:xyz@x/repo') <url scheme: 'ssh', user: 'joe', passwd: 'xyz', host: 'x', path: 'repo'> >>> url(b'ssh://joe@x/repo') <url scheme: 'ssh', user: 'joe', host: 'x', path: 'repo'> Query strings and fragments: >>> url(b'http://host/a?b#c') <url scheme: 'http', host: 'host', path: 'a', query: 'b', fragment: 'c'> >>> url(b'http://host/a?b#c', parsequery=False, parsefragment=False) <url scheme: 'http', host: 'host', path: 'a?b#c'> Empty path: >>> url(b'') <url path: ''> >>> url(b'#a') <url path: '', fragment: 'a'> >>> url(b'http://host/') <url scheme: 'http', host: 'host', path: ''> >>> url(b'http://host/#a') <url scheme: 'http', host: 'host', path: '', fragment: 'a'> Only scheme: >>> url(b'http:') <url scheme: 'http'> s !~*'()+s /!~*'()+:\s ^[a-zA-Z0-9+.\-]+:Tc C s� d | _ | _ | _| _d | _ | _ | _| _d| _d| _ || _ |r`d|v r`|�dd�\}| _t|�sr|� d�r||| _d S |� d�r�d| _ |dd � }|� d �r�|d d � }|| _d S | �|�r�|�dd�}|d r�|\| _ }d | _|�sd }| j�r�d| _d S �n�| j�r|| _d S |�rRd|v �rR|�dd�\}| _|�sDd }| j�sRd | _|�r�|� d ��r�|d d � �dd�}t|�dk�r�|\| _}n|d | _d }| j�s�d | _|�r�t|��s�d| }| j�r d| jv �r | j�dd�\| _| _d| jv �r| j�dd�\| _| _| j�s d | _| j�r|d| jv �r|| j� d��rP| j�d��s|| j| _ | j�dd�\| _| _| j�s|d | _| j�r�| j dk�r�| jdv�r�t�td���|| _dD ],}t| |�}|d u�r�t| |t�|�� �q�d S )NT� � #r � \\� bundle:� bundle� � //r � :r F� ?� /� @� [� ]� file)s localhosts 127.0.0.1s [::1]s( file:// URLs can only refer to localhost)� user� passwd� host� port� path� fragment)�scheme�user�passwd�hostr �path�query�fragment� _localpath� _hostport� _origpath�split�hasdriveletter� startswith�_matchscheme�len�rsplit�endswithr r r r r �urlreq�unquote)�selfr. � parsequery� parsefragment�parts�a�vr r r �__init__� s� �� � ����� zurl.__init__c C sd t d�}| j|_| j|_| j|_| j|_| j|_| j|_| j|_| j|_| j|_| j |_ | j |_ |S )Ns temporary useless value)r r. r* r+ r, r- r/ r0 r1 r2 r3 )r= �ur r r �copy� s zurl.copyc C sF g }dD ].}t | |�}|d ur|�d|t�|�f � qdd�|� S )N)s schemer$ r% r&