HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/hgext/transplant.pyc

Xc@@sdZddlmZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZde
jfdYZiZe	jeZdZd	efd
YZdefdYZd
efdYZdZ dZ!eddddededfddgededfdde"edfddged edfd!d"ged#edfdd$ded%edfd&d'e#ed(fdd)e"ed*fd+d,e"ed-fdd.ded/ed0fg
ed1d2Z$d3Z%ej&Z&e&d4d5Z'ej(Z(e(d6d7Z)d8Z*e'e)gZ+dS(9sVcommand to transplant changesets from another branch

This extension allows you to transplant changes to another parent revision,
possibly in another repository. The transplant is done using 'diff' patches.

Transplanted patches are recorded in .hg/transplant/transplants, as a
map from a changeset hash to its hash in the source repository.
i(tabsolute_importN(t_(t
bundlerepotcmdutilterrortexchangethgtmatchtmergetnodetpatcht	registrartrevlogtrevsettscmutiltutiltTransplantErrorcB@seZRS((t__name__t
__module__(((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR&ssships-with-hg-corettransplantentrycB@seZdZRS(cC@s||_||_dS(N(tlnodetrnode(tselfRR((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyt__init__2s	(RRR(((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR1sttransplantscB@sGeZddddZdZdZdZdZdZRS(cC@sY||_||_||_|s9tj|j|_ni|_t|_|jdS(N(tpathttransplantfiletopenerRRtFalsetdirtytread(RRRR((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR7s					cC@stjj|j|j}|jrtjj|rxr|jj|jjD]R}tt	j
|jd\}}|jj
|g}|jt||qRWndS(Nt:(tosRtjoinRtexistsRRt
splitlinestmapRtbintsplitRt
setdefaulttappendR(RtabspathtlineRRtlist((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRBs"!cC@s|jr|jrtjj|js:tj|jn|j|jd}xe|jjD]T}xK|D]C}t	t
j|j|j
f\}}|j|d|dqlWq_W|jnt|_dS(NtwRs
(RRR RtisdirtmkdirRRt
itervaluesR$tnodemodthexRRtwritetcloseR(RtfpR+tttltr((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR2Js
$!
cC@s|jj|pgS(N(Rtget(RR((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR8VscC@s8|jj|g}|jt||t|_dS(N(RR'R(RtTrueR(RRRR+((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytsetYscC@s;|jj|j}|r7||j|=t|_ndS(N(RR8RtindexR9R(Rt
transplantR+((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytremove^sN(	RRtNoneRRR2R8R:R=(((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR6s				ttransplantercB@seZdZdZddZdZeeddZdZ	dZ
dZdZd	Z
d
ZedZdZd
ZdZRS(c@sm||_jd|_tj|j|_t|jdd|j|_fd}||_dS(NR<RRc@s)tjdd}tjd|S(NR<teditform(Rt
mergeeditformR>tgetcommiteditor(R@(toptstrepo(s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRBks(tuiR!RRRRRB(RRERDRCRB((RCRDs4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRes	c	C@st||r$|jj|}nt||rv|jj|}|jj|g|dt}||krvtSnx}|jj|D]i}t||js|jj|t	S|jj|j}||jj|g|dtkrtSqWt	S(smreturns True if a node is already an ancestor of parent
        or is parent or has already been transplantedt	inclusive(
thasnodet	changelogtrevt	ancestorsR9RR8RR=R(	RRDR	tparentt	parentrevRIt	reachableR5tlnoderev((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytappliedps"	c
C@s|dkri}nt|}|jj\}}g}	tj|j|}
t|
_d}}z,|j	}|j
d}x|D]}
||
}d|
tj|f}|j
|||r|jjtd|qn|jj|}|jdp|jds|d|kr@|	j||}qn|	r||krqtj||jd|	ntj||	dtt|jj\}}g}	qnt}||krt}t||stj||jd|gqnt}|d	tjkr|jd
sR|jjtd|
tj|ft}q|j|d
}||krtjtdtj|tj|fqn
|d}|rd}nmt j!d
d\}}t"j#|d}tj$|||d|
}x|D]}|j%|q
W|j&||
=|sA|rzyL|j'|||jj(||d|d|jdd|jd}Wnt)k
r|j&nX|r|r|jj*td|tj|fn;|r$|jj*tdtj|tj|fnWd|r>t"j+|nXqqW|j&|	rtj||jd|	tj||	dttnWd|j,|||j-j%|r|j.n|r|j.nXdS(s:apply the revisions in revmap one by one in revision orderR<s%s:%ss%skipping already applied revision %s
tfiltertlogitheadsiiRKsskipping merge changeset %s:%s
s%s is not a parent of %stprefixshg-transplant-R,RCRs%s merged at %s
s%s transplanted to %s
N(/R>tsortedtdirstatetparentsR
tdifffeatureoptsRER9tgittlockttransactionR0tshortROtwarnRRHR8R(RtpulltpeerRtupdateRRGRtnullidtnotetlookupRtAbortttempfiletmkstempR tfdopentdiffR2R3tapplyoneRRtstatustunlinkt
saveseriesRtrelease(RRDtsourcetrevmaptmergesRCtrevstp1tp2tpullstdiffoptsRYttrRIR	trevstrRVtdomerget	skipmergeRKt	patchfiletfdR4tgentchunktn((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytapplys		



%	
	




!

c	C@sZ|jjtd||d|d|d}}}tjdd\}}	tj|d}
|
jd|
jd	||
jd
||
j|d|
jz|jj	d|t
j|	t
j|fd
i|dd6tj
|d6dtjdtd|jt|	dd!\}}}Wdtj|	X|||fS(s0arbitrarily rewrite changeset before applying its
filtering %s
iiiRSshg-transplant-R,s# HG changeset patch
s
# User %s
s
# Date %d %d
s
s%s %s %stenvirontHGUSERt
HGREVISIONtonerrt	errprefixs
filter failedN(RERiRRdReR RfR2R3tsystemRt
shellquoteR0R1RRctparselogtfileRj(RRPR	RHRytusertdatetmsgRzt
headerfileR4((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRPs$ 

)c
C@s|d \}}	\}
}}}
d|
|f}i|d6}|rf|j||||\}	}}
n|r|
dtj|7}
n|jjtdtj||jjd|	||
f|r|rtj	tdn|ry;t
}tj|j||d|d	dt
|}Wqtk
r}tjj|jd
}tjj|rytj|n|jj}|}|j|	||
||d||jjt|dttd
qXnd}|r)|jj\}}|j||tj|jd}ntj|jd|}|j |
|	|d|d|d|j!}|s|jj"tdtj|dS|s|j#j
||n|S(s>apply the patch in patchfile to the repository as a transplantis%d %dttransplant_sources
(transplanted from %s)sapplying %s
s	%s %s
%s
s"can only omit patchfile if mergingtfilesteolmodetseriesRs
s=fix up the working directory and run hg transplant --continuettextraRteditorsskipping emptied changeset %s
N($RPR0R1RERiRR[RaRRcR:R
R>R+t	ExceptionR RR!R"RjRURqRQR2tstrRRVt
setparentsRtalwaystroottexacttcommitRBR\R(RRDR	tclRyRRQRPtmanifestRttimettimezoneRtmessageRRtinstt
seriespathRqRrtmR}((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRhsP
$#	"cC@s"tjjtjj|jdS(Ntjournal(R RR"R!(R((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyt	canresumeAsc
C@sGtjjtjj|jdr|j|||\}}|rz|jjtdtj	|tj	|fq|jjtdtj	|fntjj|jd}tjj|s|j
jdS|j\}}i}	x$|D]}||	|j
j|<qWtj||j|||	||dS(s7recover last transaction and apply remaining changesetsRs%s transplanted as %s
s%s skipped due to empty diff
RN(R RR"R!trecoverRERiRR0R[RR2t
readseriesRHRIRjR~(
RRDRmRCR}R	RtnodesRoRn((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytresumeDs$$


cC@s|j\}}}}}t}	|sA|sA|sA|drYtjtdn|d}
t|dkr|jdr|j|d}
|
|krtjtdtj	|
tj	|fqqt
}	ni|d6}z|jj\}}
||
kr9tjtdtj
|
n|	rV|j||dn|jd \}}}}|	s|s|s|s|r|j|||d	|d
|j}|stjtdn|	s|jj||qnd}|j||fSWdXdS(
s/commit working directory using journal metadataistransplant log file is corruptiRKs%s is not a parent of %sRs-working directory not at transplant parent %siRRs
commit failedN(treadlogRRRcRtlenR8RbR0R[R9RURVR1RRiRRBRR:R>tunlog(RRDRmRCR	RRRRVRRKRRqRrtmodifiedtaddedtremovedtdeletedR}((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR[sB 
	

cC@spg}g}|}xQ|jjdjD]7}|jdrL|}q+n|jtj|q+W||fS(NRs# Merges(RRR#t
startswithR(RR%(RRRotcurR*((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRscC@s|s
dStjj|js2tj|jn|jdd}x2t|D]$}|jtj||dqQW|r|jdx+|D] }|jtj|dqWn|j	dS(NRR,s
s	# Merges
(
R RR-R.RRTR2R0R1R3(RRnRoRRIR((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRks"

!c	C@sNg}g}tj}t}d}d}x|jjD]}|rV|j|q:|jdrr|d}q:|jdr|d}q:|jdrtj|d}q:|jdr|jtj|dq:|jds:t	}|j|q:q:Wd||fkr2t
jtd	n|||d
j
||fS(Ns# User is# Date s
# Node ID i
s	# Parent i	s# s,filter corrupted changeset (no user or date)s
(RR`RR>RR#R(RR%R9RRcRR!(	RR4RVRR	tinmsgRRR*((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRs.	

cC@stjj|js(tj|jn|jdd}|jd||jd||jdtj||jdtj|d|r|jdtj|dn|j|jd|j	dS(	s,journal changelog metadata for later recoverRR,s
# User %s
s
# Date %s
s
# Node ID %s
s	# Parent s
N(
R RR-R.RR2R0R1trstripR3(RRRRRqRrRR4((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRQs!cC@s|j|jdS(NR(RR(R((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRscC@s>tjj|jd}tjj|r:tj|ndS(sremove changelog journalRN(R RR!R"Rj(Rtabsdst((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRsc@sfd}|S(Nc@sj|rtSjj|dtjkr<tSjj|d}|jd}|rj|rtStS(NiiR(	RORRHRVRR`RR8R9(R	Rtcnode(RDRRRm(s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytmatchfns((RRDRmRR((RDRRRms4/usr/lib/python2.7/dist-packages/hgext/transplant.pyttransplantfiltersN(RRRROR>R~RPRRhRRRRRkRRQRRR(((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR?ds 		l	4			-					cC@s6y|jj|dk	SWntjk
r1tSXdS(N(RHRIR>RtRevlogErrorR(RDR	((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRGscC@stj|||}g}g}td}xQ|D]I}|j||d}	x|	sd|j|}	|	dkrx8|j|dD]#\}
}|jd|
|fqWd}	qT|	dkrT|jj	|d}x*t
j|||D]}
|j|
qWd}	qTqTW|	dkr5|j|q4|	d	krQ|j|q4|	d
kraPq4|	dkr4d
}d}Pq4q4W|j
||fS(s#interactively transplant changesetssapply changeset? [ynmpcq?]:$$ &yes, transplant this changeset$$ &no, skip this changeset$$ &merge at this changeset$$ show &patch$$ &commit selected changesets$$ &quit and cancel transplant$$ &? (show this help)synmpcq?t?is%s: %s
tpityRtctqN(((Rtshow_changesetRtshowR>tpromptchoicetextractchoicesR2RHRVR
RgR(R3(RERDRRCt	displayerRRotpromptR	tactionRR5RKR|((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyt
browserevss<
	 	

R<tsRmRstransplant changesets from REPOtREPOtbtbranchs!use this source changeset as headtREVtatalls0pull all changesets up to the --branch revisionsRtprunes
skip over REVRRsmerge at REVRKs)parent to choose when transplanting mergetetedits invoke editor on commit messagesRQs%append transplant info to log messageRtcontinues7continue last transplant session after fixing conflictsRPs!filter changesets through commandtCMDsChg transplant [-s REPO] [-b BRANCH [-a]] [-p REV] [-m REV] [REV]...c	O@s*|jt||||SWdQXdS(stransplant changesets from another branch

    Selected changesets will be applied on top of the current working
    directory with the log of the original changeset. The changesets
    are copied and will thus appear twice in the history with different
    identities.

    Consider using the graft command if everything is inside the same
    repository - it will use merges and will usually give a better result.
    Use the rebase extension if the changesets are unpublished and you want
    to move them instead of copying them.

    If --log is specified, log messages will have a comment appended
    of the form::

      (transplanted from CHANGESETHASH)

    You can rewrite the changelog message with the --filter option.
    Its argument will be invoked with the current changelog message as
    $1 and the patch as $2.

    --source/-s specifies another repository to use for selecting changesets,
    just as if it temporarily had been pulled.
    If --branch/-b is specified, these revisions will be used as
    heads when deciding which changesets to transplant, just as if only
    these revisions had been pulled.
    If --all/-a is specified, all the revisions up to the heads specified
    with --branch will be transplanted.

    Example:

    - transplant all changes up to REV on top of your current revision::

        hg transplant --branch REV --all

    You can optionally mark selected transplanted changesets as merge
    changesets. You will not be prompted to transplant any ancestors
    of a merged transplant, and you can merge descendants of them
    normally instead of transplanting them.

    Merge changesets may be transplanted directly by specifying the
    proper parent changeset by calling :hg:`transplant --parent`.

    If no merges or revisions are provided, :hg:`transplant` will
    start an interactive changeset browser.

    If a changeset application fails, you can fix the merge by hand
    and then resume where you left off by calling :hg:`transplant
    --continue/-c`.
    N(twlockt
_dotransplant(RERDRpRC((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyR<sC
c@stjd}tjd}d}||||jds\|jdd|d<n|jds|jdd|d<nt|||}|jj\}}	t|dkr|tj	krt
jtdn|jd	r|j
st
jtd
qntj||	tj	krNt
jtdn|jd \}
}}}
|
s|s|s|
rt
jtd
n|jd}|rltj|||j|}t|j|jdd}t|}x?|D]7}y|j|j|Wqt
jk
r4qXqWtj|||dt|dt\}}n*|tj|jdd}d}z|jd	r|j||dS|j|||jdr)tfdt j!|jdDfd}n}tj|jdd}i}|rxt j!|D]}j||t"|<qlWn|jds|rN|kr||d|}n|||d|}|jdr|}n(t#|||\}}|j$|x'|D]}||j%j&|<q+Wnx$|D]}||j%j&|<qUW|j'||||Wd|r|nXdS(Ncs@s)x"|D]}||r|VqqWdS(N((RDtcsetsRR	((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytincwalkWs
cs@s|s|j}ng}||}x.|D]&}|j|j||jq,Wx5|jj||dD]}||rp|VqpqpWdS(sYield all nodes that are ancestors of a head but not ancestors
        of dest.
        If no heads are specified, the heads of repo will be used.iN(RRR(tancestorR	RHtnodesbetween(RDtdestRRRRJtctxtheadR	((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyttransplantwalk\s

$ cS@s|jdrX|jds<|jds<|jdrTtjtdndS|jdp|p|jdp|jdstjtdn|jdr|jdstjtdn|rtjtd	qndS(
NRRRRs;--continue is incompatible with --branch, --all and --mergeRms9no source URL, branch revision, or revision list provideds --all requires a branch revisions*--all is incompatible with a revision list(R8RRcR(RCRp((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyt	checkoptsjs-RQR<RPisno revision checked outRsno transplant to continuesoutstanding uncommitted mergesisoutstanding local changesRmRt	onlyheadstforceRc3@s|]}j|VqdS(N(Rb(t.0R7(Rm(s4/usr/lib/python2.7/dist-packages/hgext/transplant.pys	<genexpr>sc@s|o|kS(N((tx(Rttf(s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyt<lambda>sRRR(((((RRR8tconfigR?RURVRRR`RRcRRRtcheckunfinishedRiRR^t
expandpathR$RbR:taddt	RepoErrorRtgetremotechangesRTR9R>RRRtrevrangetintRtextendRHRIR~(RERDRpRCRRRttpRqRrRRR7tdt
sourcerepoR^RRttargetRt	cleanupfnRRoRntalltransplantst	newmerges((RRmRs4/usr/lib/python2.7/dist-packages/hgext/transplant.pyRVs	
!

!" 		


stransplanted([set])cC@s]|rtj|||}n|}tjg|D]%}||jjdr1|^q1S(sDTransplanted changesets in set, or all transplanted changesets.
    R(R
tgetsettbasesetRR8(RDtsubsetRRR7((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytrevsettransplanteds
ttransplantedcK@s.|jjd}|r*tj|p-dS(sEString. The node identifier of the transplanted
    changeset if any.RR(RR8R0R1(RDRtargsR}((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytkwtransplantedscC@s/tjjdtttdtdgdS(Nstransplant/journalstransplant in progresss6use 'hg transplant --continue' or 'hg update' to abort(RtunfinishedstatesR(R9RR(RE((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pytextsetups	(,t__doc__t
__future__RR Rdtmercurial.i18nRt	mercurialRRRRRRRR	R0R
RRR
RRRcRtcmdtabletcommandt
testedwithtobjectRRR?RGRR>RR<RtrevsetpredicateRttemplatekeywordRRt
i18nfunctions(((s4/usr/lib/python2.7/dist-packages/hgext/transplant.pyt<module>sH^.		(		8	u