-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
Ì\,Tc@s–ddlZddlZddlmZddlmZmZddlmZm	Z	d„Z
d„Zdefd„ƒYZ
d	e	fd
„ƒYZdS(iÿÿÿÿN(t_(tutilterror(tSKIPREVtconverter_sourceccsZt|ƒ}x<|dkrJ|| ||dfV|jdd|ƒ}qWd|fVdS(sYield tuples with path split at '/', starting with the full path.
    No leading, trailing or double '/', please.
    >>> for x in rpairs('foo/bar/baz'): print x
    ('foo/bar/baz', '')
    ('foo/bar', 'baz')
    ('foo', 'bar/baz')
    ('.', 'foo/bar/baz')
    iÿÿÿÿit/it.N(tlentrfind(tpathti((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pytrpairs
s
	cCs|dkrdStj|ƒS(s We use posixpath.normpath to support cross-platform path format.
    However, it doesn't handle None input. So we wrap it up. N(tNonet	posixpathtnormpath(R	((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyt	normalizest
filemappercBs>eZdZdd„Zd„Zd„Zd„Zd„ZRS(s€Map and filter filenames when importing.
    A name can be mapped to itself, a new name, or None (omit from new
    repository).cCsX||_i|_i|_i|_|rT|j|ƒrTtjtdƒƒ‚qTndS(Nserrors in filemap(tuitincludetexcludetrenametparseRtAbortR(tselfRR	((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyt__init__(s				csÌd}‡‡fd†}tjt|ƒ|tƒ‰ˆjd7_ˆjƒ}xw|rÇ|dkržtˆjƒƒ}|||ˆjdƒ7}|ˆj|<n|dkrþtˆjƒƒ}|||ˆjdƒ7}|||ˆjdƒ7}|ˆj|<nº|dkrWtˆjƒƒ}tˆjƒƒ}|||ˆjdƒ7}|ˆj|<na|dkr…|ˆj	tˆjƒƒƒ7}n3ˆj
jtdƒˆj
ˆj|fƒ|d	7}ˆjƒ}qQW|S(
NicsÍ|s3ˆjjtdƒˆjˆj|fƒdS||kroˆjjtdƒˆjˆj||fƒdS|jdƒs™|jdƒs™d|krɈjjtdƒˆjˆj||fƒdSdS(Ns%s:%d: path to %s is missing
is%s:%d: %r already in %s list
Rs//s%s:%d: superfluous / in %s %r
i(RtwarnRtinfiletlinenot
startswithtendswith(tnametmappingtlistname(tlexR(s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pytcheck3ss!@#$%^&*()-=+[]{}|;:,./<>?RRRtsources%s:%d: unknown directive %r
i(tshlextopentTruet	wordcharst	get_tokenRRRRRRRRRR(RR	terrsR"tcmdRtsrctdest((R!Rs9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyR1s6	"
cCs_t|ƒ}xCt|ƒD]5\}}y||||fSWqtk
rMqXqWd|dfS(Nt(RRtKeyError(RRRtpretsuf((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pytlookup^s
cCsç|jr%|j||jƒd}n|}|jrP|j||jƒd}nd}|jrf|s~t|ƒt|ƒkr‚dS|j||jƒ\}}}|rã|dkr¶|S|rß|jdƒrÓ||S|d|S|S|S(NiR-RR(RR1RRRRR(RRtinctexctnewpreR/R0((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyt__call__gs$		(cCst|jp|jp|jƒS(N(tboolRRR(R((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pytactive}sN(	t__name__t
__module__t__doc__RRRR1R5R7(((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyR#s		-			tfilemap_sourcecBs³eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„Zd„Zd„ZRS(cCs}tt|ƒj|ƒ||_t||ƒ|_i|_i|_i|_d|_	t
|_i|_i|_
i|_dS(N(tsuperR;RtbaseRtcommitst	parentmaptwantedancestorsRtconvertedordertFalset_rebuilttorigparentstchildrentseenchildren(RRt
baseconvertertfilemap((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRs								cCs|jjƒdS(N(R=tbefore(R((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRI scCs|jjƒdS(N(R=tafter(R((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRJ£sc	CsÜ||_itt6}tƒ}g}xš|jD]}||}||k}|rl|||<||j|<n|||j|<||j|<||}|tkr©d}n|j|||fƒq0W||_|j	j
|ƒS(N(RCRtsettorderR?R@RtappendRAR=t	setrevmap(	Rtrevmaptseentdummysett	convertedtrevtmappedtwantedtarg((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRN¦s$

	



		cCsh|jr
tSt|_|jjƒ|jjƒ|jjƒx¦|jD]›\}}}||jkr³y|j|ƒj	|j|<Wq³t
jk
r¯|jj
d|ƒqGq³Xn|dk	rG|jj|dƒd|j|<qGqGWx{|jD]p\}}}y|j|}Wntk
r&qðnX|r@|j||ƒn|j||ƒ|j||ŒqðWtS(Nsunknown revmap source: %s
ii(RCR&R?tclearR@RFRARDt	getcommittparentsRtRepoLookupErrorRtdebugRREtgetR.tmark_wantedtmark_not_wantedt_discard(RRSRURVRY((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pytrebuildÅs2		



'
cCs
|jjƒS(N(R=tgetheads(R((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRaãscCsU|jj|ƒ}|j|<x1|jD]&}|jj|dƒd|j|<q'W|S(Nii(R=RXR>RYRER\(RRStctp((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRXæs$cCs*||jkr|j|S|jj|ƒS(N(R>R=RX(RRS((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyt
_cachedcommitîscGsªx£|D]›}|dkrqn|jj|dƒd|j|<|j||j|kr|jj|dƒ|jj|dƒ|j|=|jr¢|j|=q¢qqWdS(Nii(RRFR\RER@tpopR?RC(Rtrevstr((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyR_ós
 
	cCsjy|jj||ƒ}Wn&tk
rAtjtdƒƒ‚nXx!|D]}|j|ƒrItSqIWtS(Ns+source repository doesn't support --filemap(	R=tgetchangedfilestNotImplementedErrorRRRRR&RB(RRSR
tfilestf((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRUÿs

cCs_|dkr3t|j|<ttfƒ|j|<dS|j||j|<|j||j|<dS(N(RRR?RKR@(RRSRc((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyR^s
cCs‹||j|<tƒ}xT|D]L}||jkrI|j|j|ƒq|jjtdƒ||fƒqW|j|ƒ||j|<dS(Ns!warning: %s parent %s is missing
(R?RKR@tupdateRRRtadd(RRSRYtwrevRc((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyR]s
	

csÀˆj|j}t|ƒdkr/ˆjƒng}tƒ}ˆj|j}t}xÔt|ƒD]Æ\}‰ˆjˆ‰ˆt	ksaˆ|kr˜qant
j‡‡‡fd†|Dƒƒ}|r|rt|ƒdkrˆjˆƒj|krt
}qn|jˆˆ||fƒ|jˆƒqaW|rWg|D]}	|	ds8|	^q8}nd}
|r™td„|Dƒƒ}
g|D]}	|	d^q€}n|r¨d}
n|ˆj|<t}dˆj|jkrg|D]}	ˆj|	ƒj^qØ}||krt
}qnt|ƒdkr”|r”ˆj||
ƒr”d}	|rS||
}	nˆj||	ƒˆjj|t|	fƒˆj|Œˆj|S|ˆj|_ˆj||ƒˆjj|t
dfƒˆj|Œˆjj|ƒ\}
}i}xT|
D]L\}}ˆj|ƒ}|rÿ||ks8||krÿ||f||<qÿqÿWt|jƒƒ}i}xL|D]D}ˆj|ƒ}|rnˆj||ƒ}|r²|||<q²qnqnW||fS(Nic3sG|]=}ˆ|krˆˆj|krˆˆj|kr|VqdS(N(R?R@(t.0tp2(tmp1tp1R(s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pys	<genexpr>Osicss|]}|dVqdS(iN((RoRc((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pys	<genexpr>^sitclosei(R>RYRR`RKtbranchRBt	enumerateR?RRtanyRdR&RMRmRtmaxRDtextraRUR^RAR_R]R=t
getchangesRtsortedtitems(RRSRYtmparentstknownparentsRtthasbranchparentR
t
isancestorRctwptclosedt	pbranchestchangestcopiesRjRkRgtnewftncopiesRbtnewct	newsource((RqRrRs9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRy3st
	
% & 	
%,



cCs|\}}|jj||ƒS(N(R=tgetfile(RRRStrealnametrealrev((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyR‰•scCs
|jjƒS(N(R=tgettags(R((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRŒ™scCs
|jjƒS(N(R=thasnativeorder(R((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRœscCs|jj|ƒS(N(R=t	lookuprev(RRS((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRŽŸscCs
|jjƒS(N(R=tgetbookmarks(R((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyR¢scCs|jj||ƒdS(N(R=RR(RRStsinkrev((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyRR¥s(R8R9RRIRJRNR`RaRXRdR_RUR^R]RyR‰RŒRRŽRRR(((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyR;Žs&													b					(R
R$tmercurial.i18nRt	mercurialRRtcommonRRRRtobjectRR;(((s9/usr/lib/python2.7/dist-packages/hgext/convert/filemap.pyt<module>s		k

Copyright © 2017 || Recoded By Mr.Bumblebee