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__/rebase.cpython-39.opt-1.pyc
a

�+�b�H�@s~dZddlmZddlZddlZddlmZddlmZm	Z	m
Z
ddlmZddl
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z)m*Z*dZ+d	Z,hd
�Z-iZ.e!�/e.�Z/iZ0e!�1e0�Z1e1ddd
d�dZ2dd�Z3dd�Z4dd�Z5d�dd�Z6e!�7�Z7e7d�dd��Z8e7d�dd��Z9dd�Z:Gd d!�d!e;�Z<e/d"d#d$ged%�ed&�fd'd(ged)�ed&�fd*d+ged,�ed&�fd-d.d/ed0�ed&�fd/d1d
ed2�fd3d4d/ed5�ed6�fd7d8d
ed9�fd:d;d/ed<�ed=�fd>d?d
ed@�fd/dAd
edB�fdCdDd
edE�fdFdGd
edE�fdHdId/edJ�fd/dKd
edL�fdMdNd
edO�fdPdQd
edR�fd/dSd/edT�fgej=ej>ej?edU�e/j@dV�dWdX��ZAdYdZ�ZBd�d[d\�ZCd]d^�ZDd_d`�ZEdadb�ZFdcdd�ZGdedf�ZHdgdh�ZIdidj�ZJdkdl�ZKdmdn�ZLdodp�ZMdqdr�ZNdsdt�ZOdudv�ZPdwdx�ZQdydz�ZRd{d|�ZSd}d~�ZTdd��ZUd�d�d��ZVd�d��ZWd�d��ZXd�d��ZYd�d��ZZd�d��Z[d�d��Z\dS)�z�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
�)�absolute_importN)�_)�nullrev�short�wdirrev)�open)�	bookmarks�cmdutil�commands�copies�destutil�
dirstateguard�error�
extensions�
logcmdutil�merge�
mergestate�	mergeutil�obsolete�obsutil�patch�phases�pycompat�	registrar�repair�revset�
revsetlang�rewriteutil�scmutil�smartset�state�util���s-1>s-3s-4s-2s-5�devel�rebase.force-in-memory-mergeF)�defaultsships-with-hg-corecCsdS)N��r'r'r'�2/usr/lib64/python3.9/site-packages/hgext/rebase.py�_nothingtorebaseVsr)cCsD|���dd�}|dur ||d<|���dd�}|dur@||d<dS)N�sourcesintermediate-source)�extra�get)�ctxr+�sr'r'r(�
_savegraftZsr/cCs|��|d<dS)N�branch)�branch)r-r+r'r'r(�_savebranchcsr2cCstj|d|d|d�S)zhsmall wrapper around destmerge to pass the right extra args

    Please wrap destutil.destmerge instead.�rebaseF)�action�	sourcesetZonheadcheck�	destspace)rZ	destmerge)�repor5r6r'r'r(�_destrebasegs�r8s_destrebasecCs6d}|dur t�|t�|�|�}|t�t||�g�@S�N)r�getsetrZfullreposet�basesetr8)r7�subset�xr5r'r'r(�_revsetdestrebasewsr>s_destautoorphanrebasecCsp|��}|�d�}t�|||���}|r0||vr8t��St�||�}t	|�dkrft
�td�||f��t�|�S)Ns
obsolete()r&s8ambiguous automatic rebase: %r could end up on any of %r)
�
unfiltered�revsrr:�firstrr;rZorphanpossibledestination�lenr�
StateErrorr)r7r<r=�unfiZ	obsoleted�src�destsr'r'r(�_revsetdestautoorphanrebase�s
��rGcCstj|��j|dd�S)zshort description for a contextr3)�command)r	Zformat_changeset_summaryr7�ui�r-r'r'r(�_ctxdesc�s�rKc@s�eZdZdZd#dd�Zedd��Zd$dd	�Zd
d�Zdd
�Z	dd�Z
dd�Zd%dd�Zdd�Z
dd�Zdd�Zd&dd�Zdd�Zdd �Zd'd!d"�ZdS)(�
rebaseruntimez2This class is a container for rebase runtime stateFNcCs|duri}d|_d|_||_||_||_d|_t|_i|_d|_	i|_
t�|_|�
dd�|_t�|t�|��|_|�
dd�|_|�
d�}tg|_|r�|g|_|�dd�|_|�
dd�|_|�
dd�|_t�|jd	�|_i|_t�|_||_ ||_!t"�#|d
�|_$dS)NF�collapse�dateZextrafnsrewrites
backup-bundleZkeepZkeepbranchesr3�rebasestate)%�prepared�resume�_reporI�opts�
originalwdr�externalr �activebookmark�destmap�set�skippedr,�	collapsefr	Z
logmessager�byteskwargs�collapsemsgrNr/�extrafns�
configbool�backupf�keepf�
keepbranchesfrZskip_empty_successor�skipemptysuccessorf�&obsolete_with_successor_in_destination�%obsolete_with_successor_in_rebase_set�inmemory�dryrun�statemodZcmdstate�stateobj)�selfr7rIrerfrS�er'r'r(�__init__�s>

�zrebaseruntime.__init__cCs|jr|j��S|jSdSr9)rPrRr?�rir'r'r(r7�s
zrebaseruntime.repocCsV|r|jdd|jdd�n8|j�dd��}|�|�Wd�n1sH0YdS)z*Store the current status to allow recoveryrO)rOsplain)�location�wN)Zaddfilegenerator�_writestatusr7�vfs)ri�tr�fr'r'r(�storestatus�s�zrebaseruntime.storestatusc	Cs
|j}|�||j��d�|�d�|�||j��d�|�dt|j��|�dt|j��|�dt|j��|�d|j	p�d�|j
}t�|j
�D]V\}}||��}|dkr�||��}nd|}|||��}|�d|||f�q�|j�d�dS)	N�
s%d
�%s
�r�%ds	%s:%s:%s
srebase status stored
)r7�writerT�hexrU�intrZr`rarVrWr�	iteritemsr rI�debug)	rirrr7rW�d�v�oldrev�newrevZdestnoder'r'r(ro�s"
zrebaseruntime._writestatuscCs�|j��st�|jtd��|��}|jj�d�|d|_	|d|_
|d|_|d|_|d|_
|d|_|d	|_|d
|_|d|_dS)
z"Restore a previously stored statusr3srebase status resumed
�
originalwd�destmap�state�skipped�collapse�keep�keepbranches�external�activebookmarkN)rh�existsr	Zwrongtooltocontinuer7r�_readrIr|rTrWr rYrZr`rarUrV)ri�datar'r'r(�
restorestatuss








zrebaseruntime.restorestatuscCsTd|_|j}dddtddd�}d}i}i}|�d�}t|�����D�]N\}}|dkrh||��|d<qD|dkr�|r�||��}qD|dkr�||��|d<qD|d	kr�tt	|��|d
<qD|dkr�tt	|��|d<qD|d
kr�tt	|��|d<qD|dk�rt
|�dk�rd|v�s||d<qD|�d�}	||	d��}
|	d}|tv�rDqDt
|	�dk�rd||	d��}n|}|||
<|t
k�r�t||
<qD||��||
<qD|ddu�r�t�td���||d<||d<t�}
|d
�st|���}t|���D]2\}}|tk�r||v�r|
�|�|�|��q�|
|d<|j�dd�dd�t|
�D���pJd�|S)NT)r�r�r�r�r�r�rOrr�r&�r��r��r��r���Q�:r�s.hg/rebasestate is incompleter�r�r�scomputed skipped revs: %s
� css|]}d|VqdS�rwNr'��.0�rr'r'r(�	<genexpr>[rvz&rebaseruntime._read.<locals>.<genexpr>rv)rPr7rrp�	enumerate�read�
splitlines�rev�boolrzrB�split�legacystates�
revtodostr�revtodor�AbortrrX�values�sorted�items�addrIr|�join)rir7r�Z
legacydestr rWrr�i�l�argsrr��destrevrY�seen�old�newr'r'r(r�sv�
"






��zrebaseruntime._readcs��jr
dS�j�dd�sdS�fdd��jD�}t�j|�j�\�_�_t	�j�}|�
�j�t�j�j||�t�
�jtj�r�t	��_n6�j�d�j�j�D] }�j�|d��j�|d�q�dS)z<Compute structures necessary for skipping obsolete revisionsN�experimentalsrebaseskipobsoletecsh|]}�j|��r|�qSr')r7rr�rlr'r(�	<setcomp>frvz8rebaseruntime._handleskippingobsolete.<locals>.<setcomp>sdescendants(%ld) and not %ld)r`rIr^r �_compute_obsolete_setsr7rWrcrdrX�update�_checkobsrebaser�	isenabled�allowdivergenceoptr@�pop)riZobsoletesetZ
skippedsetr�r'rlr(�_handleskippingobsolete`s*�

�z%rebaseruntime._handleskippingobsoleteTcCs�d|_z"|��|��t|j|�|_Wnbtjy�|rht|j�t	|j�|jj
�td��YdStd�}td�}tj
||d��Yn0|r�|o�|j}|j||||d�SdS)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�	suppwarnsrf�confirm)rQr�r��restorecollapsemsgr7r\r�RepoLookupError�clearstatus�clearcollapsemsgrI�warnrr�r_�_abort)ri�isabortr�r�rfr��msgr�r'r'r(�_prepareabortorcontinueys4

��
�z%rebaseruntime._prepareabortorcontinuec

Cs�|s
t�St|j||j�}|s4|j�td��t�S|\|_|_|_	|jr�t
|j���}t|�dkrrt
�td���tt|��}|jjj|gdd�}t|j|j	|�|_tt
|����D]0}|j|}|��r�|js�|j�td�|�q�|��|j�s�t
|���}|t
|j�8}||j8}i}t�|jtj��r8ddi}zD|j� |��"t!j"|j|d	d
�Wd�n1�sp0YWnBt
j#�y�}	z&|	j$du�r�td�|	_$|	�WYd}	~	n
d}	~	00d|_%dS)N�nothing to rebase
r&s3--collapse does not work with multiple destinationsT)Z	inclusives reopening closed branch head %s
)r�sevolution.allowdivergencestruer3)r4s&use --keep to keep original changesets)&r)�
buildstater7rZrI�statusrrTrWr rXr�rBr�
InputError�next�iter�	changelogZ	ancestors�externalparentrUr�Zclosesbranchrar�r`�keysrcrdrr��createmarkersopt�configoverriderZprecheckr�r�rP)
rirW�resultrFr��
destancestors�dest�	rebaseset�	overridesrjr'r'r(�_preparenewrebase�sN��

�6
zrebaseruntime._preparenewrebasecCsf|jr.ddlm}||j�|_|jj�d�n|jd|_|jj�d�|jjjdd|j|jd�dS)Nr)�overlayworkingctxsrebasing in memory
srebasing on disk
r3susing in-memory rebase: %r
)Zrebase_imm_used)reZmercurial.contextr�r7�wctxrIr|�log)rir�r'r'r(�_assignworkingcopy�s�z rebaseruntime._assignworkingcopyc
s4|��|j|j}}|jrn|j�dt�|jrnt�}|j	D]0}|�
||���t|�dkr<t
�td���q<|jpx|j|_|jr�t�|�|��|r�|�|�dd�t�|j	�D�}|jjtd�td�t|�d���fd	d
�}t|j�D],}|j�d|�}	|	D]}|�|||��qq���|�td��dS)
Nrr&s'cannot collapse multiple named branchescSsg|]\}}|tkr|�qSr')r�)r��kr~r'r'r(�
<listcomp>�rvz0rebaseruntime._performrebase.<locals>.<listcomp>srebasings
changesets)Zunit�totalcs�jd|��|fd�dS)N�%d:%s)�item)Z	incrementr�rJ��pr'r(�progresssz.rebaseruntime._performrebase.<locals>.progressssort(%ld, -topo)srebase merging completed
)r�r7rIrar]�insertr2rZrXr r�r1rBrr�rrVZ_activebookmarkrZ
deactivatersrr{Zmakeprogress�
sortsourcerWr@�_rebasenodeZcomplete�note)
rirqr7rIZbranchesr�Zcandsr�r<Z
sortedrevsr'r�r(�_performrebase�s:
�

�zrebaseruntime._performrebasec
s|j}||}|dur|��}|jsL|j�t�||�fdd�|j��D��}|j}|durb|��}d|�	�i}|j
D]}|||�qtt|��t
j�}	|	|jd�}
|j�|
d��P|jr�t||j||||��|d�}nt|||||��|d�}|Wd�S1�s0YdS)	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.Ncs,i|]$\}}|tkr��|���|�g�qSr')r��node)r�rr���clr'r(�
<dictcomp>s�z/rebaseruntime._concludenode.<locals>.<dictcomp>s
rebase_source))sphasess
new-commit)�ui�allowemptycommitr3)r�r+�	commitmsg�editor�userrN)r+r�r�r�rN)r7�descriptionrZr�rZupdate_hash_refsr r�rNryr]�maxZphaserZdraftrbrIr�re�commitmemorynoder�r��
commitnode)rir�r�r�r7r-rNr+�cZ	destphaser��newnoder'r�r(�
_concludenodesV
��

��
�	zrebaseruntime._concludenodec
Cs�|j|j|j}}}||}t|�}|j||krJ|�td�|��nX||jvr|td�|}	|j�|	�|j�	|��n&||j
v�r|j
|}
|
dur�td�|}	nt||
�}td�||f}	|j�|	�|j�	|�tt|||j
|j|j��}||j|<�n�|j|tk�r�|�td�|�||�t|||j
|j|j|j
�\}
}}|j�r�|j����|
k�r�|j�d�d|_�nd|�d	d
�i}|�|d���zt|||
|||j|jd�Wn�tj�yp|j�r�t�d��|j�r�|�td
��zt�|�Wn(tj�y.t |�t!|��Yn0d|_"|�#�t$j%||
|jd�t|||
|||j|jd�Yn0Wd�n1�s�0Y|j�s�|t&k}t�'|d�}tj(fd|i|��}|j�)||
�*�||�*��|�+||�}nd}|du�rB||��|j|<|�dt,|��||�-��r�|�.td�|�n>|j�sh|�.td�|�|j�	|�|
|j|<|�d|
�n |�td�|||j|f�|�s�|�/�dS)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�toolrvr3)r�sDhit 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
)0r7rIrSrKr r�rrdrYr�rcr��
adjustdestrWr��
defineparentsrQr��p1r�r|r,r��
rebasenoderZr�InMemoryMergeConflictsErrorrf�ConflictResolutionRequiredr	�
bailifchangedr�r�r�rer��mergemodr�rZ
mergeeditform�getcommiteditor�
setparentsr�r�r�isemptyr�rs)rirqr�Z
progressfnr7rIrSr-Zdescr�ZsuccZsuccdescr�r��p2�baser�Zmergingr�r�r�r'r'r(r�Fs�
���
����

�
	
���,	
������
�zrebaseruntime._rebasenodecCs�|j|j|j}}}|�dt�|��}|��|j�r&t|t	|j
�|j|j
|j|j
�\}}}|�d�}d}	|jrz|j}
n6d}
t|j
�D]"}||jvr�|
d||��7}
q�d}tj||	d�}t|j
�}
|j�||��||j���|j|
||
d�}|du�r&||��}|j
D]}||j
|<�qd	|��v�rLt||j
|jfi|��|j
�|j|j�}|d
k�rn|j}|dd�|d��D�v�r�|�t d
��t!�"||�d}|j�r�|j#�s�|}t$|||j|j
|j||j#||j%d�	t&|�t'|�|�t d��t(j)|�*d�dd�|j�r8t+|j�}|�t d�|�|�,�|j-�r~|j-|j.v�r~|d��|j.|j-k�r~t/�0||j-�dS)Nr3�editsrebase.collapsesCollapsed revisions
* %sT)r
r�)r��qtiprcSsg|]}|���qSr'�r��r�r�r'r'r(r�rvz/rebaseruntime._finishrebase.<locals>.<listcomp>s0update back to initial working directory parent
)�fmr�srebase completed
sundo�Z
ignoremissings%d revisions have been skipped
�.)1r7rIrS�	formatterrr[Z	startitemrZr��minr rWrYrcr,r\r�r�r	rr�r�rr�rUr�r��tags�updatemqrT�parentsr�rrr�r`�clearrebasedr_r�r�r!�
unlinkpathZsjoinrB�endrV�
_bookmarksr�activate)rir7rIrSrr�rZ_baseZeditoptr�r��rebasedr�Z
revtoreuser�r�rZnewwd�collapsedasZ
skippedlenr'r'r(�
_finishrebase�s��



 �


�
�
��zrebaseruntime._finishrebasec
s��j��zz�fdd��j��D�}�fdd�|D�}d}|rp�jjtd�d��fdd�|D��td	�d
�d}t�}|r�t�j�	|��}|t|�r��j�td��d}|�r6|r�d
d���d|�D�}	t|�}
|
�
�j���|s�|s�|
�
�j��d��|
v}|�rt���j�|�r6tj�j�|	|d��j�rZ�j�jv�rZt���j�Wt��t��|�s��j�td��n(t��t��|�s��j�td��0dS)z-Restore the repository to its original state.cs2g|]*\}}|dkr||kr|�j|kr|�qS�r�rW)r�r�r.rlr'r(r�.s�z(rebaseruntime._abort.<locals>.<listcomp>csg|]}�|��s|�qSr')Zmutable)r�r}�r7r'r(r�3rvTs-warning: can't clean up public changesets %s
�, c3s|]}t�|�VqdSr9��bytesr�r r'r(r�8rvz'rebaseruntime._abort.<locals>.<genexpr>s see 'hg help phases' for detailsr�FsDwarning: new changesets detected on destination branch, can't strip
cSsg|]}|���qSr')r�r
r'r'r(r�Ks�
roots(%ld)r�r�srebase aborted
r)r7r r�rIr�rr�rXr��descendantsr�rWr�r�rTr�r�clean_updater�striprVrrrr�r�)rir�r�rfr�rZ	immutableZcleanupr&ZstrippointsZupdateifonnodesZshouldupdater')r7rir(r�%sd
�����
��zrebaseruntime._abort)FFN)N)TFFF)N)TFFF)�__name__�
__module__�__qualname__�__doc__rk�propertyr7rsror�r�r�r�r�r�r�r�r�rr�r'r'r'r(rL�s&
1


M�
"4-
:QrLr3�sr*s5rebase the specified changesets and their descendantssREV�bsbases=rebase everything from branching point of specified changeset�rsrevsrebase these revisions�d�destrvs#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]...)Zhelpcategoryc

Ks�|�dd�}t�|ddd�}|rDt�||ddg�t�||gd��t�|dd�t�|d	d
d�|sr|��durvd
}|�d�r�t|�dh}t�|d|�t|�|�d���}t	�
d|�g|d	<d|d<|�d�s�|�d�r�t||||�S|dk�r�t||�}|�
���|����|��|j�r2t�td���t�|tj�}|j�sd|�sdtjtd�td�d��t�||j�|��Wd�Wd�dS1�s�0YWd�n1�s�0Yn�|�rzzNddi}	|�|	d��$t|||||d�Wd�WS1�s0YWnVtj�yv|�dd��rB�|�td��t |�t!|�t||||d
d�YS0nt||||�SdS)aumove 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.

    r3sexperimental.inmemory�abort�stop�continuer��dry_run)r��sourcer	r�r�rAr	NFZauto_orphanss%ld and orphan()s_destautoorphanrebase(SRC)r�s!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�r3�singletransactionT)rer#r$s?hit merge conflicts; re-running rebase without in-memory merge
)"r^r	Zcheck_at_most_one_argZcheck_incompatible_arguments�currenttransactionr,rX�listr@r�
formatspec�
_dryrunrebaserL�wlock�lockr�rZrrCrrr�Zallowunstableoptr`rr'rTrr��	_dorebaserr�r�r�)
rIr7rSrer4Zdisallowed_optsZuserrevs�rbsrtZ
allowunstabler�r'r'r(�rebasejsx=
�
�
�

���
P8��rLc	Cs�t||dd|d�}|�d�}|r0|�td��n|�td��|����4|����d}�z�z�ddi}|�|d��|t|||||�}|t�kr�d}|Wd�WW|r�|j	ddd|�d	�d
�Wd�Wd�SWd�n1s�0YWnxt
j�y`|�td��YW|�rD|j	ddd|�d	�d
�Wd�Wd�dSt
j�yzd}�Yn�0|�r�|�td
��|�
td���s�|��n|j	ddd|d�d}n|�td��W|�r�|j	ddd|�d	�d
�Wd�Wd�dSW|�rN|j	ddd|�d	�d
�n |�rL|j	ddd|�d	�d
�0Wd�n1�sd0YWd�n1�s�0YdS)NT)rerfrSr�sstarting in-memory rebase
s8starting dry-run rebase; repository will not be changed
rBr3Fr@)r�r�r�rfshit a merge conflict
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
r)rLr,r�rrHrIr��_origrebaser)r�rrr�Zpromptchoicer)	rIr7r4rSrKr�Z
needsabortr��resr'r'r(rGss�
��
��@��
��������rGcCs t||||d�}t|||||�S)N)rS)rLrM)rIr7r4rSrerKr'r'r(rJ�srJc
Cs�|����r|����F|�d�rjzt�d�r2d}WntyJd}Yn0d|}td�|}t�|��|j	r�|j
s�t�td���|�r|j
r�t�td���|d	kr�|�d
d�r�|�td��|d
kr�tj
�|�}t�|�|j|d	kd�}	|	du�r�|	Wd�Wd�Sn�|�d�}
t|||j|�dd�|�dg�|�dg�|�dg�|
d�}|�|�}	|	du�r�|	Wd�Wd�St||j	�d}|�dd�}
|
�r�|�d�}t�|��td}|
�r�|j�s�t�|d�}t�|��*|�|�|j�s|��Wd�n1�s$0YWd�n1�sD0YWd�n1�sd0YWd�n1�s�0YdS)N�interactiveshisteditrvs --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��
_destspacer�rAr	r��r6r3rC)rHrIr,r�find�KeyErrorrrr�r\rZr��
mergestatemodrr�r�checkunresolvedr��_definedestmaprer��storecollapsemsgr^Ztransactionr!Zacceptinterventionr
r�rfr)rIr7r4rSrKZenablehistedit�helpr��ms�retcoder6rWrqZsingletr�dsguardr'r'r(rM�sv


���
��

"




�


 

rMc	s�|durg}t���|s$t���|�dd�rJ|sJtjtd�td�d��d}|rxt��|�}	|	st|�	td��dS�n�|r�t��|�}
|
s�|�	td��dS��
d	|
|
�}	�n�t��|p�d
g�}|s�|�	td��dS|r�t��|�}n�t�||d�}t
|�}g}i}
|D]2}��
d
||�����}|
�|g�|g|
|<�qd|
v�rV|
��t�|
�D] \}}|t��
d||��7}�q`��
d|�}	|	�sZt|�|��gk�r�|�r�|�	td�|�n|�	td��n���
d||����s,|�r|�	td�d��fdd�|D��|f�n|�	td�|�n*|�	td�d��fdd�|D��|f�dSt|	v�rrt�td����d
��|	v}|jdd||d�|�r�|�r�t���t���|�sԈt�|	|d�}t
|�}t�d|	�}d|i}|du�r�ztj�||d �}Wn�tj�y�i}|	D]�}t�d!|�|d"<�j|gd#|d$�}t|�}|d%k�rf|��||<n8|d&k�r�|�td'��|�nt�td(��|���q Yn0|du�r�|����fd)d*�|	D�}|�s�|�	td+��dS|S),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)rs5empty "base" revision set - can't compute rebase set
rRsancestor(%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
�+c3s|]}t�|�VqdSr9r"r�r r'r(r�]rvz!_definedestmap.<locals>.<genexpr>sVnothing to rebase - working directory parent is already an ancestor of destination %s
s nothing to rebase from %s to %s
c3s|]}t�|�VqdSr9r"r�r r'r(r�krvscannot rebase the working copyr3s!rebasing working copy parent: %r
)Zrebase_rebasing_wcps%ldsALLSRC)�
localaliasrwsSRCT)r�r`r&rs skipping %s - empty destination
s'rebase destination for %s is not uniquecsi|]
}|��qSr'r'r�)r�r'r(r��rvz"_definedestmap.<locals>.<dictcomp>s&nothing to rebase - empty destination
)r	�checkunfinishedrr^rr�rrZrevranger�r@Z	revsingler8r#r�rAr,�clearrr{rEr�rr�rrFrr�ZanyrevsrBr�)rIr7reZdestfZsrcfZbasefZrevfr6r�r�rEr	�rootsZbpbase�bZbp�bsZrebasingwcpZallsrc�aliasrWr�Zdestset�sizer')r�r7r(rWs�

��
��������	���	��
�




�
rWc	Cs�t�}t|�}|D]F}||kr q||��D]*}|��|vr,|��|vr,|�|���q,q|sbtSt|�dkrv|��St�	t
d�t|�d�dd�t
|�D��f��dS)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: %sr!css|]}d|VqdSr�r'�r�r�r'r'r(r��rvz!externalparent.<locals>.<genexpr>N)rXrrr�r�rrBr�rrCrr�r�r�)r7r r�rrAr�r�r'r'r(r��s&���r�c
Csbd}d|vr|d}|��|j||||||d�}|��rL|j�dd�sLdS|�|�}	|��|	S)zXCommit the memory changes with parents p1 and p2.
    Return node of committed revision.Nr0)rNr+r�r1r�r�r�)Z_compactZtomemctxrrIr^Z	commitctxZclean)
r7r�r�r+r�rNr�r1ZmemctxZ	commitresr'r'r(r��s"�
r�cCsvt��}|j�dd�s"t�|d�}|�<|j|||||d�}|j�||���|Wd�S1sh0YdS)zTCommit the wd changes with parents p1 and p2.
    Return node of committed revision.r3rC)�textr�rNr+r�N)	r!ZnullcontextmanagerrIr^r
Zcommit�dirstateZ	setbranchr1)r7r�r+r�rNr�r\r�r'r'r(r��s
�r�c
CsN||}|��r|�|�nT|d��|krL|j�d||f�t�|�n|j�d�|d}|j�|�	��||}|j�d||f�|dur�|j�d|||f�|j
�|��|���}	tj
||dd||	gd�|d	�}
|�|��||���|�rt�|||�nt�|||���|
jd
k�rJ|���r@t���n
t�d��dS)zFRebase a single revision rev on top of p1 using base as merge ancestorrs update to %d:%s
s already in destination
Ns merge against %d:%s
s   detach base %d:%s
T)r2r*sparent of source)Zbranchmerge�force�ancestor�
mergeancestor�labelsr�rr3)Z
isinmemoryZsetbaser�rIr|rr'rjrxrDr��
isancestorr�Z_updaterrZgraftcopiesr�Zunresolvedcountrrr)r7r�r�rr	rMr�Zp1ctxr-rmZstatsr'r'r(r�s@�


rc
s��|����fdd�|��D�}g}|j�|�D]j}�}|tkrd|�d||���}	|	durd||	}|�kr��|vr�|�}|tkr�t�d���|�	|�q2|S)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
    cs0g|](\}}|dkr�|�kr|�vr|�qSrr')r�r.r}�r�rWrYr'r(r�Ts�zadjustdest.<locals>.<listcomp>smax(%ld and (::%d))Ns-rev %d should be rebased already at this time)
r�r��
parentrevsrr@rAr�rZProgrammingError�append)
r7r�rWr rYrAr��prevZadjusted�	candidater'rpr(r�s&5��r�c	s^t��tj�}||}|rZ|sZ�fdd�|D�}td�}td�}tj|d�|�f|d��dS)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.
    c3s|]}t�|�VqdSr9r"r�r r'r(r�yrvz"_checkobsrebase.<locals>.<genexpr>s+this rebase will cause divergences from: %ssJto force the rebase please set experimental.evolution.allowdivergence=True�,r�N)rr�r�rrrCr�)	r7rI�
rebaseobsrevsZrebaseobsskippedZdivergenceokZdivergencebasecandidatesZ	divhashesr��hr'r r(r�ls	�r�ccsB|jjj}t�|j||��g�D]}||�}|dur"|Vq"dS)z,yield revision numbers for successors of revN)r��index�get_revr�
allsuccessors�obsstorer�)rDr�ryr.r�r'r'r(�
successorrevs�s

r|csf�j��j�|�}�j���}ttg�t��|||��t|�}tdd�|dd�D��rj�d�d<�n.t|�D]�\�}	|	}
t���fdd�t	�|	�D��r���}
n|	|vr�||	dkr�||	}
t�d���D]R\}}|tkr�qԈ|
|�r�t}
qԈ||
�r�|
�|<t}
|�||||<|�<q�|
��<qr�dtk�rb|d�dk�rb��
�|�
�t��t|�k�r�|�v�r�t�
td����f��t��fdd��D���r�t�
td	���t�fd
d�t|�D��dk�r8ddg}
t|�D]�\�}|tk�s�|�v�r�q�t|�|h}t��d|||��}|�r�fdd
�|��D�}�fdd
�|D�}t��d|||��|
�<�q�tdd�|
D���r8tdd�t|
�D��\}�|dk�r�td���fdd�|
D��}t�
td����|f���dk�r8��tk�r���d�d<��<|�|d|d<|�<|d}�j�dt����d�d|fS)aReturn 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.
    css|]}|tkVqdSr9�rr�r'r'r(r��rvz defineparents.<locals>.<genexpr>r&Nrc3s|]}�|���VqdSr9r')r�r=)rFr�ror'r(r��rvs>cannot rebase %d:%s without moving at least one of its parentsc3s |]}|tko��|�VqdSr9r}rh)ror�r'r(r��rv�!source is ancestor of destinationc3s"|]}|tkr|�vrdVqdS)r&Nr})r�rd)�newpsr'r(r�rvs(%ld %% (%d+%d))cs$g|]\}}|dkr|�vr|�qSrr')r�r�r})�
obsskippedr'r(r�sz!defineparents.<locals>.<listcomp>cs"g|]}��|�dtkr|�qS)r&)rqrr�r�r'r(r�ss%ld - (::%ld) - %ldcss|]}|duVqdSr9r'�r�r@r'r'r(r�rvcss&|]\}}|durt|�|fVqdSr9)rB)r�r�r@r'r'r(r� s�s or c3s.|]&}|durd��fdd�|D��VqdS)Nr!c3s|]}d|�|fVqdS)r�Nr'r�r r'r(r�+rvz*defineparents.<locals>.<genexpr>.<genexpr>)r�r�r r'r(r�*s�s4rebasing %d:%s will include unwanted changes from %ss future parents are %d and %d
)r��
isancestorrevrqrr�rE�allr��anyr|�reverserXrr�r�sumr@r�rr�rIr|�tuple)r7r�rWr rYr�r�Zoldps�basesr�Znp�jr=Zunwantedr	�other_basesZsiderevsr�Zmergesr�Zunwanteddescr')r�rFr�rorr�r7r�r(r��s� 



 �
�� �
�
����

����	
r�cCs<tj�|jj|�}t�t|d��D]}|�d�r"dSq"dS)z/Return true if the given patch is in git formatsrbs
diff --gitTF)�os�pathr��mqrZ
linereaderr�
startswith)r7�	patchnameZmqpatch�liner'r'r(�isagitpatchFs

r�c	sBi}|j��jdd�}t���jD]T}||j��}||vrl|j�d||jf�|jt	||j�f||<q$��
|j�q$|�r>��||���t
|dd�D]p}||vr�||\}}	|j�td�||||||f��j|d||	d||gd�q���
||d	�q���fd
d�|D�}
|
�jdd�<d�_���dS)z9Update rebased mq patches - finalize and then import themNs.revision %d is an mq patch (%s), finalize it.
T)r�supdating mq patch %s to %d:%s
r'rw)r��gitr�rcs&g|]}�j�|d�d�vr|�qS)r&r)Zguard_rer��r�r.�r�Zskippedpatchesr'r(r�{s�zupdatemq.<locals>.<listcomp>)r�Z
fullseriesrX�appliedr�r�rIr|�namer�r�Zfinishr�r�r�rZqimportZseriesdirtyZ	savedirty)r7r rYrSZmqrebaseZoriginal_seriesr�r�r�ZisgitZ	newseriesr'r�r(rOsL
�����	�rcCs.|pd}|�dd�}|�d|�|��dS)z,Store the collapse message to allow recoveryrv�last-message.txtrnruN)rprx�close)r7r\rrr'r'r(rX�srXcCs|jjddd�dS)zRemove collapse message filer�TrN)rprr r'r'r(r��sr�c
Csrz"|�d�}|����}|��WnJtyl}z2|jtjkr@�|rJd}nt�t	d���WYd}~n
d}~00|S)z*Restore previously stored collapse messager�rvs'missing .hg/last-message.txt for rebaseN)
rp�readliner(r��IOError�errno�ENOENTrr�r)r7r�rrr\�errr'r'r(r��s
$r�cCs*|��}|r|�d�|jjddd�dS)zRemove the status filesrOTrN)rDZremovefilegeneratorrpr)r7rqr'r'r(r��s
r�ccsbt|�}|r^t|�}g}|D]}|||vr|�|�q|sJt�td���|t|�8}|VqdS)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)rXr�rrrr�r)rWZsrcsetZsrclistr�r�r'r'r(r��s
r�cs�|��}�d��}d���vrT�fdd��jjD�}t|���|@rTt�t	d���t
t|��}|srt�t	d���t
��d|d��}|s�t�t	d���d	d
�}t
||d�}t�|t��t|�dk}	|D]�}
�||
��}|
�|�}||
kr�t�t	d
���||k�rv�d}
||
��k�r.|
��|
��k}n|
��|��k}|�sv|�rv||
��v�rv|
���|
��<�j�d�q�d}	�j�d||
f�q�|	�r�dSt
��D]B}dd��j�|�D�}|�r�t�fdd�|D���r�|�|<�q�||�fS)zlDefine which revisions are going to be rebased and where

    repo: repo
    destmap: {srcrev: destrev}
    rrcsh|]}�|j���qSr')r�r�r�r r'r(r��rvzbuildstate.<locals>.<setcomp>s&cannot rebase onto an applied mq patchsno matching revisionsr$rcSs|��Sr9r)r�r'r'r(�revof�szbuildstate.<locals>.revof)�keyr&r~Ns!source is a child of destination
Fs rebase onto %s starting from %s
cSsg|]}|tkr|�qSr'r}rhr'r'r(r�rvzbuildstate.<locals>.<listcomp>c3s|]}��|�|kVqdSr9)r,rh)r r'r(r�rvzbuildstate.<locals>.<genexpr>)r�r�rr�r�rXr�rrCrrEr�r�r��dict�fromkeysr�rBrlr�r1rrIr|r�rqr�)r7rWrMr�rTZ	mqappliedZ	sortedsrcrcr�Zemptyrebase�rootr�Z
commonbaser�Z
samebranchr�rr')r7r r(r��sN

r�Tc	sZ|jj}	i}
i}t�|tj�}g}
t|���D]~\}}|dkr0||kr0|	|�}|pZ|	|�}|||<d}||vr�|s�||��s�d}n|r�|
�|�n|f}|dur0||
|f<q0|
r�|f|
t|
�<|�r8|j	�|j
}|j}i}t�
|
�D]4\}}|D]&}|�fdd�|D�dd�|�|�<q�q�||dd	d
�}|j|d�|�rBi}
tj||
d||d
�dS)a~dispose 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'csg|]}�|��qSr'r')r��n�Zhfr'r(r�=rvz clearrebased.<locals>.<listcomp>snode)r�soldnodesnewnodes)r��value)�nodechangesr3r%)r�r�rr�r�r�r�rrr�ZhexfuncZ
formatlistZ
formatdictrr{r�rZcleanupnodes)rIr7rWr rYrr`rr�ZtonodeZreplacementsZmovesZstripcleanupZcollapsednodesr�r�Zoldnoder�ZsuccsZfl�fdZchangesZoldnsZnewnZoldnr�r'r�r(r	sD&rc
Os
|�d��r�|�dd�r6td�}td�}tj||d��|�����|����T|�d�rh|d=|�d�tj	|d	d
�tj
|td�d�t|�}tj
}dd
�}	|	t_
z"|||g|�Ri|��}
W|t_
n|t_
0t|�}||k�r�d|vr�|d=d|vr�|d=t|jj|d��}||d<zt||fi|��Wnbtj�y�t�|�\}
}}|
|d��k�rr|�td��n|�td��t�||�Yn0Wd�n1�s�0YWd�n1�s�0Yn2|�d��r�t�td���|||g|�Ri|��}
|
S)zCCall rebase after pull if the latter has been invoked with --rebaserLr]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)Z	skipmergesCcannot pull with rebase: please commit or shelve your changes firstc_sdSr9r')r��kwargsr'r'r(�_dummyaszpullrebase.<locals>._dummyr�rA)�startrQrr�s%nothing to rebase - updating instead
Nr�s%--tool can only be used with --rebase)r,r^rrr�rHrIr|r	rarrBr
ZpostincomingrEr�r@rLZNoMergeDestAbortrZ
destupdater�r�r�)ZorigrIr7r�rSr�r�ZrevsprepullZorigpostincomingr��retZrevspostpullr6r�Z_aZ_br'r'r(�
pullrebaseEsZ
���
Tr�c
s�i}t�}|j}|jj�t|�d��}|D]�}|�|�}tt�|j|g��}	|	�	|��fdd�|	D�}
|
�
d�|	r�|
�|�r�d||<q*�|}|
D]}|�||�r�|||<q*q�||vs�t
�fdd�|
D��r*|�|�q*||fS)aiFigure 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()csh|]}�|��qSr'r'r�)ryr'r(r��rvz)_compute_obsolete_sets.<locals>.<setcomp>Nc3s|]}|�vVqdSr9r'r�rr'r(r��rvz)_compute_obsolete_sets.<locals>.<genexpr>)rXr�rxryr@r�rrzr{�remove�discard�issubsetr�r�r�)
r7rvrWrcrdr�ZextinctrevsZsrcrevZsrcnodeZ
successorsZsuccrevsZdstrevZsuccrevr')rWryr(r��s.	



�r�c	Csj|���N|���&t||�}|jdd�Wd�n1s>0YWd�n1s\0YdS)NTrP)rHrIrLr�)rIr7rKr'r'r(�abortrebase�s
r�c	Cs�|����|���vt||�}tj�|�}t�|�|jdd�}|durh|Wd�Wd�S|�	d�|�
�Wd�n1s�0YWd�n1s�0YdS)NFrP)rHrIrLrUrr�rrVr�r�r)rIr7rKrZr[r'r'r(�continuerebase�s

 
r�cCs�|j�d�sdSzt||i�}|��|j}Wn(tjyVtd�}|�|�YdS0t	dd�t
�|�D��}|�td�|�td�d�||�td�d	�t	|�|f�dS)
NrOs8rebase: (use "hg rebase --abort" to clear broken state)
cSsg|]}|dkr|�qSrr')r�r�r'r'r(r��rvzsummaryhook.<locals>.<listcomp>s#rebase: %s, %s (rebase --continue)
s
%d rebasedsrebase.rebaseds%d remainingsrebase.remaining)
rpr�rLr�r rr�rrxrBrZ
itervaluesZlabel)rIr7rKr r�Z
numrebasedr'r'r(�summaryhook�s(


����r�cCslt�tjdt�}|d�dddtd�f�|d�dddtd�f�tj�	dt
�tjdd	d
d
t
td�dS)Nspullr&rvr3s'rebase working directory to branch headr9r:sspecify merge tool for rebaserOT)�fnameZstopflagZcontinueflagZ	abortfuncZcontinuefunc)rZwrapcommandr
�tabler�rrrr	Zsummaryhooksr�r�rgZ
addunfinishedr�r�)rI�entryr'r'r(�uisetup�s��r�)N)F)NFNT)]r,Z
__future__rr�r�Zmercurial.i18nrZmercurial.noderrrZmercurial.pycompatrZ	mercurialrr	r
rrr
rrrrrrrUrrrrrrrrrrrrrr rgr!r�r�r�ZcmdtablerHZconfigtableZ
configitemZ
testedwithr)r/r2r8Zrevsetpredicater>rGrK�objectrLZ
dryrunoptsZ
formatteroptsZconfirmoptsZCATEGORY_CHANGE_MANAGEMENTrLrGrJrMrWr�r�r�rr�r�r|r�r�rrXr�r�r�r�r�rr�r�r�r�r�r�r'r'r'r(�<module>s	p!

�		




L��������9�:�;�<�A
I?
N"2N
;	6	I�
<E-

Youez - 2016 - github.com/yon3zu
LinuXploit