-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyc

ó
Ì\,Tc@s¤dZddlmZddlmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZdejfd„ƒYZdeejfd„ƒYZd	eejfd
„ƒYZdeejfd„ƒYZd
ejfd„ƒYZdejfd„ƒYZd„Zdded„Z dS(sRepository class for viewing uncompressed bundles.

This provides a read-only repository interface to bundles as if they
were part of the actual repository.
iÿÿÿÿ(tnullid(t_NtbundlerevlogcBsbeZd„Zd„Zd„Zd„Zd„Zd	d	d	d„Zd„Z	d„Z
d„ZRS(
cCstj|ƒ}tjj|||ƒ||_t|ƒ}|d|_d}tƒ|_	x¸t
r|j|ƒ}|s{Pn|d}|d}	|d}
|d}|d}|d}
t|
ƒ}|jƒ|}||ƒ}||j
kr|}|j	j|j
|ƒq\nxD|	|
fD]6}||j
krtj||jtdƒƒ‚qqW||j
kr…t||jtd	ƒƒ‚n|j|ƒ}tj|d
ƒ|d|||j|	ƒ|j|
ƒ|f}|jjd|ƒ||j
|<|j	j|ƒ|}|d7}q\WdS(Nitnodetp1tp2tcst	deltabasetdeltasunknown parentsunknown delta baseiiÿÿÿÿ(tscmutiltreadonlyvfstrevlogt__init__tbundletlent
repotiprevtNonetsett
bundlerevstTruet
deltachunkttelltnodemaptaddterrortLookupErrort	indexfileRtrevtoffset_typetindextinsert(tselftopenerRR
t
linkmappertntchaint	chunkdataRRRRRRtsizetstarttlinktptbaserevte((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRsN	
	





!
cCsT||jkr"tjj||ƒS|jj|j|ƒƒ|jj|j|ƒƒS(N(RRt_chunkR
tseekR&treadtlength(RR((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR+LscCs³||jkrK||jkrK|j|d}||kr|j|ƒSn4||jkr||jkrtjj|||ƒStj|j|j|ƒƒ|j|j|ƒƒƒS(s1return or calculate a delta between two revisionsi(	RRR+RtrevdifftmdiffttextdifftrevisionR(Rtrev1trev2trevb((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR/UscCs=t|tƒr'|}|j|ƒ}n|}|j|ƒ}|tkrLdSd}g}|}x^||jkr¾|jr|jd|kr|jd}Pn|j|ƒ|j	|d}qaW|dkrÝ|j
|ƒ}nx4|r|j|jƒƒ}t
j||gƒ}qàW|j|||ƒ|||f|_|S(sTreturn an uncompressed revision of a given node or revision
        number.
        tiiiN(t
isinstancetintRRRRRt_cachetappendRtbaserevisionR+tpopR0tpatchest
_checkhash(Rt	nodeorrevRRttextR#titerrevR((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR2bs0

	cCstjj||ƒS(N(RR2(RR?((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR;…scCs
t‚dS(N(tNotImplementedError(RR@ttransactionR'RRtd((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pytaddrevision‹scCs
t‚dS(N(RB(RtrevsR!RC((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pytaddgroupscCs
t‚dS(N(RB(RRtminlink((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pytstripscCs
t‚dS(N(RB(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyt	checksize‘sN(t__name__t
__module__RR+R/R2R;RRERGRIRJ(((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRs	7			
	#			tbundlechangelogcBseZd„Zd„ZRS(cCs<tjj||ƒd„}tj|||j||ƒdS(NcSs|S(N((tx((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyt<lambda>—s(t	changelogRRR(RR R
R!((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR•s	cCstjj||ƒS(N(RPR2(RR?((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR;›s(RKRLRR;(((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRM”s	tbundlemanifestcBseZd„Zd„ZRS(cCs3tjj||ƒtj|||j||ƒdS(N(tmanifestRRR(RR R
R!((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR¢scCstjj||ƒS(N(RRR2(RR?((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR;§s(RKRLRR;(((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRQ¡s	t
bundlefilelogcBs#eZd„Zd„Zd„ZRS(cCs?tjj|||ƒtj|||j||ƒ||_dS(N(tfilelogRRRt_repo(RR tpathR
R!trepo((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR«scCstjj||ƒS(N(RTR2(RR?((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR;±scCs|jj|ƒdS(N(RUtfile(Rtf((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyt_file´s(RKRLRR;RZ(((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRSªs		t
bundlepeercBseZd„ZRS(cCstS(N(tFalse(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pytcanpush¸s(RKRLR](((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR[·stbundlerepositorycBseZd„Zejd„ƒZejd„ƒZejd„ƒZejd„ƒZd„Z	d„Z
d„Zd„Zd	„Z
d
„ZRS(c	Csád|_ytjj|||ƒWnRtjk
rwtjƒ|_tj	||jdƒtjj|||jƒnX|j
jddtdƒ|r¸dt
j|ƒd||_n
d||_d|_t
j|dƒ}tj|||ƒ|_|jjƒrÔ|jjdd	d
dƒ\}}||_tj|dƒ}zG|jd
ƒx3trˆ|jjdƒ}|sxPn|j|ƒqVWWd|jƒX|jj|jddƒ}tj||||jƒ|_ni|_dS(Nitphasestpublisht
bundlereposbundle:t+trbtprefixs
hg-bundle-tsuffixs.hg10untwbtHG10UNiitmodei(Rt_tempparentt	localrepotlocalrepositoryRRt	RepoErrorttempfiletmkdtemptinstancetuit	setconfigR\tutilt
expandpatht_urlt	posixfiletexchanget
readbundleR
t
compressedtvfstmkstemptostfdopentwriteRR-tclosetopentbundlefilespos(	RRpRVt
bundlenameRYtfdtempttemptfptemptchunk((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR¼s<	!
		
	!cCs8|jjƒt|j|jƒ}|jjƒ|_|S(N(R
tchangelogheaderRMtsopenerRtmanstart(Rtc((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRPäs
cCsT|jj|jƒ|jjƒt|j|j|jjƒ}|jjƒ|_	|S(N(
R
R,RˆtmanifestheaderRQR‡RPRRt	filestart(Rtm((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRRìs

cCs|j|jS(N(RPRˆ(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRˆõscCs|j|jS(N(RRR‹(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR‹úscCs|jS(N(Rt(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyturlÿscCsí|jsŽ|jj|jƒxotrŠ|jjƒ}|s>Pn|d}|jjƒ|j|<x&tr†|jjdƒ}|saPqaqaWqWn||jkrÖ|jj|j|ƒt	|j
||j|jj|ƒSt
j
|j
|ƒSdS(Ntfilename(R€R
R,R‹Rt
filelogheaderRRRRSR‡RPRRT(RRYR$tfnameR‰((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRXs"		
	cCsU|jjƒ|jdk	r2|jj|jƒn|jrQtj|jt	ƒndS(s'Close assigned bundle file immediately.N(
R
R~RmRRytunlinkRitshutiltrmtreeR(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR~s

	cCstS(N(R\(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pytcancopyscCs
t|ƒS(N(R[(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pytpeer"scCs
tjƒS(N(R{tgetcwd(R((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR–%s(RKRLRRjtunfilteredpropertycacheRPRRRˆR‹RRXR~R”R•R–(((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyR^»s	(						c	CsU|rtjtdƒƒ‚n|jdddƒ}|sftjtjƒƒ}|dkrfd}qfn|rÇtjƒ}||krd}qÇtj	j
|dƒ}|j|ƒrÇ|t|ƒ}qÇntj
|ƒ}|jƒ}|jdkr8|jddƒ}t|ƒdkr)||d}}qE|\}}n
||}}t|||ƒS(Ns#cannot create new bundle repositoryR
tmainreporootR6Rbii(RrtAbortRtconfigtcmdutiltfindrepoR{R–RRVtjoint
startswithRRt	localpathtschemetsplitR^(	RpRVtcreatet
parentpathtcwdtutstrepopathR((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyRo)s.	
csútj|ˆd|d|ƒ}|\}}}	|sqy|rLtj|ƒnWntk
r`nX|gˆjfSt|ƒ}
g|	D]}||
kr„|^q„}	d
‰d
‰ˆjƒ}|sÇ|r®ˆj	dƒrôˆj
dd|d|	ƒ}
nL|d
kr+ˆj	dƒr+ˆj|dƒ}
d
}	nˆj||	dƒ}
|rLdpOd}tj
|
||ƒ}‰|rzd
‰n|s®t|j|j|ƒ}‰|jƒ}q®n|rÃ|jƒ}n|jj||	ƒ}‡‡‡fd	†}|||fS(sGobtains a bundle of changes incoming from other

    "onlyheads" restricts the returned changes to those reachable from the
      specified heads.
    "bundlename", if given, stores the bundle to this file path permanently;
      otherwise it's stored to a temp file and gets deleted again when you call
      the returned "cleanupfn".
    "force" indicates whether to proceed on unrelated repos.

    Returns a tuple (local, csets, cleanupfn):

    "local" is a local repo from which to obtain the actual incoming
      changesets; it is a bundlerepo for the obtained bundle when the
      original "other" is remote.
    "csets" lists the incoming changeset node ids.
    "cleanupfn" must be called without arguments when you're done processing
      the changes; it closes both the original "other" and the one returned
      here.
    theadstforcet	getbundletincomingtcommontchangegroupsubsettHG10BZRgcs7ˆrˆjƒnˆr)tjˆƒnˆjƒdS(N(R~R{R‘((R
Ratother(s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pytcleanupŒs

N(t	discoverytfindcommonincomingR{R‘tOSErrorR~RRtlocaltcapableRªtchangegroupR­twritebundleR^tbaseuitrootR¨t
unfilteredRPtfindmissing(RpRWR¯t	onlyheadsRR©ttmpR¬R«trheadst	commonsetRNRjtcgt
bundletypeRtcsetsR°((R
RaR¯s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pytgetremotechangesHsF	
%
		
(!t__doc__RRti18nRR{RmR’R¶RrR0R±R›R	RvRjRPRRRTRRRRMRQRSt	localpeerR[RkR^RoRR\RÃ(((s8/usr/lib/python2.7/dist-packages/mercurial/bundlerepo.pyt<module>s$TH€
	
n	

Copyright © 2017 || Recoded By Mr.Bumblebee