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/mercurial/exchange.pyc

Xc@@sddlmZddlZddlZddlmZddlmZmZddl	m
Z
mZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZejZejZidd6dd	6d
d6Z idd
6dd6dd6dd6Z!e"e#dZ$ddZ%dZ&dZ'dZ(dZ)de*fdYZ+iededfd6ededfd 6ed!ed"fd#6Z,e#de#d`dd$Z-gZ.iZ/d%Z0d&Z1e0d'd(Z2e0d)d*Z3e0d+d,Z4e0d-d.Z5d/Z6gZ7iZ8dd0Z9d1Z:e9d'd2Z;e9d)d3Z<e9d4d5Z=e9d-d6Z>d7Z?d8Z@d9ZAejBd:ZCd;ZDd<ZEd=e*fd>YZFd?e*fd@YZGde#dadddAZHgZIiZJdBZKdCZLeKdDdEZMeKdFdGZNdHZOdIZPdJZQdKZRdLZSdMZTdNZUdOZVgZWiZXddPZYdQZZddddRZ[eYdFdddddSZ\eYdTdddUZ]eYd4ddddVZ^eYdWdddddXZ_dYZ`dZZad[Zbd\Zcd]Zdd^Zed_ZfdS(bi(tabsolute_importNi(t_(thextnullid(tbase85t	bookmarkstbundle2tchangegroupt	discoveryterrortlocktobsoletetphasestpushkeytscmutiltsslutiltstreamclonettagsturltutiltnonetBZtbzip2tGZtgzipt01tv1t02tv2ts1tpacked1Rc
C@sd}|r7d|kr7tjtd|nd|kr|jdd\}}|tkrtjtd|n||\}}|tkr[tjtd|q[n|st||\}}|tkr|}d}d|jkr[d	}q[nI|tkrB|d
kr3d}nd}|}ntjtd
||d
krd|krt	|djd}||j
}	|	rtjtddjt|	qn|st|}t|}n|||fS(sgParse a bundle string specification into parts.

    Bundle specifications denote a well-defined bundle/exchange format.
    The content of a given specification should not change over time in
    order to ensure that bundles produced by a newer version of Mercurial are
    readable from an older version.

    The string currently has the form:

       <compression>-<type>[;<parameter0>[;<parameter1>]]

    Where <compression> is one of the supported compression formats
    and <type> is (currently) a version string. A ";" can follow the type and
    all text afterwards is interpretted as URI encoded, ";" delimited key=value
    pairs.

    If ``strict`` is True (the default) <compression> is required. Otherwise,
    it is optional.

    If ``externalnames`` is False (the default), the human-centric names will
    be converted to their internal representation.

    Returns a 3-tuple of (compression, version, parameters). Compression will
    be ``None`` if not in strict mode and a compression isn't defined.

    An ``InvalidBundleSpecification`` is raised when the specification is
    not syntactically well formed.

    An ``UnsupportedBundleSpecification`` is raised when the compression or
    bundle type/version is not recognized.

    Note: this function will likely eventually return a more complex data
    structure, including bundle2 part information.
    cS@sd|kr|ifSi}|jdd\}}x|jdD]n}d|krrtjtd|n|jdd\}}tj|}tj|}|||<qDW||fS(Nt;it=s:invalid bundle specification: missing "=" in parameter: %s(tsplitR	tInvalidBundleSpecificationRturlreqtunquote(tstparamstversiontparamstrtptkeytvalue((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytparseparamsXs
	
t-sCinvalid bundle specification; must be prefixed with compression: %sis%s compression is not supporteds%%s is not a recognized bundle versionRtgeneraldeltaRRRRs+%s is not a recognized bundle specificationtrequirementst,s+missing support for repository features: %ss, (
R	R"RR!t_bundlespeccompressionstUnsupportedBundleSpecificationt_bundlespeccgversionstAssertionErrorR/tsettsupportedformatstjointsorted(
trepotspectstrictt
externalnamesR,tcompressionR'R&R/tmissingreqs((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytparsebundlespec5sN#		

		
	

cC@sdtj|d}d}|sgd}|jdr|jdrtj||}d}d}qn|r|j|}n|dd!|dd!}}|dkrtjtd	|n|d
kr|dkrtj|d}ntj	||S|jdr(t
j||d||S|d
krAtj
|Stjtd||fdS(NitstreamtHGstHG10tUNiis%s: not a Mercurial bundlet10t2tmagicstringtS1s%s: unknown bundle version %s(RtreadexactlytNonet
startswiththeaderlessfixupR7R	tAbortRtcg1unpackerRtgetunbundlerRtstreamcloneapplier(tuitfhtfnametvfstheadertalgtmagicR'((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
readbundles,
c
C@sd}t||d}t|tjr|j}|dkrKd}n||}|sytjtd|nd|St|t	j
rd|jkr||jd}|stjtd|qnd}d}xm|jD]_}|j
dkr|jd	}|dkr*d}qRtjtd
|dtdqqW|sttjtdnd||fSt|tjrtj|d}ddjt|}	dtj|	Stjtd|dS(sInfer the bundlespec from a bundle file handle.

    The input file handle is seeked and the original seek position is not
    restored.
    cS@s1x*tjD]\}}||kr
|Sq
WdS(N(R1titemsRI(RUtktv((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytspeccompressionst_truncatedBZRs!unknown compression algorithm: %ss%s-v1tCompressionRRR'RRRs7changegroup version %s does not have a known bundlespecthints#try upgrading your Mercurial clients0could not identify changegroup version in bundles%s-%sisrequirements=%sR0snone-packed1;%ssunknown bundle type: %sN(RR(RWRIt
isinstanceRRMt_typeR	RLRRt
unbundle20R&t	iterpartsttypeRROtreadbundle1headerR7R8R#tquote(
RPRQR[tbRUtcompR'tpartR/R&((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
getbundlespecsB			
	cC@sq|rmtj|j}tj|}|dkrBtdntj|td|}|j	dd|SdS(sadd an obsmarker part to the bundler with <markers>

    No part is created if markers is empty.
    Raises ValueError if the bundler doesn't support any known obsmarker format.
    s0bundler does not support common obsmarker formatR't
obsmarkerstdataN(
RtobsmarkersversiontcapabilitiesRt
commonversionRIt
ValueErrort
encodemarkerstTruetnewpart(tbundlertmarkerstremoteversionsR'R@((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytbuildobsmarkerspartscC@sq|j}|r@|j}g|D]}||r|^q}n	tg}|s^|j}ntj|||S(sComputes which revs are outgoing given a set of common
    and a set of heads.

    This is a separate function so extensions can have access to
    the logic.

    Returns a discovery.outgoing object.
    (t	changelogthasnodeRtheadsRtoutgoing(R9RytcommontclRxtn((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_computeoutgoings			(	cC@sS|jj}t}|jdd}d|ko9d|k}|pR|jjdS(ssreturn true if a pull/push must use bundle1

    This function is used to allow testing of the older bundle versiontdevelslegacy.exchangeRtbundle1(R9RPtFalset
configlisttremotetcapable(topRPtforcebundle1texchange((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
_forcebundle1s
t
pushoperationcB@sVeZdZededdZejdZejdZ	e
dZRS(sA object that represent a single push operation

    Its purpose is to carry push related state and very common operations.

    A new pushoperation should be created at the beginning of each push and
    discarded afterward.
    cC@s||_|j|_||_||_||_||_||_d|_t	|_
d|_d|_d|_
d|_d|_d|_d|_t	|_g|_d|_i|_dS(N(R9RPRtforcetrevsRt	newbranchRItlocallockedR5t	stepsdonetcgresulttbkresultRztremoteheadstincomingtoutdatedphasestfallbackoutdatedphasest
outobsmarkerstoutbookmarkst	trmanagertpkfailcb(tselfR9RRRRR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt__init__0s(																cC@s
|jjS(s2future remote heads if the changeset push succeeds(Rztmissingheads(R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytfutureheadsascC@s|jdkr|jjS|jj}|jj}|jjj}g|jD]}|||krM|^qM}|j	d|jj|jj
}|jd|D|S(s/future remote heads if the changeset push failss%ln and parents(roots(%ln))cs@s|]}|jVqdS(N(tnode(t.0tc((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pys	<genexpr>sN(RRIRztcommonheadsR9t
unfilteredR{RwtnodemapR5tmissingtextend(RtunfiR{tnmRtcheadstrevset((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
fallbackheadsfs
,		cC@s|jr|jS|jSdS(s3set of all common heads after changeset bundle pushN(RRR(R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs	N((t__name__t
__module__t__doc__RRIRRt
propertycacheRRtpropertyR(((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyR's	0 supdating bookmark %s
supdating bookmark %s failed!
tupdatesexporting bookmark %s
sexporting bookmark %s failed!
texportsdeleting remote bookmark %s
s$deleting remote bookmark %s failed!
tdeletecC@s|d	kri}nt|||||||}|jjrt|jj|jjj}|rtddj	t
|}	tj|	qn|jj
stjtdnd	}
}yV|jjdd}t|r|r|jj}
n|jj}t|_WnNtk
ru}
t|_|
jtjkrXnd|
}	|jj|	nXz|jrt|jd|jj|_n|jj|d	}|jjd}|s|jj}nzOt|t|st |nt!|t"|t#|t$|Wd	|d	k	rQ|j%nX|jrk|jj&nWd	|jr|jj%n|d	k	r|j%n|
d	k	r|
j%nX|S(
sWPush outgoing changesets (limited by revs) from a local
    repository to remote. Return an integer:
      - None means nothing to push
      - 0 means HTTP error
      - 1 means we pushed and remote head count is unchanged *or*
        we have outgoing changesets but refused to push
      - other values as described by addchangegroup()
    s:required features are not supported in the destination: %ss, s!destination does not support pushtexperimentalsbundle2.pushbacks"cannot lock source repository: %s
s
push-responsetunbundleN('RIRRtlocalR5R9R/t	supportedRR7R8R	RLtcanpushRPt
configboolRtwlockR
RqRtIOErrorRterrnotEACCEStdebugttransactionmanagerRRt	checkpushRt_pushdiscoveryt_pushbundle2t_pushchangesett_pushsyncphaset
_pushobsoletet
_pushbookmarktreleasetclose(R9RRRRRtopargstpushopRtmsgt
localwlockt	locallocktmaypushbackterrR
R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytpushsn
			


	
		




		
c@sfd}|S(s|decorator for function performing discovery before push

    The function is added to the step -> function mapping and appended to the
    list of steps.  Beware that decorated function will be added in order (this
    may matter).

    You can only use this decorator for a new step, if you want to wrap a step
    from an extension, change the pushdiscovery dictionary directly.c@s-tkst|t<tj|S(N(tpushdiscoverymappingR4tpushdiscoveryordertappend(tfunc(tstepname(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytdecs

((RR((Rs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
pushdiscoverys	cC@s)x"tD]}t|}||qWdS(sRun all discovery stepsN(RR(RRtstep((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs

t	changesetc	C@stj}||j|jd|j}|\}}}tj}||j|jd|jd|d|j}||_||_||_	dS(s-discover the changeset that need to be pushedRt	onlyheadst	commonincN(
RtfindcommonincomingR9RRtfindcommonoutgoingRRzRR(RtfciRR{tincRtfcoRz((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pushdiscoverychangesets				tphasecC@sd|j}|jj}|jjd}|jdt}|jjddtr}|r}|jj	r}|r}idd6}nt
j|j|j|}|\}}d}|sd}nd|}	t
|j|	||j}
|j	s|
}n[t
|jd	|j	|}g|D]}
|
j^q}t
|j|	||j}||_|
|_d
S(spdiscover the phase that needs to be pushed

    (computed for both success and failure case for changesets push)Rt
publishingRPt_usedassubrepoRqts
 and public()sheads((%%ln::%%ln) %s)sroots(%ln  + %ln::)N(RzR9RRtlistkeystgetRRPRRRtanalyzeremotephasesRtlistR5RRRR(RRzRtremotephasesRtanatpheadstdrootst	extracondRtfallbacktfuturetfdrootstf((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pushdiscoveryphases4	

		
			t	obsmarkercC@stj|jtjr|jjrd|jjdkr|j}d|jd|jD}|jjj	||_
ndS(NRt
namespacescs@s|]}|jVqdS(N(R(RR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pys	<genexpr>Qss::%ln(Rt	isenabledR9texchangeopttobsstoreRRR5RtrelevantmarkersR(RR9tnodes((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pushdiscoveryobsmarkersIs	RcC@s|j}|jj}|j}|jdd	}|jrpt|jj|j}|jj	|dt
}n|jd}tg|j
D]}|jj|^q}tj||j|dt}	|	\}
}}}
}}}}xl|D]d\}}}||kr|j|n|s8||j|kr|jj|||fqqWxL|
D]D\}}}||kr_|j||jj|d|fq_q_WxT|
||D]D\}}}||kr|j||jj|||fqqWxL|D]D\}}}||kr|j||jj||dfqqWx3|D]+\}}}||krT|j|qTqTW|rt|}|jtd|dd|_n|jjdS(
Nschecking for updated bookmarks
t	inclusiveRtsrchexRs>bookmark %s does not exist on the local or remote repository!
ii((RPR9RRRRtmapRwtrevt	ancestorsRqRR5Rt
_bookmarkst
expandnametbookmodtcompareRtremoveRRR8twarnRRtsort(RRPR9RRtrevnumstremotebookmarktbookmarktexplicitRgtaddsrctadddsttadvsrctadvdsttdivergetdiffertinvalidtsameRftscidtdcid((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pushdiscoverybookmarksTsN		
	( 
 
 
 cC@s|j}|jj}|js>tj|j||jtS|j	s|j
rtd}itdd6tdd6tdd6}xp|jD]b}||}|j
rtj||q|jrtj||jd|qqWntj|ntS(	Ns%push includes obsolete changeset: %s!s%push includes unstable changeset: %s!tunstables#push includes bumped changeset: %s!tbumpeds&push includes divergent changeset: %s!t	divergenti(RzR9RRRtnochangesfoundRPtexcludedRRRRRRR	RLttroubledttroublesRt
checkheadsRq(RRzRtmsotmstRtctx((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pushcheckoutgoings&				

+c@sfd}|S(swdecorator for function generating bundle2 part

    The function is added to the step -> function mapping and appended to the
    list of steps.  Beware that decorated functions will be added in order
    (this may matter).

    You can only use this decorator for new steps, if you want to wrap a step
    from an extension, attack the b2partsgenmapping dictionary directly.c@sLtkst|t<dkr8tjntj|S(N(tb2partsgenmappingR4RItb2partsgenorderRtinsert(R(tidxR(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs
((RR$R((R$Rs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytb2partsgenerators	cC@s,|js(|jddt|jndS(sdGenerate race condition checking parts

    Exists as an independent function to aid extensions
    scheck:headsRkN(RRrtiterR(RRs((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pushb2ctxcheckheadss	c@sbdjkrdSjjdts3dSjjt|tjj}d}|j	d}|rg|D]$}|t
jjkr|^q}|stt
dnt|}nt
jjdjd|}|jdd||r'jd|nd	jjkrLjd	d
nfd}|S(swhandle changegroup push through bundle2

    addchangegroup result is stored in the ``pushop.cgresult`` attribute.
    t
changesetsNRRsno common changegroup versionRR'Rkttreemanifestt1c@sJ|jjj}t|ddks1t|ddd_dS(s0extract addchangegroup returns from server replyRiitreturnN(trecordst
getrepliestidtlenR4R(Rt	cgreplies(tcgpartR(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pythandlereplys(RtaddR R9tprepushoutgoinghooksR'Rtbundle2capsRRRtsupportedoutgoingversionsRoRtmaxtgetlocalchangegrouprawRzRrtaddparamR/(RRstb2capsR't
cgversionsRZtcgR2((R1Rs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
_pushb2ctxs6

			c@s2djkrdStjj}d|kr5dSjjdgfd}tj}xjD]}|jd}|j	d|d|j	d||j
|j	d|ttj
|j	d|ttjj|j|f|j|j<qmWfd	}|S(
s!handle phase push through bundle2RNR
c@sRt|j}x<D]4\}}||krtjtd|qqWdS(Nsupdating %s to public failed(tinttpartidR	RLR(RtexcttargetidR?R(t	part2node(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
handlefailurest	namespaceR*toldtnewc@sxD]\}}|jj|}|d}t|dksGtd}|sftd|}n't|ddstd|}n|dk	rjj|qqWdS(NR
is'server ignored update of %s to public!
iR+supdating %s to public failed!
(	R,R-R/R4RIRR>RPR(RR?RtpartreptresultsR(RBR(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyR2s
(RRR5RR3R
tencodeRRrR9RtstrRtdrafttpublicRR.R(RRsR:RCtenct
newremoteheadRhR2((RBRs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
_pushb2phasess&	RjcC@szd|jkrdStj|j}tj|dkr>dS|jjd|jrvt	|j}t
||ndS(NRj(RRRlRmRRnRIR3RR8Rv(RRsRuRt((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pushb2obsmarkerss	c@sJdjkrdStjj}d|kr5dSjjdgtj}fd}xjD]\}}}|jd}|j	d|d|j	d|||j	d|||j	d||d	}	|sd
}	n|sd}	nj
|j||	f|j|j<qmWfd}
|
S(
s$handle bookmark push through bundle2RNR
c@sit|j}xGD]?\}}}||krtjt|dj|qqWtsetdS(Ni(R>R?R	RLt
bookmsgmaptrstripRR4(RR@RAR?tbooktaction(t	part2book(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRC4s
(RDR*RERFRRRc@sj}xD]\}}}|jj|}|d}t|dksSt|svjjtd|qt|dd}|r|jt	|d|q|jt	|d|j
dk	rd_
qqWdS(NR
is"server ignored bookmark %s update
iR+(RPR,R-R/R4RRR>tstatusRQRRI(RRPR?RSRTRGRHtret(RUR(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyR2Js	
(
RRR5RR3R
RIRRrR9RR.R(RRsR:RMRCRSRERFRhRTR2((RURs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pushb2bookmarks(s0			cC@sktj|jtj|j}|jo<|jjdd}tjtj|j	d|}|j
dd|g}xCtD];}t|}|||}t
|r|j|qqW|jdkrdStj|j}yy(|jj|dg|jj}	Wn/tjk
rC}
tjtd	|
nXy7d}|rb|jj}ntj|j	|	|}Wn|tjk
r}
tjtd	|
nNtjk
r}
|jjtd
|
tjtdd|
jnXWnNtjk
rK}
t |
j!}
|
|j"kr4n|j"|
||
nXx|D]}||qSWdS(
spush data to the remote using bundle2

    The only currently supported type of data is changegroup but this will
    evolve in the future.Rsbundle2.pushbackt
allowpushbackt	replycapsRkiNRsmissing support for %ssremote: %s
spush failed on remoteR^(#Rtbundle20RPR5RRRt
encodecapstgetrepocapsR9RrR"R!tcallableRtnbpartsRtchunkbuffert	getchunksRRR	tBundleValueErrorRLRRIttransactiont
processbundlet
AbortFromPartRVR^t
PushkeyFailedR>R?R(RRstpushbacktcapsblobt
replyhandlerstpartgennametpartgenRWR@treplyR@ttrgetterRR?trephand((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyR]sL!	

	&
cC@sSd|jkrdS|jjdt|s3dS|jj||j}|jjd}d}|j	dkr|j
p|jjjrt
j|j|}t
j|j||ddt}nt
j|jd||}|r+|jrdg}n	|j}|jj|||jj|_n$|jj|d|jj|_dS(s7Make the actual push of changeset bundle to remote repoR(NRRtfastpathR(RR3R R9R4RzRRRIRRRwtfilteredrevsRt	cg1packert	getsubsetRqtgetlocalchangegroupRRRRRtaddchangegroup(RRzRt
bundlecapsRsR<R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs6				c
C@s|j}|jjd}|jjddtrj|rj|jdkrj|jdtrjidd6}n|st	||n9t
j|j||}|\}}|jdtrt	||n t	||t	||t
j
|jrd|jkrdS|j}n	|j}|jjdg|D]}|j|kr.|^q.}xd|D]\}|jjd|jtt
j
tt
j}	|	sY|jjtd|qYqYWdS(s2synchronise phase information locally and remotelyRRPRRRqNsupdating %s to public failed!
(RRRRPRRRRIRt_localphasemoveRRR9RKRRRR3RR
RRJRLRR(
RRRRRRtoutdatedRRNtr((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs>	
	
		+
	cC@s|jr.tj|j|jj||nbg|D]%}||j|jkr5|^q5}tj|}|r|jjt	d|ndS(s0move <nodes> to <phase> in the local source repos8cannot lock source repo, skipping local %s phase update
N(
RRtadvanceboundaryR9RcRt
phasenamesRPRVR(RRRR}tactualmovestphasestr((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRvs	
2
c	C@sd|jkrdS|j}|j}|jjd|jr|jjdg}tjt	|j}xCt	|dt
D]/}||}|j|jd|d|qWg|D]}|s|^qrt
d}|jj|qndS(s5utility function to push obsolete markers to a remoteRjNs'try to push obsolete markers to remote
treverseRRs&failed to push some obsolete markers!
(RR9RR3RRPRRt_pushkeyescapeR8RqRR
RR(	RR9Rtrsltst
remotedataR*RkRxR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs			
#cC@s|jdksd|jkr"dS|jjd|j}|j}x|jD]\}}}d}|srd}n|sd}n|jd|||r|jt|d|qN|j	t|d||j
dk	rNd|_
qNqNWdS(s"Update bookmark position on remoteiRNRRRi(RRR3RPRRR
RVRQRRRI(RRPRRfRERFRT((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs 				t
pulloperationcB@seeZdZdeddddZejdZejdZ	ejdZ
dZRS(sA object that represent a single pull operation

    It purpose is to carry pull related state and very common operation.

    A new should be created at the beginning of each pull and discarded
    afterward.
    c	C@s||_||_||_g|D]}|jj|^q"|_||_||_d|_	d|_
d|_d|_||_
d|_t|_t|_dS(N(R9RRyRRtexplicitbookmarksRtstreamclonerequestedRIRR{trheadstfetchtremotebookmarksRR5RRtclonebundleattempted(	RR9RRyRRRRR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyR6s			%								cC@sl|jdkrat|j}t|j}x-|jD]"}||kr7|j|q7q7W|S|jSdS(s0heads of the set of changeset target by the pullN(RyRIR5R{RRR(RRRWR}((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytpulledsubsetVscC@st|S(N(R(R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
canusebundle2hscC@stj|jS(N(RR5R(R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytremotebundle2capslscC@s
|jjS(N(RRc(R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytgettransactionpsN((RRRRIRRRRRRRR(((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyR-s	RcB@s2eZdZdZdZdZdZRS(sAn object to manage the life cycle of a transaction

    It creates the transaction on demand and calls the appropriate hooks when
    closing the transaction.cC@s(||_||_||_d|_dS(N(R9tsourceRRIt_tr(RR9RR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRys			cC@sm|jsfd|jtj|jf}|jj||_|j|jjd<|j|jjd<n|jS(s<Return an open transaction object, constructing if necessarys%s
%sRR(RRRthidepasswordRR9Rcthookargs(Rttrname((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRcs	cC@s#|jdk	r|jjndS(sclose transaction if createdN(RRIR(R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRscC@s#|jdk	r|jjndS(srelease transaction if createdN(RRIR(R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs(RRRRRcRR(((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRts
				c
C@so|dkri}nt||||d|d||}|jjrt|jj|jj}|rtddj	t
|}	tj|	qnd}
}z|jj
}
|jj}t|d|j|_tj|t|t||jrt|nt|t|t|t||jjWdtj|j||
X|S(sFetch repository data from a remote.

    This is the main function used to retrieve data from a remote repository.

    ``repo`` is the local repository to clone into.
    ``remote`` is a peer instance.
    ``heads`` is an iterable of revisions we want to pull. ``None`` (the
    default) means to pull everything from the remote.
    ``bookmarks`` is an iterable of bookmarks requesting to be pulled. By
    default, all remote bookmarks are pulled.
    ``opargs`` are additional keyword arguments to pass to ``pulloperation``
    initialization.
    ``streamclonerequested`` is a boolean indicating whether a "streaming
    clone" is requested. A "streaming clone" is essentially a raw file copy
    of revlogs from the server. This only works when the local repository is
    empty. The default value of ``None`` means to respect the server
    configuration for preferring stream clones.

    Returns the ``pulloperation`` created for this pull.
    RRs:required features are not supported in the destination: %ss, tpullN(RIRRRR5R/R9RRR7R8R	RLRR
RRRRtmaybeperformlegacystreamclonet_maybeapplyclonebundlet_pulldiscoveryRt_pullbundle2t_pullchangesett
_pullphaset_pullbookmarkst
_pullobsoleteRtlockmodR(R9RRyRRRRtpullopRRRR
((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs6		



	




c@sfd}|S(s|decorator for function performing discovery before pull

    The function is added to the step -> function mapping and appended to the
    list of steps.  Beware that decorated function will be added in order (this
    may matter).

    You can only use this decorator for a new step, if you want to wrap a step
    from an extension, change the pulldiscovery dictionary directly.c@s-tkst|t<tj|S(N(tpulldiscoverymappingR4tpulldiscoveryorderR(R(R(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs

((RR((Rs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt
pulldiscoverys	cC@s)x"tD]}t|}||qWdS(sRun all discovery stepsN(RR(RRR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs

sb1:bookmarkscC@sH|jdk	rdS|jr/d|jkr/dS|jjd|_dS(sfetch bookmark data in bundle1 case

    If not using bundle2, we have to fetch bookmarks before changeset
    discovery to reduce the chance and impact of race conditions.NRR(RRIRRRR(R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pullbookmarkbundle1s
Rc	C@stj|j|jd|jd|j}|\}}}|jjjj}|r|rt	|}g}xF|D]>}||kr||kr|j
|qqs|j
|qsW|sg}n|}n||_||_||_
dS(s~discovery phase for the pull

    Current handle changeset discovery only, will change handle all discovery
    at some point.RyRN(RRR9RRyRRRwRR5RR{RR(	RttmpR{RRRtscommontfilteredrheadsR}((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_pulldiscoverychangegroups(		
				cC@s-it|jd6}tj|\}}|jjd|j|d<|jpW|j|d<|j	|d<d|j
krdg|d<|jdkr|dj
dqn|jjd	r|jdkrt|jtgkr|j|d
<n|r|jjjtdnq|j	sF|jjjtdd
|_nC|jdkrt|jtgkr|jjjtdntj|jtjrtj|j
}tj|dk	rt|d<|jjdqnt|||jjd|}ytj |j||j!}Wn/t"j#k
rZ}t"j$td|nX|j	rg|j%dD]}|d^qr}	t&j'|	|_nx7|j%dD](\}
}|
dkrt(||qqWx3|j%dD]$\}
}|
dkr||_qqW|jdk	r)t)|ndS(sNpull data using bundle2

    For now, the only supported data are changegroup.RuRR{RyR<RRRtclonebundlestcbattemptedsstreaming all changes
sno changes found
isrequesting all changes
RjRsmissing support for %sR+N(*t
caps20to10R9RtcanperformstreamcloneRR3R{RyRRRRRIRRRRRRRPRVRRRRRRRlRnRqt_pullbundle2extrapreparet	getbundleRdRR	RbRLR,Rtcombineresultst_pullapplyphasesR(Rtkwargst	streamingt
streamreqsRutbundleRR@R<RHRDR+((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRsT


'	'

	$cC@sdS(s>hook function so that extensions can extend the getbundle callN((RR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRascC@sd|jkrdS|jjd|jsR|jjjtdd|_dS|j|j	dkrt|jt
gkr|jjjtdn0|j	dkr|jjdr|j|_	n|jjdr|jjdd	|jd
|j	p|j}nr|j	dkr;|jj|jd}nH|jjdsetjtdn|jj|j|j	d}|j|jd|jj|_dS(s0pull changeset from unbundle into the local repoRNsno changes found
isrequesting all changes
tchangegroupsubsetRRR{RysWpartial pull cannot be done because other repository doesn't support changegroupsubset.(RR3RR9RPRVRRRRyRIRR{RRRRRRR	RLRtapplyR(RR<((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRes*		
'!cC@s6d|jkrdS|jjd}t||dS(NR(RRRR(RR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRsc
C@sd|jkrdS|jjdt|jdt}|ru|rutj|j|j|\}}|j}n|j}g}|jj	}|j
j}|jj
j}tj}	tj}
g|D]'}|||||	kr|^q}|r"|j}tj|j||	|ng|D]'}|||||
kr)|^q)}|r|j}tj|j||
|ndS(s/apply phase movement from observed remote stateRNR(RR3tboolRRRRR9RRt_phasecacheRRwRRLRKRRy(
RRRRt_drtdheadsRRRRLRKtpnttr((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs0
			44cC@sjd|jkrdS|jjd|j}|j}tj|j|||jj|j	d|j
dS(s?process the remote bookmark information to update the local oneRNR	(RR3R9RRtupdatefromremoteRPRRRR(RR9R((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs			cC@sd|jkrdS|jjdd}tj|jtjr|jjjd|j	j
d}d|kr|j}g}x^t|dt
D]J}|jdrtj||}tj|\}}||7}qqW|r|jjj||n|jjqn|S(sVutility function to pull obsolete markers from a remote

    The `gettransaction` is function that return the pull transaction, creating
    one if necessary. We return the transaction to inform the calling code that
    a new transaction have been created (when applicable).

    Exists mostly to allow overriding for experimentation purposeRjNs!fetching remote obsolete markers
Rtdump0R}tdump(RR3RIRRR9RRPRRRRR8RqRJRt	b85decodet_readmarkersRtinvalidatevolatilesets(RRt	remoteobsRtR*RkR'tnewmarks((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs&cC@sEtdg}tjtj|}|jdtj||S(sFreturn a set with appropriate options to use bundle20 during getbundletHG20sbundle2=(R5RR\R]R3R#Re(R9tcapsRh((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRsc@sfd}|S(sdecorator for function generating bundle2 part for getbundle

    The function is added to the step -> function mapping and appended to the
    list of steps.  Beware that decorated functions will be added in order
    (this may matter).

    You can only use this decorator for new steps, if you want to wrap a step
    from an extension, attack the getbundle2partsmapping dictionary directly.c@sLtkst|t<dkr8tjntj|S(N(tgetbundle2partsmappingR4RItgetbundle2partsorderRR#(R(R$R(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs
((RR$R((R$Rs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytgetbundle2partsgenerators	cC@s$|dk	r td|DStS(Ncs@s|]}|jdVqdS(tHG2N(RJ(Rtcap((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pys	<genexpr>s(RItanyR(Ru((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytbundle2requestedsc
K@svt|}|s|r@|jdtr@ttdn|rtttddjt|jnt|||}t	j
d||}t	j||||Si}	xO|D]G}
|
jdrt
j|
td}|	jtj|qqWtj|j|	}||d<||d<x7tD]/}t|}
|
|||d	|d
|	|q9W|jS(sReturn chunks constituting a bundle's raw data.

    Could be a bundle HG10 or a bundle HG20 depending on bundlecaps
    passed.

    Returns an iterator over raw chunks (of varying sizes).
    R<s-request for bundle10 must include changegroups#unsupported getbundle arguments: %ss, Rsbundle2=RyR{RuR:(RRRqRoRR7R8tkeysR~Rt
getbundlertgetsubsetrawRJR#R$R/RRt
decodecapsR[RPRRRa(R9RRyR{RuRt
usebundle2RzRsR:tbcapstblobtnameR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytgetbundlechunkss.	"




cK@sCd}|jdtrd}	|jd}
|
rg|
D]!}|tj|kr:|^q:}
|
s|ttdnt|
}	nt|||}tj	|||d|d|	}n|r?|j
dd|}
|
r|
jd|	n|
jdtt
|jd	td
|jkr?|
jd
dq?ndS(
s.add a changegroup part to the requested bundleR<RRsno common changegroup versionRuR'Rkt	nbchangest	mandatoryR)R*N(RIRRqRR6RoRR7R~R8RrR9RJR/RRR/(RsR9RRuR:RyR{RR<R'R;RZRzRh((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_getbundlechangegrouppart's*
!%Rc
K@sm|jdd}xT|D]L}|jd}|jd||j|j}	tj|	|_qWdS(s@add parts containing listkeys namespaces to the requested bundleRRDN((RRrR9RRXR
t
encodekeysRk(
RsR9RRuR:RRRDRhR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_getbundlelistkeyspartsCs
c
K@s|jdtr|dkr-|j}ng|jd|D]}|j^q@}|jj|}	t|	}	t	||	ndS(s8add an obsolescence markers part to the requested bundleRjs::%lnN(
RRRIRyR5RRRR8Rv(
RsR9RRuR:RyRRtsubsetRt((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_getbundleobsmarkerpartNs+thgtagsfnodesc
K@s|jdtod|ks"dSt|||}|jsAdStj|j}	g}
xH|jD]=}|	j|dt}|dk	rf|
j
||gqfqfW|
r|jdddj|
ndS(sTransfer the .hgtags filenodes mapping.

    Only values for heads in this bundle will be transferred.

    The part data consists of pairs of 20 byte changeset node and .hgtags
    filenodes raw values.
    R<RNtcomputemissingRkR(
RRqR~RRthgtagsfnodescacheRtgetfnodeRRIRRrR7(
RsR9RRuR:RyR{RRztcachetchunksRtfnode((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt_getbundletagsfnodesZs	cC@sw|j}tjdjt|j}|dgkpZ||kpZ|d|gksstjd|ndS(sVcheck if the heads of a repo have been modified

    Used by peer for unbundling.
    RRthasheds.repository changed while %s - please try againN(Rythashlibtsha1R7R8tdigestR	t	PushRaced(R9ttheir_headstcontextRyt
heads_hash((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytcheck_headss$	c
@s*ddddgd}jjddt}jdsQjdrZt}nzt|dtj|drdyfd}jjdd	s|nt	j
|d
|}zt	j|d|}Wd|j|r<dk	r<jj
d
tdtfd}nXddk	r^djnWqtk
r}	t|	_|rdk	rj|	_fd}nqXn%jd<|jWdtjddd|dk	r%|jjnXS(sApply a bundle to a repo.

    this function makes sure the repo is locked during the application and have
    mechanism to check that no push race occurred between the creation of the
    bundle and its application.

    If the push was raced as PushRaced exception is raised.iRsbundle2-output-capturesremote:http:s
remote:https:suploading changesR&c@s{dssjd<jd<jd<djd<djd<ddjd<ndS(NiiiRRR*R(RR
RcR((t	lockandtrR9RR(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs
tbundle2lazylockingt
captureoutputRNR	tsubprocc@sjdd|dtdS(NtoutputRkR(RrR(R(Rx(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt	recordoutsic@s,tjdd|dt}j|dS(NRRkR(Rt
bundlepartRR(RRh(tparts(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs	i(RIRPRRRJRqRRtsafehasattrRtbundleoperationRdRlt
pushbufferRt
BaseExceptiontduringunbundle2t
salvageoutputt_bundle2salvagedoutputR
RRRt	popbuffer(
R9R<RyRRRRRRR@((RRRxR9RRs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRsJ		
			
cC@s|j}|j}|jjddts.dSt|r>dS|jrKdS|jds^dS|jd}t|_	t
||}|s|jjtddSt
||}|s|jjtd|jjtddSt|j|}|dd}|jjtd	|t|j||rR|jjtd
nR|jjddtr|jjtdn!tjtd
dtddS(s0Apply a clone bundle from a remote, if possible.RPRNsDno clone bundles available on remote; falling back to regular clone
sOno compatible clone bundles available on server; falling back to regular clone
s5(you may want to report this to the server operator)
itURLsapplying clone bundle from %s
sfinished applying clone bundle
tclonebundlefallbacksfalling back to normal clone
serror applying bundleR^s}if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false"(R9RRPRRqR/RyRt_callRtparseclonebundlesmanifesttnoteRtfilterclonebundleentriesRtsortclonebundleentriesRVttrypullbundlefromurlRR	RL(RR9RtrestentriesR((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs<				cC@sg}x|jD]}|j}|s1qni|dd6}x|dD]}|jdd\}}tj|}tj|}|||<|dkrMy6t||dt\}	}
}|	|d<|
|d<Wqtjk
rqtjk
rqXqMqMW|j	|qW|S(	sParses the raw text of a clone bundles manifest.

    Returns a list of dicts. The dicts have a ``URL`` key corresponding
    to the URL and other keys are the attributes for the entry.
    iRiR t
BUNDLESPECR<tCOMPRESSIONtVERSION(
t
splitlinesR!R#R$R?RqR	R"R2R(R9R%tmtlinetfieldstattrstrawattrR*R+RgR'R&((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs.

cC@sg}x|D]}|jd}|ryt||dtWqtjk
rt}|jjt|dq
qtjk
r}|jjd|dt|fq
qXnd|krt	j
r|jjd|dq
n|j|q
W|S(suRemove incompatible clone bundle manifest entries.

    Accepts a list of entries parsed with ``parseclonebundlesmanifest``
    and returns a new list consisting of only the entries that this client
    should be able to apply.

    There is no guarantee we'll be able to apply all returned entries because
    the metadata we use to filter on may be missing or wrong.
    RR;s
s1filtering %s because unsupported bundle spec: %s
Rt
REQUIRESNIs'filtering %s because SNI not supported
(RR?RqR	R"RPRRJR2RthassniR(R9Rt
newentriestentryR:te((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyR<s&


c@sl|jdddgs(t|SgD]}|jdd^q/fd}t|d|S(NRPtclonebundlepreferstdefaultR ic@sxD]\}}|j|}|j|}|dk	rY|dkrY||krYdS|dk	r|dkr||krdS|dks|dkrqn||krqn||krdS||krdSqqWdS(Niii(RRI(taRftprefkeyt	prefvaluetavaluetbvalue(tprefers(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pytcompareentryes"$$tcmp(RRR!R8(RPRR)R((Rs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyR]s
%"c@sL|j}z.|jdz
ytj||}t||d}t|tjrytj||fdn5t|t	j
r|j|n|j|d|jt
SWnftjk
r}|jtdt|n4tjk
r%}|jtd|jdnXtSWdjXWd|jXdS(	s%Attempt to apply a bundle from a URL.t	bundleurlR@c@sS(N(((R(s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt<lambda>sRsHTTP error fetching bundle: %s
serror fetching bundle: %s
iN(R
RcturlmodtopenRWR_RRaRdRRORRRqturlerrt	httperrorRRRJturlerrortreasonRR(RPR9RR
RQR<R((Rs6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyRs*
 "(((gt
__future__RRRti18nRRRRRRRRRRRR	R
RRRR
RRRRRRRR R#RIR1R3RqRR?RWRiRvR~RtobjectRRQRRRRRRRRRR R"R!R%R'R=RORPRXRRRRLRvRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR(((s6/usr/lib/python2.7/dist-packages/mercurial/exchange.pyt<module>sj		



o	5			h		U		
14	 	))5	/	/	8		G8		&	D		!		#				(				
	)		E	@	$	!	,