403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.139
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/proc/self/root/usr/lib/python3/dist-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/proc/self/root/usr/lib/python3/dist-packages/hgext/__pycache__/rebase.cpython-313.pyc
�

6�h�G���SrSSKJr SSKrSSKJr SSKJrJrJ	r	 SSK
JrJrJ
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r%J&r& Sr'Sr(1S	kr)0r*\RV"\*5r+0r,\RZ"\,5r-\-"S
SSS
9 Sr.Sr/Sr0SjSjr1\Rd"5r2\2"S5S5r3\2"S5S5r4Sr5"SS5r6\+"SSS/\"S5\"S54SS/\"S 5\"S54S!S"/\"S#5\"S54S$S%S&\"S'5\"S54S&S(S\"S)54S*S+S&\"S,5\"S-54S.S/S\"S054S1S2S&\"S35\"S454S5S6S\"S754S&S8S\"S954S:S;S\"S<54S=S>S\"S<54S?S@S&\"SA54S&SBS\"SC54SDSES\"SF54SGSHS\"SI54S&SJS&\"SK54/\Rn-\Rp-\Rr-\"SL5\+RtSM9SN5r;SOr<SkSPjr=SQr>SRr?SSr@STrASUrBSVrCSWrDSXrESYrFSZrGS[rHS\rIS]rJS^rKS_rLS`rMSarNSbrOSlScjrPSdrQSerRSfrSSgrTShrUSirVg)mz�command to move sets of revisions to a different ancestor

This extension lets you rebase changesets in an existing Mercurial
repository.

For more information:
https://mercurial-scm.org/wiki/RebaseExtension
�)�annotationsN)�_)�nullrev�short�wdirrev)�	bookmarks�cmdutil�commands�copies�destutil�error�
extensions�
logcmdutil�merge�
mergestate�	mergeutil�obsolete�obsutil�patch�phases�pycompat�	registrar�repair�revset�
revsetlang�rewriteutil�scmutil�smartset�state�util���s-1>�-2�-3�-4�-5�devel�rebase.force-in-memory-mergeF)�defaultsships-with-hg-corec��g)N��r+��./usr/lib/python3/dist-packages/hgext/rebase.py�_nothingtorebaser.Ts��r,c�*�UR5US'g)N�branch)�branch)�ctx�extras  r-�_savebranchr4Xs���z�z�|�E�)�r,c�2�[R"USUSUS9$)zdsmall wrapper around destmerge to pass the right extra args

Please wrap destutil.destmerge instead.�rebaseF)�action�	sourceset�onheadcheck�	destspace)r�	destmerge)�repor8r:s   r-�_destrebaser=\s&�����������r,s_destrebasec��SnUb,[R"U[R"U5U5nU[R"[X5/5-$�N)r�getsetr�fullreposet�basesetr=)r<�subset�xr8s    r-�_revsetdestrebaserElsI���I��}��M�M�$��(<�(<�T�(B�A�F�	��H�$�$�k�$�&B�%C�D�D�Dr,s_destautoorphanrebasec��UR5nURS5n[R"XU5R	5nU(aXT;a[
R"5$[R"X5n[U5S:�a#[R"[S5XV4-5e[
R"U5$)Ns
obsolete()r*s8ambiguous automatic rebase: %r could end up on any of %r)
�
unfiltered�revsrr@�firstrrBr�orphanpossibledestination�lenr
�
StateErrorr)r<rCrD�unfi�	obsoleted�src�destss       r-�_revsetdestautoorphanrebaserQzs���
�?�?��D��	�	�-�(�I�
�-�-��a�
(�
.�
.�
0�C��#�"����!�!��.�.�t�9�E�
�5�z�A�~����
�I�J��l�
�
�	
�
���E�"�"r,c�^�[R"UR5RUSS9$)zshort description for a contextr6)�command)r	�format_changeset_summaryr<�ui)r2s r-�_ctxdescrV�s&���+�+����
�
�
�s�I��r,c��\rSrSrSrSSjr\S5rSSjrSr	Sr
S	rS
rSSjr
SrS
rSrSSjrSrSrSSjrSrg)�
rebaseruntime�z2This class is a container for rebase runtime stateNc�4�Uc0nSUlSUlXlX lXPlSUl[Ul0UlSUl	0Ul
[5UlURSS5Ul[R "U["R$"U55UlURSS5UlURS5n[*R,/UlU(aU/UlUR1SS5UlURSS5UlURSS5Ul[*R8"URS	5Ul0Ul[5UlX0l X@l![DRF"US
5Ul$g)NF�collapse�date�extrafnsrewrites
backup-bundle�keep�keepbranchesr6�rebasestate)%�prepared�resume�_reporU�opts�
originalwdr�externalr�activebookmark�destmap�set�skipped�get�	collapsefr	�
logmessager�byteskwargs�collapsemsgr\r�preserve_extras_on_rebase�extrafns�
configbool�backupf�keepf�
keepbranchesf�skip_empty_successor�skipemptysuccessorf�&obsolete_with_successor_in_destination�%obsolete_with_successor_in_rebase_set�inmemory�dryrun�statemod�cmdstate�stateobj)�selfr<rUrzr{rd�es       r-�__init__�rebaseruntime.__init__�sN���<��D���
�����
����	������
���
�"�������u������*�e�4���"�-�-�b�(�2F�2F�t�2L�M����H�H�V�T�*��	��H�H�Y���$�>�>�?��
���C�D�M��}�}�Z�1A�B����X�X�f�e�,��
�!�X�X�n�e�<���#.�#C�#C��G�G�Y�$
�� �79��3�58�U��2� �
��� �)�)�$��?��
r,c�p�UR(aURR5$UR$r?)rarcrG)rs r-r<�rebaseruntime.repo�s&���=�=��:�:�(�(�*�*��:�:�r,c���U(aURSSURSS9 gURRSS5nURU5 SSS5 g!,(df   g=f)z*Store the current status to allow recoveryr`)r`splain)�location�wN)�addfilegenerator�_writestatusr<�vfs)r�tr�fs   r-�storestatus�rebaseruntime.storestatus�sZ��
�����!��!�!�!�	
 �
������~�t�4���!�!�!�$�5�4�4�s�A�
A*c��URnURbeURX RR	5S-5 URS5 URX R
R	5S-5 URS[
UR5-5 URS[
UR5-5 URS[
UR5-5 URSUR=(d S-5 URnURR5H`upEX$R	5nUS:�aX%R	5nOSU-nX#UR	5nURSXgU4-5 Mb URRS5 g)	N�
s%d
�%s
r,r�%ds	%s:%s:%s
srebase status stored
)r<�
filtername�writere�hexrf�intrlrtrurgrhr�itemsrU�debug)	rr�r<rh�d�v�oldrev�newrev�destnodes	         r-r��rebaseruntime._writestatus�s]���y�y�����&�&�&�	����_�_�%�)�)�+�e�3�4�	�����	����]�]�#�'�'�)�E�1�2�	����#�d�n�n�-�-�.�	����#�d�j�j�/�)�*�	����#�d�0�0�1�1�2�	����4�.�.�5�#�6�7��,�,���J�J�$�$�&�D�A��W�[�[�]�F��A�v������������A�J�'�+�+�-�H�
�G�G�M�V�X�$>�>�?�'�	
���
�
�/�0r,c��URR5(d*[R"UR[S55 UR
5nURRRS5 USUl	USUl
USUlUSUlUSUl
USUlUS	UlUS
UlUSUlg)
z"Restore a previously stored statusr6srebase status resumed
�
originalwd�destmap�state�skipped�collapse�keep�keepbranches�external�activebookmarkN)r~�existsr	�wrongtooltocontinuer<r�_readrUr�rerhrrjrlrtrurfrg)r�datas  r-�
restorestatus�rebaseruntime.restorestatus�s����}�}�#�#�%�%��'�'��	�	�1�Y�<�@��z�z�|���	�	�����5�6��}�-����J�'����(�^��
��J�'����k�*����'�]��
�!�/�2����[�)��
�"�#4�5��r,c	��SUlURnURbeSSS[SSS.nSn0n0nUR	S5n[UR
5R55GHmupxUS:XaXR5US'M#US:XaU(aXR5nMDMFUS:XaXR5US'McUS	:Xa[[U55US
'M�US:Xa[[U55US'M�US
:Xa[[U55US'M�US:Xa[U5S:XaSU;dX�S'M�URS5n	XSR5n
U	SnU[;aGM[U	5S:�aXSR5nOUnX�U
'U[:Xa[XJ'GMYXR5XJ'GMp USc[ R""[%S55eXRS'XBS'['5n
US
(dn['UR)55n[+UR-55H8unnU[:waUU;aU
R/U5 UR/U5 M: X�S'UR0R3SSR5S[+U
555=(d S-5 U$)NT)r�r�r�r�r�r�r`rr�r*�r��r��r��r���Q�:r�s.hg/rebasestate is incompleter�r�r�scomputed skipped revs: %s
� c3�,# �UH
nSU-v� M g7f�r�Nr+��.0�rs  r-�	<genexpr>�&rebaseruntime._read.<locals>.<genexpr>Ps���<�O�q����O���r,)rar<r�rr��	enumerate�read�
splitlines�rev�boolr�rK�split�legacystates�
revtodostr�revtodor
�Abortrri�values�sortedr��addrUr��join)rr<r��
legacydestrrhr��i�l�argsr�r��destrevrj�seen�old�news                 r-r��rebaseruntime._reads�����
��y�y�����&�&�&�!��#� ���

���
����������(�A�!�!�&�&�(�"5�"5�"7�8�����6�*.�'�+�+�-�D��'��!�V��%)�W�[�[�]�
���!�V�(,����
�D��%��!�V�(,�S��V��D��%��!�V�$(��Q��L�D��M��!�V�,0��Q��L�D��)��!�V�S��V�r�\�d�a�i�/0�*�+��7�7�4�=�D�!�q�'�]�.�.�0�F�!�!�W�F���-� ��4�y�1�}�"&�A�w�-�"3�"3�"5��",��&-�F�O���+�(/��
�)-��(8�(8�(:��
�I9�L�� �(��+�+�a� @�A�B�B�"�Z���X���%���K� ��w�~�~�'�(�D�"�5�;�;�=�1���S��'�>�c�T�k��K�K��$�����
�2�#�Z�����
�
�*��y�y�<�F�7�O�<�<�C��
E�	
�
�r,c�X�UR(agURRSS5(dgURVs1sH(oRUR5(dM&UiM* nn[
URX R5uUlUl	[UR5nURUR5 [URURX#5 [
R"UR[
R5(a[5Ul	gURRSURUR5H;nURR!US5 URR!US5 M= gs snf)z<Compute structures necessary for skipping obsolete revisionsN�experimentalsrebaseskipobsoletesdescendants(%ld) and not %ld)rtrUrrrr<r�_compute_obsolete_setsrhrxryri�update�_checkobsrebase�	isenabled�allowdivergenceoptrH�pop)rr��obsoleteset�
skippedsetr�s     r-�_handleskippingobsolete�%rebaseruntime._handleskippingobsoleteUs.���:�:���w�w�!�!�/�3H�I�I��"&�*�*�H�*�Q�	�	�!��0E�0E�0G�q�*��H�
#�4�9�9�k�<�<�H�	
��7��6���D�D�E�
����$�D�D�E���	�	�4�7�7�K�D����d�i�i��)D�)D�E�E�9<��D�6��y�y�~�~�/��:�:��:�:���
�
�
���s�D�)���� � ��d�+�
��Is�%F'�,F'c�,�SUlUR5 UR5 [URU5UlU(a'U=(a URnURUUUUS9$g![Ra� U(aZ[UR5 [UR5 URRR[S55 g[S5n[S5n[R"XgS9ef=f)NTsFrebase aborted (no revision is removed, only broken state is cleared)
rs#cannot continue inconsistent rebases-use "hg rebase --abort" to clear broken state��hint)�backup�	suppwarnsr{�confirm)rbr�r��restorecollapsemsgr<ror
�RepoLookupError�clearstatus�clearcollapsemsgrU�warnrr�rs�_abort)r�isabortr�r�r{r��msgr�s        r-�_prepareabortorcontinue�%rebaseruntime._prepareabortorcontinuens������	2���� ��(�(�*�1�$�)�)�W�E�D��"��,����F��;�;��#���	��
���!�$�$�	2���D�I�I�&� ����+��	�	���!�!��<�����>�?���I�J���k�k�#�1�1�	2�s�;A3�3A3D�(+Dc���U(d
[5$[URXR5nU(d.URR[
S55 [5$UuUlUlUl	UR(a�[URR55n[U5S:wa[R"[
S55e[[!U55nURR"R%U/SS9n['URURU5Ul[+[UR555HcnURUnUR-5(dM)UR.(aM<URR[
S5U-5 Me UR15 UR2(d�[UR555nU[UR65-nXpR8-n0n[:R<"UR[:R>5(aSS0nURRAU5 [BRD"URUS	S
9 SSS5 SUl%g!,(df   N=f![RFa$n	U	RHc[
S5U	l$U	eSn	A	ff=f)N�nothing to rebase
r*s3--collapse does not work with multiple destinationsT)�	inclusives reopening closed branch head %s
)r�sevolution.allowdivergencestruer6)r7s&use --keep to keep original changesets)&r.�
buildstater<rlrU�statusrrerhrrir�rKr
�
InputError�next�iter�	changelog�	ancestors�externalparentrfr��closesbranchrur�rt�keysrxryrr��createmarkersopt�configoverrider�precheckr�r�ra)
rrh�resultrPr��
destancestors�dest�	rebaseset�	overridesr�s
          r-�_preparenewrebase�rebaseruntime._preparenewrebase�s1���#�%�%��D�I�I�w���?����G�G�N�N�1�3�4�5�#�%�%�6<�3���$�,��
��>�>�����+�+�-�.�E��5�z�Q���&�&��L�M����4��;�'�G� �I�I�/�/�9�9��	�T�:��M�+�4�9�9�d�j�j�-�P�D�M��c�'�.�.�"2�3�4�G��9�9�W�%�D�� � �"�"�4�+=�+=�+=������q�!E�F��M�N�5�	
�$�$�&��z�z��G�L�L�N�+�I���T�H�H�I�I�I��C�C�C�I��I��!�!�$�)�)�X�-F�-F�G�G�C�W��	�
��W�W�+�+�I�6��(�(����I�i�P�7���
�7�6���;�;�
��6�6�>��H�I�A�F����
�s6�!J>�<!J-�J>�-
J;�7J>�;J>�>K6�K1�1K6c��UR(aCSSKJn U"UR5UlURR
R
S5 O9URSUlURR
R
S5 URR
RSSURURS9 g)Nr)�overlayworkingctxsrebasing in memory
srebasing on disk
r6susing in-memory rebase: %r
)�rebase_imm_used)rz�mercurial.contextrr<�wctxrUr��log)rrs  r-�_assignworkingcopy� rebaseruntime._assignworkingcopy�s����=�=�;�)�$�)�)�4�D�I��I�I�L�L���6�7��	�	�$��D�I��I�I�L�L���4�5��	�	������+��M�M� �M�M�		�	
r,c�^�UR5 URURp2UR(a�URRS[5 UR(al[5nURHRnURX%R55 [U5S:�dM5[R"[S55e UR =(d UR"UlUR (a[$R&"U5 UR)5 U(aUR)U5 URR+5VVs/sHupgU[,:XdMUPM nnnURR/[S5[S5[U5S9mU4Sjn	[1UR25H:n
URR5SU
5nUHnUR7XU	5 M M< TR95 UR;[S	55 gs snnf)
Nrr*s'cannot collapse multiple named branchessrebasings
changesets)�unit�totalc�J>�TRSUR5U4-S9 g)N�%d:%s)�item)�	incrementr�)r2�ps �r-�progress�.rebaseruntime._performrebase.<locals>.progress�s!���
�K�K�h�#�'�'�)�S�)9�9�K�;r,ssort(%ld, -topo)srebase merging completed
)rr<rUrurq�insertr4rlrirr�r1rKr
r�rrg�_activebookmarkr�
deactivater�r�r��makeprogress�
sortsourcerhrH�_rebasenode�complete�note)
rr�r<rU�branchesr��kr��candsrrC�
sortedrevsrs
            @r-�_performrebase�rebaseruntime._performrebase�s�������!��9�9�d�g�g�b����
�M�M� � ��K�0��~�~��5���:�:�C��L�L���!1�!1�!3�4��8�}�q�(�#�.�.��H�I���&�#�1�1�I�T�5I�5I������� � ��&�	
����
�
���R� �#�z�z�/�/�1�B�1�t�q�Q�'�\��1��B��G�G� � �
�k�N��=�!1��U��
!�
��	<�!����.�F������(;�V�D�J�!��� � ��(�3�"�/�	
�
�
��
����/�0�1��Cs�'H>�;H>c���URnXAnUcUR5nUR(d}URn[R
"UUURR5VVs0sH3upxU[:wdMURU5URU5/_M5 snn5nURn	U	cUR5n	0n
URRSS5(aSUR50n
URHnU"XZ5 M
 [UR!5["R$5nUUR&(+S.n
URR)U
S5 UR*(a([-UUR.U
UUUR15U	S9nO[3UU
UUUR15U	S9nUsSSS5 $s snnf!,(df   g=f)z�Commit the wd changes with parents p1 and p2.

Reuse commit info from rev but also store useful information in extra.
Return node of committed revision.Nr6sstore-sources
rebase_source))sphasess
new-commit)�ui�allowemptycommit)rr3�	commitmsg�editor�userr\)r3r-r.r/r\)r<�descriptionrlr�r�update_hash_refsrr�r��noder\rUrrr�rq�max�phaser�draftrwrrz�commitmemorynoderr/�
commitnode)rr�r.r-r<r2�clr�r�r\r3�c�	destphaser�newnodes               r-�
_concludenode�rebaseruntime._concludenodes���
�y�y���i�������)�I��~�~����B�#�4�4���+/�*�*�*:�*:�*<��*<�����(�7�B�G�G�F�O�b�g�g�f�o�%6�6�*<���I��y�y���<��8�8�:�D����7�7���i��9�9�%�s�w�w�y�1�E����A�
�c�M����	�	��V�\�\�2�	�(1�.2�.F�.F�*F�
�	��W�W�
#�
#�I�y�
9��}�}�*������'�!��������%���'�!������
���+:�
9��)�(:�
9�s�0G�&G�9AG � 
G.c�"�URURURpenXBn[U5nURUU:XaUR[
S5U-5 GO�X R;aF[
S5U-n	URRU	5 URRU5 GO�X R;a�URUn
U
c[
S5U-n	O[XJ5n[
S5X�4-n	URRU	5 URRU5 [[XBURURUR55nX�RU'GO�URU[:XGa�UR[
S5U-5 U"U5 [UUURURURUR5up�nUR (aOUR"R%5R'5U
:Xa#URR)S5 SUlOSSUR+S	S
50nUR-US5 [/UUU
UUUR0UR"S9 SSS5 UR0(d�U[L:gn[:RN"US5n[:RP"SSU0UD6nUR"RSXMRU5XNRU55 URWUU5nOSnUbsUUR'5URU'UR)S[YU5-5 UUR[5(aUR][
S5U-5 O�UR0(d8UR][
S5U-5 URRU5 X�RU'UR)SU
-5 O.UR[
S5X�URU4-5 U(dUR_5 gg![2R4a� UR6(a[2R8"S5eUR0(aeUR[
S
55 [:R<"U5 O/![2R>a [AU5 [CU5 ef=fSUl"URG5 [HRJ"XMUR"S9 [/UUU
UUUR0UR"S9 GN�f=f!,(df   GN�=f)Nsalready rebased %s
sInote: not rebasing %s and its descendants as this would cause divergence
s+note: not rebasing %s, it has no successor
s4note: not rebasing %s, already in destination as %s
srebasing %s
sresuming interrupted rebase
F)r+s
forcemerge�toolr,r6)rsDhit merge conflicts; rebasing that commit again in the working copy
)�wc�editformsrebased as %s
sRnote: created empty successor for %s, its destination already has all its changes
sCnote: not rebasing %s, its destination already has all its changes
snext revision set to %d
salready rebased %s as %s
r+)0r<rUrdrVrr�rryrjr�rxr3�
adjustdestrhr��
defineparentsrbr�p1r�r�rkr�
rebasenoderlr
�InMemoryMergeConflictsErrorr{�ConflictResolutionRequiredr	�
bailifchangedr�r�r�rzr�mergemodr�r�
mergeeditform�getcommiteditor�
setparentsr2r<r�isemptyr�r�)rr�r��
progressfnr<rUrdr2�descr��succ�succdescrrD�p2�baser�mergingrAr.r;s                     r-r!�rebaseruntime._rebasenode=s������D�G�G�T�Y�Y�$���i����}���:�:�c�?�c�!��I�I�a�/�0�4�7�8�
�>�>�
>��5���	�
�
�G�G�N�N�3���L�L���S�!�
�?�?�
?��>�>�s�C�D��|��G�H�4�O��#�D�J�/���L���$�%��
�G�G�N�N�3���L�L���S�!���4�d�l�l�D�J�J����M��D�#�J�J�s�O�
�Z�Z��_��
'��I�I�a�(�)�D�0�1��s�O�(�������
�
�����;�;�
�L�B�D��{�{�t�y�y�|�|�~�1�1�3�r�9����
�
�>�?�#���3�T�X�X�f�c�5J�K�	��&�&�y�)�<�)�"� ���� � �N�N�!%����=�V�>�>���-��"�0�0��)�D�� �0�0�K�(�K�d�K���	�	�$�$�T�X�]�]�_�d�h�m�m�o�F��,�,�S�&�9�����"�"&�w�-�"3�"3�"5��
�
�3�����+�e�G�n�<�=���=�(�(�*�*��G�G��I���	����~�~��G�G��5���	���L�L�$�$�S�)�"$�
�
�3�����5��:�;��I�I��/�0�D�t�z�z�#��:O�3P�P�
��

������U!�<�<���;�;�"'�"B�"B�9�"M�M��>�>�"��	�	��!F���"�#�1�1�$�7��$�{�{�"�'��-�,�T�2�!�"��).��
��/�/�1� �����T�Y�Y�?�"� ���� � �N�N�!%����/��=�<�sD�?U?�#Q/�/A'U<�S.�-U<�.,T�AU<�8U?�;U<�<U?�?
Vc��URURURp2nURS[R
"U55nUR
5 UR(Ga}[U[UR5URURURUR5upVnURS5nSn	UR(a
URn
OISn
[!UR5H,nX�R;dMU
SXR#5--
n
M. Sn[$R&"X�S9n[)UR5n
UR*R-XR/5XR0R/55 UR3X�U
S9nUb3XR55nURHnX�RU'M S	UR75;a![9XRUR40UD6 URRUR:UR:5nUS
:aUR:nUUSR=5Vs/sHnUR55PM sn;a3UR?[AS55 [BRD"UU5 SnUR(aURF(dWn[IUUURURURUURFUURJS9	 [MU5 [OU5 UR?[AS
55 [PRR"URUS5SS9 UR(a2[WUR5nUR?[AS5U-5 URY5 URZ(akURZUR\;aPUSR/5UR\URZ:Xa![^R`"XRZ5 ggggs snf)Nr6�editsrebase.collapsesCollapsed revisions
* %sT)rWrA)r-�qtiprs0update back to initial working directory parent
)�fmr�srebase completed
sundo��
ignoremissings%d revisions have been skipped
�.)1r<rUrd�	formatterrrn�	startitemrlrC�minrrhrjrxrkror�r0r	rKr3rrLr2rfr<r��tags�updatemqre�parentsr#rrIr�rt�clearrebasedrsr�r�r �
unlinkpath�sjoinrK�endrg�
_bookmarksr�activate)rr<rUrdrYrDrR�_base�editoptrAr-�rebasedr.�
revtoreuser;r�r��newwdr9�collapsedas�
skippedlens                     r-�
_finishrebase�rebaseruntime._finishrebase�sK�����D�G�G�T�Y�Y�$��
�\�\�)�X�%9�%9�$�%?�
@��
�����>�>�>�)���D�J�J������
�
�����;�;�
�M�B�E��h�h�v�&�G�)�H���� �,�,�	�1�	�%�d�j�j�1�G��l�l�2�!�Y���1J�1J�1L�%L�L�	� 2����,�,�'�M�F��T�Z�Z��J��I�I� � ������$�}�}�2E�2J�2J�2L�M��(�(��i�)��G��"���*�*�,��"�j�j�F�)/�J�J�v�&�)��d�i�i�k�!��T�:�:�t�|�|�<�t�<��
�
���t������@���1�9��O�O�E��$�t�*�*<�*<�*>�?�*>�Q�����*>�?�?��G�G�A�J�K�L��O�O�D��K�(����>�>�$�*�*�!�K�����L�L��J�J��L�L���J�J���<�<�
	
�	�D�����
����'�(�)�����
�
�7�+�4�@��<�<��T�\�\�*�J��G�G�A�9�:�Z�G�H�
����
����#�#�t���6��T�
���!�T�_�_�T�5H�5H�%I�I����t�%8�%8�9�J�7�
 ��=@s�6Qc�h^�URmURR5VVs/sH*upVUS:�dM
Xe:wdMX`RU:wdM(UPM, nnnUVs/sHnTUR	5(aMUPM! n	nSn
U	(aJTR
R
[S5SRU4SjU	55-[S5S9 Sn
[5nU(a$[TRRU55nU[U5-
(a&TR
R
[S	55 Sn
U
(a�U(a/TRS
U5Vs/sHo�R5PM n
n[U5nURURR55 U(dURUR 5 TSR#5U;nU(d*U(a#[$R&"TUR 5 U(a![(R*"TR
TW
US9 UR,(a;UR,TR.;a![0R2"TUR,5 [5T5 [7T5 U(d$TR
R
[S
55 gs snnfs snfs snf![5T5 [7T5 U(d%TR
R
[S
55 ff=f)z-Restore the repository to its original state.rTs-warning: can't clean up public changesets %s
�, c3�@># �UHn[TU5v� M g7fr?��bytes�r�r�r<s  �r-r��'rebaseruntime._abort.<locals>.<genexpr>/s���� C��A��t�A�w������s see 'hg help phases' for detailsr�FsDwarning: new changesets detected on destination branch, can't strip
�
roots(%ld)r\�r�srebase aborted
)r<rr�rh�mutablerUr�rr�rir��descendantsr2r�r�r�rer�rI�clean_updater�striprgrgrrhr�r�)rr�r�r{r�r��srkr��	immutable�cleanupr}r9�strippoints�updateifonnodes�shouldupdater<s                @r-r��rebaseruntime._aborts�����y�y��A	5�!�J�J�,�,�.��.�D�A���6���f��)*�l�l�1�o�)=��.�
��
%,�E�G�q�4��7�?�?�3D��G�I�E��G��������G�H��j�j� C�� C�C�D��>�?���
 ���%�K��!�$�.�.�"<�"<�W�"E�F���S��\�)�������=��� ����*.�(�(�=�'�*J�#�*J�Q����*J� �#�#&�g�,���&�&�t�|�|�':�':�'<�=��
$�'�'����8�#�D�z�~�~�/�?�B���,��)�)�$�t���*?�@���L�L����$��F�K��"�"�t�':�':�d�o�o�'M��"�"�4��)<�)<�=�
����T�"�������Q�2�3�4���{��
F��0#��8
����T�"�������Q�2�3�4��sN�K-�K�K�K�K�K-�$K#�K#�
C%K-�/K(�DK-�K-�-AL1)rcrgrsrlror\rhr{rfrqrzrurtrxryrdrerarbrwrjrr~rUr)FFNr?)TFFF)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r��propertyr<r�r�r�r�r�r�rrr(r<r!rpr��__static_attributes__r+r,r-rXrX�ss��<�/@�b����%�1�,6�$K�Z,�4LQ� �D2�h
� +2�Z:�xL�\O:�bFr,rXr6�s�sources5rebase the specified changesets and their descendantssREV�bsbases=rebase everything from branching point of specified changeset�rsrevsrebase these revisions�d�destr,s#rebase onto the specified changesetr�scollapse the rebased changesets�msmessages#use text as collapse commit messagesTEXT�esedits invoke editor on commit messages�lslogfiles&read collapse commit message from filesFILE�kr�skeep original changesetsr�skeep original branch names�Dsdetachs(DEPRECATED)�isinteractive�t�toolsspecify merge toolsstopsstop interrupted rebase�cscontinuescontinue an interrupted rebase�asabortsabort an interrupted rebasesauto-orphanssLautomatically rebase orphan revisions in the specified revset (EXPERIMENTAL)s>[[-s REV]... | [-b REV]... | [-r REV]...] [-d REV] [OPTION]...)�helpcategoryc	���URSS5n[R"USSS5nU(a2[R"X$SS/5 [R"X$/SQ5 [R"USS5 [R"US	S
S5 U(dUR	5bS
nURS5(ap[
U5S1-
n[R"USU5 [URURS555n[R"SU5/US	'SUS'URS5(dURS5(a[XXB5$US:XGa[X5nUR5 UR5 UR5 UR (a["R$"['S55e[(R*"U[(R,5nUR.(d.U(d'["R$"['S5['S5S9e[0R2"XR45 UR75 SSS5 SSS5 gU(a,SS0n	UR9U	S5 [;XXBUS9sSSS5 $[;XXB5$!,(df   O=fSSS5 g!,(df   g=f!,(df   g=f!["R<aV URSS5(aeUR?['S55 [AU5 [CU5 [;XXBS
S9s$f=f)a9move changeset (and descendants) to a different branch

Rebase uses repeated merging to graft changesets from one part of
history (the source) onto another (the destination). This can be
useful for linearizing *local* changes relative to a master
development tree.

Published commits cannot be rebased (see :hg:`help phases`).
To copy commits, see :hg:`help graft`.

If you don't specify a destination changeset (``-d/--dest``), rebase
will use the same logic as :hg:`merge` to pick a destination.  if
the current branch contains exactly one other head, the other head
is merged with by default.  Otherwise, an explicit revision with
which to merge with must be provided.  (destination changeset is not
modified by rebasing, but new changesets are added as its
descendants.)

Here are the ways to select changesets:

  1. Explicitly select them using ``--rev``.

  2. Use ``--source`` to select a root changeset and include all of its
     descendants.

  3. Use ``--base`` to select a changeset; rebase will find ancestors
     and their descendants which are not also ancestors of the destination.

  4. If you do not specify any of ``--rev``, ``--source``, or ``--base``,
     rebase will use ``--base .`` as above.

If ``--source`` or ``--rev`` is used, special names ``SRC`` and ``ALLSRC``
can be used in ``--dest``. Destination would be calculated per source
revision with ``SRC`` substituted by that single source revision and
``ALLSRC`` substituted by all source revisions.

Rebase will destroy original changesets unless you use ``--keep``.
It will also move your bookmarks (even if you do).

Some changesets may be dropped if they do not contribute changes
(e.g. merges from the destination branch).

Unlike ``merge``, rebase will do nothing if you are at the branch tip of
a named branch with two heads. You will need to explicitly specify source
and/or destination.

If you need to use a tool to automate merge/conflict decisions, you
can specify one with ``--tool``, see :hg:`help merge-tools`.
As a caveat: the tool will not be used to mediate when a file was
deleted, there is no hook presently available for this.

If a rebase is interrupted to manually resolve a conflict, it can be
continued with --continue/-c, aborted with --abort/-a, or stopped with
--stop.

.. container:: verbose

  Examples:

  - move "local changes" (current commit back to branching point)
    to the current branch tip after a pull::

      hg rebase

  - move a single changeset to the stable branch::

      hg rebase -r 5f493448 -d stable

  - splice a commit and all its descendants onto another part of history::

      hg rebase --source c0c3 --dest 4cf9

  - rebase everything on a branch marked by a bookmark onto the
    default branch::

      hg rebase --base myfeature --dest default

  - collapse a sequence of changes into a single commit::

      hg rebase --collapse -r 1520:1525 -d .

  - move a named branch while preserving its name::

      hg rebase -r "branch(featureX)" -d 1.3 --keepbranches

  - stabilize orphaned changesets so history looks linear::

      hg rebase -r 'orphan()-obsolete()' -d 'first(max((successors(max(roots(ALLSRC) & ::SRC)^)-obsolete())::) + max(::((roots(ALLSRC) & ::SRC)^)-obsolete()))'

Configuration Options:

You can make rebase require a destination if you set the following config
option::

  [commands]
  rebase.requiredest = True

By default, rebase will close the transaction after each commit. For
performance purposes, you can configure rebase to use a single transaction
across the entire rebase. WARNING: This setting introduces a significant
risk of losing the work you've done in a rebase if the rebase aborts
unexpectedly::

  [rebase]
  singletransaction = True

By default, rebase writes to the working copy, but you can configure it to
run in-memory for better performance. When the rebase is not moving the
parent(s) of the working copy (AKA the "currently checked out changesets"),
this may also allow it to run even if the working copy is dirty::

  [rebase]
  experimental.inmemory = True

Return Values:

Returns 0 on success, 1 if nothing to rebase or there are
unresolved conflicts.

r6sexperimental.inmemory�abort�stop�continuer��dry_run)r��sourcerSrr�r�rSNF�auto_orphanss%ld and orphan()s_destautoorphanrebase(SRC)rs!cannot stop in --collapse sessions<cannot remove original changesets with unrebased descendantss^either enable obsmarkers to allow unstable revisions or use --keep to keep original changesetsr�r�r6�singletransactionT)rzr&r's?hit merge conflicts; re-running rebase without in-memory merge
)"rrr	�check_at_most_one_arg�check_incompatible_arguments�currenttransactionrkri�listrHr�
formatspec�
_dryrunrebaserX�wlock�lockr�rlr
rLrrr��allowunstableoptrtrIr~rerpr�	_dorebaserFr�r�r�)
rUr<rdrzr7�disallowed_opts�userrevs�rbsrt�
allowunstablers
          r-�rebaser�es���x�}�}�Y�(@�A�H�
�
*�
*�4��&�*�
M�F�
��,�,��9�i�0�	
�	�,�,��;�	
��!�!�$�	�9�=��!�!�$��x��@�
��(�(�*�6����x�x�����d�)�~�&6�6���,�,��.�/�	
���	�	�$�(�(�>�":�;�<��!�,�,�-@�(�K�L��U��4��V���x�x�	���d�h�h�y�1�1��R�v�4�4�	�6�	��d�'��
�Z�Z�\�4�9�9�;����!�����&�&�q�)M�'N�O�O�$�.�.�t�X�5N�5N�O�M��K�K�=��&�&��2���&��
�
�
�!�!�$�'7�'7�"8�9����!��+'�\�\�,
�	E�;�D�A�I��"�"�9�i�8� ��6�(�K�9�8���6�0�0�U'�;��\�\�\��69�8���0�0�	E��}�}�X�'F�G�G���G�G�� ��
�
����T�"��R�v�e�D�D�	E�sV�K#�!CK	�9K#�L�(K4�3	L�	
K	�K#�#
K1�4
L�>L�L�A'M/�.M/c�R�[XSSUS9nURS5nU(aUR[S55 OUR[S55 UR	5 UR5 SnSS0nUR
US5 [UUUUU5nU[5:XaGSnUsSSS5 U(a!URSSSURS	5S
9 sSSS5 sSSS5 $SSS5 U(a_UR[S55 UR[S55(dUR5 OURSSSUS
9 SnOUR[S55 U(a!URSSSURS	5S
9 SSS5 SSS5 g!,(df   N�=f![RaU UR[S55 U(a!URSSSURS	5S
9 SSS5 SSS5 g[Ra Snef=f!U(a"URSSSURS	5S
9 ff=f!,(df   O=fSSS5 g!,(df   g=f)NT)rzr{rdr�sstarting in-memory rebase
s8starting dry-run rebase; repository will not be changed
r�r6Fr�)r�r�r�r{srebase completed successfully
s!apply changes (yn)?$$ &Yes $$ &No)r�r�r�r�sWdry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
rshit a merge conflict
r*)rXrkr�rr�r�r�_origrebaser.r��promptchoicerpr
rGr�)	rUr<r7rdr�r��
needsabortr�ress	         r-r�r�nsr���$�T�$�T�J�E��h�h�y�!�G��
�	�	�!�2�3�4�
�	�	�
�J�K�	
�
����t�y�y�{��
�1	�:�D�A�I��"�"�9�i�8�!���������*�,�,�!&�J��9�8�P��-�-� � �"��8�8�I�.�	.��]#�{���-�9�$��	�	�!�>�?�@����q�)M�'N�O�O��'�'�)��1�1� $�$�"&� '�	2��#�
��	�	��B������-�-� � �"��8�8�I�.�	.��]#���9�8���/�/�	��I�I�a�1�2�3��6��-�-� � �"��8�8�I�.�	.��]#���$�{�{�	��J��	��4��-�-� � �"��8�8�I�.�	.����Y#�{�����s��*J�;I>�?G�!F=�6	G�?(I>�'	J�;G�BI�(I>�,J�=
G�G�.I
�<I�=(I>�%J�6I
�
I�+I;�;I>�>
J	�J�
J&c�0�[XXCS9n[XX#U5$)N)rd)rXr�)rUr<r7rdrzr�s      r-r�r��s���$�H�8�E��r��u�5�5r,c�0�US:wdeUR5 UR5 URS5(aG[R"S5(aSnSW-n[
S5U-n[R"U5eUR(a0UR(d[R"[
S55eU(a�UR(a[R"[
S	55eUS
:Xa1URSS5(aUR[
S
55 US:Xa5[RRU5n[R "U5 UR#US
:HS9n	U	bU	sSSS5 sSSS5 $O�URS5n
[%UUUR&URSS5URS/5URS/5URS/5U
S9nUR)U5n	U	bU	sSSS5 sSSS5 $[+XR5 SnUR-SS5n
U
(aUR/S5n[0R2"U5 UR5U5 UR6(dUR95 SSS5 SSS5 SSS5 g![
a SnGN�f=f!,(df   N2=f!,(df   N;=f!,(df   g=f)Nr��interactiveshisteditr,s --config extensions.histedit=shg%s help -e histeditsOinteractive history editing is supported by the 'histedit' extension (see "%s")s+message can only be specified with collapses*cannot use collapse with continue or abortr�r?Fstool option will be ignored
r��r��
_destspacerr�rSr��r:r6r�)r�r�rkr�find�KeyErrorrr
r�rorlr��
mergestatemodrr�r�checkunresolvedr��_definedestmaprzr�storecollapsemsgrr�transactionr �acceptinterventionr(r{rp)rUr<r7rdr��enablehistedit�helpr��ms�retcoder:rhr��singletrs              r-r�r��s����V����	
����t�y�y�{��8�8�M�"�"�
C��?�?�;�/�/�%(�N�,�n�<�D��9���	�
��"�"�3�'�'����U�_�_��"�"��@�A��
������&�&��C�D����� �T�X�X�f�e�%<�%<�����:�;�<���#�"�-�-�2�2�4�8���)�)�"�-��3�3�V�w�=N�3�P�G��"��G#�{���D#�
����.�I�$�����������&�����2�&������$������#�#�	�G��-�-�g�6�G��"��i#�{���j
�T�#4�#4�5�
���=�=��,@�A����!�!�)�,�B�
�
$�
$�R�
(�� � ��$��<�<��#�#�%�)�A#����
�
C�!B��
C��v)�
(��A#�{����sy�L�K6�K�D)K6�	L�BK6�	L�/AK6�3K%�9K6�L�K"�K6�!K"�"K6�%
K3�/K6�6
L	�L�
Lc	�
^�Uc/n[R"T5 U(d[R"T5 URSS5(a.U(d'[R
"[
S5[
S5S9eSnU(a;[R"TU5n	U	(dUR[
S55 gGO�U(aM[R"TU5n
U
(dUR[
S55 gTRS	X�5n	GOR[R"TU=(d S
/5nU(dUR[
S55 gU(a[R"TU5nOT[TX�S9n[U5n/n0n
UHInTRS
X�R55R5nU
R!U/5U/-X�'MK SU
;aU
R#5 U
R%5H%unnU['TRSUU55-
nM' TRSU5n	U	(Gd['U5UR5/:XaAU(aUR[
S5U-5 gUR[
S55 gTRSX�R55(d_U(a9UR[
S5SR)U4SjU55U4-5 gUR[
S5U-5 gUR[
S5SR)U4SjU55U4-5 g[*U	;a[R
"[
S55eTS
R5U	;nUR-SSUUS9 U(a3U(a,[R"T5 [R"T5 U(dT[TX�S9n[U5n[.R0"SU	5nSU0nUc[2R"TUUS9nUb#UR5nU	Vs0sHnUU_M nnW(dUR[
S(55 gU$![R4a� 0nU	H�n[.R0"S U5US!'TR7U/S"US#9n[9U5nUS$:XaUR5UU'MUUS%:Xa"UR;[
S&5TU-5 M}[R
"[
S'5TU-5e GN	f=fs snf))z:use revisions argument to define destmap {srcrev: destrev}N�commands�rebase.requiredestsyou must specify a destinationsuse: hg rebase -d REVr�s-empty "rev" revision set - nothing to rebase
s0empty "source" revision set - nothing to rebase
s(%ld):: + (%ld)r\s5empty "base" revision set - can't compute rebase set
r�sancestor(%d, %d)schildren(%d) & ancestors(%ld)s%ld::s6nothing to rebase - %s is both "base" and destination
sAnothing to rebase - working directory parent is also destination
s
%ld - ::%dsGnothing to rebase - "base" %s is already an ancestor of destination %s
�+c3�@># �UHn[TU5v� M g7fr?rurws  �r-r��!_definedestmap.<locals>.<genexpr>Rs����$B�T��U�4��7�^�^�T�rysVnothing to rebase - working directory parent is already an ancestor of destination %s
s nothing to rebase from %s to %s
c3�@># �UHn[TU5v� M g7fr?rurws  �r-r�r�`s���� >��A��t�A�w����ryscannot rebase the working copyr6s!rebasing working copy parent: %r
)�rebase_rebasing_wcps%ldsALLSRC)�
localaliasr�sSRCT)r/r�r*rs skipping %s - empty destination
s'rebase destination for %s is not uniques&nothing to rebase - empty destination
)r	�checkunfinishedrHrrr
r�rr�revranger�rH�	revsingler=rvr�rIrk�clearr�r�r�rrrr�rr��anyrevsrKr#)rUr<rz�destf�srcf�basef�revfr:rrrOrS�roots�bpbase�b�bp�bs�rebasingwcp�allsrc�aliasrhr��destset�sizer�s `                       r-r�r��s�����|���
���D�!�����d�#�	�}�}�[�"7�8�8�����
�/�0��+�,�
�	
�
�D���'�'��d�3�	���I�I�a�I�J�K���
��!�!�$��-����I�I�a�L�M�N���I�I�0�#�;�	��"�"�4���4�&�9����I�I��O�P�
����'�'��e�4�D���D�$�D�E�D��$�K�E������A����.��8�8�:�>�D�D�F�B����B��+�q�c�1�F�J���6�>�
�L�L�N��l�l�n�F�B���T�$�)�)�$D�b�"�M�N�N�E�%��I�I�h��.�	���D�z�d�h�h�j�\�)���I�I��2���	��L�=�I�I��<���<�1�Y�Y�}�d�H�H�J�?�?���I�I��$��
 �9�9�$B�T�$B�B�D�I�J��,��I�I��<��
����	�	�	��:�;��y�y� >�� >�>��E�F����)�����q�!B�C�D�D��t�*�.�.�"�i�/�K��F�F��-��'�	���K�����%����d�#���K��i�E�F���d���
�
"�
"�6�9�
5�F�
���E��|�	��$�$�T�5�U�C�D�&���(�(�*��'0�1�y�!�1�g�:�y��1��
�	�	�!�>�?�@���N��7�$�$�	��G��� *� 5� 5�e�Q� ?��f�
��,�,��w�T�e�,�L���7�|���1�9�!(����G�A�J��Q�Y��G�G�A�B�C�d�1�g�M�N��*�*��D�E��Q��O����	��*2s�2R�
U�B<U�Uc
��[5n[U5nUHnnXT:XaM
XR5HNnUR5U;dMUR5U;dM/UR	UR55 MP Mp U(d[
$[
U5S:XaUR5$[R"[S5[U5SRS[U5554-5e)z�Return the revision that should be used as the second parent
when the revisions in state is collapsed on top of destancestors.
Abort if there is more than one parent.
r*sKunable to collapse on top of %d, there is more than one external parent: %srsc3�,# �UH
nSU-v� M g7fr�r+)r�rs  r-r��!externalparent.<locals>.<genexpr>�s���)M�_��%�!�)�_�r�)rir_rbr�r�rrKr�r
rLrr3r�r�)r<rrrbr�r�rs       r-r�r��s���
�e�G�
��Z�F����=����"�"�$�A��u�u�w�e�#�����}�(D����A�E�E�G�$�%�����
�7�|�q���{�{�}��
�
�
�	�
,�	
��}��u�z�z�)M�V�G�_�)M�M�
N�		O��r,c	��SnSU;aUSnUR5 URUUUUUUS9nUR5(a"URR	SS5(dgURU5n	UR
5 U	$)zTCommit the memory changes with parents p1 and p2.
Return node of committed revision.Nr0)r\r3r/r1r.r+r,)�_compact�tomemctxrMrUrr�	commitctx�clean)
r<rr.r3r/r\r-r1�memctx�	commitress
          r-r6r6�s���
�F��E���y�!��
	�M�M�O�
�]�]��
��
���
��F��~�~������ 2� 2�5�:M� N� N�����v�&�I��J�J�L��r,c	�R^�[RnTRRSS5(dU4SjnU"5 TR	XSXBUS9nTR
R
TUR5TR55 UsSSS5 $!,(df   g=f)zPCommit the wd changes with parents p1 and p2.
Return node of committed revision.r6r�c�&>�TRS5$)Nr6)r��r<s�r-�<lambda>�commitnode.<locals>.<lambda>�s���T�%�%�i�0r,)�textr/r\r3r.N)	r �nullcontextmanagerrUrr�commit�dirstate�	setbranchr1r�)r<r.r3r/r\r-r�r;s`       r-r7r7�s����
�	 �	 �B��7�7���i�)=�>�>�
0��	���+�+��D�f��
��	
�
�
�����M� � �"�D�$;�$;�$=�	
��
���s
�AB�
B&c�^�TUnUR5(a"URU5 [RnO�TSR	5U:wa6TR
R
SX'4-5 [R"U5 OTR
R
S5 U4SjnTSnTRRTR55 TUn	TR
R
SX4-5 Ub#TR
R
SUTU4-5 U"5 TRRUR5U	R55n
[R"TUSSUU
/S	QUS
9nUR!UR5TUR55 U(a["R$"XiU5 O%["R$"XiU	R'55 SSS5 WR(S:�a@UR5(a[*R,"5e[*R."S5eg!,(df   N_=f)
zFRebase a single revision rev on top of p1 using base as merge ancestorr\s update to %d:%s
s already in destination
c�:>�TRRT5$r?)r��changing_parentsr�s�r-r��rebasenode.<locals>.<lambda>�s����
�
�6�6�t�<r,Ns merge against %d:%s
s   detach base %d:%s
T)r�r�sparent of source)�branchmerge�force�ancestor�
mergeancestor�labelsr@rr6)�
isinmemory�setbaser r�r�rUr�rIr~r�r�r�r��
isancestorr2�_updaterLr�graftcopiesrD�unresolvedcountr
rFrG)r<r�rDrRrSr[r�p1ctx�scoper2r�statss`           r-rErE�s����
��H�E���������U���'�'����:�>�>��r�!��G�G�M�M�/�2�+�=�>��!�!�%�(��G�G�M�M�6�7�<���D�z���
�
���D�3�3�5�6�
�s�)�C��G�G�M�M�+�s�j�8�9������
�
�/�4��d��2D�D�E�	�����1�1�%�*�*�,����
�K�
�� � ������'�<��	
��	
����
�
��d�2�h�m�m�o�6�����t�%�0�

���t�#�&�&�(�3�)
�,
���q� ��?�?����3�3�5�5��2�2�9�=�=�	!�-
��s
�+CI�
Ic���X!nUR5VVs/sH upgUS:�dM
X&U:XdMXd;dMUPM" nnn/n	URRU5Hxn
UnU
[:wa'UR	SX�5R5nUbX<nX�:Xa,XS;a'X5nU[:Xa[R"SU-5eU	RU5 Mz U	$s snnf)a�adjust rebase destination given the current rebase state

rev is what is being rebased. Return a list of two revs, which are the
adjusted destinations for rev's p1 and p2, respectively. If a parent is
nullrev, return dest without adjustment for it.

For example, when doing rebasing B+E to F, C to G, rebase will first move B
to B1, and E's destination will be adjusted from F to B1.

    B1 <- written during rebasing B
    |
    F <- original destination of B, E
    |
    | E <- rev, which is being rebased
    | |
    | D <- prev, one parent of rev being checked
    | |
    | x <- skipped, ex. no successor or successor in (::dest)
    | |
    | C <- rebased as C', different destination
    | |
    | B <- rebased as B1     C'
    |/                       |
    A                        G <- destination of C, different

Another example about merge changeset, rebase -r C+G+H -d K, rebase will
first move C to C1, G to G1, and when it's checking H, the adjusted
destinations will be [C1, G1].

        H       C1 G1
       /|       | /
      F G       |/
    K | |  ->   K
    | C D       |
    | |/        |
    | B         | ...
    |/          |/
    A           A

Besides, adjust dest according to existing rebase information. For example,

  B C D    B needs to be rebased on top of C, C needs to be rebased on top
   \|/     of D. We will rebase C first.
    A

      C'   After rebasing C, when considering B's destination, use C'
      |    instead of the original C.
  B   D
   \ /
    A
rsmax(%ld and (::%d))s-rev %d should be rebased already at this time)
r�r��
parentrevsrrHrIr�r
�ProgrammingError�append)
r<r�rhrrjrr�r�r�r�prev�adjusted�	candidates
             r-rBrBs���j�<�D��K�K�M��!�D�A��q�5�	
��Z�4�'�	
�,-�,<�	
�!����F����)�)�#�.�����7�?��	�	�"8�&�G�M�M�O�I��$� �+�����
��{�H��7�"��,�,�D�t�K���	�
�
�h��/��M��+s�C�C�C�Cc�
^�[R"T[R5nX#-
nU(aRU(dJU4SjU5n[S5n[S5n[R
"USR
U54-US9egg)a
Abort if rebase will create divergence or rebase is noop because of markers

`rebaseobsrevs`: set of obsolete revision in source
`rebaseobsskipped`: set of revisions from source skipped because they have
successors in destination or no non-obsolete successor.
c3�@># �UHn[TU5v� M g7fr?rurws  �r-r��"_checkobsrebase.<locals>.<genexpr>ss����F�-E��U�4��7�^�^�-E�rys+this rebase will cause divergences from: %ssJto force the rebase please set experimental.evolution.allowdivergence=True�,r�N)rr�r�rr
rLr�)	r<rU�
rebaseobsrevs�rebaseobsskipped�divergenceok�divergencebasecandidates�	divhashesr��hs	`        r-r�r�fs~����%�%�d�H�,G�,G�H�L�,�?����F�-E�F�	��>�?��
�
;�
�����s�d�i�i�	�&:�%<�<�1�E�E�)5�r,c#�# �URbeURRRn[R
"URXR5/5HnU"U5nUcMUv� M g7f)z,yield revision numbers for successors of revN)r�r��index�get_revr�
allsuccessors�obsstorer2)rMr�r$r�r�s     r-�
successorrevsr'|se����?�?�"�"�"��n�n�"�"�*�*�G�
�
"�
"�4�=�=�4�9�>�>�3C�2D�
E���A�J���=��G�F�s�A.A=�4	A=c	�\^^^^^^�TRbeTRnURmUTnTRRT5n[[/m[TTX#U5m[
U5n	[SUSS55(a
TSTS'GOX[U5H�umn
U
n[UUU4Sj[TU
555(aTTnOX�;aX:S:�aX:n[TST5HOup�U
[:XaMT"X�5(a[nM&T"X�5(dM5UTU'[nU	TX�sX�'U	T'MQ UTT'M� TS[:waLUSTS:Xa@[T5S:Xa[U5S:XdeTR5 U	R5 [T5[U5:Xa-UT;a'[R"[!S5TTT4-5e[UU4SjT55(a[R"[!S	55e[#U4S
j[U	555S:�Ga�SS/n[U	5H�umnU[:XdUT;aM[U	5U1-
n[
TR%SUX�55nU(dMLUR'5VVs/sHunnUS:�dMUU;dMUPM nnnUVs/sH#nURU5S[:wdM!UPM% nn[
TR%SUUU55UT'M� [S
U55(a�[)S[U555unmUS:�aL[!S5R+U4SjU55n[R"[!S5TTTU4-5eTS:wa/TT[:waTTTSsTS'TT'U	TU	SsU	S'U	T'U	SnTR,R/S[1T5-5 TSTSU4$s snnfs snf)a�Return new parents and optionally a merge base for rev being rebased

The destination specified by "dest" cannot always be used directly because
previously rebase result could affect destination. For example,

      D E    rebase -r C+D+E -d B
      |/     C will be rebased to C'
    B C      D's new destination will be C' instead of B
    |/       E's new destination will be C' instead of B
    A

The new parents of a merge is slightly more complicated. See the comment
block below.
Nc3�2# �UH
o[:Hv� M g7fr?�rr�s  r-r�� defineparents.<locals>.<genexpr>�s���
+��A��<��s�r*rc3�<># �UHnT"UTT5v� M g7fr?r+)r�rDrPr�r
s  ���r-r�r+�s!����K�4J�q�:�a��q��*�*�4J�s�r�s>cannot rebase %d:%s without moving at least one of its parentsc3�T># �UHo[:g=(a	 T"TU5v� M g7fr?r*)r�rr
r�s  ��r-r�r+�s"����
>��1��<�.�J�s�A�.�.��s�%(�!source is ancestor of destinationc3�N># �UHo[:wdMUT;dMSv� M g7f)r*Nr*)r�r��newpss  �r-r�r+�s����
D�j���L�1�Q�e�^�1�1�j�s�
%�%�	%s(%ld %% (%d+%d))s%ld - (::%ld) - %ldc3�(# �UHoSLv� M
 g7fr?r+)r�rHs  r-r�r+s���5�H�D�4��H�s�c3�J# �UHupUcM
[U5U4v� M g7fr?)rK)r�r�rHs   r-r�r+s&����2�G�A����T��A��2�s�	#�#s or c3�d># �UH%nUcMSRU4SjU55v� M' g7f)Nrsc3�8># �UHnSUTU4-v� M g7f)rNr+rws  �r-r��*defineparents.<locals>.<genexpr>.<genexpr>$s����E��1�x�1�d�1�g�,�6��s�)r�)r�rHr<s  �r-r�r+#s0����/� (���F�E�J�J�E��E�E�E� (�s�0�"0s4rebasing %d:%s will include unwanted changes from %ss future parents are %d and %d
)r�r��
isancestorrevrrrBr��allr��anyr'rK�reverserir
r�r�sumrHr�r_r�rUr��tuple)r<r�rhrrj�
obsskippedr8r�oldps�basesr�np�jrD�unwantedrS�other_bases�siderevsr�r�r�mergesr��unwanteddescrPr�r
r0s``                      @@@@r-rCrC�s1��� �?�?�"�"�"�	
���B��!�!�J��3�<�D��N�N�%�%�c�*�E�
�g��E��t�S�'�'�:�E���K�E�
�
+��q�r��
+�+�+���8��a��0�e�$�D�A�q��B��K�M�$��4J�K�K�K��1�X������1���X��"�%���)�,�����<���b�$�$� �B���&�&�!�E�!�H� �B�*/�q��5�8�&�E�H�e�A�h�-��E�!�H�+%�4��8�w��5��8�u�Q�x�#7��u�:��?�s�5�z�Q��6�6��M�M�O��M�M�O��u�:��U��#��E�(9��"�"��:����S�	�"�	#��
��
>��
>�>�>����q�!E�F�G�G�"�
D�c�%�j�
D�D�q�H��$�<�� ��'�G�A�t��w��$�%�-���e�*��v�-�K���	�	�-�{�D�G��H��x�"'�+�+�-��"/�$�!�Q�1�q�5�A�Q�j�=P�A�-��� )��(�!�B�M�M�!�,<�Q�,?�7�,J�A�y���#��I�I�.��&�)������'(�2�5�H�5�5�5���(��2���D�A�q��1�u� ��z���/� (�/� ��
�&�&��M�N��D��I�|�4�5����A�v���8�w�&�).�q��5��8�&�E�!�H�e�A�h�%*�1�X�u�Q�x�"��a��%��(���8�D��G�G�M�M�4�u�U�|�C�D���8�U�1�X�t�#�#��_��s�:
P#�P#�P#�  P)�P)c�2�[RRURRU5n[	US5n[
R"U5H#nURS5(dM SSS5 g SSS5 g!,(df   g=f)z/Return true if the given patch is in git format�rbs
diff --gitNTF)�os�pathr��mq�openr�
linereader�
startswith)r<�	patchname�mqpatch�fp�lines     r-�isagitpatchrR>so���g�g�l�l�4�7�7�<�<��3�G�	
�g�t�	���$�$�R�(�D����}�-�-��
�	�(�
��	
�	��s�.B�3B�=B�
Bc
��0nURnURSSn[5nURH�nXRR5n	X�;aNURRSX�R4-5 UR[XR54XI'MrURUR5 M� U(a�URXR55 [USS9Hpn	X�;aRXIup�URR[S5X�U	XU	4-5 UR!USU
USX-/S9 MZURXIS	5 Mr UVs/sH*nUR"R%US
5S	U;dM(UPM, n
nX�RSS&SUlUR)5 ggs snf)z9Update rebased mq patches - finalize and then import themNs.revision %d is an mq patch (%s), finalize it.
T)r9supdating mq patch %s to %d:%s
r+r�)rN�gitr�rr*)rJ�
fullseriesri�appliedr2r�rUr��namerRr��finishr�r�r#r�qimport�guard_rer��seriesdirty�	savedirty)r<rrjrd�mqrebaserJ�original_series�skippedpatchesrr�rW�isgitr��	newseriess              r-raraIs����H�	
���B��m�m�A�&�O��U�N�
�Z�Z���6�6�l��� ���<��G�G�M�M�B����-� �
��V�V�[��v�v�%>�?�H�M�
���q�v�v�&���
�	�	�$�
�
��(��(�D�1�C��!�&�m���������8�9��3�Z��C�j�)9�:�;���
�
���"�����+�,����"�"�8�=��#3�4�!2�.%�
�$���{�{� � ��A�&�q�)��?�
�$�	�
�
%�
�
�a�����
����A��2
s�-'G�Gc��U=(d SnURSS5nURSU-5 UR5 g)z,Store the collapse message to allow recoveryr,�last-message.txtr�r�N)r�r��close)r<ror�s   r-r�r�s7���$��K����$�d�+�A��G�G�G�k�!�"��G�G�Ir,c�8�URRSSS9 g)zRemove collapse message filercTrZN)r�rdr�s r-r�r��s���H�H���+�4��@r,c��URS5nUR5R5nUR5 U$![a, U(aSnU$[
R"[S55ef=f)z*Restore previously stored collapse messagercr,s'missing .hg/last-message.txt for rebase)r��readlinerrd�FileNotFoundErrorr
r�r)r<r�r�ros    r-r�r��sv��	M��H�H�(�)���j�j�l�(�(�*��	���	����
�M���K����+�+�a� J�K�L�L�M�s�?A�A9� A9c��UR5nU(aURS5 URRSSS9 g)zRemove the status filesr`TrZN)r��removefilegeneratorr�rd)r<r�s  r-r�r��s:��
�	 �	 �	"�B�	�
���~�.��H�H����d��;r,c#�# �[U5nU(as[U5n/nUHnXU;dM
URU5 M  U(d[R"[S55eU[U5-nUv� U(aMrgg7f)a�yield source revisions in an order that we only rebase things once

If source and destination overlaps, we should filter out revisions
depending on other revisions which hasn't been rebased yet.

Yield a sorted list of revisions each time.

For example, when rebasing A to B, B to C. This function yields [B], then
[A], indicating B needs to be rebased first.

Raise if there is a cycle so the rebase is impossible.
s#source and destination form a cycleN)rir�rr
r�r)rh�srcset�srclistrr�s     r-r r �sw�����\�F�
���.�����A��z��'��
�
�a� ����"�"�1�%K�#L�M�M��#�f�+������&�s�+B	�AB	�B	c�T^�UR5nUSR5nSUR5;a�URRVs1sHoPUR
R5iM! nn[
UR55U-(a[R"[S55e[[U55nU(d[R"[S55e[UR
SUS55nU(d[R"[S55eSn	[X�S9n[R!U["5m[%U5S	:Hn
UGH/nXUR5nUR'U5n
X�:Xa[R"[S
55eX�:Xa�USnX�R)5:Xa"UR+5UR+5:HnO!UR+5UR+5:HnU(dYU(aRX�R-5;a?UR5TUR5'UR.R1S5 GMS
n
UR.R1SX�4-5 GM2 U
(ag[T5HdnUR2R5U5Vs/sHnU[6:wdMUPM nnU(dMC[9U4SjU55(dM_UTU'Mf XAT4$s snfs snf)z`Define which revisions are going to be rebased and where

repo: repo
destmap: {srcrev: destrev}
r\rXs&cannot rebase onto an applied mq patchsno matching revisionsrzrc�"�UR5$r?)r�)r�s r-�revof�buildstate.<locals>.revof�s
���u�u�w�r,)�keyr*r.Ns!source is a child of destination
Fs rebase onto %s starting from %s
c3�L># �UHnTRU5U:Hv� M g7fr?)rk)r�rrs  �r-r��buildstate.<locals>.<genexpr>�s����>�g��5�9�9�Q�<�1�,�g�s�!$)r�r�r`rJrVr2rir�r
rLrr�r r�r��dict�fromkeysr�rKrrDr1rbrUr�r�rrr7)r<rhr[rrer��	mqapplied�	sortedsrcr�rp�emptyrebase�rootr�
commonbaser�
samebranchr�rrbrs                   @r-r�r��sw�������I��d����!�J�
�$�)�)�+��15�����A��A�!�&�&�\�%�%�'��	�A��w�~�~�� �9�,��"�"�1�%N�#O�P�P��Z��(�)�I�����q�!9�:�;�;�
����-��1��6�7�E�����q�!9�:�;�;��
�5�$�E��M�M�)�W�-�E��i�.�A�%�K����D�H�H�J�'�(���]�]�4�(�
����"�"�1�%I�#J�K�K�����:�D��w�w�y� �!�[�[�]�d�k�k�m�;�
�!�[�[�]�d�k�k�m�;�
��
�t�|�|�~�/E�%)�H�H�J��d�h�h�j�!����
�
�C�D�������
�
�:�d�\�I�J�)�*���e�}��"�n�n�7�7��<�M�<���W��1�<��M��7�s�>�g�>�>�>��E�#�J�	�
��%�%��gB��^Ns�&L �L%�&L%c	
�\�URRn	0n
0n[R"U[R5(+n/n
[UR
55H�up�US:�dM
X�:wdMU	"U5nU=(d U	"U5nUUU'SnX�;a!U(dXR5(dSnOU(aU
RU5 OU4nUcM{UU
U4'M� U
(aU4U
[U
5'U(a�URnURnURn0nU
R
5H6unnUH*nU"UVs/sHnU"U5PM
 snSS9UU"U5'M, M8 U"USSS9nURUS	9 U(a0n
[R"XS
X�S9 gs snf)abdispose of rebased revision at the end of the rebase

If `collapsedas` is not None, the rebase was a collapse whose result if the
`collapsedas` node.

If `keepf` is not True, the rebase has --keep set and no nodes should be
removed (but bookmarks still need to be moved).

If `backup` is False, no backup will be stored when stripping rebased
revisions.
rNr+snode)rWsoldnodesnewnodes)rr�value)�nodechangesr6r{)r�r2rr�rr�r�rr;�hexfunc�
formatlist�
formatdictr�r�cleanupnodes)rUr<rhrrjrnrtrYr��tonode�replacements�moves�stripcleanup�collapsednodesr�r��oldnoder;�succs�hf�fl�fd�changes�oldns�newn�oldn�nrs                            r-rcrcs���,�^�^�
 �
 �F��L��E��)�)�$��0I�0I�J�J�L��N��e�k�k�m�,����Q�;�6�=��S�k�G�!�3�V�F�^�G�$�E�'�N��E��~��t�y�'9�'9�';�';��E����%�%�g�.� �
��� �+0��g�Z�(�-��/:�n��U�>�*�+�	�
�Z�Z��
�]�]��
�]�]����'�-�-�/�K�E�4���$&�t�'<�t�!��1��t�'<�7�$K���4��!��0���j��D��
���K��(��������Y��M��(=s�	F)c��URS5(GahURSS5(a*[S5n[S5n[R"XVS9eUR5 UR
5 URS5(aUS	URS5 [R"US	S
9 [R"U[S5S9 [U5n[RnSn	U	[lU"X/UQ70UD6n
U[l[U5nX�:�aES
U;aUS
	SU;aUS	[URRUS95nX�S'[!X40UD6 SSS5 SSS5 W
$URS5(a[R"[S55eU"X/UQ70UD6n
U
$!U[lf=f![R"a~ [$R&"U5up�nX�SR)5:XaUR+[S55 N�UR+[S55 [,R."X5 N�f=f!,(df   GN=f!,(df   W
$=f)zCCall rebase after pull if the latter has been invoked with --rebaser�r�r�s,rebase destination required by configurations)use hg pull followed by hg rebase -d DESTr�r�sC--update and --rebase are not compatible, ignoring the update flag
T)�	skipmergesCcannot pull with rebase: please commit or shelve your changes firstc��gr?r+)r��kwargss  r-�_dummy�pullrebase.<locals>._dummyYs��r,r�r�)�startr�r\r�s%nothing to rebase - updating instead
Nr?s%--tool can only be used with --rebase)rkrrrr
r�r�r�r�r	r�rHrK�postincomingr�r�rHr��NoMergeDestAbortr�
destupdater�r�r
r�)�origrUr<r�rdr�r��revsprepull�origpostincomingr��ret�revspostpullr:r��_a�_bs                r-�
pullrebaser�=s@���x�x����
�=�=��&;�<�<��C�D�C��A�B�D��"�"�3�2�2�
�Z�Z�\�4�9�9�;��x�x��!�!���N����)��

�#�#�D�D�9��!�!���B��
��d�)�K�&�3�3��
�$*�G� �
8��2�3�d�3�d�3��'7��$��t�9�L��)��D�=��U���t�#��X�� ����!4�!4�;�!4�!G�H�	�%.�\�"�2��2�,�t�,�U'�\�t�J�	�8�8�F����"�"�1�%M�#N�O�O��2�+�d�+�d�+���J��?(8��$�� �-�-�	2�"*�"5�"5�d�";�K�C�R��4�j�n�n�.�.��	�	�!�$:�";�<��	�	�!�$M�"N�O�!����1�	2��W'�;��\�\�t�J�si�)I:�:BI(�G�AI(�"G�.I:�
G�I(�AI%�0I(�20I%�"I(�$I%�%I(�(
I7	�2I:�:
J	c�^�0n[5nURnURRn[UR	S55nUH�nURU5n	[[R"URU	/55n
U
RU	5 U
Vs1sH
o�"U5iM nnURS5 U
(aURU5(aSX8'M�TUn
UH nURX�5(dMX�U' M� X�;d[U4SjU55(dM�URU5 M� UU4$s snf)aUFigure out what to do about about obsolete revisions

`obsolete_with_successor_in_destination` is a mapping mapping obsolete => successor for all
obsolete nodes to be rebased given in `rebaseobsrevs`.

`obsolete_with_successor_in_rebase_set` is a set with obsolete revisions,
without a successor in destination, that would cause divergence.
s	extinct()Nc3�,># �UH	oT;v� M g7fr?r+)r�r�rhs  �r-r��)_compute_obsolete_sets.<locals>.<genexpr>�s����/O�h��W��h�s�)rir�r#r$rHr2rr%r&�remove�discard�issubsetr6r8r�)r<rrhrxryr8r$�extinctrevs�srcrev�srcnode�
successorsr��succrevs�dstrev�succrevs  `            r-r�r��s.���.0�*�,/�E�)�	
���B��h�h���G��d�i�i��-�.�K����'�'�&�/����.�.�t�}�}�w�i�H�I�
����'�"�(2�3�
�1�G�A�J�
��3�������X�.�.�{�;�;�=A�2�:��V�_�F�#���#�#�G�4�4�EL�6�B��$��(�C�/O�h�/O�,O�,O�9�=�=�f�E�- �2	/�-����%4s� Ec���UR5 UR5 [X5nURSS9 SSS5 SSS5 g!,(df   N=f!,(df   g=f)NTr�)r�r�rXr�)rUr<r�s   r-�abortrebaser��sA��	
����t�y�y�{��d�'��
�%�%�d�%�3�#���{�{����s!�A�A�A�
A	�A�
A-c��UR5 UR5 [X5n[RRU5n[R"U5 URSS9nUbUsSSS5 sSSS5 $URS5 UR5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)NFr�)r�r�rXr�rr�rr�r�r(rp)rUr<r�r�r�s     r-�continuerebaser��s���	
����t�y�y�{��d�'��
�
%�
%�
*�
*�4�
0���!�!�"�%��/�/��/�>�����
#�{���	���T�"�
����#���{�{����s/�C�AB;�6	C�	!B;�*C�;
C		�C�
Cc	�6�URRS5(dg[X05nUR5 URn[UR5Vs/sHoUS:�dM
UPM sn5nUR[S5UR[S5S5U-UR[S5S5[U5U-
-4-5 g![
Ra [S5nURU5 gf=fs snf)	Nr`s8rebase: (use "hg rebase --abort" to clear broken state)
rs#rebase: %s, %s (rebase --continue)
s
%d rebasedsrebase.rebaseds%d remainingsrebase.remaining)r�r�rXr�rr
r�rr�rKr��label)rUr<r�rr�r��
numrebaseds       r-�summaryhookr��s����8�8�?�?�>�*�*����d��+��
�������������:��A��6�a��:�;�J��H�H�	�
1�2��H�H�Q�}�%�'8�9�J�F��H�H�Q��'�)<�=��5�z�J�&�
(�
�	
���� � ���L�M��
����
��	��
;s�(C �"	D�/D� 0D�Dc	�f�[R"[RS[5nUSRSSS[
S545 USRSSS[
S545 [RRS[5 [R"SS	S
S
[[S9 g)Nspullr*r,r6s'rebase working directory to branch headr�r�sspecify merge tool for rebaser`T)�fname�stopflag�continueflag�	abortfunc�continuefunc)r�wrapcommandr
�tabler�rrr	�summaryhooksr�r�r|�
addunfinishedr�r�)rU�entrys  r-�uisetupr��s����"�"�8�>�>�7�J�G�E�	�!�H�O�O�	�i��q�!K�L�M��
�!�H�O�O�T�7�C��+K�)L�M�N������Y��4���������#�
r,r?)F)NFNT)Wr��
__future__rrH�mercurial.i18nr�mercurial.noderrr�	mercurialrr	r
rrr
rrrrIrr�rrrrrrrrrrrrrrr|r r�r�r��cmdtablerS�configtable�
configitem�
testedwithr.r4r=�revsetpredicaterErQrVrX�
dryrunopts�
formatteropts�confirmopts�CATEGORY_CHANGE_MANAGEMENTr�r�r�r�r�r�r6r7rErBr�r'rCrRrar�r�r�r�r r�rcr�r�r�r�r�r�r+r,r-�<module>r�s����#�	����
�������B
��
�
�,��
��
�
�
�H�
%����
�
!�
!�+�
.�
�
��#���#�
�
�$�
��+�+�-���� �
E�!�
E��)�*�#�+�#�,�J�J�Z	�
�
���
�F�G�
�f�I�	
�
���
�N�O�
�f�I�	
�
�v�r�1�6�7��6��C����
�4�5�
�f�I�	
�

�k�5�!�$F�"G�H����
�4�5�
�g�J�	
�
�w��q�!D�E�F����
�7�8�
�g�J�	
�
�w��q�!<�=�>�	�o�u�a�(E�&F�G�	
�y�%��?�!3�4�	
�~�u�a��&8�9�	
�w��Q�4�5�6�	�g�u�a� :�;�<�	
�{�E�1�%F�#G�H�	
�x���"@� A�B����
�:�
�		
�_8�r���s9�t���u:�v���w;�x�G�H��3�3�@�BE1�C@�BE1�P<�~6�
E&�P^�B�4�8�$2>�jK�\F�,�u$�p�3�l�A�
�<��4@&�R�
���9N�xB�J*�Z4�	��0r,

Youez - 2016 - github.com/yon3zu
LinuXploit