403Webshell
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/hgext/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/__pycache__/schemes.cpython-39.pyc
a

�+�b\�@s�dZddlmZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZiZe�e�ZdZe�d�ZGd	d
�d
e�Zdd�Zd
ddddd�Zdd�Zeddd�dd��ZdS)a'extend schemes with shortcuts to repository swarms

This extension allows you to specify shortcuts for parent URLs with a
lot of repositories to act like a scheme, for example::

  [schemes]
  py = http://code.python.org/hg/

After that you can use it like::

  hg clone py://trunk/

Additionally there is support for some more complex schemas, for
example used by Google Code::

  [schemes]
  gcode = http://{1}.googlecode.com/hg/

The syntax is taken from Mercurial templates, and you have unlimited
number of variables, starting with ``{1}`` and continuing with
``{2}``, ``{3}`` and so on. This variables will receive parts of URL
supplied, split by ``/``. Anything not specified as ``{part}`` will be
just appended to an URL.

For convenience, the extension adds these schemes by default::

  [schemes]
  py = http://hg.python.org/
  bb = https://bitbucket.org/
  bb+ssh = ssh://hg@bitbucket.org/
  gcode = https://{1}.googlecode.com/hg/
  kiln = https://{1}.kilnhg.com/Repo/

You can override a predefined scheme by defining a new scheme with the
same name.
�)�absolute_importN)�_)�error�
extensions�hg�pycompat�	registrar�	templater)�urlutilsships-with-hg-cores{(\d+)\}c@s.eZdZdd�Zdd�Zd
dd�Zdd	�ZdS)�ShortRepositorycCsL||_||_||_ztttt�|j���|_Wnt	yFd|_Yn0dS)Nr)
�schemer	�url�max�map�int�_partre�findall�parts�
ValueError)�selfr
rr	�r�3/usr/lib64/python3.9/site-packages/hgext/schemes.py�__init__HszShortRepository.__init__cCs
d|jS)Ns<ShortRepository: %s>)r)rrrr�__repr__QszShortRepository.__repr__NcCs$|�|�}t�|�j|||||d�S)N)�intents�
createopts)�resolver�_peerlookup�instance)r�uir
ZcreaterrrrrrTs


�zShortRepository.instancecCs�z|�dd�d}Wn$ty8t�td�|��Yn0|�d|j�}t|�|jkrl|d}|dd�}nd}dd�t|�D�}d�|j	�
|j|��|S)	Ns://�sno '://' in scheme url '%s'�/����cSsi|]\}}d|d|�qS)s%dr r)�.0�i�vrrr�
<dictcomp>fr#z+ShortRepository.resolve.<locals>.<dictcomp>)�split�
IndexErrorr�Abortrr�len�	enumerate�joinr	Zprocessr
)rr
r�tail�contextrrrrZszShortRepository.resolve)NN)�__name__�
__module__�__qualname__rrrrrrrrrGs	
rcCs*|r"tD]}|�|d�rdSq||�S)N�:F)�schemes�
startswith)Zorig�pathrrrr�hasdriveletterjs
r7shttp://hg.python.org/shttps://bitbucket.org/sssh://hg@bitbucket.org/shttps://{1}.googlecode.com/hg/shttps://{1}.kilnhg.com/Repo/)spysbbsbb+sshsgcodeskilncCs�t�t|�d���t�tj�}t��D]^\}}tj	rtt
|�dkrt|��rttj
�d|�rtt�td�||��f��t|||�tj|<q(t�tdt�dS)Nsschemesr s%s:\s5custom scheme %s:// conflicts with drive letter %s:\
shasdriveletter)r4�update�dictZconfigitemsr	Zengine�parse�itemsrZ	iswindowsr+�isalpha�osr6�existsrr*r�upperrrrZwrapfunctionr
r7)r�trr
rrr�extsetup{s(�
����
��rAsdebugexpandschemeT)ZnorepocKs0t�|�}t|t�r|�|�}|�|d�dS)z3given a repo path, provide the scheme-expanded path�
N)rr�
isinstancerr�write)rr
ZoptsZreporrr�expandscheme�s


rE)�__doc__Z
__future__rr=�reZmercurial.i18nrZ	mercurialrrrrrr	Zmercurial.utilsr
ZcmdtableZcommandZ
testedwith�compiler�objectrr7r4rArErrrr�<module>s*$ 

#	�	


Youez - 2016 - github.com/yon3zu
LinuXploit