-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
Ì\,Tc@sßdZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZddlmZddlmZddlZddlZiZejeƒZedddd	ed
ƒdfd	deed
ƒfgedƒdedeƒd„ƒZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"eed„Z#dd„Z%dd„Z&deed„Z'edd d!ged"ƒfgej(ed#ƒƒd$d%„ƒZ)dS(&s=High-level command function for lfconvert, plus the cmdtable.iÿÿÿÿN(	tutiltmatchthgtnodetcontextterrortcmdutiltscmutiltcommands(t_(treleaset	lfconverttstsizets9minimum size (MB) for files to be converted as largefilestSIZEs	to-normals/convert from a largefiles repo to a normal repos#hg lfconvert SOURCE DEST [FILE ...]tnorepot	inferrepocsÍ|drt}n*t}tj|t|jdƒddƒ}tj|ƒshtj	t
dƒ|ƒ‚ntj|ƒs“tj	t
dƒ|ƒ‚ntj||ƒ‰|jt
dƒ|ƒtj||dtƒ}t}d}	}
z®|j
ƒ}	|jƒ}
‡fd†ˆjjdˆjƒƒdDƒ}itjtj6}|rtƒ}
tƒ}|s}|jtjd	dgƒ}n|r¤tjˆjd
t|ƒƒ}nd}i}xh|D]`}|jt
dƒ|jƒdt
d
ƒdˆdjƒƒtˆ||||
||||ƒ	q·W|jt
dƒdƒtjj |j!tj"ƒƒrkt#j$|j!tj"ƒƒnx‚|j%ƒD]t}tjj&|j!|ƒƒr²tj'|j!|ƒƒny&tj(tjj)|j!|ƒƒƒWqxt*k
rëqxXqxW|
r‹|j+j,dƒ|j-ƒq‹nux\|D]T}|jt
dƒ|jƒdt
d
ƒdˆdjƒƒt.|ˆ|||ƒqW|jt
dƒdƒt}Wd|j/j0ƒt1|
|	ƒ|sÈt#j$|jƒnXdS(sMconvert a normal repository to a largefiles repository

    Convert repository SOURCE to a new repository DEST, identical to
    SOURCE except that certain files will be converted as largefiles:
    specifically, any file that matches any PATTERN *or* whose size is
    above the minimum size threshold is converted as a largefile. The
    size used to determine whether or not to track a file as a
    largefile is the size of the first version of the file. The
    minimum size can be specified either with --size or in
    configuration as ``largefiles.size``.

    After running this command you will need to make sure that
    largefiles is enabled anywhere you intend to push the new
    repository.

    Use --to-normal to convert largefiles back to normal files; after
    this, the DEST repository can be used without largefiles at all.t	to_normalR
tdefaults %s is not a local Mercurial reposinitializing destination %s
tcreatec3s|]}ˆ|VqdS(N((t.0tctx(trsrc(s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pys	<genexpr>SsitpatternsRsconverting revisionstunittrevisionttotalttipt
largefilesN(2tFalsetTruetlfutilt
getminsizetgettNoneRtislocalRtAbortR	t
repositorytstatustwlocktlockt	changelogtnodesbetweentheadsRtnullidtsett
configlisttlongnametmatch_Rtroottlisttprogresstrevt_lfconvert_addchangesettostpathtexiststwjoint	shortnametshutiltrmtreetkeystisfiletunlinkt
removedirstdirnametOSErrortrequirementstaddt_writerequirementst
_addchangesettdirstatetclearR
(tuitsrctdesttpatstoptsttolfileR
trdsttsuccesstdstwlocktdstlocktctxstrevmaptlfilestnormalfilestmatchertlfiletohashRtf((Rs?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRsp
	$
		!
&




c	s¢tˆˆƒ}tˆ|ƒ‰‡‡‡‡‡fd†}g}xCˆD];}tj|ƒrt|jtj|ƒƒqF|j|ƒqFWt||ˆ||ˆƒdS(Nc	s›tj|ƒˆkr„yˆjtj|ƒƒ}Wntjk
rMt‚nX|jƒ}|rvtj|dƒ}n|jƒj	ƒ}tj
ˆ|ƒ}|dkrtˆˆˆj
ƒƒtj
ˆ|ƒ}|dkrtjtdƒ|t
jˆj
ƒƒfƒ‚qnd}d}zt|dƒ}|jƒ}Wd|rO|jƒnXtj|||d|jƒkd|jƒk|ƒSt|ˆ|ˆƒSdS(Nis'missing largefile '%s' from revision %sRtrbtltx(R tstandintfilectxRtLookupErrortIOErrortrenamedtsplitstandintdatatstriptfindfileR#tcachelfilesRRR%R	thextopentreadtcloseRt
memfilectxtflagst_getnormalcontext(	trepotmemctxRZtfctxRbthashR8Rdtfd(RtfilesRURRJ(s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyt
getfilectxŽs6
	%(t_convertparentst_getchangedfilesR t	isstandintappendRct_commitcontext(	RJRRPRRUtparentsRutdstfilestfile((RRtRURRJs?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRG‡s&
c	s§tˆˆƒ}	tˆ|	ƒ}
g}xN|
D]F}||kr||krt|ˆ||ƒ}
|ˆjƒkrëˆj|ƒ}|jƒ}|ož|d|k}|
|O}
d|jƒkrë|rßtjt	dƒ|ƒ‚nt
}
qën|
r|j|ƒq|j|ƒn||krd|jt
j|ƒƒ|ˆjƒkrqˆj|ƒ}d|jƒkr§|jƒ}|r§|d|kr§tjt	dƒ|ƒ‚q§ntjdƒ}|jˆ|jƒƒ|jƒ}|ˆksõˆ||kra|j|ˆ|jƒˆ|jƒƒdˆ|jƒk}t
j|t
j|ƒ||ƒ|ˆ|<qaqqq+|j|ƒq+W‡‡‡fd†}t||	ˆ||ˆƒdS(NiR\s+renamed/copied largefile %s becomes symlinkslargefile %s becomes symlinkRR]csÉtj|ƒr²tj|ƒ}yˆj|ƒ}Wntjk
rMt‚nX|jƒ}|rvtj|dƒ}nt	j
||ˆ|dd|jƒkd|jƒk|ƒSt|ˆ|ˆƒSdS(Nis
R\R](
R RxRcR_RR`RaRbR^RRlRmRn(RoRpRZtsrcfnameRqRb(RRYRU(s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRuós
(RvRwt_islfiletmanifestR_RbRmRR%R	RRERyR R^tsha1tupdateRdt	hexdigesttwwritetwritestandinRz(RRPRRURVRWRXR
RYR{RtR|RZtislfileRqRbtrenamedlfiletmRrt
executableRu((RRYRUs?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyR6½sP

	
'c	Csutj|||jƒ|||jƒ|jƒ|jƒƒ}|j|ƒ}|j|ƒ|jj	ƒ||j
ƒ<dS(N(RRptdescriptiontusertdatetextrat	commitctxt
setparentsR*RR(RPR{RR|RuRUtmctxtret((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRzs
$
cCsÝt|jƒƒ}tj|krÙ|jƒ}|jƒdjƒ}|jƒdjƒ}|t|ƒt|ƒBt|ƒO}xY|D]N}|||j|dƒksÂ|||j|dƒkr„|j|ƒq„q„Wn|S(Nii(	R.RtRR-R€R{R"R#RE(RR{Rttmctmp1tmp2RZ((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRws$
8cCsag}x+|jƒD]}|j||jƒƒqWx&t|ƒdkr\|jtjƒq7W|S(Ni(R{RyRtlenR-(RRUR{tp((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRv scCs³y|j|ƒ}Wntjk
r/t‚nX|jƒ}|rO|d}n|jƒ}|dkrt|j||ƒ}ntj	|||d|j
ƒkd|j
ƒk|ƒS(Nis.hgtagsR\R](R_RR`RaRbRdt_converttagsRJRRlRm(RoRRZRURqRbRd((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRn)s

cCsg}xõ|jƒD]ç}y|jddƒ\}}Wn+tk
rb|jtdƒ|ƒqnXytj|ƒ}Wn+tk
r£|jtdƒ|ƒqnXy(|jdtj	||ƒ|fƒWqt
k
rù|jtdƒ|ƒqqXqWdj|ƒS(Nt is&skipping incorrectly formatted tag %s
s%skipping incorrectly formatted id %s
s%s %s
sno mapping for id %s
R(t
splitlinestsplitt
ValueErrortwarnR	Rtbint	TypeErrorRyRhtKeyErrortjoin(RJRURdtnewdatatlinetidtnametnewid((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyR—9s*


cCs|dks$|dks$|dkr(tS|r>||ƒr>tSy%|j|ƒjƒ|ddkSWntjk
rztSXdS(slReturn true if file should be considered a largefile, i.e.
    matcher matches it or it is larger than size.s.hgtagss	.hgignores.hgsigsiN(RRR_R
RR`(R}RRXR
((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRPs$%c	s|s
dStj||dtƒ}d}|jdt|ƒƒ|j|ƒ‰t‡fd†|ƒ}|jdt|ƒƒx„|D]|}|jtdƒ|dd	d
t|ƒƒt	j
||ƒ}|sætjtdƒ|ƒ‚n|j
||ƒ|d7}q„W|jtdƒdƒdS(
s&upload largefiles to the central storeNtputis,sending statlfile command for %d largefiles
cs	ˆ|S(N((th(tretval(s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyt<lambda>hss"%d largefiles need to be uploaded
suploading largefilesRt	largefileRs6largefile %s missing from store (needs to be uploaded)i(t	basestoret
_openstoreRtdebugR•R9tfilterR4R	R RfRR%R¦R#(RJRRPRttstoretatRrtsource((R¨s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pytuploadlfiles]s$


cCsF|rtt|ƒƒ}n	dg}tj|ƒ}|j|d|ƒS(s)Verify that every largefile revision in the current changeset
    exists in the central store.  With --contents, also verify that
    the contents of each local largefile file revision are correct (SHA-1 hash
    matches the revision ID).  With --all, check every changeset in
    this repository.t.tcontents(trangeR•R«R¬tverify(RJRotallR´trevsR¯((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pytverifylfilesws
	cCsútj||ƒ}|r1t|ƒt|ƒ@}ng}xŽ|D]†}y'||tj|ƒjƒjƒ}Wn.tk
r›}|jtjkr•q>n‚nXtj	||ƒs>|j
||fƒq>q>W|rðtj|ƒ}	|	j
|ƒ}
|
SggfS(s.cachelfiles ensures that all largefiles needed by the specified revision
    are present in the repository's largefile cache.

    returns a tuple (cached, missing).  cached is the list of files downloaded
    by this operation; missing is the list of files that were needed but could
    not be found.(R t
listlfilesR.R^RdReRaterrnotENOENTRfRyR«R¬R"(RJRoRtfilelistRVttogettlfiletexpectedhashterrR¯R‘((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRg‡s$
'c
Csûtj|d|jtjƒgiƒ}d„}d}d}|gkr´xhtj||i|d6|ƒD]D}t|||j	ƒƒ\}}	|t
|ƒ7}|t
|	ƒ7}qiWn|jtdƒ|ƒ|dkrñ|jtdƒ|ƒn||fS(NcSsdS(N((Rtfns((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pytprepare§siR5s %d additional largefiles cached
s!%d largefiles failed to download
(
RRR#R:R R;RtwalkchangerevsRgRR•R'R	(
RJRoR5tmatchfnRÃttotalsuccessttotalmissingRRQtmissing((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pytdownloadlfiles¤s
	
cCsb|jƒ}zDtj||ƒ}ttj|ƒƒt|ƒB}|dk	rtg|D]}||krS|^qS}ni}	d\}
}xh|D]`}|j|ƒ}
|jtj|ƒƒ}tj	j
|ƒr¥tj	j
|dƒrtj	j
|
ƒrtj|
|
dƒt
j|dƒntj||ƒ}|dkrítj	j
|
ƒsb|tj|
ƒkrí||dkrˆt
j|
dtƒn|j|ƒ||	|<qíqtj	j
|
ƒr|jj|ƒ|dkrt
j|
ƒ|d7}qqW|jƒ|r3|r|jtdƒƒnt||d|ƒnxã|D]Û}d}|	j|ƒ}|rŒtj|||ƒsvq:n|j|ƒd}n|j|ƒ}
|jtj|ƒƒ}tj	j
|ƒrtj|ƒj}|tj|
ƒjkrtj|
|ƒd}qn|
|7}
tj|ƒ}||jkr[|jj|}|d|d}}nd\}}|d
kr¥|s…|dkr•|j|ƒq|j|ƒq:|dkrÁ|j|ƒq:|dkrÝ|j |ƒq:|d
krù|j!|ƒq:|dkr:|j"|ƒq:q:W|jƒ|rO|rO|jtdƒ|
|fƒnWd|j#ƒXdS(Nis.origRt
ignoremissingisgetting changed largefiles
it?iÿÿÿÿtnRˆtrtas"%d largefiles updated, %d removed
(ii(RËiÿÿÿÿ($R(R topenlfdirstateR.RºR#R:R^R7R8R9R<tcopyfileRt
unlinkpathtreadstandinthashfileRtnormallookupRHt	normalizetwriteR'R	RgR"t
copyfromcachetnormaltstattst_modetchmodt_maptremoveREtdropR
(RJRoR½tprintmessageRÔR(t
lfdirstateRVRZR‚tupdatedtremovedR¿tabslfilet
absstandint
expecthashtupdate1tmodeR^RÙtstatetmtime((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pytupdatelfiles¶sŽ(





	

tlfpullRÍR5s#pull largefiles for these revisionss--r REV... [-e CMD] [--remotecmd CMD] [SOURCE]Rc	Ks¼||_|jdgƒ}|s9tjtdƒƒ‚ntj||ƒ}d}xM|D]E}|jtdƒ|ƒt|||ƒ\}}|t	|ƒ7}qXW|j
tdƒ|ƒdS(s0pull largefiles for the specified revisions from the specified source

    Pull largefiles that are referenced from local changesets but missing
    locally, pulling from a remote repository to the local cache.

    If SOURCE is omitted, the 'default' path will be used.
    See :hg:`help urls` for more information.

    .. container:: verbose

      Some examples:

      - pull largefiles for all branch heads::

          hg lfpull -r "head() and not closed()"

      - pull largefiles on the default branch::

          hg lfpull -r "branch(default)"
    R5sno revisions specifiedis#pulling largefiles for revision %s
s%d largefiles cached
N(tlfpullsourceR"RR%R	RtrevrangetnoteRgR•R'(	RJRoR±RNR¸t	numcachedR5tcachedRÈ((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyRës	
(*t__doc__R7R»R<t	mercurialRRR1RRRRRRRtmercurial.i18nR	tmercurial.lockR
R R«tcmdtabletcommandRRRRGR6RzRwRvRnR—RR²R¹R#RgRÉRêt
remoteoptsRë(((s?/usr/lib/python2.7/dist-packages/hgext/largefiles/lfcommands.pyt<module>	sH@		d	6	N		
					
	f

Copyright © 2017 || Recoded By Mr.Bumblebee