-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/hgext/convert/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyc

ó
lŕÁ\c@sŐddlZddlmZejjdddgƒddlmZddlmZddlm	Z	m
Z
mZy0dd	lm
Z
mZmZdd
lmZWnek
r´nXdZd
efd„ƒYZdS(i˙˙˙˙N(tdemandimportsbzrlib.transactionssbzrlib.urlutilstElementPath(t_(tutil(tNoRepotcommittconverter_source(tbzrdirtrevisionterrors(tRevisionSpectfiletsymlinkt
bzr_sourcecBs†eZdZdd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
d„Zd„Zd
„ZRS(s>Reads Bazaar repositories by using the Bazaar Python librariescCs
tt|ƒj||d|ƒtjjtjj|dƒƒsYttdƒ|ƒ‚nyt	Wn1t
k
r”ttdƒtdƒdƒ‚nXtjj|ƒ}|j|ƒyt	j
j|ƒjƒ|_Wn*tjk
r˙ttdƒ|ƒ‚nXi|_dS(Ntrevs.bzrs)%s does not look like a Bazaar repositorys"Bazaar modules could not be loadeds  (try installing the %s package)tbzr(tsuperR
t__init__tostpathtexiststjoinRRRt	NameErrortabspatht_checkrepotypetBzrDirtopentopen_repositoryt
sourcerepoR	tNoRepositoryPresentt
_parentids(tselftuiRR((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyR$s"!


cCsěyžddlm}|jj|ƒd}y|jdtƒ}|j}Wn/tjtj	fk
ryd}|jƒ}nX|dk	r˝|jjj
|jjj
kr˝|jjtdƒƒnWn'tk
rç|jjtdƒƒnXdS(Ni˙˙˙˙(Ritrecommend_upgradesawarning: lightweight checkouts may cause conversion failures, try with a regular branch instead.
s(bzr source type could not be determined
(tbzrlibRRtopen_containingtopen_workingtreetFalsetbranchR	t
NoWorkingTreetNotLocalUrltNonetopen_branchtroot_transporttbaseR twarnRt	Exceptiontnote(RRRtdirttreeR&((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyR;s

cCs|jjƒdS(sBefore the conversion begins, acquire a read lock
        for all the operations that might need it. Fortunately
        read locks don't block other reads or writes to the
        repository, so this shouldn't have any impact on the usage of
        the source repository.

        The alternative would be locking on every operation that
        needs locks (there are currently two: getting the file and
        getting the parent map) and releasing immediately after,
        but this approach can take even 40% longer.N(Rt	lock_read(R((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pytbeforeOscCs|jjƒdS(N(Rtunlock(R((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pytafter\scCs|jjdtƒS(Ntusing(Rt
find_branchestTrue(R((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyt_bzrbranches_scCsö|js7tg|jƒD]}|jƒ^qƒ}n–d}xY|jƒD]K}y%tj|jƒ}|j|ƒ}Wntj	k
r‹nX|j
}qJW|dkrÄtjt
dƒ|jƒ‚n|g}g|D]}|dkrÔ|^qÔ}|S(Ns%s is not a valid revisionsnull:(RtsortedR9t
last_revisionR)R
tfrom_stringt
in_historyR	tBzrErrortrev_idRtAbortR(RtbtheadstrevidR&trtinfoth((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pytgetheadsbs	.
	%c	Cs|jj|ƒ}|j|j|jp*dƒƒ}d}|dk	rW|j|ƒ}n|tkr‚tt	dƒ||fƒ‚n|j
||f}|dkrč|j|ƒ}|dkrŢtj
t	dƒ||fƒ‚n||fS|j|ƒ}|jƒ|fSdS(Nsutf-8s!%s is not available in %s anymoreRs%s.%s symlink has no target(Rt
revision_treetpath2idtdecodetencodingR)tkindtsupportedkindstIOErrorRt
_modecachetget_symlink_targetRR@tget_filetread(	RtnameRtrevtreetfileidRLtmodettargettsio((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pytgetfilevs"!
cCsYi|_|jj|ƒ|_|jj|ƒ}|jj|dƒ}|j|j|ƒS(Ni(RORRHt_revtreeRtpopt_gettreechanges(Rtversiont	parentidstprevtree((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyt
getchanges‹s
	c
CsÝ|jj|ƒ}|js7g}tjf|j|<n|j|jƒ}||j|<|j|jj	ddƒƒ}|dkr‰d}nt
d|dd|j|jfd|j|j
ƒd	|j|jƒd
|d|ƒS(Nsbranch-nickudefaultttrunktdefaulttparentstdates%d %dtauthortdescR&R(Rtget_revisiont
parent_idsRt
NULL_REVISIONRt
_filterghoststrecodet
propertiestgetRt	timestampttimezonet	committertmessage(RR]RRcR&((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyt	getcommit•s	
	cCspi}xc|jƒD]U}|jƒs)iS|jjƒ}x-|jƒD]\}}|||j|ƒ<qEWqW|S(N(R9t
supports_tagsttagstget_tag_dictt	iteritemsRk(RtbytetagsR&ttagdictRSR((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pytgettagsŠscCs‡i|_|jj|ƒ}|dk	r;|j||}n	tj}|jj|ƒ}g|j||ƒdD]}|d^qm}|S(Ni(RORRHR)RRRiR\(RRtitcurtreetparentidR_tetchanges((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pytgetchangedfilesłs		-c	CsX|j}g}i}tƒ}t|j|ƒdd„dtƒ}x	|D]\}}	}
}}}
}}|	ddksI|	ddkrqIn|ddkr%|ddkrĐ|j|j|	dƒ|fƒn|ddkrId|	krI|	d|	dk}|jj	|	dƒ}x|jj
|ƒD]ď\}
}|jdkrJq)n|j|	dd|
ƒ}||krwq)n|j|ƒ|sq)n|j|	dd|
ƒ}|j||fƒ|j||fƒ|j
rŕd	př|jd
krődpřd}||j||f<|||<q)WqIqIn|	\}}|dk	rO|j|ƒ}n|dk	rm|j|ƒ}n|j|p||ƒ|dkrĽ|j||fƒqIn|r×||kr×|||<|j||fƒng||fD]}|d^qä\}}|rd	p!|d
krd
p!d}||j||f<|j||fƒqIW||fS(NtkeycSs|ddp|ddS(Nii((tc((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyt<lambda>Čstreverseiuit	directoryt/txRtsttl(NR„(t_revision_idtsetR:titer_changesR8R)tappendRkt	inventoryRItiter_entriesRLtaddt
executableRO(RtcurrenttoriginRCR~trenamestseent
curchangesRUtpathstchanged_contentt	versionedtparentRSRLR‘trenamingtsubdirtentrytfrompathttopathRVRR}((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyR\Ŕsj				" #

)cCsA|jj|ƒ}tg|D]}||kr|^qƒ}|S(sqFilters out ghost revisions which hg does not support, see
        <http://bazaar-vcs.org/GhostRevision>
        (Rtget_parent_mapttuple(Rtidst	parentmapRšRc((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyRjs+N(t__name__t
__module__t__doc__R)RRR3R5R9RGRYR`RrRyRR\Rj(((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyR
!s		
					
		
	
	X(sfilessymlink(Rt	mercurialRtignoretextendtmercurial.i18nRRtcommonRRRR"RRR	tbzrlib.revisionspecR
tImportErrorRMR
(((s5/usr/lib/python2.7/dist-packages/hgext/convert/bzr.pyt<module>s	



Copyright © 2017 || Recoded By Mr.Bumblebee