403Webshell
Server IP : 74.208.236.16  /  Your IP : 216.73.216.220
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u102440577 ( 7172810)
PHP Version : 8.4.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/mercurial/__pycache__/shelve.cpython-313.pyc
�

6�h������SrSSKJr SSKrSSKrSSKrSSKrSSKJrJ	r	J
r
JrJrJ
r
Jr SSKJr SSKJrJrJr SSKJrJrJrJrJrJrJrJrJrJ r!J"r"J#r#J$r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r. SS	K/J0r0J1r1 S
r2Sr3/SQr4S
r5"SS5r6S<Sjr7S=Sjr8"SS5r9S>Sjr:"SS5r;S?Sjr<S@Sjr=S?Sjr>S?Sjr?S@Sjr@SASjrASBSCSjjrBS?SjrCSDSjrDS?S jrES?S!jrFS"rGS#rHS<S$jrIS<S%jrJS?S&jrKS?S'jrLSES(jrMSFS)jrNSGS*jrOSHS+jrPSGS,jrQS?S-jrRS?S.jrSSIS/jrTSJS0jrUSGS1jrVS?S2jrWS3rXSKS4jrYSLS5jrZSKS6jr[S?S7jr\S?S8jr]S?S9jr^S?S:jr_SMS;jr`g)Na@save and restore changes to the working directory

The "hg shelve" command saves changes made to the working directory
and reverts those changes, resetting the working directory to a clean
state.

Later on, the "hg unshelve" command restores the changes saved by "hg
shelve". Changes can be restored even after updating to a different
parent, in which case Mercurial's merge machinery will resolve any
conflicts if necessary.

You can have more than one shelved change outstanding at a time; each
shelved change has a distinct name. For details, see the help for "hg
shelve".
�)�annotationsN)�Any�Dict�Iterable�Iterator�List�Sequence�Tuple�)�_)�bin�hex�nullrev)�	bookmarks�bundle2�changegroup�cmdutil�context�	discovery�error�exchange�hg�lock�mdiff�merge�
mergestate�patch�phases�pycompat�repair�scmutil�templatefilters�util�vfs)�dateutil�
stringutils
shelve-backupsshelved)shg�patch�shelvesshelve@localhostc�6�\rSrSrSSSjjrS	SjrS
SjrSrg)�ShelfDir�Tc���U(a9[R"URR[55Ulg[R"URR[55Ulg�N)�vfsmodr$�join�	backupdir�	shelvedir)�self�repo�for_backupss   �2/usr/lib/python3/dist-packages/mercurial/shelve.py�__init__�ShelfDir.__init__Us?����z�z�$�(�(�-�-�	�":�;�D�H��z�z�$�(�(�-�-�	�":�;�D�H�c�.�[URU5$r-)�Shelfr$)r2�names  r5�get�ShelfDir.get[s���T�X�X�t�$�$r8c��URR5n/n[5nUHznUR	SS5SnXS;aMURU5 UR
U5nUR5(dMXUR5nURXu45 M| [USS9$![a /s$f=f)z2return all shelves in repo as list of (time, name)�.rrT)�reverse)r$�listdir�FileNotFoundError�set�rsplit�addr<�exists�mtime�append�sorted)r2�names�info�seen�filenamer;�shelfrGs        r5�listshelves�ShelfDir.listshelves^s���	��H�H�$�$�&�E����u���H��?�?�4��+�A�.�D��|���H�H�T�N��H�H�T�N�E��<�<�>�>���K�K�M�E��K�K��
�&���d�D�)�)��!�	��I�	�s�B2�2C�C)r$N�F)r4�bool�return�None)r;�bytesrSr:)rSzList[Tuple[float, bytes]])�__name__�
__module__�__qualname__�__firstlineno__r6r<rO�__static_attributes__�r8r5r*r*Ts��<�%�*r8r*c�z�[R"U5=(a URRSS5S:H$)Nr(sstore�internal)r�supportinternal�ui�config�r3s r5�_use_internal_phaserbss1�����t�$�	?��G�G�N�N�9�h�/�;�>�r8c�b�[U5(a[R$[R$r-)rbr�internal�secretras r5�
_target_phaserfzs��1�$�7�7�6�?�?�J�V�]�]�Jr8c��\rSrSrSrSSjrSSjrSSjrSSjrSSjr	SSjr
SS	jrS
rSSjr
SSjrSSS
jjrSSjrSrS SjrS!SjrSSjrSrSrg)"r:�~z�Represents a shelf, including possibly multiple files storing it.

Old shelves will have a .patch and a .hg file. Newer shelves will
also have a .shelve file. This class abstracts away some of the
differences and lets you work with the shelf as a whole.
c��XlX lgr-�r$r;)r2r$r;s   r5r6�Shelf.__init__�s�����	r8c�V�URS5=(d URSS5$)N�.shelve�.patch�.hg)�_exists�r2s r5rF�Shelf.exists�s!���|�|�J�'�J�4�<�<�	�6�+J�Jr8c�.^�[U4SjU55$)Nc3�t># �UH-nTRRTRU-5v� M/ g7fr-�r$rFr;)�.0�extr2s  �r5�	<genexpr>� Shelf._exists.<locals>.<genexpr>�s)����D�t��4�8�8�?�?�4�9�9�s�?�3�3�t�s�58)�all)r2�extss` r5rp�
Shelf._exists�s����D�t�D�D�Dr8c��URS5[R$![a% URS5[Rs$f=f)Nrmrn)�_stat�stat�ST_MTIMErBrqs r5rG�Shelf.mtime�sF��	8��:�:�j�)�$�-�-�8�8�� �	8��:�:�i�(����7�7�	8�s�!$�,A�Ac�R�URRURU-5$r-)r$rr;�r2rws  r5r~�Shelf._stat�s���x�x�}�}�T�Y�Y��_�-�-r8c�~�[R"URURS-5R	U5 g�Nrm)r!�simplekeyvaluefiler$r;�write)r2rKs  r5�	writeinfo�Shelf.writeinfo�s*���"�"�4�8�8�T�Y�Y��-C�D�J�J�4�Pr8c�R�URRURS-5$r�rurqs r5�hasinfo�
Shelf.hasinfo�s���x�x���t�y�y�:�5�6�6r8c�z�[R"URURS-5R	5$r�)r!r�r$r;�readrqs r5�readinfo�Shelf.readinfo�s.���)�)��H�H�d�i�i�*�,�
�
�$�&�	r8c	�t�[R"U5nUS:XaSnSnOSnSnUR5n[R"XU/S9n[R
"XUS5nURRURS-5n	[R"URUU	UURUS9 g)	Ns01sHG10BZsHG20sBZ)�missingroots�ancestorsofr(ro)�compression)r�safeversion�
unfilteredr�outgoing�makechangegroupr$r/r;r�writebundler_)
r2r3�bases�node�	cgversion�btyper�r��cg�bundle_filenames
          r5r��Shelf.writebundle�s����+�+�D�1�	�����E��K��E��K���� ���%�%��4�&�
���
(�
(���I�
N���(�(�-�-��	�	�F�(:�;������G�G�����H�H�#�
	
r8c
��URS-nURU5n[U5n[R"UR
XCUR5nUSn[R"UUUSSURRU5-US9 USnXx:XaURSSn	XnUUR5 $!UR5 f=f)Nrostip�unshelvesbundle:)�source�url�targetphases
revduplicates���)r;r$rfr�
readbundler_r�applybundler/�changes�close)
r2r3�trrM�fpr��gen�pretip�	shelvectx�	shelverevs
          r5r��Shelf.applybundle�s����9�9�v�%��
�X�X�h�
��	�'��-�K��%�%�d�g�g�r�T�X�X�F�C��&�\�F�������"�������x�!8�8�'�

��V��I��"��J�J�'7�8��<�	� �O�	���H�H�J��B�H�H�J�s�BC�Cc�@�URURS-U5$)Nrnrj)r2�modes  r5�
open_patch�Shelf.open_patch�s���x�x��	�	�I�-�t�4�4r8c	���UR5n[X5n[R"5n[R
"UU/U[R"SS9US9 URS5 U$)NT��git��opts�matchr)	r��_optimized_match�io�BytesIOr�
exportfiler�diffopts�seek)r2r3r�r�r�s     r5�patch_from_node�Shelf.patch_from_node�s]����� �� ��,��
�Z�Z�\������
�F�����D�)��	
�	����
��	r8c��URXR5S5$![[R4a UR5s$f=f)N�node)r�r�rBr�RepoLookupErrorr�)r2r3s  r5�
load_patch�Shelf.load_patch�sJ��	%��'�'��m�m�o�g�.F�G�G��!�5�#8�#8�9�	%��?�?�$�$�	%�s�!$�*A�Ac��SSjnU"U5H,nURU5(aMURU5s $ [R"S5e)Nc3�# �Uv� URSS5up[R"S5HnSXU4-v� M g7f)Nr?rs%s-%d.%s)rD�	itertools�count)�baserw�is   r5�gennames�'Shelf._backupfilename.<locals>.gennames�s>����J����D�!�,�I�D��_�_�Q�'��!�T�c�N�2�2�(�s�AA�unreachable)r�rU)rFr/r�ProgrammingError)r2�	backupvfsrMr��ns     r5�_backupfilename�Shelf._backupfilename�sK��	3��(�#�A��#�#�A�&�&� �~�~�a�(�(�$�
�$�$�]�3�3r8c�N�UR5(dUR5 [HvnURS-U-nURRU5(dM7[R"URRU5URX55 Mx g�Nr?)
�isdir�makedir�shelvefileextensionsr;r$rFr#�renamer/r�)r2r��suffixrMs    r5�movetobackup�Shelf.movetobackup�su����� � �����*�F��y�y�4�'�&�0�H��x�x���x�(�(�����H�H�M�M�(�+��(�(��=��+r8c�t�[H.nURRURS-U-5 M0 gr�)r�r$�	tryunlinkr;r�s  r5�delete�Shelf.deletes,��'�C��H�H���t�y�y�4�/�#�5�6�(r8c�*�UR5UR5SnUR5$![[R
4aB URRURS-5n[R"XU5s$f=f)Nr�rn)r�r��filesrBrr�r$r/r;r�changedfiles)r2r_r3�ctxrMs     r5�
changed_files�Shelf.changed_files
sw��	:��/�/�#�D�M�M�O�G�$<�=�C��9�9�;���!�5�#8�#8�9�	:��x�x�}�}�T�Y�Y��%:�;�H��%�%�b��9�9�	:�s�36�AB�B)r;r$N)r$�
vfsmod.vfsr;rUrSrT�rSrR)r{rUrSrR)rS�float)rwrU�rSrT)rS�contextmod.changectx)srb)r�rU)rSz
io.BytesIO)r�r�rMrUrSrU)r�r�rSrT)rVrWrXrY�__doc__r6rFrprGr~r�r�r�r�r�r�r�r�r�r�r�r�rZr[r8r5r:r:~s_����K�E�8�.�Q�7��

�4�.5��%�4�	�7�:r8r:c�P�[R"XUR55$)z�
Create a matcher so that prefetch doesn't attempt to fetch
the entire repository pointlessly, and as an optimisation
for movedirstate, if needed.
)r!�
matchfilesr�)r3r�s  r5r�r�s"�����d��J�$4�$4�$6�7�7r8c�,�\rSrSr%SrSrSrSrSrSr	Sr
S	\S
'S\S'S
\S'S\S'S\S'S	\S'S\S'S	\S'S\S'\SSj5r
\S Sj5r\S!Sj5r\S5r\S"S#Sjj5r\S$Sj5rSrg)%�shelvedstateiz�Handle persistence during unshelving operations.

Handles saving and restoring a shelved state. Ensures that different
versions of a shelved state are possible and handles them appropriately.
�sshelvedstate�keepsnokeeps:no-active-bookmark�interactiverUr;�contextmod.workingctx�wctxr��
pendingctx�List[bytes]�parents�
nodestoremove�branchtorestorerR�keep�activebookmark�interactivec���[US5US'[US5US'USRS5Vs/sHo"(dM[U5PM snUS'USRS5Vs/sHo"(dM[U5PM snUS'gs snfs snf![[4a/n[R
"[R"U55eSnAff=f)z@Some basic shelvestate syntactic verification and transformation�originalwctx�
pendingctx�parents� �
nodestoremoveN)r
�split�
ValueError�KeyErrorr�CorruptedStater&�forcebytestr)�cls�d�h�errs    r5�_verifyandtransform� shelvedstate._verifyandtransform7s���	E�!$�Q��%7�!8�A�o��"�1�]�#3�4�A�m��-.�z�]�-@�-@��-F�L�-F��!�V�S��V�-F�L�A�j�M� !�"2� 3� 9� 9�$� ?�#� ?�1�1���A�� ?�#�A����M��#���H�%�	E��&�&�z�'>�'>�s�'C�D�D��	E�s@�8B!�
B�B�B!�3
B�B�B!�
B!�!C �1*C�C c�P�URUR5n[UR5R	55nUR5 U$![
a/n[R"[R"U55eSnAff=f!UR5 f=f)z.Read version information from shelvestate fileN)r$�	_filename�int�readline�stripr	rrr&rr�)r
r3r��versionrs     r5�_getversion�shelvedstate._getversionDs����X�X�c�m�m�
$��	��"�+�+�-�-�-�/�0�G�
�H�H�J����	�	E��&�&�z�'>�'>�s�'C�D�D��	E��
�H�H�J�s#�'A�
B�!*B�B�B�B%c���/SQnURUR5n0nUH#nUR5R5XE'M% UR	5 U$!UR	5 f=f)z9Read the old position-based version of a shelvestate file)	sversion�namerrrr�branchtorestorer��
activebook)r$rrrr�)r
r3�keysr�r�keys      r5�_readold�shelvedstate._readoldPsd��

���X�X�c�m�m�
$����	�������,�,�.����
�H�H�J����
�H�H�J�s�)A�A0c��URU5nX R:aURU5nOgX R:Xa9[R"UR
UR5RSS9nO[R"[S55eURU5 U"5nUSUlXSUl
XSUlUSUlUSUlUR#S	S
5UlUR#S5UR&:HUlS
UlUR#SS
5UR,:waUR#SS
5UlUR#S
5UR.:HUlU$![R2[44a/n[R6"[8R:"U55eSnAff=f)NT)�firstlinenonkeyvalsIthis version of shelve is incompatible with the version used in this reporrrrrrr8r�rr�)r�_versionr!r!r�r$rr�r�Abortrrr;r�r�r�r�r<r��_keepr�r�
_noactivebook�_interactiverr�r
rr&r)r
r3rr�objrs      r5�load�shelvedstate.loadls����/�/�$�'���\�\�!����T�"�A�
���
$��*�*�4�8�8�S�]�]�C�H�H�#'�I��A��+�+��:���
�	����"�	E��%�C���z�C�H��o�.�/�C�H�!�M�"2�3�C�N��J�-�C�K� !�"2� 3�C��"#�%�%�(:�C�"@�C���u�u�W�~����2�C�H�!$�C���u�u�]�C�(�C�,=�,=�=�%&�U�U�=�#�%>��"��e�e�N�3�s�7G�7G�G�C�O��
���%�%�x�0�	E��&�&�z�'>�'>�s�'C�D�D��	E�s�,CF�G� *G
�
Gc
�v�U[UR55[UR55SRURR	5V
s/sHn
[U
5PM sn
5SRUVs/sHn[U5PM sn5UU(aUR
OURU=(d URS.nU	(aURUS'[R"URUR5RUSUR-S9 gs sn
fs snf)Nr)rrrrrrr�rr�s%d)�	firstline)rr�r/�dirstater�r'�_nokeepr(r)r!r�r$rr�r%)
r
r3r;�originalwctxr�r�r�r��
activebookr�pr�rKs
             r5�save�shelvedstate.save�s���� ��!2�!2�!4�5��z���0�1��	�	�4�=�=�3H�3H�3J�"K�3J�a�3�q�6�3J�"K�L�"�i�i��(G��A��Q���(G�H� /�"&�S�Y�Y�C�K�K�%�:��):�):�	
���#&�#3�#3�D�� ��"�"�4�8�8�S�]�]�;�A�A��U�S�\�\�1�	B�	
��#L��(Gs�D1�D6c�L�URRURSS9 g)NT)�
ignoremissing)r$�
unlinkpathr)r
r3s  r5�clear�shelvedstate.clear�s�������C�M�M���>r8r[N)r�Dict[bytes, Any]rSrT�rSr)rSr;)Fr8F)r;rUr1r�r�r�r�r�r�rUr�rRr2rUrrRrSrTr�)rVrWrXrYr�r%rr'r0r(r)�__annotations__�classmethodrrr!r+r4r9rZr[r8r5r�r�s;����H��I��E��G�*�M�!�L��K�
��$�$�
������
�J������
E��
E��	��	�����6�!��!�F���!�
��
�,�	
�
)�
�#�

��
��
��
��
�
�
��
�8�?��?r8r�c��URRSS5n[USS9nUR5nUS:�aU[	U5:aX1S-
SnOSnX1SH+upVXT:XaMURU5R
5 M- g)Nr(s
maxbackupsT)r4rr)r_�	configintr*rO�lenr<r�)r3�
maxbackups�
backup_dir�hgfiles�bordermtimerGr;s       r5�cleanupoldbackupsrF�s������"�"�9�m�<�J��$�D�1�J��$�$�&�G��A�~�*�s�7�|�3��1�n�-�a�0�����{�+���������t��#�#�%�	,r8c�X�URnU(a[R"U5 U$r-)�_activebookmarkr�
deactivate)r3rs  r5�_backupactivebookmarkrJ�s$���)�)�N�����T�"��r8c�@�U(a[R"X5 ggr-)r�activate)r3�marks  r5�_restoreactivebookmarkrN�s������4�&�r8c�"�URnUR5nS[U5;deSUlUR	5 U?UR5beURR
S5 URUS5 g!U?f=f)z@Abort current transaction for shelve/unshelve, but keep dirstate�
invalidatec��gr-r[r[r8r5�<lambda>�#_aborttransaction.<locals>.<lambda>�s��r8N)r/�branch�varsrP�abort�currenttransactionr��	setbranch)r3r��ds�current_branchs    r5�_aborttransactionr[�s���
���B��Y�Y�[�N��t�B�x�'�'�'��%��
�
���
��M��"�"�$�,�,�,��M�M������L�L���&��
�M�s�B
�
Bc�"^�U4SjnURS5nUR=(d UR5=(d SmTRSS5mTRSS5mTR	S5(aTRSSS5mU(a�[U5RU5R
5(a$[S	5U-n[R"U5eSU;dSU;a[R"[S
55eUR	S5(a[R"[S55eU$[U5nU"5H,nURU5R
5(aM)Un U$ U$)z/Decide on the name this shelve is going to havec3�b># �Tv� [R"S5HnSTU4-v� M g7f)Nrs%s-%02d)r�r�)r��labels �r5r��getshelvename.<locals>.gennames�s-����������#�A���q�z�)�)�$�s�,/rsdefault�/�_�\r?rs*a shelved change named '%s' already existss,shelved change names can not contain slashess+shelved change names can not start with '.')
r<rHrT�replace�
startswithr*rFrrr&)	r3�parentr�r�r;�e�	shelf_dirr�r^s	        @r5�
getshelvenamerh�sS���*�
�8�8�G��D�� � �A�F�M�M�O�A�z�E��M�M�$��%�E��M�M�%��&�E��������
�
�d�D�!�,����D�>���d�#�*�*�,�,��?�@�4�G�A��+�+�a�.� ��4�<�5�D�=��+�+��A�B��
��?�?�4� � ��+�+�a� N�O�P�P�!��K�
�T�N�	���A��=�=��#�*�*�,�,�����K��
�Kr8c#�# �[1n[R"5nURU5 U(a�UR	5nUR5v� UR
5HSnUR5nXA;dMURU5 UR5(dMBURU5 MU U(aM�gg7f)zereturn all mutable ancestors for ctx (included)

Much faster than the revset ancestors(ctx) & draft()N)
r�collections�dequerH�popleftr�r��revrE�mutable)r�rL�visitrerms     r5�mutableancestorsrps����
�9�D�����E�	�L�L���
��m�m�o���h�h�j���k�k�m�F��*�*�,�C�������
��>�>�#�#��L�L��(�$��%�s�A=C�$C�+C�	Cc�8^^^�UU4SjmU4SjnU(aU$T$)Nc
�`>�[US5nU(a'URRSsoaRl[U5nSU0nSn	T
(a,[R
"SSS0[R"U5D6n	URRU5 URU[URS5UU	TS9sSSS5 U(aWURl$$!,(df   O=fU(aWURlgg!U(aWURlff=f)	N�mqF�sphasess
new-commit�editforms
shelve.shelve�date)�editor�extrar[)
�hasattrrs�checkappliedrfr�getcommiteditorr�	strkwargsr_�configoverride�commit�
shelveuserr<)r_r3�messager�r��hasmq�savedr��	overrides�editor_rwrxs          ��r5�
commitfunc�!getcommitfunc.<locals>.commitfunc"s�����d�#���*.�'�'�*>�*>��'�E�7�7�'�#�D�)��/��=�	�	-��G��!�1�1��-��19�1C�1C�D�1I������'�'�	�2��{�{����H�H�W�%��"��
#��3�2��',����$��3�2��2��',����$���u�',����$��s%�AD�'C&�	D�&
C4�0D�D-c�>�[R"U5n[R"USU05nUSnT"XXTU5$)Nr?�message)r�byteskwargsr!r�)r_r3�patsr�r�r�r�s      �r5�interactivecommitfunc�,getcommitfunc.<locals>.interactivecommitfunc<sB����#�#�D�)���
�
�d�4�j�$��3���z�"���"�G�D�9�9r8r[)rxrrwr�r�s` ` @r5�
getcommitfuncr�!s���-�4:�%0� �?�Z�?r8c�
�UR[R"USX#5S9nUR(a1UR[	S5[UR5-5 gUR[	S55 g)N)r�s4nothing changed (%d missing files, see 'hg status')
snothing changed
)�statusr!r��deletedrrA)r_r3r�r�rs     r5�_nothingtoshelvemessagingr�Esb���;�;�W�]�]�4��:�t�B�;�C�D��|�|�
�	�	�
�F�G��$�,�,��
 �	
�
	�	�	�!�(�)�*r8c
�n�S[U50n[U5RU5nURU5 [	[X55nUR
XU5 URS5n[R"X/U[R"SS9US9 SSS5 g!,(df   g=f)Nr�swbTr�r�)rr*r<r��listrpr�r�rr�rr�)r3r�r;r�rKrNr�r�s        r5�_shelvecreatedcommitr�Ps����S��Y��D��T�N���t�$�E�	�O�O�D���!�$�*�-�.�E�	���d�4�(�	�	�	�%�	 �B�����&�"�5�>�>�d�#;�5�	
�
!�	 �	 �s�2+B&�&
B4c���UR[R"USX5SS9nUR(a=SR	UR5US'USRUR5 gg)NT)r��unknown��shelve_unknown)r�r!r�r�r/rE)r3r�r�rx�ss     r5�_includeunknownfilesr�\s[�����'�-�-��T�
�D�?���N�A��y�y�#(�:�:�a�i�i�#8��� ��T�
���q�y�y�!�r8c�\�[U5(aUR5 g[X5 gr-)rbr�r[)r3r�s  r5�
_finishshelver�cs���4� � �
���
��$�#r8c��UR5 [R"U5 [XX#5sSSS5 $!,(df   g=f)z$subcommand that creates a new shelveN)�wlockr�checkunfinished�_docreatecmd)r_r3r�r�s    r5�	createcmdr�js-��	
��������%��B�d�1�
���s	�"=�
Ac���USnUR5nUSnUR5nUR5[:wa'SUR	5RSS5S-nOSnUR
S5(dX�S'S=n	=p�UR5n	URSSS	9n
UR
S
S5nUR
SS5=(a UR
S
S5(+n
[XU5n[U5nSS0nU
(a0URRU5 [XX?5 SSS5 [U5(aK[X#5(d;URR!USR5UR#55 [%X�SS9nU(d[&R("XUX#5nOA[&R*"UUUSS[&R,/UQ70[.R0"U5D6nU(d/[3XX#5 [5X5 [6R8"X�5 g[;UU5n[=UUUU5 UR?[AS5U-5 US(a<URRCU5 [DRF"XU5 SSS5 Oh[HRJ"XRM55 [NRPRSU5nURU5(dURW5 XqSR5:wa9[X#5(d)URR!XqR#55 [YX5 [5X5 [6R8"X�5 g!,(df   GNl=f!,(df   N�=f![5X5 [6R8"X�5 f=f)Nrschanges to: %s�
rs(changes in empty repository)r�r(c��gr-r[��xs r5rR�_docreatecmd.<locals>.<lambda>�s��$r8��reportr�Fsunknowns	addremover]r?T)rwsshelved as %s
r�)-r�rTrmr�descriptionrr<r�transactionrhrJr/�changing_filesr��_iswctxonnewbranch�
_isbareshelverXrWr�rr~�dorecord�recordfilterrr|r�rN�lockmod�releaser�r�r�r�changing_parentsr!�movedirstater�updater��
mergestatemodrr��unresolvedcount�resetr�)r_r3r�r�r�r�re�
origbranch�descrr�rr�includeunknownr;rxr�r�r��mss                    r5r�r�qs*����:�D��l�l�n�G�
�Q�Z�F�����J�
�z�z�|�w�� �6�#5�#5�#7�#=�#=�e�Q�#G��#J�J��/���8�8�J����Z��!%�%�D�%�2�?"��y�y�{���
�
�i��
�
?���h�h�~�u�5�����*�e�4�
�T�X�X��%�>
�:
���T�4�0��.�t�4���i�(������-�-�d�3�$�T��=�4��d�#�#�M�$�,E�,E�
�M�M�#�#��T�
�!�!�#�T�%<�%<�%>�
�#�5�d�C�
���>�>�"�J��C�D��#�#�������$�$�
	��	��$�$�T�*�	�D��%�b��;��(	�t�4�����!�'!��t�,���T�4��u�5�
�	�	�!�&�'�$�.�/���=����/�/��5��$�$�T�5�9�6�5�
�I�I�d�K�K�M�*��)�)�.�.�t�4�B��%�%�'�'����
��d��*�*�,�,�]�4�5N�5N��M�M�#�#�J�0G�0G�0I�J��d���t�4�����!�_4�3��B6�5��	�t�4�����!�sF�B O�,
N�9C!O�=AO�N0�1CO�
N-�(O�0
N>�:O�#O$c���U(+=(aS URSS5(+=(a5 URSS5(+=(a URSS5(+$)Nr�Fsincludesexclude)r<)r�r�s  r5r�r��sP����	,������/�/�	,�����U�+�+�	,�����U�+�+�	r8c�P�USR5USR5:g$r�)rTras r5r�r��s'����:����$�t�*�"3�"3�"5�5�5r8c�\�UR5 [U5n[R"URR	[
55nUR
5H0upEURU5RU5 [U5 M2 SSS5 g!,(df   g=f)z#subcommand that deletes all shelvesN)
r�r*r.r$r/r0rOr<r�rF)r_r3rgr��_mtimer;s      r5�
cleanupcmdr��so��
�����T�N�	��J�J�t�x�x�}�}�Y�7�8�	�%�1�1�3�L�F��M�M�$��,�,�Y�7��d�#�4�
���s�BB�
B+c��U(d[R"[S55eUR5 [R
"UR
R
[55nUHpn[U5RU5nUR5(d"[R"[S5U-5eURU5 [U5 Mr SSS5 g!,(df   g=f)z)subcommand that deletes a specific shelvesno shelved changes specified!�shelved change '%s' not foundN)
r�
InputErrorrr�r.r$r/r0r*r<rFr�rF)r_r3r�r�r;rNs      r5�	deletecmdr��s�������q�!A�B�C�C�	
�����J�J�t�x�x�}�}�Y�7�8�	��D��T�N�&�&�t�,�E��<�<�>�>��&�&��6�7�$�>���
���y�)��d�#��
���s�B*C*�*
C8c�T�[U5nSnUR5(dUR5nSnURS5 [	U5nUR5GH0upxU(aX�;aMUR
X�S9 SnUR(aUR
S5 MIUR
SS[U5-
-5 Sn	[R"U5n
S	[R"U
S
S9-nUR
USS9 UR
SS
[U5-
-5 U	S
-
n	URU5RU5nUR5n
U
(dOhU
R!S5(dPU
R#5nUR%5(a[&R("X�U	-
5nUR
U5 OM�UR
S5 US(dUS(dSSS5 GM�UR+5nUS(a5[,R."[0U5HunnUR
UUS9 M US(a.[,R2"X�S9HunnUR
UUS9 M SSS5 GM3 g!,(df   GMF=f)z,subcommand that displays the list of shelves�Ps
shelve.newestr()r^sshelve.namer�r�s(%s)T)�abbrevs
shelve.age��#r'sstatN)�width)rC�plain�	termwidth�pagerr*rOr��quietrAr%�makedater"�ager<r�rrd�rstrip�	formattedr&�ellipsis�	readlinesr�	difflabel�iter�
diffstatui)r_r3r�r�r��	namelabelrgrGr;�used�dater�r��liner��	difflines�chunkr^s                  r5�listcmdr��s���t�9�D��E�
�8�8�:�:������ �I��H�H�Y�����I� �,�,�.����D�$��
�����'�"�	�
�8�8��H�H�U�O��
�����c�$�i��(�)���� � ��'����+�+�D��>�>��
����M��*�
�����c�#�h��'�(���
��
�]�]�4�
 �
+�
+�D�
1�R���{�{�}�������t�,�,��;�;�=�D��|�|�~�~�)�2�2�4���F���H�H�T�N���
�H�H�U�O���N�d�7�m��2�
1�����I��H�~�$)�O�O�D�)�$D�L�E�5��H�H�U�%�H�0�%E��G�}�$)�$4�$4�Y�$L�L�E�5��H�H�U�%�H�0�%M�'2�
1�/�2�
1�s�B(J�BJ�
J'	c�n�[U5n[U5S:Xa@UR5nU(d[R"[S55eUSupgU/nUHInUR
U5R5(aM)[R"[S5U-5e [XX#5 g)z subcommand that displays shelvesrsthere are no shelves to showscannot find shelf %sN)	r*rArOrr&rr<rFr�)	r_r3r�r�rg�shelvesrGr;�	shelfnames	         r5�	patchcmdsr�s������I�
�4�y�A�~��'�'�)����+�+�a� ?�@�A�A��a�j����v���	��}�}�Y�'�.�.�0�0��+�+�a� 7�8�9�D�E�E���B�d�!r8c��URURR5:wa[R"[	S55eg)z'check parent while resuming an unshelves5working directory parents do not match unshelve stateN)r�r/rr&r)r3�states  r5�checkparentsr�*s:���}�}��
�
�-�-�/�/��k�k�
�F�G�
�	
�0r8c��[RU5nURS5cURUS'U$![a# [
R"U[S55 g[Ra�nUR[R"U5S-5 URS5(a*[S5n[S5n[R"XVS9eURS5(a4[RU5 [R"[S	55e[R"S
5eSnAff=f)Nr�r�r��continuescorrupted shelved state files:please run hg unshelve --abort to abort unshelve operation��hint�abortspcould not read shelved state file, your working copy may be in an unexpected state
please update to some commit
z=a corrupted shelvedstate exists without --abort or --continue)r�r+r<r�rBr�wrongtooltocontinuerrr�debugr�bytestrr&r9r�)r_r3r�r�r�msgr�s       r5�_loadshelvedstater�2s����!�!�$�'���8�8�G��$�!�J�J�D��M�����:��#�#�D�!�K�.�9�����
����!�!�#�&��.�/��8�8�K� � ��3�4�C����D��+�+�c�-�-�
�X�X�h�
�
����t�$��+�+��6���
��(�(�O��
��'�s�7:�*E�&E�9CE�Ec	���UR5 [X5 [R"UR5 UR
(a:UR
UR;a [R"XR
5 [XURUR5 [U5(d![R"XURSSS9 [R!U5 UR#[%S5UR&-5 SSS5 g![R!U5 UR#[%S5UR&-5 f=f!,(df   g=f)z-subcommand that abort an in-progress unshelveFr(��backup�topicsunshelve of '%s' aborted
N)rr�r�clean_updater�r�
_bookmarksrrL�
mergefilesr�rbr rr�r�r9�warnrr;�r_r3r�s   r5�
unshelveabortr�Rs���	
����
	C���%����u�/�/�0��#�#��(<�(<����(O��"�"�4�)=�)=�>��r����U�-=�-=�>�&�t�,�,�����e�1�1�%�y��
���t�$��G�G�A�3�4�u�z�z�A�B�
���
���t�$��G�G�A�3�4�u�z�z�A�B��
��s#�E"�CD!�<E"�!>E�E"�"
E0c��UR5 [XSS05n[XU5sSSS5 $!,(df   g=f)z(logic to  abort unshelve using 'hg abortr�TN)r�r�r�r�s   r5�hgabortunshelver�es0��	
����!�"�X�t�,<�=���R�u�-�
���s	�5�
Ac���URSS05 [R"XR55 [R
"XU5 SSS5 g!,(df   g=f)zHupdates to wctx and merges the changes from shelvectx into the
dirstate.��uisquietTN)r}rr�r�r�revert)r_r3r�r�s    r5r�r�lsD��
�	�	�-�t�4�	5�
�	�	�$�	�	��$����r��+�
6�	5�	5�s�<A�
A'c���U(aeX!RR5:waGURRX!R55 UR	[S5U-5 ggg)Ns&marked working directory as branch %s
)r/rTrXrWr�r)r_r3r�s   r5�
restorebranchrtsT���?�m�m�.B�.B�.D�D��
�
����1H�1H�1J�K�
�	�	�
�8�9�O�K�	
�E�r8c��URS5(dh[R"URR[55n[U5RU5R
U5 [U5 gg)z&remove related files after an unshelver�N)r<r.r$r/r0r*r�rF)r_r3r;r�r�s     r5�unshelvecleanupr|sV���8�8�G����J�J�t�x�x�}�}�Y�7�8�	������4� �-�-�i�8��$��r8c
�x�URnURnUR5 [X5 [R
R
U5nUR5(a'[R"[S5[S5S9eXRSnURnURRU5 URURR!5UR"5 URR%UR'55 SSS5 [)U5n	SU	0n
UR*R-U
S5 URRU5 URURSUR"5 SSS5 [/XXuXC5up�SSS5 Wc)URn[S	5n
UR1U
5 OUR2R5U5 Xn[6R8"U5 [;XUR<U5 [?XUR@5 [CU5(d![DRF"XUR2S
SS9 [HRKU5 W(d[MXURU5 [OXRP5 UR1[S
5UR-5 SSS5 g!,(df   GN�=f!,(df   GNo=f!,(df   GNj=f!,(df   g=f)z.subcommand to continue an in-progress unshelves$unresolved conflicts, can't continues/see 'hg resolve', then 'hg unshelve --continue'r�rNrtr�r�<note: unshelved changes already existed in the working copy
Fr(r�sunshelve of '%s' complete
))rr;rr�r�rr�r�rr&rr�r�r/r��
setparentsr��nullidr�rWrfr_r}�_createunshelvectxr�r�rHrr�r�r�rr�rbr rr�r9rrNr)r_r3r�r�r�basenamer�r�r�r�r��newnode�ispartialunshelver�s              r5�unshelvecontinuer�sk���#�#�K��z�z�H�	
�����T�!�
�
%�
%�
*�
*�4�
0��
������+�+��9�:��I�J��
�
���q�)�*�	��%�%�
�
�]�]�
+�
+�D�
1��O�O�E�,�,�1�1�3�T�[�[�A��M�M���� 7� 7� 9�:�2�$�D�)��/��=�	�
�W�W�
#�
#�I�{�
;����/�/��5�����
�
�a� 0�$�+�+�>�6�);��)�{�*�&�G�<��?��(�(�I��)��C�
�I�I�c�N�
���&�&�w�/��
�I�
���Z� ��2�U�Z�Z��3��b�� 5� 5�6�"�4�(�(��L�L��%�-�-�e�9�
�	���4� � ��B�e�j�j�$�7��t�%9�%9�:�
�	�	�!�2�3�e�j�j�@�A�c
��2�
1��6�5��<�
;��%
��sV�BL+�AK5�&3L+�L�5*L�L�6D6L+�5
L	�?L+�
L�L�
L(	�#L+�+
L9c��UR5 [XSS05n[XUSUR05sSSS5 $!,(df   g=f)z,logic to resume unshelve using 'hg continue'r�Tr�N)r�r�rr�r�s   r5�hgcontinueunshelver�s;��	
����!�"�[�$�,?�@����%�'�5�:�:�1F�G�
���s�'A�
Ac���UR5n[UR5nUR(d%UR(dUR(dX54$UR[S55 SS0n[
USSS9n0nSUS'URS5US'URS	S
05 [R"XU/U5n	SSS5 UW	nX54$!,(df   N=f)zETemporarily commit working copy changes before moving unshelve commitsLtemporarily committing pending changes (restore with 'hg unshelve --abort')
r]r(F)rxrrws pending changes temporary commitr�rvr�TN)r��	frozenset�added�modified�removedrr�r<r}rr~)
r_r3r��tmpwctxr��addedbeforerxr��tempoptsr�s
          r5�_commitworkingcopychangesr�s���	
���
�A��A�G�G�$�K�
�J�J�!�'�'�Q�Y�Y��#�#��I�I�	�
6�	
���)�$�E��U��e�L�J��H�>�H�Z������)�H�W��	�	�	�-�t�4�	5��~�~�b�
�B��A��
6��4�j�G����
6�	5�s�3C�
C+c��UR5nSn[U5RU5nUR5(aUR	5SnUbXA;a`URSS05 UR
X5nSSS5 Uc,S[WR550nURU5 UW4$XnX4$!,(df   NH=f)z5Recreate commit in the repository during the unshelveNr�r�T)
r�r*r<r�r�r}r�rr�r�)r_r3r�rr�rNr�rKs        r5�_unshelverestorecommitr�s����?�?��D��D��T�N���x�(�E��}�}����~�~���(���|�t�'�
�
�
� 1�4�8�
9��)�)�$�3�I�:��<��S����!1�2�3�D��O�O�D�!���?���J�	��?��:�
9�s�0C�
Cc�`�UR5US'SUS'/nU(dNURUR5UR5UR5UR	5S9nUS4$[UR5SSS9n[R"UUUSS[R/UQ70[R"U5D6nURUR5UR5UR5S9n	U	(a[X5n
[XX:5 U[U	54$)	aAHandles the creation of unshelve commit and updates the shelve if it
was partially unshelved.

If interactive is:

  * False: Commits all the changes in the working directory.
  * True: Prompts the user to select changes to unshelve and commit them.
          Update the shelve with remaining changes.

Returns the node of the new commit formed and a bool indicating whether
the shelve was partially unshelved.Creates a commit ctx to unshelve
interactively or non-interactively.

The user might want to unshelve certain changes only from the stored
shelve in interactive. So, we would create two commits. One with requested
changes to unshelve at that time and the latter is shelved for future.

Here, we return both the newnode which is created interactively and a
bool to know whether the shelve is partly done or completely done.
r�Tsinteractive-unshelve)�textrx�userr�F)rrwN)rrxr)r�r~rxrr�r�rr�r�rr|r�r�rR)r_r3r�rrr�r�rr��snode�ms           r5r
r
�s,��.!�,�,�.�D���$(�D�	 �!�
�D���+�+��&�&�(��/�/�#����!����!�	�
����~���y���0�d�4�P�J����
����
����
	�
�	��
�
�T�
"�	�G�
�K�K�
�
"�
"�
$��o�o��
�^�^�
�
�
�E�

��T�)���T�(�6��D��K��r8c�b�URS5nUR5UR5R5:XaU(dUS4$URSS5[RS.nUR
R
US5 UR[S55 [R"UU/SQS	S
9n
U
R(a�UR5 [U[U55Vs/sHo�RRU5PM nn[ R#UUUUUU	URS5U
U5	 [$R&"S5eUR(R+U5 UR-UR5UR.5 SSS5 [1XX�X�5unnUcUn[S
5nURU5 OUUn[R2"U5 SSS5 UU4$s snf!,(df   Nl=f!,(df   UW4$=f)zBRebase restored commit from its original location to a destinationr�F�toolr8)�rs
forcemergertr�srebasing shelved changes
)sworking-copysshelved changesparent of shelved changeT)�labels�keepconflictparentr�Nr)r<r��p1rrer_r}r�rr�graftr�r��rangerA�	changelogr�r4r�ConflictResolutionRequiredr/r�rr	r
r�)r_r3r�r��	oldtiprevr�pctxrr�r�rrr��statsrmr�rr
r�s                   r5�_rebaserestoredcommitr.-s��� �(�(�>�*�K��|�|�~�����,�,�.�.�{��%���!%����#� 6�$*�M�M��I�
���	�	�	�;�	7�
�	�	�!�1�2�3�������
 $�	
��� � ��H�H�J�5:�)�S��Y�4O��4O�S���#�#�C�(�4O�
��
�������������!���

��2�2�;�?�?�
�]�]�
+�
+�D�
1��O�O�G�L�L�N�D�K�K�8�2�%7��i�;�&
�"��"��?��I��)��C�
�I�I�c�N��W�
�I��L�L��!�]
8�`�'�'�'��C� 2�
1��?
8�	7�`�'�'�'�s9�A,H�8$H�AH�;+H�&AH�H�
H	�H�
H.c��UR5RS5nU(dg[URS55n[UR	5R
5nXC-U-
nUSR
U5 g)Nr�r�)rxr<rrr�r�forget)r3r�r�
shelveunknown�
addedafter�toforgets      r5�_forgetunknownfilesr4zsl���O�O�%�)�)�*;�<�M����m�1�1�%�8�9�M��4�;�;�=�.�.�/�J��*�k�9�H���J���h�r8c�0�[X5 [X5 gr-)rNr[)r3r+r�rs    r5�_finishunshelver6�s���4�0��d�r8c��[UR5R5n[UR55nUR	U5nU(a*[S5n[S5n[R"XgS9eg)zUCheck potential problems which may result from working
copy having untracked changes.s$shelved change touches missing filess,run hg status to see which files are missingr�N)rCr�r�r��intersectionrrr&)r_r3r��	wcdeleted�
shelvetouchedr8r r�s        r5�_checkunshelveuntrackedproblemsr;�sh���D�K�K�M�)�)�*�I��	���)�*�M��)�)�-�8�L��
�5�6���@�A���k�k�!�'�'�r8c���[R"U5nURS5nURS5nURS5nU(dU(d[R"U5 [U5nURS5(aUR
US5 U(a5URS5(a[R"[S55eU(dU(GaU(a&U(a[R"[S55eU(a[R"[S55eU(a1URS	S
5(aUR[S55 [XU5nU(a[XU5$U(a&U(a[R"[S55eU(a[XXs5$[R"S
5e[U5S:�a[R"[S55eU(de[!U5R#5nU(d[R$"[S55eUSSnUR'[S5U-5 OUSn[!U5RU5R)5(d"[R"[S5U-5e[+XX�5$)Nr�r�r�rr�s,--keep on --interactive is not yet supporteds"cannot use both abort and continues:cannot combine abort/continue with naming a shelved changer"Fstool option will be ignored
s(cannot use both continue and interactivez$neither abort nor continue specifiedrs&can only unshelve one change at a timesno shelved changes to apply!rsunshelving change '%s'
r�)rr�r<rr�r�rHrr�rr�r�r�rr�rAr*rO�
StateErrorr�rF�_dounshelve)	r_r3�shelvedr��abortf�	continuefrr�rs	         r5�unshelvecmdrB�s:������%�D�
�X�X�h�
�F�����%�I��(�(�>�*�K��)�����%��7�m�G��x�x�������t�G�}�%��t�x�x��(�(����
�=�>�
�	
����i��"�"�1�%J�#K�L�L���"�"��/���
��d�h�h�w��.�.��G�G�A�6�7�8�!�"�D�1��� ��5�1�1�
�;��"�"��=�>��
��#�B�e�:�:�
�(�(�)O�P�P�	�W���	����q�!J�K�L�L�
��4�.�,�,�.����"�"�1�%D�#E�F�F��1�:�a�=��
�	�	�!�/�0�8�;�<��1�:���D�>���h�'�.�.�0�0����q�!A�B�X�M�N�N��r��0�0r8c
��UR5nS=pEUR5nURSSS9n[U5nUSn[	U5n[XX75up�[
XXR5up[XU5 SnUR5UR5R5:waUR5n[UUUUUUUU	UUU5up�SURSS50nURUS5 [XX{5 SSS5 [XU5 [R!U5 [#XXX5 UR$R'U5 [)XU
5 SSS5 U
(d[+XX#5 U(aUR-5 [.R,"U5 g!,(df   N�=f!,(df   N`=f!U(aUR-5 [.R,"U5 f=f)Nr�c��gr-r[r�s r5rR�_dounshelve.<locals>.<lambda>�s��Dr8r�r?r8r#r")r�rr�rArJrrr;rTr&r.r<r}r�rr�r9r6r/r�r4rr�r�)r_r3rr�rr�r+r,rrrr�r�r
r�s               r5r>r>�s����?�?��D���D�.��y�y�{��
�
�
�k�.�
�
A����I�	��D�z��/�t�4��8��4�N���0��2�H���'��)�<�����������!6�!6�!8�8�'�.�.�0�O�'<������������(
�$�	�,�T�X�X�g�s�-C�D�	�
�
�
�y�+�
6��r��1�7��b��0����4� ����<�
�]�]�
)�
)�$�
/����=�0� ��B�h�5�
��J�J�L������7�
6��
0�
/��
��J�J�L������s=�C#G
�8
F+�AG
�
F<�"G
�+
F9�5G
�<
G
�G
�
/G<r�r<)r�rUr�)rSrU)rSzIterator[bytes]rQ)rrRrwrR)r�rUr;rUrSrT)r�zIterable[bytes]rSrT)r�zSequence[bytes]rSrT)r�r�rSrT)rSr�)r�rUrSrT)r;rUrSrT)rrU)rrUrrRrSzTuple[bytes, bool])rrUrSrT)ar��
__future__rrjr�r�r�typingrrrrrr	r
�i18nrr�r
rr�rrrrr�
contextmodrrrrrr�rrrr�rrrr r!r"r#r$r.�utilsr%r&r0r1r�rr*rbrfr:r�r�rFrJrNr[rhrpr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr
r.r4r6r;rBr>r[r8r5�<module>rLs���� #��	���������
������.�

�	��	�3��!�
�*�*�>�K�R:�R:�j8�S?�S?�l&��'�
'�4%�P)�$!@�H+�	
�"�$�2�N"�b�6�$�
$� ,1�^"�"
��@C�&.�,�
� �7B�tH� �2�*7 �#(�7 �7;�7 ��7 �tJ(��
J(�Z	 � �	(�81�v1r8

Youez - 2016 - github.com/yon3zu
LinuXploit