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__/githelp.cpython-39.pyc
a

�+�b���%@sbdZddlmZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZdZiZe�e�Zdd	�Zed
ged�ejdd
�dd��Zdd�ZGdd�de�ZGdd�de�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Z d$d%�Z!d&d'�Z"d(d)�Z#d*d+�Z$d,d-�Z%d.d/�Z&d0d1�Z'd2d3�Z(d4d5�Z)d6d7�Z*d8d9�Z+d:d;�Z,d<d=�Z-d>d?�Z.d@dA�Z/dBdC�Z0dDdE�Z1dFdG�Z2dHdI�Z3dJdK�Z4dLdM�Z5dNdO�Z6dPdQ�Z7dRdS�Z8dTdU�Z9dVdW�Z:dXdY�Z;dZd[�Z<d\d]�Z=d^d_�Z>d`da�Z?dbdc�Z@ddde�ZAdfdg�ZBeeeeeee!e"e#e$e%e'e(e)e*e+e,e-e.e/e0e1e2e3e4e5e6e7e8e9e:e;e<e=eBe&dh�$ZCe>e?e@eAdi�ZDdS)jz�try mapping git commands to Mercurial commands

Tries to map a given git command to a Mercurial command:

  $ hg githelp -- git checkout master
  hg update master

If an unknown command or parameter combination is detected, an error is
produced.
�)�absolute_importN)�_)�encoding�error�	fancyopts�pycompat�	registrar�scmutil)�procutilsships-with-hg-corecCs<|�d�r|dd�Sd|vr*|�dd�}t�dd|�}|S)Nsorigin/�sHEAD�.s~$s~1)�
startswith�replace�re�sub)�s�r�3/usr/lib64/python3.9/site-packages/hgext/githelp.py�convert,s
rsgithelp|gits
hg githelpT)ZhelpcategoryZ	helpbasiccOs�t|�dks$t|�dkr2|ddkr2t�td���|ddkrJ|dd�}|d}|tvrlt�td�|��|�d�|dd�}t|||g|�Ri|��S)zgsuggests the Mercurial equivalent of the given git command

    Usage: hg githelp -- <git command>
    r�sgits8missing git command - usage: hg githelp -- <git command>Nserror: unknown git command %ssgithelp)�lenr�Abortr�gitcommandsZpager)�ui�repo�args�kwargs�cmdrrr�githelp6s
$�
rcCsft|�}i}t|�}zt�t|�||d�}W�q4Wqtj�y0}z�d|jvrR�d|j|jvrtdt�|j�}n<d|j|jvr�dt�|j�}nt�	t
d�t�|j���z|�|�WnJt�yt
d�}t
d	�}tj	|t�|j�|t�|j�d
��Yn0|�
t
d�|�WYd}~qd}~00qtdd
�|D��}tdd
�t�|�D��}||fS)NTzrequires argumentz--�--�-�-sunknown option %ss-unknown option '%s' packed with other optionss2please try passing the option as its own flag: -%s)�hintsignoring unknown option %s
cSsg|]}t|��qSr�r)�.0�xrrr�
<listcomp>s�z parseoptions.<locals>.<listcomp>cSs.g|]&\}}t|t�r"|t|�fn||f�qSr)�
isinstance�bytesr)r$�k�vrrrr&us�)�listr�getopt�GetoptError�msg�optrZbytestrrrr�remove�	Exception�warn�dict�	iteritems)r�
cmdoptionsr�opts�ex�flagr/r"rrr�parseoptionsTsB

��*��r:c@sFeZdZdd�Zdd�Ze�e�Zdd�Zdd�Z	d	d
�Z
dd�Zd
S)�CommandcCs||_g|_i|_dS�N)�namerr7)�selfr=rrr�__init__szCommand.__init__cCs�d|j}|jrltt�|j��D]J\}}|D]<}|rZt|t�rDd}nd}||||f7}q,|d|f7}q,q |jr�|d7}|d�|j�7}|S)Nshg s %s %ds %s %ss %s� )	r=r7�sortedrr5r(�intr�join)r>rr*�valuesr+Zfmtrrr�	__bytes__�s

zCommand.__bytes__cCs|j�|�dSr<)r�append)r>�valuerrrrF�szCommand.appendcCs|j�|�dSr<)r�extend)r>rDrrrrH�szCommand.extendcCs|j�|g�}|�|�dSr<)r7�
setdefaultrF)r>�keyrGrDrrr�__setitem__�szCommand.__setitem__cCs
t||�Sr<��
AndCommand�r>�otherrrr�__and__�szCommand.__and__N)�__name__�
__module__�__qualname__r?rErZ	strmethod�__str__rFrHrKrPrrrrr;~s
r;c@s$eZdZdd�Zdd�Zdd�ZdS)rMcCs||_||_dSr<��left�right)r>rVrWrrrr?�szAndCommand.__init__cCsd|j|jfS)Ns%s && %srU)r>rrrrT�szAndCommand.__str__cCs
t||�Sr<rLrNrrrrP�szAndCommand.__and__N)rQrRrSr?rTrPrrrrrM�srMcOszddg}t|||�\}}|�d�r:|�td��td�}n,td�}|�d�sX|�|�n|�td��|�t|�d	�dS)
N)�A�allNr'��p�patchNr'r\sUnote: Mercurial will commit when complete, as there is no staging area in Mercurial

�commit --interactive�addrYs?note: use hg addremove to remove files that have been deleted

�
)r:�get�statusrr;rHr)�rrrrr6r7rrrr�add�s(�
��

��rccOs,g}t|||�td�}|�t|�d�dS)Nsimportr_�r:r;rar)�rrrrr6rrrr�am�srfcOsvddtdfdg}t|||�\}}td�}|�d�r@|�d�|d<|�d�rX|�d�|d<|�|�|�t|�d�dS)	Nr[r')r'�	directoryr'r'simport --no-commit�-prgs--prefixr_)rBr:r;r`rHrar)rbrrr�apply�s
�


ricOs|�td��dS)Ns,see 'hg help bisect' for how to use bisect

�rar�rrrrrrr�bisect�srlcOsDg}t|||�\}}td�}|�dd�|D��|�t|�d�dS)Ns
annotate -udlcSsg|]}t|��qSrr#)r$r+rrrr&�r'zblame.<locals>.<listcomp>r_�r:r;rHrar)rbrrr�blame�s
rnc
Os*gd�}t|||�\}}td�}|�d�s4|�d�rF|�td��dS|�d�rttd�}|D]}||d<q\d|d<n�|�d	�r�t|�d
kr�t|�dkr�|�d
�}q�d}nt�td
���|d
}	||d<|�	|	�nDt|�dkr�|d|d<|�	|d
�nt|�dk�r|�	|d
�|�t
|�d�dS)N))r'sset-upstreamNr')r'sset-upstream-tor'r'��d�deleteNr')�DrqNr')�m�moveNr')�MrtNr'�bookmarksset_upstreamsset_upstream_tos.Mercurial has no concept of upstream branches
rqsstrip�-Brtrrs"`hg log -T"{activebookmark}" -r .`smissing newbranch argument�-m�-rr_)r:r;r`rarr�poprrrFr))
rrrrr6r7r�branch�old�newrrrr{�s4



r{cCsht�||�rdS|��}|dkr&|}n|d|}|j�|�}|rFdS|d��}||vpb|�|�}|S)a
    The first argument to git checkout can either be a revision or a path. Let's
    generally assume it's a revision, unless it's obviously a path. There are
    too many ways to spell revisions in git for us to reasonably catch all of
    them, so let's be conservative.
    Fr'�/Tr)r	Zisrevsymbol�getcwdZwvfs�exists�manifestZhasdir)r�string�cwdZrepopathr�r�Zdidexistrrr�ispath"sr�cOs�gd�}g}d|vr@|�d�}|�||dd��|d|�}t|||�\}}d}|rpt||d�rp||}n|r�|d}|dd�|}td�}	|�d�r�|s�|r�d|	d<|�d�r�td	�}	d|	d
<|�d��r*t|�dkr�td�}	|	�|�d��n.|	�|d�td�}
|
�|�d��|	|
@}	n�t|�dk�r||�t	d
��td	�}	|�d��rbd|	d
<|�rp||	d<|	�|�nT|�r�|�d��r�||	d<n
|	�|�n,|�d��r�td	�}	d|	d<nt
�t	d���|�t|	�d�dS)N)��b�branchr'r')�Br�r'r'��f�forceNr'rZrrr�updater�s-Cr\�revert�-ir�rvs5note: use --no-backup to avoid creating .orig files

ry�--allsa commit must be specifiedr_)
�indexrHr:r�r;r`rrFrarrrr))rrrrr6�pathsZsepindexr7ZrevrZbookcmdrrr�checkout?sZ






r�cOs�gd�}t|||�\}}td�}|�d�r2d|d<|�d�rFd|d<n&|�d�rb|�td��dS|�|�|�t|�d	�dS)
N)�r'�continueNr'�r'�abortNr')�e�editNr'sgraftr�s--editr��
--continuer�s&note: hg graft does not have --abort

r_�r:r;r`rarrHr)rbrrr�
cherrypicks




r�cOsPgd�}t|||�\}}td�}|�d�r2d|d<|�|�|�t|�d�dS)N))rprpNr'r�)�xr�Nr'spurger�r�r_)r:r;r`rHrar)rbrrr�clean�s

r�cOs�gd�}t|||�\}}t|�dkr2t�td���td�}|�|d�t|�dkrb|�|d�|�d�r�d|d<|�td��n|�d	�r�d|d<|�d
�r�td�}|�|�d
��||@}|�t	|�d�dS)
N))r'�bareNr')�nsno-checkoutNr'r�rs'a repository to clone must be specified�clonerr�s-Usanote: Mercurial does not have bare clones. -U will clone the repo without checking out a commit

sno_checkoutr�r�r_)
r:rrrrr;rFr`rar))rrrrr6r7rZcocmdrrr�clone�s,
��

r�cOsgd�}t|||�\}}td�}|�d�r2td�}|�d�rX|�d�rPtd�}nd|d<|�d�rp|�d�|d	<|�d
�r�d|�d
�f|d<|�d
�r�|�td��|�d�r�|�d�|d<|�d�r�|�d�|d<|�d�r�|�d�|d<|�|�|�t|�d�dS)N)	��arYNr')rs�messager'r'rZ)�Cs
reuse-messager'r')�F�filer'r')r'�authorr'r')r'�dater'r')r'�amendNr')r'sno-editNr'�commitr\r]r�sno_edits--amends
reuse_messages-Mr�s'%s'rxrYsqnote: Mercurial doesn't have a staging area, so there is no --all. -A will add and remove files for you though.

r��-lr�s-ur��-dr_r�rbrrr�commit�s6






��



r�cOs|�td��dS)NsXthis command has been deprecated in the git project, thus isn't supported by this tool

)r3rrkrrr�
deprecated�s
��r�c	Os�gd�}t|||�\}}td�}|�d�r8|�td��|�d�rJd|d<t|�D]B}|�|�z|�|�||d<WqRty�|�	|�YqR0qR|�t
|�d�dS)	N)r�)r'�cachedNr')�R�reverseNr'�diffr�sLnote: Mercurial has no concept of a staging area, so --cached does nothing

r�s	--reverseryr_)r:r;r`rarr,r1Zrevsr2rFr))rrrrr6r7r�arrr�diffs&
��


r�cOs|�td��dS)NsMercurial does not enable external difftool by default. You need to enable the extdiff extension in your .hgrc file by adding
extdiff =
to the [extensions] section and then running

hg extdiff -p <program>

See 'hg help extdiff' and 'hg help -e extdiff' for more information.
rjrkrrr�difftool's
��r�cOs�ddg}t|||�\}}td�}t|�dkr�|�|d�t|�dkr�|�td��|dd�D] }||jvrx||d<q`||d<q`|�t|�d	�dS)
N�r'rYNr'r��pullrr�note: Mercurial doesn't have refspecs. -r can be used to specify which commits you want to pull. -B can be used to specify which bookmark you want to pull.

rwryr_�r:r;rrFrar�
_bookmarksr)�rrrrr6r7rr+rrr�fetch5s$���


r�cOs:g}t|||�\}}td�}|�|�|�t|�d�dS)N�grepr_rmrbrrr�grepRs

r�cOsJg}t|||�\}}td�}t|�dkr6|�|d�|�t|�d�dS)N�initrr_�r:r;rrFrar)rbrrr�init_sr�cOs�gd�}t|||�\}}|�d�p*|�d�}|rVtd�}||d<|�dt|��dS|�td��|�td��td	�}d|d
<|�d�r�|�d�|d<|�d
�r�d
|d<|�d�r�d|d<|�d�r�d|d<|�d�r�d|d<|�d��s|�d��s|�d��rJ|�dd�}d|v�r4|�td��d|d<n|�td��d|d<t|�dk�r�d|dv�r�|d�d�\}	}
d |	|
f|d!<|d=|�|�|�t|�d"�dS)#N))r'sfollowNr')r'sdecorateNr')r��numberr'r')�1r�Nr'�r'�prettyr'r')r'�formatr'r')r'�onelineNr')r'�statNr')r'�graphNr'rZ)�Gs	grep-diffr'r')�Ss
pickaxe-regexr'r's	grep_diffs
pickaxe_regexr�s--diffs%s
senote: -v prints the entire commit message like Git does. To print just the first line, drop the -v.

sFnote: see hg help revset for information on how to filter log output

�logs-vr�r�r�r��--statr�s-Gr\rhr�r�r�r'�format:scnote: --format format:??? equates to Mercurial's --template. See hg help templates for more info.

s???s
--templatesqnote: --pretty/format/oneline equate to Mercurial's --style or --template. See hg help templates for more info.

s--stylers..s'%s::%s'ryr_)	r:r`r;rar)rr�splitrH)rrrrr6r7Zgrep_patr�formatZsinceZuntilrrr�logksh����




$
��
��
r�cOs�gd�}t|||�\}}|�d�s@|�d�s@|�d�s@|�d�r�td�}|�d�rZd|d<|�d�rld|d<|�d�r~d|d	<|�d�r�d|d
<ntd�}|�d�r�|�td
��|�d�r�d|d<|�d�|D]}t�|�|d<q�|�t|�d�dS)N))�cr�Nr')rp�deletedNr')rs�modifiedNr')�o�othersNr')�i�ignoredNr')�s�stageNr')�z�_zeroNr'r�r�r�r��statusr�rxs-or�sfilesr�s>note: Mercurial doesn't have a staging area, ignoring --stage
r�s-0rs-Ir_)	r:r`r;rarrFr
Z
shellquoter))rrrrr6r7rZincluderrr�lsfiles�s@	����





��

r�cOsRg}t|||�\}}td�}t|�dkr>|�|t|�d�|�t|�d�dS)N�mergerrr_r�rbrrr�merge�sr�cOshg}t|||�\}}t|�dkr(ddg}td|d|df�}|�td�td��|�t|�d	�dS)
N�rXr�s&log -T '{node}\n' -r 'ancestor(%s,%s)'rrs1note: ancestors() is part of the revset language
s3(learn more about revsets with 'hg help revsets')

r_)r:rr;rarr)rbrrr�	mergebase�s��r�cOsNg}t|||�\}}td�}t|�dkr0d|d<|�|�|�t|�d�dS)Nsresolverr�r_)r:r;rrHrar)rbrrr�	mergetools
r�cOsbddg}t|||�\}}td�}|�|�|�d�r<d|d<|�d�rNd|d<|�t|�d�dS)	Nr��r�sdry-runNr'�mvr��-f�dry_run�-nr_�r:r;rHr`rar)rbrrr�mvs�


r�cOs�gd�}t|||�\}}td�}d|d<t|�dkr�|�|d�t|�dkr�|�td��|dd�D] }||jvr�||d<qh||d<qh|�t|�d	�dS)
N)r�r�)�r�rebaseNr'r�s--rebaserrr�rwryr_r�r�rrr�pull$s"��


r�cOs�ddg}t|||�\}}td�}t|�dkr�|�|d�t|�dkr�|�td��|dd�D] }||jvrx||d<q`||d<q`|�d	�r�d|d
<|�t|�d�dS)Nr�r��pushrrs�note: Mercurial doesn't have refspecs. -r can be used to specify which commits you want to push. -B can be used to specify which bookmark you want to push.

rwryr�r�r_)	r:r;rrFrarr�r`r)r�rrr�pushCs(���



r�cOs�gd�}t|||�\}}|�d�rf|�td��td�}t|�dkrR|�td��|�t|�d�dS|�d�r�td	�}|�t|�d�td
�}|�d�s�|�d�r�d|d<|�d
�r�d|d<|�d��r(|�td��t|�d��|d<t|�dk�rt�	td���dt|d�t|d�f|d<nNt|�dk�rHt|d�|d<n.t|�dk�rvt|d�|d<t|d�|d<|�t|�d�dS)N)r�)r��interactiveNr')r'�ontor'r'r�r�)r'�skipNr'r�sEnote: hg histedit does not perform a rebase. It just edits history.

shisteditrscalso note: 'hg histedit' will automatically detect your stack, so no second argument is necessary

r_r�srevert --all -r .r�r�r�r�s--abortr�sxnote: if you're trying to lift a commit off one branch, try hg rebase -d <destination commit> -s <commit to be lifted>

r�r�s(expected format: git rebase --onto X Y Zs
'::%s - ::%s'rs-ss-b)
r:r`rarr;rr)rrrrbrrr�rebasecsR
����

��"r�cOsldg}t|||�\}}td�}|�d�r0d|d<t|�dkrJ|�|d�|�t|�d�|�td��dS)Nr�sjournalrYr�rs

sHnote: in hg commits can be deleted from repo but we always have backups
)r:r;r`rrFrar)rrbrrr�reflog�s�
��r�c	Os�gd�}t|||�\}}tt|�dkr.|dnd�}|�d�}|�d�rV|�td��|�d�rn|�td��td	�}|r�|�d
�|�|�|�t|�d�dS)N))r'�softNr')r'�hardNr')r'�mixedNr'rrr�r�sBnote: --mixed has no meaning since Mercurial has no staging area

r�sAnote: --soft has no meaning since Mercurial has no staging area

r�s--cleanr_)	r:rrr`rarr;rFr))	rrrrr6r7r�Zhardrrrr�reset�s*

��
��

r�cOs\g}t|||�\}}t|�dkr.|�td��td�}|rH|�|d�|�t|�d�dS)Nrs;note: hg backout doesn't support multiple commits at once

sbackoutrr_)r:rrarr;rFr)rbrrr�revert�s��r�cOspddg}t|||�\}}|�d�s,|�d�r^td�}|�d�rL|�td��|�t|�d�n|�td��dS)	N)r's	show-cdupNr')r's
show-toplevelNr's	show_cdups
show_toplevelsroots1note: hg root prints the root of the repository

r_s5note: see hg help revset for how to refer to commits
)r:r`r;rarr)rbrrr�revparse�s�
r�cOsbddg}t|||�\}}td�}|�|�|�d�r<d|d<|�d�rNd|d<|�t|�d�dS)	Nr�r��rmr�r�r�r�r_r�rbrrr�rm�s�


r�cOsddddtdfg}t|||�\}}|�d�rj|�d�dkrLtd	�}d
|d<q�td�}|�d
�|�d�n�t|�dkr�t||d�r�td�}ntd�}|�|�|�d�r�|�d|df�n0|�d�r�td�}|�d|df�ntd�}|�t	|�d�dS)N)r'sname-statusNr'r��Usunifiedr'sname_statusr�r�r�rs--changer�s--style statuss-r .rscatsexports--config diff.unified=%dr_)
rBr:r`r;rFrr�rHrar)rbrrr�shows0
�






r�cOs�dg}t|||�\}}td�}t|�dkr2|dnd}|dkr\d|d<|�d�rXd|d<�n@|dkr�|�d�rxd|d<nd|d	<t|�d
kr�|�|d
��n�|dkr�d|d<n�|d
kr�d|d<t|�d
kr�|�|d
�n
|�d�n�|dks�|dk�r2td�}t|�d
k�r|�|d
�|dk�r�d|d<nj|dk�sF|dk�rX|�td��dSt|�dk�r�|ddk�r�|d|d<nt|�d
k�r�|d
|d<|�t|�d�dS)NrZsshelver�listr�r\rh�showr�rsclears	--cleanupsdropr�s
<shelve name>spop�applysunshelves--keepr�screatesTnote: Mercurial doesn't have equivalents to the git stash branch or create actions

ssaves--namer_)r:r;rr`rFrarr))rrrrr6r7r�actionrrr�stash/sR�





��rcOsNdg}t|||�\}}td�}|�|�|�d�r:d|d<|�t|�d�dS)N)r'r�Nr'r�r�r�r_r�rbrrrracs�

racOs\|st�td���|d}|tvr4t�td�|��|dd�}t|||g|�Ri|��S)Nsmissing svn commandrsunknown git svn command "%s"r)rrr�gitsvncommands)rrrrZsvncmdrrr�svnrsrcOs,g}t|||�td�}|�t|�d�dS)Nr�r_rdrerrr�
svndcommit}srcOs6g}t|||�td�}|�d�|�t|�d�dS)Nr��default-pushr_�r:r;rFrar)rerrr�svnfetch�s

r
cOsNg}t|||�\}}|s&t�td���td�}|d|d<|�t|�d�dS)Nsmissing find-rev argumentr�rryr_)r:rrrr;rar)rbrrr�
svnfindrev�srcOsRdg}t|||�td�}|�d�td�}|�d�||@}|�t|�d�dS)N)�lslocalNr'r�rr�stipr_r	)rrrrr6ZpullcmdZ	rebasecmdrrrr�	svnrebase�s�

r
cOs�gd�}t|||�\}}|�d�r,td�}ndtd�}|sFt�td���|�|d�t|�dkrl|d|d<|�d	�r~d|d
<|�d�r�d|d<|�t	|�d
�dS)N)r�)rrNr'rorstags�tagsmissing tag argumentrrryrqs--remover�r�r_)
r:r`r;rrrrFrrar)rbrrr�tag�s



r)$r^samrsbisectsblamer�scheckoutscherry-pickscleanr�r�r�sdifftool�fetchr�r�r�sls-filesr�s
merge-bases	mergetoolr�r�r�r�sreflogsresetr�s	rev-parser�rsstashr�ssvnrswhatchanged)sdcommitrsfind-revr�)E�__doc__Z
__future__rr-rZmercurial.i18nrZ	mercurialrrrrrr	Zmercurial.utilsr
Z
testedwithZcmdtableZcommandrZ
CATEGORY_HELPrr:�objectr;rMrcrfrirlrnr{r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrarrr
rr
rrrrrrr�<module>s� 

�
*),@#5	 
P- >#!4	

�(�

Youez - 2016 - github.com/yon3zu
LinuXploit