Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/mercurial/localrepo.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��c@s�ddlmZmZmZddlmZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z!ddl"Z#ddlm$Z$ddl%Z%ddl&Z&ddl'Z'ddl(Z(ddl)Z)ddl*Z*ej+Z+ej,Z,de,fd��YZ-de-fd��YZ.d	e+fd
��YZ/de+fd��YZ0d
�Z1d�Z2e3dddddf�Z4e4j5e3dg��Z6dej7fd��YZ8de8fd��YZ9de:fd��YZ;d�Z<d�Z=d�Z>d�Z?dS(i�(thextnullidtshort(t_N(treleaset
repofilecachecBs,eZdZdd�Zd�Zd�ZRS(sMAll filecache usage on repo are done for logic that should be unfiltered
    cCstt|�j|j�|�S(N(tsuperRt__get__t
unfiltered(tselftrepottype((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRscCstt|�j|j�|�S(N(RRt__set__R(R	R
tvalue((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRscCstt|�j|j��S(N(RRt
__delete__R(R	R
((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRsN(t__name__t
__module__t__doc__tNoneRRR(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRs	t
storecachecBseZdZd�ZRS(s filecache for files in the storecCs
|j|�S(N(tsjoin(R	tobjtfname((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytjoin#s(RRRR(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR!stunfilteredpropertycachecBseZdZdd�ZRS(s0propertycache that apply to unfiltered repo onlycCstt|�j|j��S(N(RRRR(R	R
R((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR)sN(RRRRR(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR&stfilteredpropertycachecBseZdZd�ZRS(s1propertycache that must take filtering in accountcCstj||j|�dS(N(tobjectt__setattr__tname(R	RR
((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
cachevalue/s(RRRR(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR,scCs|t|j��kS(s?check if a repo has an unfilteredpropertycache value for <name>(tvarsR(R
R((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pythasunfilteredcache3scs�fd�}|S(s@decorate method that always need to be run on unfiltered versioncs�|j�||�S(N(R(R
targstkwargs(torig(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytwrapper9s((R"R#((R"s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytunfilteredmethod7stlookupt	branchmaptpushkeytknownt	getbundletchangegroupsubsett	localpeercBs�eZdZed�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
ddd�Zd�Zd
�Zd�Zd�Zdddd�ZRS(s8peer for a local repo; reflects only the most recent APIcCs\tjj|�|jd�|_|j|_|j|�|_|j|_|j	|_	dS(Ntserved(
tpeertpeerrepositoryt__init__tfilteredt_repotuit_restrictcapabilitiest_capstrequirementstsupportedformats(R	R
tcaps((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR/CscCs|jj�dS(N(R1tclose(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR8KscCs|jS(N(R4(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
_capabilitiesNscCs|jS(N(R1(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytlocalQscCstS(N(tTrue(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytcanpushTscCs
|jj�S(N(R1turl(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR=WscCs|jj|�S(N(R1R%(R	tkey((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR%ZscCs
|jj�S(N(R1R&(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR&]scCs
|jj�S(N(R1theads(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR?`scCs|jj|�S(N(R1R((R	tnodes((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR(cscCs|jj|d|d|�S(NR?tcommon(R1R)(R	tsourceR?RA((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR)fscCs
|jj�S(N(R1tlock(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRClscCs|jj|||�S(N(R1taddchangegroup(R	tcgRBR=((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRDoscCs|jj||||�S(N(R1R'(R	t	namespaceR>toldtnew((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR'rscCs|jj|�S(N(R1tlistkeys(R	RF((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRIuscCsd|||||fS(s+used to test argument passing over the wires%s %s %s %s %s((R	tonettwotthreetfourtfive((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
debugwireargsxsN(RRRt
MODERNCAPSR/R8R9R:R<R=R%R&R?R(RR)RCRDR'RIRO(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR+@s"													tlocallegacypeercBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(scpeer extension which implements legacy methods too; used for tests with
    restricted capabilitiescCstj||dt�dS(NR7(R+R/t
LEGACYCAPS(R	R
((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR/�scCs|jj|�S(N(R1tbranches(R	R@((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRS�scCs|jj|�S(N(R1tbetween(R	tpairs((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRT�scCs|jj||�S(N(R1tchangegroup(R	t	basenodesRB((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRV�scCs|jj|||�S(N(R1R*(R	tbasesR?RB((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR*�s(RRRR/RSRTRVR*(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRQ|s				tlocalrepositoryc	Bs.eZed{�Zeed|�BZed}�ZdgZd~Zd�Z	d~e
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zed�d��Zed�d��Zd�Zed�d��Zed�d��Zed�d��Zed�d��Zed�d��Zd�Zd �Zd!�Z d"�Z!d#�Z"d$�Z#d%�Zd&�Z$e
d'�Z%e&id(��Z'd)�Z(e)d*��Z*d+�Z+d,�Z,d-�Z-d.�Z.d/�Z/d0�Z0d1�Z1d2�Z2d3�Z3d4�Z4d5�Z5d~d6�Z6d7�Z7d8�Z8d9�Z9d:�Z:d;�Z;d<�Z<d=�Z=d~d>�Z>e?d?�Z@d~d~d@�ZAdA�ZBd~dB�ZCdCdD�ZDdE�ZEdF�ZFdG�ZGeHdH��ZIeHdI��ZJdJ�ZKdK�ZLdL�ZMdM�ZNdN�ZOdO�ZPdP�ZQdQ�ZRdR�ZSe
e
dS�ZTe&dT��ZUdU�ZVdV�ZWdW�ZXdX�ZYdY�ZZdZ�Z[e\d[�Z]e\d\�Z^d]�Z_e&d^d~d~d~e
e
id_��Z`e&e
d`��Zae&da��Zbe&db��Zcd~dc�Zdddd~d~e
e
e
e
de�Zed~df�Zfd~d~e
dg�Zgdh�Zhdi�Zid~e
dj�Zjdk�Zke
d~e
dl�Zldm�Zmdn�Zndo�Zod~d~dp�Zpe&dq��Zqdr�Zre&ds��Zse&e
dt��Ztdu�Zuge
dv�Zvdw�Zwdx�Zxd~d~d~dy�Zydz�ZzRS(trevlogv1tgeneraldeltatstoretfncachetsharedt	dotencodecCs|jS(N(R5(R	tcreate((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_baserequirements�scCs'tj|dtdt�|_|j|_|jj|_|jjd�|_||_	tj
|j|j�|_tj|j�|_|j|_
||_|j�|_g|_y3|jj|jd�|j�tj|j�Wntk
r�nX|jj�s?|r#|jj�s/|jj�n|jjdt�|j|�}|jjddt�r�jjd�|jd�|jjdd	t�r�|jd
�|jjddt�r�|jd�q�n|jjdd
�n|jjddt�r|jd�nt|�}q�t j!t"d�|��nu|rat j!t"d�|��nSytj#|j|j$�}Wn4tk
r�}|j%t%j&kr��nt�}nX|j|_'yhtj|jj(d�j)d�dt�}|j}|j�st j!t"d�|��n||_'Wn+tk
rU}|j%t%j&krV�qVnXt*j*||j'tj�|_*|j*j|_+|j*j|_,|j,|_-|j*j|_.|j*j/|j_/|j0|�|r�|j1�ni|_2i|_3i|_4d|_6|_7|_8i|_9i|_:dS(Nt
expandpathtrealpaths.hgthgrct
notindexedtformattusestoreR\t
usefncacheR]R_s
00changelog.it9 dummy changelog to prevent using the old repo layoutR[srepository %s not foundsrepository %s already existst
sharedpaths
s1.hg/sharedpath points to nonexistent directory %s(;tscmutiltvfsR;twvfstwopenertbasetrootRtpathtorigroottpathauditort_checknestedtauditortopenertbaseuitcopyR2t_phasedefaultst
readconfigt
extensionstloadalltIOErrortisdirtexiststmakedirstmakedirRat
configbooltmkdirtappendtFalsetsetterrort	RepoErrorRtreadrequirest	supportedterrnotENOENTRjtreadtrstripR\tspathtsvfstsopenerRt
createmodet_applyrequirementst_writerequirementst
_branchcachest
filterpatst_datafiltersRt	_transreft_lockreft	_wlockreft
_filecachetfilteredrevcache(R	RwRqR`R5tinstRlts((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR/�s�			


	

!		



					cCsdS(N((R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR8�scCs|S(N((R	R7((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR3scs/|�_t�fd�|D���j_dS(Nc3s*|] }|�jkr|dfVqdS(iN(t
openerreqs(t.0tr(R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pys	<genexpr>s(R5tdictR�toptions(R	R5((R	s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�s	cCsK|jdd�}x(t|j�D]}|jd|�q"W|j�dS(Ntrequirestws%s
(RvtsortedR5twriteR8(R	treqfileR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�	scCs�|j|j�stS|t|j�d}tj|�}|d}tj|�}xo|r�dj|�}||j	kr�||kr�t
S|j|�}|j|t|�d�SqX|j
�qXWtS(s/Determine if path is a legal nested repository.it/N(t
startswithRpR�tlentutiltpconvertRt	splitpathRtsubstateR;tsubtchecknestedtpop(R	RqtsubpathtnormsubpathtctxtpartstprefixR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRts
	cCs
t|�S(N(R+(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR-5scCs|S(saReturn unfiltered version of the repository

        Intended to be overwritten by filtered repo.((R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR8scCs2dtj|j�jfd��Y}|||�S(s)Return a filtered version of a repositorytproxyclscBseZRS((RR(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�Bs(trepoviewRt	__class__(R	RR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR0>s%t	bookmarkscCs
tj|�S(N(R�tbmstore(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
_bookmarksFssbookmarks.currentcCs
tj|�S(N(R�treadcurrent(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_bookmarkcurrentJscCsl|jdd�d}g}xI|jj�D]8\}}|jdd�d|kr,|j|�q,q,W|S(Nt@ii(tsplitR�t	iteritemsR�(R	tbookmarkRR?tmarktn((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
bookmarkheadsNst
phaserootscCstj||j�S(N(tphasest
phasecacheRy(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_phasecacheVstobsstorecCsOtj|j�}|rKtjrKd}|jj|tt|���n|S(Ns3obsolete feature not enabled but %i markers found!
(tobsoleteR�R�t_enabledR2twarnR�tlist(R	R\tmsg((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�Zs
#s
00changelog.icCsWtj|j�}dtjkrStjd}|j|j�rS|jd�qSn|S(Nt
HG_PENDINGs00changelog.i.a(t	changelogR�tostenvironR�Rptreadpending(R	tctp((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�cs
s00manifest.icCstj|j�S(N(tmanifestR�(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�lstdirstatecs:dg���fd�}tj�j�j�j|�S(Nicsky�jj|�|SWnLtjk
rf�dsbt�d<�jjtd�t|��nt	SXdS(Nis-warning: ignoring unknown working parent %s!
(
R�trevR�tLookupErrorR;R2R�RRR(tnode(R	twarned(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytvalidatess

(R�RvR2Rp(R	R�((R	R�s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�ps	cCs)|dkrtj|�Stj||�S(N(Rtcontextt
workingctxt	changectx(R	tchangeid((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt__getitem__�s
cCs3yt|j|��SWntjk
r.tSXdS(N(tboolR%R�tRepoLookupErrorR�(R	R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt__contains__�scCstS(N(R;(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt__nonzero__�scCs
t|j�S(N(R�R�(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt__len__�scCs
t|j�S(N(titerR�(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt__iter__�scGsJtj||�}tjd|�}g||t|��D]}|^q:S(s4Return a list of revisions matching the given revsetN(trevsett
formatspectmatchRR�(R	texprR tmR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytrevs�scgs*x#|j||�D]}||VqWdS(sw
        Yield a context for each matching revision, after doing arg
        replacement via revset.formatspec
        N(R�(R	R�R R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��scCsd|jS(Nsfile:(Rp(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR=�scKstj|j||||�S(N(thookR2(R	RtthrowR ((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��scsgt|t�r|f}n�j�}xb|D]Z}	�jddtdt��d|	d|�|	|kr.�jjtd�|	�q.q.W��fd�}
d}|r?y�j	d	d
�}Wn#t
k
r��j	d	d�}n
X|j�}|
||d|�x3|D]+}	�jddt��d|	d|�qWdSy�j
dd
�}Wn=t
k
r�}
|
jtjkr�n�j
dd�}n
X|j�}|
||tj|�|j��j�d�jkr�djdg�ntj�jddg�}�j|||d|d|�}x3|D]+}	�jddt��d|	d|�q4W|S(NtpretagR�R�ttagR:s4warning: tag %s conflicts with existing branch name
c	s�|jdd�|r6|ddkr6|jd�nx�|D]�}|rU||�pX|}�jjr�|�jjkr��j�j|t�}|jdt|�|f�n|jdt��|f�q=W|j�dS(Niii�s
s%s %s
(	tseekR�t
_tagscachettagtypesttagstgetRRR8(tfptnamestmungetprevtagsRR�RG(R�R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt	writetags�s
 !tt	localtagssr+tas.hgtagssrb+tabtextraR�(t
isinstancetstrR&R�R;RR2R�RRvR}R�RtwfileR�R�tencodingt	fromlocalR8tinvalidatecachesR�taddtmatchmodtexactRptcommit(R	R�R�tmessageR:tusertdateRRSRR�R�R�teR�ttagnode((R�R	s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_tag�sL
$


)

!
)cCsr|sHx?|j�d D]*}d|krtjtd���qqWn|j�|j||||||�dS(sZtag a revision with one or more symbolic names.

        names is a list of strings or, when adding a single tag, names may be a
        string.

        if local is True, the tags are stored in a per-repository file.
        otherwise, they are stored in the .hgtags file, and a new
        changeset is committed with the change.

        keyword arguments:

        local: whether to store tags in non-version-controlled file
        (default False)

        message: commit message to use if committing

        user: name of user to use if committing

        date: date tuple to use if committingis.hgtagssCworking copy of .hgtags is changed (please commit .hgtags manually)N(tstatusR�tAbortRR�R(R	R�R�RR:RRtx((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��s
cCs;dtfd��Y}|�}|j�\|_|_|S(sMReturns a tagscache object that contains various tags related
        caches.t	tagscachecBseZd�ZRS(cSs$d|_|_d|_|_dS(N(RR�R�t
nodetagscachettagslist(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR/s(RRR/(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRs(Rt	_findtagsR�R�(R	Rtcache((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�
s	cCs�i}|jjr'|j�\}}n|jj}xU|j�D]G\}}y|jj|�|||<Wq@tjt	fk
r�q@Xq@W|S(sreturn a mapping of tag to node(
R�tfilteredrevsRR�R�R�R�R�R�t
ValueError(R	ttR�ttttktv((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�!scCs�i}i}tj|j|||�tj|j|||�i}xB|j�D]4\}\}}|tkrQ||tj|�<qQqQW|jj	�|d<t
g|j�D]!\}}tj|�|f^q��}||fS(suDo the hard work of finding tags.  Return a pair of dicts
        (tags, tagtypes) where tags maps tag name to node, and tagtypes
        maps tag name to a string like 'global' or 'local'.
        Subclasses or extensions are free to add their own tags, but
        should be aware that the returned dicts will be retained for the
        duration of the localrepo object.ttip(ttagsmodtfindglobaltagsR2t
readlocaltagsR�RRttolocalR�R"R�(R	talltagsR�R�RR�thistR
((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR1s4cCs|jjj|�S(s�
        return the type of the given tag. result can be:

        'local'  : a local tag
        'global' : a global tag
        None     : tag does not exist
        (R�R�R�(R	ttagname((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyttagtypeRs	cCs�|jjs�g}xH|j�j�D]4\}}|jj|�}|j|||f�q%Wgt|�D]\}}}||f^qj|j_n|jjS(s)return a list of tags ordered by revision(R�RR�R�R�R�R�R�(R	tlRR�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR]s7cCs�|jjs~i}x9|jjj�D]%\}}|j|g�j|�q%Wx|j�D]}|j�q[W||j_n|jjj|g�S(s&return the tags associated with a node(	R�RR�R�t
setdefaultR�t
itervaluestsortR�(R	R�RRR�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytnodetagshscCsLg}x9|jj�D](\}}||kr|j|�qqWt|�S(N(R�R�R�R�(R	R�tmarksR�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
nodebookmarksss
cCstj|�|j|jS(s,returns a dictionary {branch: [branchheads]}(R&tupdatecacheR�t
filtername(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR&zs
cCs?|d}x.t|�D] }||j�s|}PqqW|S(s'return the tipmost branch head in headsi�(treversedtclosesbranch(R	R?R"th((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
_branchtip�s
cCsE||j�kr.tjtd�|��n|j|j�|�S(s&return the tip node for a given branchsunknown branch '%s'(R&R�R�RR7(R	tbranch((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt	branchtip�scCs@i}x3|j�j�D]\}}|j|�||<qW|S(smreturn a dict where branch names map to the tipmost head of
        the branch, open heads come before closed(R&R�R7(R	tbttbnR?((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
branchtags�scCs||j�S(N(R�(R	R>((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR%�scCsN|p	|}||j�kr"|S|r:|j�r:|p=|}||j�S(N(R&R:R8(R	R>tremoteR
((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytlookupbranch�s
cCst|jj}|j}g}xR|D]J}|j|�}|dkp[|j||�tjk}|j|�q"W|S(N(	R�tnodemapR�R�RtphaseR�tsecretR�(R	R@tnmtpctresultR�R�tresp((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR(�s	
(cCs|S(N((R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR:�scCs
|j�S(N(R:(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytcancopy�scCstjj|j|�S(N(R�RqR(R	tf((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�scCstjj|j|�S(N(R�RqRRp(R	RG((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytwjoin�scCs0|ddkr|d}ntj|j|�S(NiR�i(tfilelogR�(R	RG((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytfile�s
cCs||S(N((R	R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��scCs||j�S(s.get list of changectxs for parents of changeid(tparents(R	R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRK�scCs�|jj||�}||}|roxG|D]<}||kr,|||kr,|jj|||�q,q,Wn|tkr�xZt|jj�j��D]:\}}||kr�||kr�|jjd|�q�q�WndS(N(R�t
setparentsRxRR�tcopiestitemsR(R	tp1tp2RMtpctxRGR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRL�s

!(cCstj||||�S(sechangeid can be a changeset revision, node, or tag.
           fileid can be a file revision or node.(R�tfilectx(R	RqR�tfileid((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRR�scCs
|jj�S(N(R�tgetcwd(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRT�scCs|jj||�S(N(R�tpathto(R	RGtcwd((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRU�sR�cCs|j||�S(N(Rn(R	RGtmode((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�scCs|jj|�S(N(Rmtislink(R	RG((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_link�sc
s.||jkr#g}x�jj|�D]�}}|dkrFq(ntj|jd|g�}d}|}xL|jj�D];\}}	|j	|�r}|	}|t
|�j�}Pq}q}W|s�d�}ntj
|�ds���fd�}n|j|||f�q(W||j|<n|j|S(Nt!R�c[stj||�S(N(R�tfilter(R�R�R!((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt<lambda>�sics
�||�S(N((R�R�R!(toldfn(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR\�s(R�R2tconfigitemsRR�RpRR�R�R�R�tlstriptinspectt
getargspecR�(
R	R[R+tpattcmdtmftfntparamsRtfilterfn((R]s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_loadfilter�s*c
Cslxe|D]]\}}}||�r|jjd||f�|||d|jd|d|�}PqqW|S(Nsfiltering %s through %s
R2R
tfilename(R2tdebug(R	R�RitdataRdReRc((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_filter�s$cCs
|jd�S(Ntencode(Rh(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_encodefilterpatsscCs
|jd�S(Ntdecode(Rh(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_decodefilterpats	scCs||j|<dS(N(R�(R	RR[((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
adddatafilter
scCsL|j|�r$|jj|�}n|jj|�}|j|j||�S(N(RYRmtreadlinkRnR�RlRn(R	RiRk((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytwreadscCsv|j|j||�}d|kr:|jj||�n8|jj||�d|krr|jj|tt�ndS(NR+R(	RlRpRntsymlinkR�RmtsetflagsR�R;(R	RiRktflags((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytwwritescCs|j|j||�S(N(RlRp(R	RiRk((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
wwritedata sc	Cs�|jr|j�pd}|r7|j�r7|j�S|jjd�ratjtd���n|j	|�g|j
�D]!\}}||t|�f^q{}tj|j
j|j|jd�t|�|jj�}tj|�|_|S(Ntjournals,abandoned transaction found - run hg recover(R�RtrunningtnestR�RR�R�Rt
_writejournalt
_journalfilestundonamettransactionR2R�R�Rt
aftertransR\R�tweakreftref(R	tdescttrRlRtrenames((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR#s

4	cCsL|jdf|jdf|jdf|jdf|jdf|jdffS(NRysjournal.dirstatesjournal.branchsjournal.descsjournal.bookmarkssjournal.phaseroots(R�Rl(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR}7scCs2g|j�D]!\}}|jt|��^q
S(N(R}RR~(R	RlR((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt	undofiles?scCs�|jjd|jjd��|jjdtj|jj���|jjddt|�|f�|jjd|jjd��|jjd|jjd	��dS(
Nsjournal.dirstateR�sjournal.branchsjournal.descs%d
%s
sjournal.bookmarksR�sjournal.phaserootsR�(	RvR�ttryreadRRR�R8R�R�(R	R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR|BscCs�|j�}zy|jjd�rj|jjtd��tj|j|j	d�|jj
�|j�tS|jj
td��t
SWd|j�XdS(NRys%rolling back interrupted transaction
s%no interrupted transaction available
(RCR�RR2RRRtrollbackR�RR�t
invalidateR;R�R(R	RC((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytrecoverNs

cCswd}}zX|j�}|j�}|jjd�rG|j||�S|jjtd��dSWdt	||�XdS(Ntundos"no rollback information available
i(
RtwlockRCR�Rt	_rollbackR2R�RR(R	tdryruntforceR�RC((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�]s
c	Cs|j}y�|jjd�j�}t|d�|dd}}}t|�dkre|d}n|d}|r�|jr�td�|||f}	ntd�||f}	Wn#t	k
r�td�}	d}nX|r"|d	|d
kr"|dkr"t
jtd�d
td���n|j|	�|r9dS|j
j�}
|j�tj|j|jd�|j�|jjd�r�|jjdd�n|jjd�r�|jjdd�n|j�|
d|jjkp�d|jjk}|r�jjdd�y/|jjd�}|j
jtj|��Wn1t	k
ru|jtd�|j
j��nX|j
j�t g|j�D]}
|
j!�^q��}
t|
�dkr�|jtd�|
�q�jtd�|
�n|j"�dS(Ns	undo.desciiiis8repository tip rolled back to revision %s (undo %s: %s)
s4repository tip rolled back to revision %s (undo %s)
s!rolling back unknown transaction
t.R"R
s;rollback of last commit while not checked out may lose datathintsuse -f to forceR�sundo.bookmarksR�sundo.phaserootsR�s
undo.dirstateR�sundo.branchs>named branch could not be reset: current branch is still '%s'
s3working directory now based on revisions %d and %d
s+working directory now based on revision %d
(#R2RvR�t
splitlinestintRR�tverboseRR}R�RRR�RKt
destroyingRR�R�RR�RlRtrenameR�R�R�R?t	setbranchRR&R8ttupleR�t	destroyed(R	R�R�R2R toldlenR�tdetailtoldtipR�RKt
parentgoneR8R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�jsb	"

		

'

"


+
cCs@dt|�kr|jd=n|j�jj�|j�dS(NR�(Rt__dict__RR�tcleartinvalidatevolatilesets(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR	�s
cCs|jj�tj|�dS(N(R�R�R�tclearobscaches(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��s
cCsht|d�rdx<|jjD].}yt|j|�Wqtk
rIqXqWt|j�d�ndS(s�Invalidates the dirstate, causing the next call to dirstate
        to check if it was modified since the last time it was read,
        rereading it if it has.

        This is different to dirstate.invalidate() that it doesn't always
        rereads the dirstate. Use dirstate.invalidate() if you want to
        explicitly read the dirstate again (i.e. restoring it to a previous
        known good state).R�N(RR�R�tdelattrtAttributeErrorR(R	R ((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytinvalidatedirstate�s	
cCse|j�}xH|jD]=}|dkr.qnyt||�Wqtk
rRqXqW|j�dS(NR�(RR�R�R�R	(R	RR ((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��s
cCs�ytj|d|d|�}Wnxtjk
r�}|s@�n|jjtd�||jf�tj|t|jjddd��|d|�}nX|r�|�n|S(NiR�s"waiting for lock on %s held by %r
R2ttimeoutt600(	RCR�tLockHeldR2R�RtlockerR�tconfig(R	tlocknametwaitt	releasefnt	acquirefnR�R+R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_lock�s$
cCs9|jo|j�}|r.|jj|�n|�dS(sfadd a callback to the current repository lock.

        The callback will be executed on lock release.N(R�tpostreleaseR�(R	tcallbackR+((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
_afterlock�sc	s��jo�j�}|dk	r8|jr8|j�|S�fd�}�j�jd�||�jtd��j�}t	j
|��_|S(s�Lock the repository store (.hg/store) and return a weak reference
        to the lock. Use this before modifying the store (e.g. committing or
        stripping). If you are opening a transaction, get a lock as well.)cs{�jj�t�d�r,�jj�nxH�jj�D]7\}}|dks<|�jkriq<n|j�q<WdS(NR�R�(R\R�RR�R�RNR�trefresh(R tce(R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytunlock�s
RCs
repository %sN(R�RtheldRCR�RR�RRrR�R�(R	R�R+R�((R	s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRC�s
	c	s��jo�j�}|dk	r8|jr8|j�|S�fd�}�j�jd�||�jtd��j�}t	j
|��_|S(s�Lock the non-store parts of the repository (everything under
        .hg except .hg/store) and return a weak reference to the lock.
        Use this before modifying files in .hg.cs"�jj��jdj�dS(NR�(R�R�R�R�((R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�s
R�sworking directory of %sN(R�RR�RCR�RR�RRrR�R�(R	R�R+R�((R	s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�s

cCs�|j�}|j�}|j|�}	|j|t�}
|j|t�}}i}
|j�}|r�|d|kr�|d}|j|�}|}|r�|tks�|dkr�||kr�||}|
}q�q�n|s7|jjd||f�x;|dj	�D]&}||kr
||j
�}Pq
q
Wn|r�|jjd||t|�f�||
d<t|�|
d<t|}
}q�jjt
d�||f�nR|tkr�j|
|�}||
kr�t}
}q�|kr�}q�|tks#|	j|
|�s#|
rL|j|�|	j||
|||
|�S|
|kr�|j|�|j�kr�|j|�n|
S(sK
        commit an individual file as part of a larger transaction
        is( %s: searching for copy revision for %s
s %s: copy %s:%s
Rxtcopyrevs8warning: can't find ancestor for '%s' copied from '%s'!
N(RqRkRJR�RtrenamedRR2Rjt	ancestorstfilenodeRR�RtancestortcmpR�R
Rv(R	tfctxt	manifest1t	manifest2tlinkrevR�t
changelistRttexttflogtfparent1tfparent2t	fparent2otmetaRxtcfnametcrevt
newfparentR�tfparentancestor((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt_filecommitsT

#
$
'R�c&s�d�}|s'tj�jd�}n|sKg}	|	j|_||_n�j�}
z=�d#}t|j	��dk}|r�|r�|r�|j
�s�|j�r�tj
td���n�jd|d|�}
|r�dj|
d�ng}t�}|jj�}d	|kr�d
|
dkrC|
djd
�nd
|
dkrg|
djd
�n|j�j}xAt|j��D]-}||�s�|kr�||||<q�n|s�j
td�|��q�|j|�jt�rR�jjd
d�s5tj
td�|dtd���n|j|�|j|�q�|j|�j�}||d|||df||<|j|d%�d|kr�|j|�q�q�Wxe|j	�D]W}g|jD]}||kr�|^q�}|g|D]}||�r�^q�q�W|r�|d	�rid	|j �|j!�kritj
td���n|
dj"dd
�q�nVd	|
dkr�d
|kr�d
|
d|
d|
dkr�|
dj"dd
�q�n|r|j
�rt|
d|
d|
d�}x�j
�D]��j#j$|�}|dks||ks||jkr^qn||
dkr�||td��n||	kr�|d}x\|D]}|j%|�r�Pq�q�W||td��q|�j#kr||td��qqWnt&j'�|||||
�}|rk|jd�rk|rk|j
�rk|j(�|j�j(�krkd#S|r�|j)�r�tj
td���nt*j+��}xF|
dD]:}||kr�||dkr�tj
td���q�q�W|r|�||�|_,n||j,k}|r�xvt|�D]h}|j|�}�jjtd�t-j.|��|j/|j,||�}||d|f||<q-Wt-j0�|�n�j1|j,�}�j#j	�\} }!t2| �|!t3kr�|!�p�}"}#y5�j4ddtd |"d!|#��j5|t�}$Wn-|r\�jj6td"�|�n�nXt7j8�| |!g|$�|j9|$�|j:�Wd#|
j;�Xt2|$�|"|#�fd$�}%�j<|%�|$S(&s�Add a new revision to current repository.

        Revision information is gathered from the working directory,
        match can be used to filter the committed files. If editor is
        supplied, it is called to get a commit message.
        cSstjd||f��dS(Ns%s: %s(R�R(RGR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytfailtsR�isBcannot partially commit a merge (do not specify files or patterns)R�tcleaniis.hgsubs.hgsubstateis#commit with new subrepo %s excludedR2tcommitsubreposs!uncommitted changes in subrepo %sR�s#use --subrepos for recursive commits$can't commit subrepos without .hgsubR�isfile not found!R�sno match under directory!sfile not tracked!R8s&cannot commit merge with missing filestus0unresolved merge conflicts (see hg help resolve)scommitting subrepository %s
t	precommitR�tparent1tparent2s!note: commit message saved in %s
Ncs#�jdd|d|d|�dS(NR
R�R�R�(R�(R�R�R�(R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
commithook
s(NNN(=RtalwaysRpR�tdirtbadR�RR�RKtfilestanypatsR�RRRtextendR�R�RxtremoveROR�tkeysR�tdirtyR;R2R�R
t	basestateR�tmodifiedtaddedtinsertR�t	normalizeR�R�R�R8tdeletedtmergemodt
mergestatet_texttsubrepot
subrelpathR
t
writestatetsavecommitmessageRRR�t	commitctxR�R�tupdatet
markcommittedtresetRR�(&R	R�RRR�R�teditorRR�tvdirsR�twctxtmergetchangestsubst
commitsubstnewstatetoldstateR�tbsR�R�tmatchedRGtdRdtcctxtmsteditedR�tsrtmsgfnRORPthookp1thookp2tretR�((R	s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR
js�
	
	
#(-
  '


+	

cs�d}}t|j��}|j�|j�}}|j�}�j�}z�jd�}tj	|�}	|j
�r�|j�j�}
|j�}i}g}
t
��}x t|j�|j��D]}�jj|d�yF||}�j||
|||	|
�||<|
j||j��Wq�tk
r_}�jjtd�|��q�tk
r�}t|dtj�}|s�|r�|tjkr��jjtd�|��q�|j|�q�Xq�W|
j|�gt|�D]$}||
ks||kr�^q�g|D]}||
kr|^q}x|D]
}|
|=qCW�jj|
|	||j �|j �||f�}|
|}n|j �}g}�j!j"��j!j|||j#�|	|j$�|j$�||j%�|j&�j��}�fd�}|j'�|r+|j'�p.d}}�j(ddt)d	t'|�d
|d|d|��j!j*|	�t+j,�j�}|r�t+j-�||g�n|j.�t/j0�j1d
��|SWd|r�j2�n|j2�XdS(ssAdd a new revision to current repository.
        Revision information is passed via the context argument.
        R
s
strouble committing %s!
R�cs�jj�r�jpdS(NR�(R�twritependingRp((R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR\NsR�tpretxncommitR�R�R�R�tpendingR,N(3RR�tremovedRORPRRCRR�tproxyR�R�RxR�R�R�R�R2tnoteR�R�RvtOSErrorR�RR}tgetattrR�R�R�R�R
tmanifestnodeR�tdelayupdatetdescriptionR�RRRR�R;tfinalizeR�tnewcommitphasetretractboundaryR8R&R2R0R(R	R�R�R�RCRRORPRttrptm1tm2RHtchangedR�RGR�R�terrcodetdroptmnR�R�R�txp1txp2ttargetphase((R	s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�st
#


7%


!%$


cCs&dt|�kr"|jj�ndS(sInform the repository that nodes are about to be destroyed.
        Intended for use by strip and rollback, so there's a common
        place for anything that has to be done before destroying history.

        This is mostly useful for saving state that is in memory and waiting
        to be flushed when the current lock is released. Because a call to
        destroyed is imminent, the repo will be invalidated causing those
        changes to stay in memory (waiting for the next unlock), or vanish
        completely.
        R�N(RR�R�(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�dscCsA|jj|�|jj�tj|jd��|j�dS(s�Inform the repository that nodes have been destroyed.
        Intended for use by strip and rollback, so there's a common
        place for anything that has to be done after destroying history.
        R,N(R�t
filterunknownR�R&R2R0R�(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�vs
cCs||j|�S(s�
        walk recursively through the directory tree or a given
        changeset, finding all files matched by the match
        function
        (twalk(R	R�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�sR�c(s �fd�}t|tj�r*|�n
�|�t|tj�rO|}	n
�|}	|	j�dk}
|
o~��dk}�p�tj�j�j���|||}}
}|
r�	j��j�kr�	j	�n|s��fd�}|�_
n|
rug}d�jkr3t|	j
�}n�jj�|||
|�}|\}}}}}}}}|ru|rug}xrt|�D]d}|�ks�|	j|��j|�ks��|j|	|�r�j|�q�|j|�q�W|rr|
r||7}nyF�jt�}z%x|D]}�jj|�q+WWd|j�XWqotjk
rkqoXqrqun|s4|��}|
r|�d�}x9|||D])}d||<|j||	j|��q�WxG|D]}||kr�|=q��n ggg}}}||	�}ggg}}}|j�|j�B}x�|j�D]�\}}||kr||kr�|kr�|j|�|j|�ks�|||kr�s��|j|	|�r�j|�n|
r�j|�n||=qZ||krZ|j|�qZqZW|j�}n|
r�r�jjr�}x�|D]�}|	j|�dkr�|	|j�} t| �dks�d| ks�tj | �r��j!j"d	|�qZq�n|j|�qZW|}n|||||||f}!|rx�j$�|	�D]�\�}"|
r8d}#n|	j
�d
}#y�tj%���}$|"j|#d|$d|d
|
d|dt&�}x:t'|!|�D])\}%}&|%j(�fd�|&D��q�WWqtj)k
r��j!jt*d���qXqWnx|!D]}'|'j+�qW|!S(s�return status of files between two nodes or node and working
        directory.

        If node1 is None, use the first dirstate parent instead.
        If node2 is None, compare node1 with working directory.
        csS|j�j�}�j�r"|Sx*|j�D]}�|�s/||=q/q/W|S(N(R�RxR�R�(R�RdRe(R�(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt	mfmatches�sR�csK|�krG|�j�krG�jjd�jj|�|f�ndS(Ns%s: %s
(tdirsR2R�R�RU(RGR�(tctx1R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��ss.hgsubNR+is
s*ignoring suspect symlink placeholder "%s"
iR�tignoredR�tunknowntlistsubreposc3s|]}d�|fVqdS(s%s/%sN((R�RG(R�(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pys	<genexpr>0ss#skipping missing subrepository: %s
(,RR�R�R�RRR�RpRTR�R�R�R�R�RRvR�R�R�R�tnormalRR�t	LockErrorR�t	withflagsR�R�t
_checklinkRkR�R�tbinaryR2RjR�titersubrepost
narrowmatcherR;tzipR�R�RR.((R	tnode1tnode2R�RR�R R!Rtctx2tworkingt
parentworkingtlistignoredt	listcleantlistunknownR�tsubreposR�R�R�R�RR�tfixupRGR�tmf1tmf2R$Retmf2nodetsaneR�R�R�trev2tsubmatchtrfilestsfilesR+((RR�R	R�s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�s�
		
	
!
*




*

-				%
cCs.|jj|�}t|d|jjdt�S(NR>treverse(R�R?R�R�R;(R	tstartR?((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR?9scCs�|dkr|dj�}n|j�}||kr;gStt||��}|dk	r�t|jj|g|�d�}g|D]}||kr�|^q�}n|s�g|D]}||j�s�|^q�}n|S(sVreturn a (possibly filtered) list of heads for the given branch

        Heads are returned in topological order, from newest to oldest.
        If branch is None, use the dirstate branch.
        If start is not None, return only heads reachable from start.
        If closed is True, return heads that are marked as closed as well.
        iN(	RR8R&R�R4R�R�tnodesbetweenR5(R	R8R=tclosedRStbheadstfbheadsR6((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytbranchheads>s"(,cCs�|s|jj�g}ng}x�|D]z}|}xktr�|jj|�}|dtkso|dtkr�|j|||d|df�Pn|d}q7Wq(W|S(Nii(R�R"R;RKRR�(R	R@tbR�RR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRSUs
	 !c
Cs�g}x�|D]�\}}|gd}}}d}xh||kr�|tkr�|jj|�d}	||kr�|j|�|d}n|	}|d7}q6W|j|�q
W|S(Niii(RR�RKR�(
R	RUR�ttoptbottomR�R+tiRGR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRTcs

c	s'd�dtj|j����j�}z�tj�|d|d|�}|\}}}|s��jjt	d��g}	d}
nj�j
���|dkr�t|�tgkr��jjt	d��n$|dkr�j
d�r�}n|j
d�r&|jd	d
|d|p|�}n]|dkrG|j|d	�}n<|j
d�sntjt	d���n|j||d	�}�j�j}t|�}
�j|d	|j��}
t|�}gt|
|�D]}|j|�^q�}	|dkr	||	}n|}|jd�}t|jd
t��}|r�|r�tj�||�\}}tj�tj|�tj�tj |�ntj�tj|����fd�}t!j"�||�}|dk	r��n�dk	r�j#�nWd�dk	r�j$�n|j$�X|
S(Nspull
R?R�sno changes found
isrequesting all changes
R*R)tpullRAsWpartial pull cannot be done because other repository doesn't support changegroupsubset.R�t
publishingcs�dkr�j��S�S(N(RR((R	R�ttrname(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytgettransaction�s
(%RR�thidepasswordR=RCt	discoverytfindcommonincomingR2RRRR�RtcapableR)RVRR*RR�R�RDtxrangeR�RIR�R�R�R�tanalyzeremotephasestadvanceboundarytpublictdraftR�tsyncpullR8R(R	R=R?R�RCttmpRAtfetchtrheadsR�RDREtcltclstarttclendR�tsubsettremotephasesRHtpheadst_drRJtobstr((R	R�RIs7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRGvsd		!	+

	
cCsdS(s�Extensions can override this function if additional checks have
        to be performed before pushing, or call it if they override push
        command.
        N((R	R�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt	checkpush�sc's�|j�s$tjtd���n�j�}tj��fd�}d�y�j��WnEt	k
r�}|j
t
jkr��nd|}�jj
|�nXz<�j||�d}	|jd�}
|
s�j�}	nz�j}|||d|�}|\}
}}tj}|||d|d|d|�}|jshtj|j||j�d}nj|sG|jr"td�}d	}td
�td�td�xx|jD]j}||}|j�r�j||��q�|j�r�tjt|�|j�d
|f��q�q�Wntj|||||t|��n|dkru|jru�j|jd�}n�jd|�}|
r�|r�dg}n|j ||d�}n|j!|d�j"��}|r�j}n~|dkr�j#}nft$|j%�}
g|D]}||
kr|^q}|j$d|j#|j�}|j&d�|D��|j'd�}�jj(ddt)�r�|r�|dkr�|j*dt)�r�idd6}n|s�||�n�tj+�||�}|\}}|j*dt)�r||�n||�||tj,�|j$d||�}xa|D]Y}|j-d|j.�t/tj,�t/tj��} | sF�jj0td�|�qFqFW�jj
d�tj1�|�Wd|	dk	r�	j2�nXWd�dk	r�j2�nX�jj
d�|j'd�}!x�|!j3�D]�}"|"|j4kr+|!|"t.�j4|"�}#}$|#|kr�|#}%||$}&t5j6||%|&�r�j-d|"|#|$�} | r��jj7td�|"�q�jj0td�|"�q��q+W|S(swPush outgoing changesets (limited by revs) from the current
        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!destination does not support pushcs��dk	r"tj�||�n_g|D]"}|�|j�kr)|^q)}tj|}|r��jjtd�|�ndS(s0move <nodes> to <phase> in the local source repos8cannot lock source repo, skipping local %s phase update
N(RR�RQR@t
phasenamesR2RR(R@R@R�tactualmovestphasestr(t	locallockR	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytlocalphasemove�s/
s"cannot lock source repository: %s
tunbundleR�t	onlyheadst	commonincs%push includes obsolete changeset: %s!spush includes %s changeset: %s!s%push includes unstable changeset: %s!s#push includes bumped changeset: %s!s&push includes divergent changeset: %s!itpushs%ln and parents(roots(%ln))css|]}|j�VqdS(N(R�(R�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pys	<genexpr>csR�R2t_usedassubrepoRHR;sheads((%ln::%ln) and public())supdating %s to public failed!
s'try to push obsolete markers to remote
Nschecking for updated bookmarks
R�supdating bookmark %s
supdating bookmark %s failed!
(8R<R�RRRR�RRRRCR}R�tEACCESR2RjR`RNRLRMtfindcommonoutgoingtmissingRktnochangesfoundtexcludedR�tmissingheadsR�ttroubledttroublest
checkheadsR�t_changegrouptgetlocalbundleRfRDR=tcommonheadsR�RAR�RIR�R�R�RPRSR'RRR�tsyncpushRR�R�R�t	validdestR('R	R=R�R�t	newbranchtunfiReterrR�RCRftfciRhRAtinctremoteheadstfcotoutgoingRtmsotmstR�R�REtcheadsR�R\tanaR]tdrootstoutdatedt
newremoteheadR�trbR tnrtnltcrRX((RdR	s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRi�s�
					




%	



	
		

cCs�|jjs|dkr;|jjtd�t|��n|jjr�|jjd�x+|D] }|jjdt|��q^WndS(Ntbundles%d changesets found
slist of changesets:
s%s
(R2R�RRR�t	debugflagRjR(R	R@RBR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytchangegroupinfo�s#
cCsw|j}|stg}n|j||�\}}}|jg|D]}|j|�^qC�}|j||||�S(s=Compute a changegroup consisting of all the nodes that are
        descendants of any of the bases and ancestors of any of the heads.
        Return a chunkbuffer object whose read() method will return
        successive changegroup chunks.

        It is fairly complex as determining which filenodes and which
        manifest nodes need to be included for the changeset to be complete
        is non-trivial.

        Another wrinkle is doing the reverse, figuring out which changeset in
        the changegroup a particular filenode or manifestnode belongs to.
        (R�RR>R�R�t_changegroupsubset(R	RXR?RBRXtcsetsR�RA((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR*�s
	+cCs,|js
dS|j|j|j|j|�S(s�Like getbundle, but taking a discovery.outgoing as an argument.

        This is only implemented for local repos and reuses potentially
        precomputed sets in outgoing.N(RmRR�RARp(R	RBR�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRu�s	cCs}|j}|r@|j}g|D]}||�r|^q}n	tg}|s^|j�}n|j|tj|||��S(sJLike changegroupsubset, but returns the set difference between the
        ancestors of heads and the ancestors common.

        If heads is None, use the local heads. If common is None, use [nullid].

        The nodes in common might not all be known locally due to the way the
        current discovery protocol works.
        (R�thasnodeRR?RuRLR�(R	RBR?RARXR�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR)�s			(		cs��j��j�i�i�t��dig�ddg�|j�|t�j��krq�j���S�jddtd���j	����fd���j
j�td��td��td	��td
��������������fd�}t
j|���j
jdd
d���dkrQd�ntj������������������fd�}t
jtj|��d�S(NR�itpreoutgoingR�RBcsB|j|j}}g|D]$}|||���kr|^qS(N(R�R�(trevlogRmtrrtrlR�(t
commonrevs(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytprune�s
tbundlingt
changesetst	manifestsR�c
sJ|�kru�j|�}�j|d��j|d|��dcd7<���dd�d�d�|S|�kr�|}�j|�}x=|j�D]/\}}|�kr��|j||�q�q�W�dcd7<���dd�d�d�|S���dd�dd�d�d��d|SdS(Niiitunitttotaltitem(R�R�R,treadfastR�(R�RR�tclnodetmdataRGR�(t	_bundlingt_changesetst_filest
_manifeststchangedfilesRXtcounttfnodestfstateRdtmfstprogress(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR%s*
R�treordertautoc3s�dt��g�(x%�j��d��D]}|Vq,W��d�x�D]}i�|<qOWdt��g�(x.�j�����d��D]}|Vq�W��d��j�dt��g�(x�t��D]�}�j|�}t|�stjtd�|��n|�d<�j	|i��d<�|�d�}|r��dcd7<�j
|�Vx%|j|���D]}|Vq�Wq�q�W�j�V��d��r�
jddt
�d�d��ndS(NiR�sempty or missing revlog for %siR�R�RB(R�tgroupRR�R�RJR�RRR�t
fileheaderR8R�R(tchunkRGRt
filerevlogtnodelist(R�tbundlerR�RXR�R�R�R�RdR�R�R�R�R	RB(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytgengroup&s:	

(	




tUN(R�R�R�R.R�R?RtR�R;R�R2R�RRVtbundle10R�RR�t	parseboolt
unbundle10tchunkbuffer(R	R�R�R?RBR%R�((R�R�R�R�R�R�RXR�R�R�R�R�RdR�R�R�R�R	RBs7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��s4			
0	9+cCs|j||j�|�S(N(R*R?(R	RWRB((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRVSscs��j��j�i�t��dg�ddg��jddtd���j���tg�D]}�j|�^qi���fd���jj�t	d��t	d��t	d	��t	d
�������������fd�}t
j|���jjdd
d���dkr;d�ntj�����������������fd�}t
jtj|��d�S(sqCompute the changegroup of all nodes that we have that a recipient
        doesn't.  Return a chunkbuffer object whose read() method will return
        successive changegroup chunks.

        This is much easier than the previous function as we can assume that
        the recipient has any changenode we aren't sending them.

        nodes is the set of nodes to sendR�iR�R�RBcsB|j|j}}g|D]$}||��kr||�^qS(N(R�R�(tlogtlntllrR�(R�(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt
gennodelstnsR�R�R�R�c	s|�kru�j|�}�j|d��j|d|��dcd7<���dd�d�d�|S|�kr��dcd7<���dd�d�d��j|j|j|���S���dd�dd�dd���j|j|j|���SdS(NiiiR�R�R�(R�R�R,R�R�R�(R�RR�(R�R�R�R�R�RXR�R�RdR�R�(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR%xs R�R�R�c3s�dt��g�(x%�j��d��D]}|Vq,W��d�dt��g�(x+�j����d��D]}|VqzW��d�dt��g�(x�t��D]�}�j|�}t|�s�jtd�|��n|�d<�|�}|r��dcd7<�j|�Vx%|j|���D]}|VqCWq�q�W�j	�V��d��r��j
ddt�d�d��ndS(	s0yield a sequence of changegroup chunks (strings)iR�sempty or missing revlog for %siR�R�RBN(R�R�RR�RJR�RRR�R8R�R(R�RR�R�(R�R�R�RXR�R�R�RdR�R@R�R�R	RB(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��s2	
%	



R�N(R�R�R�R�R;R�R�R2R�RRVR�R�RR�R�R�R�(R	R@RBR�R%R�((R�R�R�R�R�R�RXR�R�R�RdR�R@R�R�R�R	RBs7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRtWs.				(-	6!c$
sl��fd�}�fd�}|s+dS�jddtd�d��d}}}	t�}
�j��j��j���jdj�tj	��g��}z�t
j|�}�jj
td	��t���d
tf�fd��Y}
|
�}||_|j��j|||�}|p1|sLtjtd���nt��}|�}x.t�|�D]}|
j�|j��qrWt|
�}
�jjtd
�d(��jj
td��td�|_d|_||_|j��jj|||��jjtd�d(�i}�jjdddt �r�x�t�|�D]s}�jj!�jj"|��d}�jj#|�}x6|j$�D](\}}|j%|t��j&|�q�WqYWn�jj
td��td�|_d|_|
|_d(|_x4trI|j'�}|s2Pn|d}�jj(d|�|��j)|�}t|�}|j|||�s�tjtd���n|	t|�|7}	|d7}||kr||}x]t|t|��D]F}|j"|�}||kr|j*|�q�jtd���q�|sF||=qFqqW�jjtd�d(�x�|j$�D]y\}}�j)|�}x[|D]S}y|j+|�Wq�t,j-k
r�tjtd�|t.|�f��q�Xq�WqpWd}�rX�j�}t|�t��}x:|D]/}|�kr"�|j/�r"|d8}q"q"Wnd}|rwtd�|}n�jj
td�||	||f��j0�|dkr��fd�} �jddtd t.�j"���d�d�d!| �ngt�|�D]}!�j"|!�^q��jjd"d#t�}"�d$kr�|"rpt1j2�t1j3|�q�t1j2�t1j4|�t1j5�t1j4��n%�d%kr�t1j5�t1j4��n�j6|�|j7�|dkr=�d%krt8j9�j:d&��n�������fd'�}#�j;|#�nWd(|j<�X|dkr`|dS|dSd(S()s�Add the changegroup returned by source.read() to this repo.
        srctype is a string like 'push', 'pull', or 'unbundle'.  url is
        the URL of the repo where this changegroup is coming from.

        Return an integer summarizing the change to this repo:
        - nothing changed or no source: 0
        - more heads than before: 1+added heads (2..n)
        - fewer heads than before: -1-removed heads (-2..-n)
        - number of heads stays the same: 1
        cs$�jjdt|��t��S(Nsadd changeset %s
(R2RjRR�(R(RXR	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytcsmap�scs
�j|�S(N(R�(R(RX(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytrevmap�sitprechangegroupR�RBR=s
sadding changesets
tprogcs2eZed�ZdZ�jZdZd�ZRS(R�icSsA|jj|j|jdtd�d|j�|jd7_dS(NR�tchunksR�i(R2R�tstepR�RR�(R	((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt__call__�s$
N(	RRRR�R�R2RR�R�((R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��s
	s!received changelog group is emptyR�sadding manifests
R�itserverR�tdefaultsadding file changes
R�Risadding %s revisions
s#received file revlog group is emptys#received spurious file revlog entrys+missing file data for %s:%s - run hg verifyR�s (%+d heads)s2added %d changesets with %d changes to %d files%s
cs�j�r�jpdS(NR�(RRp((RXR	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR\F	stpretxnchangegroupR�RR�tpublishRitstripR,c
s��jjd��jddt�j���d�d��x3�D]+}�jddt|�d�d��qEWg�j�D]}|�kr�|^q�}�jjddt��djg|D]}t|d	 �^q���dS(
Nsupdating the branch cache
RVR�RBR=tincomings$%s incoming changes - new heads: %s
s, i(	R2RjR�RR�R?R�R�R(R�R6tnewheadsR�(R�RXRYtoldheadsR	tsrctypeR=(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytrunhooksj	s!

+	N(=R�R;R�R�RR?RRR�RKR�RR2RRR�RR�tchangelogheadertaddgroupRROR�R�R�RR�R�R�tmanifestheaderR�R�R�R�R�t	readdeltaR�R,R
t
filelogheaderRjRJR�R�R�R�RR5R�R�RQRRRSRR
R8R&R2R0R�R($R	RBR�R=temptyokR�R�R�R�t	revisionstefilesR�RR�tprt
srccontentRZR�t	needfilestcsettmfestRGR�t	chunkdatatfltotneedsRHtdhR?R6thtextR�R�RHR�((R�RXRYR�R	R�R=s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRD�s�		
'			

		
"'				



	"

+

!cs��j�}zxd}|jd�r3|j�}n|j�}|j�}yt|�}Wn)tk
r�tj	t
d�|��nX|dkr�tjt
d���nH|dkr�tjt
d���n$|dkr�jt
d���n�j
jt
d	��|j�}y%tt|jd
d��\}}	Wn/ttfk
rktj	t
d�|��nX�j
jt
d�|tj|	�f�d}
�j
jt
d�dd
|	�tj�}x-t|�D]}|j�}y(|jdd�\}
}t|�}Wn/ttfk
r>tj	t
d�|��nX�j
jrq�j
jd|
tj|�f�n�jtj|
�d�}xYtj|d|�D]B}|
t|�7}
�j
jt
d�|
d
|	�|j|�q�W|j�q�Wtj�|}|dkrd}n�j
jt
d�d��j
jt
d�tj|	�|tj|	|�f�|jt �j!��j"��j#|��j$�|reg}x!|j%�D]}|j&|�q�W|ret'�fd�|D��}tj(|�|j)�|�}xMdD]B}�j*|�}|j+|�r|�j,|<|j|�PqqWqen�j-�t�j.��dSWd|j/�XdS(NR&s'unexpected response from remote server:isoperation forbidden by serveris$locking the remote repository failedis%the server sent an unknown error codesstreaming all changes
t s!%d files to transfer, %s of data
tcloneR�tsadding %s (%s)
R�tlimitg�MbP?s(transferred %s in %.1f seconds (%s/sec)
c3s'|]}t�jj|��VqdS(N(R�R�R�(R�R�(R	(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pys	<genexpr>�sRot	immutableR,(sbaseR�sserved(0RCRRNR&t
stream_outtreadlineR�RR�t
ResponseErrorRR�RR2RtmapR�t	TypeErrort	bytecountR�ttimeROR�RjR�R\t	decodedirt
filechunkiterR�R�R8R�R�R5R6R�R�R-R�tmaxtbranchcacheR�R0tvalidforR�R�R?R(R	R=R5RCt
rbranchmapR�R+REttotal_filesttotal_bytest
handled_bytesR=RFRtsizetofpR�telapsedtrbheadsR@trtiprevRt	candidatetrview((R	s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt	stream_in�s�
%	


	
	



cCs�|s|jd�}n|r�|r�|jd�rJ|j|td��S|jd�}|r�t|jd��}||js�|j||�Sq�n|j||�S(s�clone remote repository.

        keyword arguments:
        heads: list of revs to clone (forces use of pull)
        stream: use streaming clone if possiblesstream-preferredtstreamRZt
streamreqst,(RZ(RNR�R�R�R6RG(R	R=R?R�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR��s

cCs�|jddtd|d|d|d|�|jjd||f�tj|||||�}|jdd|d|d|d|d	|�|S(
Nt
prepushkeyR�RFR>RGRHspushing key for "%s:%s"
R'R(R�R;R2RjR'Ri(R	RFR>RGRHR((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR'
s
$cCs\|jddtd|�|jjd|�tj||�}|jdd|d|�|S(NtprelistkeysR�RFslisting keys for "%s"
RItvalues(R�R;R2RjR'R�(R	RFR((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRI	
s
cCsd|||||fS(s+used to test argument passing over the wires%s %s %s %s %s((R	RJRKRLRMRN((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRO
scCsR|jdd�}z|j|�Wd|j�X|j|jt|j�d�S(Nslast-message.txttwbi(RvR�R8RURR�Rp(R	R�R�((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�
s
(srevlogv1sgeneraldelta(sstoresfncachesshareds	dotencode(srevlogv1sgeneraldeltaN({RRR�R6R�R�R5RR3RaR�R/R8R3R�R�RtR-RR0RR�R�R�RR�R�R�R�R�R�R�R�R�R�R�R=R�R$RR�RR�R�RR*RR/R1R&R7R9R<R%R>R(R:RFRRHRJR�RKRRLRRRTRURRYRhRlRRnRpRqRsRwRxRR}R�R|R�R�R�R	R�R�R�R�R�R;RCR�R�R
R�R�R�RRR?RBRSRTRGR`RiR�R*RuR)R�RVRtRDR�R�R'RIROR�(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyRY�s�
		c					&														C			!											
																					
B					
		
	P�Q"		�		T	�		l	^�] 			cs2g|D]}t|�^q��fd�}|S(NcsFx?�D]7\}}}y|j||�Wqtk
r=qXqWdS(N(R�R(Rltsrctdest(trenamefiles(s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR
s

(R�(R�RR((Rs7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR�
scCsOtjj|�\}}|jd�s-t�tjj||jddd��S(NRyR�i(R�RqR�R�tAssertionErrorRtreplace(ReRoR((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyR~'
scCst|tj|�|�S(N(RYR�turllocalpath(R2RqR`((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytinstance,
scCstS(N(R;(Rq((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pytislocal/
s(@R�RRRti18nRR-RVR�RLR'R�R�R�R�RIR�R�R�R�RCRR\RRkR�R{R�R�R�R�RR�R�R�R#RR�R�R�R�R`R&t
propertycachet	filecacheRRRRRR$R�RPtunionRRR.R+RQRRYR�R~RR(((s7/sys/lib/python2.7/site-packages/mercurial/localrepo.pyt<module>sJTT0H<				<�����
		

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.