HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //lib64/python2.7/site-packages/mercurial/localrepo.pyo
�
1�3\c@@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZm
Z
mZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z#m$Z$m%Z&m'Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z8m9Z9m:Z;m<Z<m=Z=m>Z>m?Z@ddlAmBZBmCZCmDZDddlEmFZGe#jHZHe>jIZIe>jJZJeK�ZLd	e5jMfd
��YZNdeNfd��YZOd
eNfd��YZPd�ZQde>jRfd��YZSde>jRfd��YZTd�ZUd�ZVddddddhZWeWjXdh�ZYeBjZe1j[�de\fd��Y�Z]eBjZe1j^�de1j_fd ��Y�Z`eBjZe1ja�d!e`fd"��Y�Zbd#Zcd$ZdeK�Zeefd%�Zgd&�Zhd'�Zid(�Zjd)�Zkd*�Zld+�Zmd,�Znd-�ZoeBjZe1jp�d.e\fd/��Y�ZqeBjZe1jp�d0e\fd1��Y�Zrd2�Zse1jtd3�fe1jpd4�fgZueBjZe1jt�d5e\fd6��Y�Zvd7�Zwd8�Zxefefd9�Zyd:�Zzefd;�Z{d<�Z|d=�Z}efd>�Z~d?�ZdS(@i(tabsolute_importNi(t_(tbinthextnullidtnullrevtshort()t	bookmarkst	branchmaptbundle2tchangegroupt	changelogtcolortcontexttdirstatet
dirstateguardt	discoverytencodingterrortexchanget
extensionstfilelogthooktlocktmanifesttmatchtmerget	mergeutilt
namespacest
narrowspectobsoletetpathutiltphasestpushkeytpycompatt
repositorytrepoviewtrevsett
revsetlangtscmutiltsparsetstoretsubrepoutilttagsttransactionttxnutiltutiltvfs(t
interfaceutiltprocutilt
stringutil(t	constantst_basefilecachecB@s,eZdZdd�Zd�Zd�ZRS(sMAll filecache usage on repo are done for logic that should be unfiltered
    cC@s/|dkr|Stt|�j|j�|�S(N(tNonetsuperR4t__get__t
unfiltered(tselftrepottype((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR7[scC@stt|�j|j�|�S(N(R6R4t__set__R8(R9R:tvalue((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR<_scC@stt|�j|j��S(N(R6R4t
__delete__R8(R9R:((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR>asN(t__name__t
__module__t__doc__R5R7R<R>(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR4Xs	t
repofilecachecB@s eZdZd�Zd�ZRS(s3filecache for files in .hg but outside of .hg/storecG@s>tt|�j|�x!|D]}tj|df�qWdS(Ntplain(R6RBt__init__t_cachedfilestadd(R9tpathstpath((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRDfs
cC@s|jj|�S(N(R/tjoin(R9tobjtfname((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRIks(R?R@RARDRI(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRBds	t
storecachecB@s eZdZd�Zd�ZRS(s filecache for files in the storecG@s>tt|�j|�x!|D]}tj|df�qWdS(Nt(R6RLRDRERF(R9RGRH((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRDps
cC@s
|j|�S(N(tsjoin(R9RJRK((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRIus(R?R@RARDRI(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRLns	cC@s8|j�jj|d�}|s+dtfS|jtfS(s{check if a repo has already cached "name" filecache-ed property

    This returns (cachedobj-or-None, iscached) tuple.
    N(R8t
_filecachetgetR5tFalseRJtTrue(R:tnamet
cacheentry((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytisfilecachedxs
tunfilteredpropertycachecB@seZdZdd�ZRS(s0propertycache that apply to unfiltered repo onlycC@s>|j�}||kr.tt|�j|�St||j�S(N(R8R6RVR7tgetattrRS(R9R:R;tunfi((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR7�sN(R?R@RAR5R7(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRV�stfilteredpropertycachecB@seZdZd�ZRS(s1propertycache that must take filtering in accountcC@stj||j|�dS(N(tobjectt__setattr__RS(R9RJR=((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
cachevalue�s(R?R@RAR\(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRY�scC@s|t|j��kS(s?check if a repo has an unfilteredpropertycache value for <name>(tvarsR8(R:RS((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pythasunfilteredcache�sc@s�fd�}|S(s@decorate method that always need to be run on unfiltered versionc@s�|j�||�S(N(R8(R:targstkwargs(torig(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytwrapper�s((RaRb((Ras9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytunfilteredmethod�stlookupRR!tknownt	getbundletunbundletchangegroupsubsettlocalcommandexecutorcB@s>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cC@s||_t|_t|_dS(N(t_peerRQt_sentt_closed(R9tpeer((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRD�s		cC@s|S(N((R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt	__enter__�scC@s|j�dS(N(tclose(R9texctypetexcvaluetexctb((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt__exit__�scC@s�|jrtjd��n|jr6tjd��nt|jtj|��}tjj	�}y|tj
|��}Wn+tk
r�tj|t
j�d�nX|j|�|S(Ns1callcommand() cannot be used after sendcommands()s*callcommand() cannot be used after close()i(RkRtProgrammingErrorRlRWRjR"tsysstrtfuturestFuturet	strkwargst	Exceptiontfuture_set_exception_infotsystexc_infot
set_result(R9tcommandR_tfntftresult((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcallcommand�s		

cC@s
t|_dS(N(RRRk(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytsendcommands�scC@s
t|_dS(N(RRRl(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRo�s(R?R@RDRnRsR�R�Ro(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRi�s					t	localpeercB@s�eZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zdddd
�Z
dddd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(s8peer for a local repo; reflects only the most recent APIcC@sbtt|�j�|dkr.tj�}n|jd�|_|j|_|j	|�|_
dS(Ntserved(R6R�RDR5t
moderncapstcopytfilteredt_repotuit_restrictcapabilitiest_caps(R9R:tcaps((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRD�scC@s
|jj�S(N(R�turl(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��scC@s|jS(N(R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytlocal�scC@s|S(N((R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRm�scC@stS(N(RR(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcanpush�scC@s|jj�dS(N(R�Ro(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRo�scC@s
|jj�S(N(R�R(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�scC@s|jS(N(R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcapabilities�scC@s|jjd�S(Nsclonebundles.manifest(R�ttryread(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytclonebundles�scC@s2d||tj|�tj|�tj|�fS(s+Used to test argument passing over the wires%s %s %s %s %s(R"tbytestr(R9tonettwotthreetfourtfive((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
debugwireargs�sc
K@svtj|j|d|d|d||�d}tj|�}tj|�r_tj|j|�St	jd|d�SdS(Ntheadstcommont
bundlecapsit01(RtgetbundlechunksR�R.tchunkbuffertbundle2requestedR	tgetunbundlerR�R
R5(R9tsourceR�R�R�R`tchunkstcb((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRf�s	
cC@s
|jj�S(N(R�R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�scC@s|jj|�S(N(R�Re(R9tnodes((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRescC@s|jj|�S(N(R�tlistkeys(R9t	namespace((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�scC@s|jj|�S(N(R�Rd(R9tkey((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRdscC@s|jj||||�S(N(R�R!(R9R�R�toldtnew((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR!scC@stjtd���dS(Ns.cannot perform stream clone against local peer(RtAbortR(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
stream_outscC@scy%y}tj|j|d�}tj|j||d|�}tj|d�r{tj|j	��}t
j|j|�}n|SWn�tk
r#}t
|dd�}|rt
j|jj�}x|D]}	|j|	�q�Wtj|j	��}t
j|j|�}
t
j|j|
�n�nXWn7tjk
r^}tjtd�tj|���nXdS(sPapply a bundle on a repo

        This function handles the repo locking itself.tpusht	getchunkst_bundle2salvagedoutputspush failed:N((Rt
readbundleR�R5RgR�R.tsafehasattrR�R�R	R�RyRWtbundle20taddpartt
processbundleRt	PushRacedt
ResponseErrorRR2tforcebytestr(R9tbundleR�R�trettstreamtexctoutputtbundlertouttb((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRgs*
cC@s
t|�S(N(Ri(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcommandexecutorFsN(R?R@RAR5RDR�R�RmR�RoRR�R�R�RfR�ReR�RdR!R�RgR�(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��s(															(tlocallegacypeercB@s;eZdZd�Zd�Zd�Zd�Zd�ZRS(scpeer extension which implements legacy methods too; used for tests with
    restricted capabilitiescC@s tt|�j|dt�dS(NR�(R6R�RDt
legacycaps(R9R:((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRDPscC@s|jj|�S(N(R�tbetween(R9tpairs((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�UscC@s|jj|�S(N(R�tbranches(R9R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�XscC@s@tj|jd|d|jj��}tj|j|d|�S(NtmissingrootstmissingheadsR�(RtoutgoingR�R�R
tmakechangegroup(R9R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR
[scC@s7tj|jd|d|�}tj|j|d|�S(NR�R�R�(RR�R�R
R�(R9tbasesR�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRh`s	(R?R@RARDR�R�R
Rh(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�Ks				sexp-revlogv2.0tsparserevlogcC@s%|j�}|j|_tj|dtdt�}|jd�}tj|dt�}|j�s�y|j�Wn+tk
r�}|jtj	kr��q�nXt
jtd�|��nyt
|jd�j��}Wn4tk
r}|jtj	kr�nt
�}nXy6|j|jd�d|j�t||||�Wntk
rZnXtj|�d	�tj|�D�}	t|�}
t||
�t||�t
�}d
|ks�d|kri|jd�jd
�}d|kr�|j|�}ntj|dt�}
|
j�s>t
jtd�|
j��n|jtj�|
j}|
jd�}n|j}|jd�}t||d��}|j|_|j}t |||�|_!tj|dt�}|j|_g}i}x�t"D]�\}}|�d|d|d|d|d|d|d|d|d|j!d|d|	d|d|�
}t#|t$�s�t
j%d|��n|j&|�q�Wt'j(d|jd jt)|��f�}t$|t*|�i�}|d!|d|d"|d|d|d|d#|
d|d|d|d|d|�S($seCreate a local repository object.

    Given arguments needed to construct a local repository, this function
    performs various early repository loading functionality (such as
    reading the ``.hg/requires`` and ``.hg/hgrc`` files), validates that
    the repository can be opened, derives a type suitable for representing
    that repository, and returns an instance of it.

    The returned object conforms to the ``repository.completelocalrepository``
    interface.

    The repository type is derived by calling a series of factory functions
    for each aspect/interface of the final repository. These are defined by
    ``REPO_INTERFACES``.

    Each factory function is called to produce a type implementing a specific
    interface. The cumulative list of returned types will be combined into a
    new type and that type will be instantiated to represent the local
    repository.

    The factory functions each receive various state that may be consulted
    as part of deriving a type.

    Extensions should wrap these factory functions to customize repository type
    creation. Note that an extension's wrapped function may be called even if
    that extension is not loaded for the repo being constructed. Extensions
    should check if their ``__name__`` appears in the
    ``extensionmodulenames`` set passed to the factory function and no-op if
    not.
    t
expandpathtrealpaths.hgtcacheauditedsrepository %s not foundtrequiresthgrctrootcS@sh|]\}}|j�qS((R?(t.0tntm((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pys	<setcomp>�s	tsharedt	relsharedt
sharedpaths
s1.hg/sharedpath points to nonexistent directory %stcachecS@stj|dt�S(NR�(tvfsmodR/RR(tbase((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt<lambda>RMR�tintentstrequirementstfeaturestwdirvfsthgvfsR)tstorevfststoreoptionstcachevfstextensionmodulenamest
extrastatetbaseclassessunable to construct type for %ssderivedrepo:%s<%s>t,tbaseuitorigroottsupportedrequirements(+R�R�R/RRRItisdirtstattOSErrorterrnotENOENTRt	RepoErrorRtsettreadt
splitlinestIOErrort
readconfigR�t
afterhgrcloadRtloadalltgathersupportedrequirementstensurerequirementsrecognizedtensurerequirementscompatibletrstriptexistsRFR#tREPO_FEATURE_SHARED_STORAGEt	makestoret
createmodetresolvestorevfsoptionstoptionstREPO_INTERFACESt
isinstanceR;RttappendR"Rutsortedttuple(R�RHR�R�R�thgpathR�teR�R�R�R�R�t	sharedvfst
storebasepatht	cachepathR)R�R�R�R�tifaceRttypRStcls((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytmakelocalrepository}s�





								
	cC@s�idgd6dgd6}xqt|j��D]]\}}||krKq-nx<|D]4}|jd|�sR|jd|ddd�qRqRWq-WdS(sQPerform additional actions after .hg/hgrc is loaded.

    This function is called during repository loading immediately after
    the .hg/hgrc file is loaded and before per-repo extensions are loaded.

    The function can be used to validate configs, automatically add
    options (including extensions) based on requirements, etc.
    t
largefilestlfsRRMR�tautoloadN(Rtitemst	hasconfigt	setconfig(R�R�R�R�tautoextensionstrequirementtnamesRS((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�Ds


cC@s�ttj�}d�tj|�D�}x-tD]%}|j|kr/|||�q/q/Wx>tjD]3}tj|}|j�rb|j	d|�qbqbW|S(s6Determine the complete set of recognized requirements.cS@sh|]\}}|j�qS((R?(R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pys	<setcomp>ds	sexp-compression-%s(
R�tlocalrepositoryt_basesupportedRtfeaturesetupfuncsR@R.tcompenginestrevlogheaderRF(R�t	supportedtmodulesRRStengine((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�]s

cC@s�t�}x`|D]X}||kr(qn|sC|dd!j�r[tjtd���n|j|�qW|r�tjtd�djt|��dtd���ndS(	sValidate that a set of local requirements is recognized.

    Receives a set of requirements. Raises an ``error.RepoError`` if there
    exists any requirement in that set that currently loaded code doesn't
    recognize.

    Returns a set of supported requirements.
    iis.hg/requires file is corrupts:repository requires features unknown to this Mercurial: %st thintsJsee https://mercurial-scm.org/wiki/MissingRequirement for more informationN(R�tisalnumRtRequirementErrorRRFRIR(R�RtmissingR((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�rs		
	cC@s2d|kr.tjr.tjtd���ndS(s�Validates that a set of recognized requirements is mutually compatible.

    Some requirements may not be compatible with others or require
    config options that aren't enabled. This function is called during
    repository opening to ensure that the set of requirements needed
    to open a repository is sane and compatible with config options.

    Extensions can monkeypatch this function to perform additional
    checking.

    ``error.RepoError`` should be raised on failure.
    s
exp-sparsesfrepository is using sparse feature but sparse is not enabled; enable the "sparse" extensions to accessN(R(tenabledRR�R(R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��s
cC@sQd|krAd|kr1tj||d|k�Stj||�Stj||�S(s,Construct a storage object for a repository.R)tfncachet	dotencode(tstoremodtfncachestoretencodedstoret
basicstore(R�RHtvfstype((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��s
cC@s�i}d|krt|d<n|jdd�}|dk	rJ||d<nd|ksbt|kr~|jt|||��n|S(s�Resolve the options to pass to the store vfs opener.

    The returned dict is used to influence behavior of the storage layer.
    ttreemanifesttformattmanifestcachesizetrevlogv1N(RRt	configintR5tREVLOGV2_REQUIREMENTtupdatetresolverevlogstorevfsoptions(R�R�R�RR1((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�s

cC@s,i}i|d<d|kr)t|d<nt|krBt|d<nd|kr[t|d<n|jdd�}|dk	r�||d<n|jdd�}||d	<tj|�|d
<|jdd�}d
|kr�||d<n|jdd�}|dk	r||d<n|jdd�}t|j	dd��}	|jdd�}
||d<|	|d<|
|d<t
|k}||d<|r�t|d<nd}|r�tj}n|jdd|�}|dk	r�||d<nx4|D],}
|
j
d�r�|
td�|d<q�q�Wtj|kr(t|d<n|S(s+Resolve opener options specific to revlogs.tflagprocessorsR2trevlogv2tgeneraldeltaR0tchunkcachesizetstorages#revlog.optimize-delta-parent-choicetdeltabothparentst
lazydeltabasetexperimentaltmaxdeltachainspanitmmapindexthresholdssparse-readssparse-read.density-thresholdssparse-read.min-gap-sizeswith-sparse-readssparse-read-density-thresholdssparse-read-min-gap-sizes
sparse-revlogtmaxchainlensexp-compression-t
compenginetenableellipsisN(RRR4R3R5t
configboolR't
gddeltaconfigtconfigbytestfloattconfigtSPARSEREVLOG_REQUIREMENTtrevlogconsttSPARSE_REVLOG_MAX_CHAIN_LENGTHt
startswithtlenR#tNARROW_REQUIREMENT(R�R�R�RR:R<t	chainspanR@twithsparsereadtsrdensitythrestsrmingapsizeR�RAtr((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR6�s\




		

		
		







cK@stS(s6Produce a type conforming to ``ilocalrepositorymain``.(R(R`((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytmakemainstrevlogfilestoragecB@seZdZd�ZRS(s File storage when using revlogs.cC@s0|ddkr|d}ntj|j|�S(Nit/i(Rtsvfs(R9RH((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytfiles
(R?R@RARX(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRUstrevlognarrowfilestoragecB@seZdZd�ZRS(s1File storage when using revlogs and narrow files.cC@s9|ddkr|d}ntj|j||j��S(NiRVi(Rt
narrowfilelogRWtnarrowmatch(R9RH((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRXs
(R?R@RARX(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRYscK@s;|jtj�|jtj�tj|kr3tStSdS(s=Produce a type conforming to ``ilocalrepositoryfilestorage``.N(RFR#t REPO_FEATURE_REVLOG_FILE_STORAGEtREPO_FEATURE_STREAM_CLONERNRYRU(R�R�R`((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytmakefilestorages
cC@stS(N(RT(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�,RMcC@stS(N(R^(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�-RMRc	B@s�eZdZdddeehZedddddd	d
hBZddd
ddhZd�d�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zed��Zed��Zd�Zd�Zd�Zd�d�Zedd�d��Zed ��Zed!d"�d#��Zed$�d%��Zed"�d&��Zed'�d(��Zed�d)��Zd*�Z d+�Z!ee"j#�d,��Z$ee"j#�d-��Z%d�e&d.�Z'd/�Z(d0�Z)d1�Z*d2�Z+e+Z,d3�Z-d4�Z.d5�Z/d6�Z0e&d�d7�Z1d8�Z2e&d9�Z3e4d:��Z5d;�Z6d<�Z7d=�Z8d>�Z9d?�Z:d@�Z;dA�Z<e=dB��Z>e&dC�Z?dD�Z@dE�ZAdF�ZBdG�ZCdH�ZDdI�ZEdJ�ZFdK�ZGeHdL�ZId�d�d�dM�ZJdN�ZKd�dO�ZLdP�ZMdQ�ZNeOdR��ZPeOdS��ZQdT�ZRdU�ZSe&dV�ZTdW�ZUdX�ZVd�dY�ZWdZ�ZXd[�ZYe=d\��ZZd]�Z[e&e&d^�Z\e=d_��Z]d`�Z^e=d�e&da��Z_db�Z`dc�Zadd�Zbe&de�Zcdf�Zde=dg��Zed�d�dh�Zfdi�Zgehdj�Zidk�Zjehdl�Zkdm�Zldn�Zmdo�Zndp�Zoe=dqd�d�d�e&e&d�dr��Zpe=e&ds��Zqe=dt��Zre=du��Zsdvd�d�e&e&e&e&dw�Ztdx�Zudy�Zvdz�Zwd�d{�Zxd�d�e&d|�Zyd}�Zzd~�Z{d�Z|eOd���Z}d��Z~d��Zd�d�d�d��Z�d��Z�RS(�sQMain class for representing local repositories.

    All local repositories are instances of this class.

    Constructed on its own, instances of this class are not usable as
    repository objects. To obtain a usable repository object, call
    ``hg.repository()``, ``localrepo.instance()``, or
    ``localrepo.makelocalrepository()``. The latter is the lowest-level.
    ``instance()`` adds support for creating new repositories.
    ``hg.repository()`` adds more extension integration, including calling
    ``reposetup()``. Generally speaking, ``hg.repository()`` should be
    used.
    R2R9R/R)R(R�R�R)s
exp-sparsesinternal-phaseR�R�scache/Rsbisect.statec

C@s||_||_||_||_|j|_||_|j|_||_||_	||_
|	|_|
|_||_
d|_|jjdd�s�|jjdd�r�|j|jj�|j_ng|_tj|j�|jj|_|jj|_|jj|_|jjdd�s<|jjdd�r�tj|jd�ru|j|jjj�|jj_q�|j|jj�|j_nt|_i|_d|_ i|_!i|_"d|_#|_$|_%i|_&i|_'g|_(t)j)�|_*i|_+i|_,dS(s�Create a new local repository instance.

        Most callers should use ``hg.repository()``, ``localrepo.instance()``,
        or ``localrepo.makelocalrepository()`` for obtaining a new repository
        object.

        Arguments:

        baseui
           ``ui.ui`` instance that ``ui`` argument was based off of.

        ui
           ``ui.ui`` instance for use by the repository.

        origroot
           ``bytes`` path to working directory root of this repository.

        wdirvfs
           ``vfs.vfs`` rooted at the working directory.

        hgvfs
           ``vfs.vfs`` rooted at .hg/

        requirements
           ``set`` of bytestrings representing repository opening requirements.

        supportedrequirements
           ``set`` of bytestrings representing repository requirements that we
           know how to open. May be a supetset of ``requirements``.

        sharedpath
           ``bytes`` Defining path to storage base directory. Points to a
           ``.hg/`` directory somewhere.

        store
           ``store.basicstore`` (or derived) instance providing access to
           versioned storage.

        cachevfs
           ``vfs.vfs`` used for cache files.

        features
           ``set`` of bytestrings defining features/capabilities of this
           instance.

        intents
           ``set`` of system strings indicating what this repo will be used
           for.
        tdevelsall-warningsscheck-locksR/N(-R�R�R�twvfsR�R�R/RHR�RR�R)R�R�R5t
filternameRDt_getvfswardtauditt_phasedefaultsRtsetuptspathRWRIRNR.R�t_getsvfswardRQt_dirstatevalidatewarnedt
_branchcachest_revbranchcachet_filterpatst_datafilterst	_transreft_lockreft	_wlockrefROtfilteredrevcachet
_postdsstatusRRt_sparsesignaturecachet_sparsematchercache(
R9R�R�R�R�R�R�R�R�R)R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRDjsN4													$										c@s+tj���d���fd�}|S(sbuild a ward for self.vfsc@sx�|d|�}��}|dksMtj|d�sMtj|d�rQdS|dkradS|j|j�r�|t|j�d}n|jd�r�d}|jj||d	d
dd�n|jd
�r|j|j	�dkrt|jjd|d	d
dd�qtnb|j|j
�dkrtx$�jD]}|j|�r4dSq4W|jjd|d	d
dd�n|S(NtmodeRoRnRStrbiscache/s2accessing cache with vfs instead of cachevfs: "%s"t
stackleveliRHs	cache-vfssjournal.swrite with no lock: "%s"scheck-locksswrite with no wlock: "%s"(NRSRu(R5R.R�RLRHRMR�t	develwarnt_currentlockRnRot_wlockfreeprefix(RHRtR�R:tmsgtprefix(torigfunctrrefR9(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcheckvfs�s0	#N(tweakreftrefR5(R9R|R~((R|R}R9s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRb�sc@s(tj|��d��fd�}|S(sbuild a ward for self.svfsc@s��|d|�}��}|dks:tj|d�r>dS|d	krNdS|j|j�rz|t|j�d}n|j|j�dkr�|jj	d|dd�n|S(
NRtRnRSRuiswrite with no lock: "%s"Rvi(NRSRu(
R5R.R�RLR�RMRxRnR�Rw(RHRtR�R:(R|R}(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt	checksvfss	
N(RR�R5(R9R|R�((R|R}s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRg	scC@s|j�dS(N(t_writecaches(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRoscC@s|jr|jj�ndS(N(Rjtwrite(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�s	cC@s`|jjdd�r\t|�}tjtj|dd��}|jdtj|��n|S(NR>sbundle2-advertisetroletclientsbundle2=(	R�RDR�R	t
encodecapstgetrepocapsRFturlreqtquote(R9R�tcapsblob((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�#scC@stj|j|j�dS(N(R't
writerequiresR/R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_writerequirements+scC@stj|jd|j�S(Ntcallback(RtpathauditorR�t_checknested(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytauditor1scC@s%tj|jd|jdtdt�S(NR�trealfstcached(RR�R�R�RQRR(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytnofsauditor7scC@s�|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.iRVN(RLR�RQRMR.tpconvertR5t	splitpathRItsubstateRRtsubtchecknestedtpop(R9RHtsubpathtnormsubpathtctxtpartsR{R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�>s
	cC@s
t|�S(N(R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRmdscC@s|S(saReturn unfiltered version of the repository

        Intended to be overwritten by filtered repo.((R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR8gscC@s(tj|j�j�}||||�S(s)Return a filtered version of a repository(R$tnewtypeR8t	__class__(R9RStvisibilityexceptionsR((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�msRsbookmarks.currentcC@s
tj|�S(N(Rtbmstore(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
_bookmarksrscC@s
|jjS(N(R�tactive(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_activebookmarkvst
phaserootss
00changelog.icC@stj||j�S(N(R t
phasecacheRd(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_phasecache}stobsstorecC@stj|j|�S(N(RR�R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��scC@s"tj|jdtj|j��S(Nt
trypending(RRWR-tmayhavependingR�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�ss00manifest.icC@s(tj|j�}tj|j||�S(N(RtmanifestrevlogRWtmanifestlog(R9t	rootstore((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��scC@s
|j�S(N(t
_makedirstate(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�sc@s4�fd�}tj�j�j�j�j|�S(s3Extension point for wrapping the dirstate per-repo.c@s
tj��S(N(R(tmatcher((R9(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��RM(RR/R�R�t_dirstatevalidate(R9t
sparsematchfn((R9s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��scC@siy|jj|�|SWnJtjk
rd|js`t|_|jjtd�t	|��nt
SXdS(Ns-warning: ignoring unknown working parent %s!
(RtrevRtLookupErrorRhRRR�twarnRRR(R9tnode((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��s		cC@s
tj|�S(sdmatcher patterns for this repository's narrowspec

        A tuple of (includes, excludes).
        (Rtload(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
narrowpats�scC@sPtj|jkr%tj|jd�S|j\}}tj|jd|d|�S(NRMtincludetexclude(	R#RNR�tmatchmodtalwaysR�R�RR(R9R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_narrowmatch�scC@s|rx|re|jj�retj|j|j|j��}tj|j|g�}tj||�Stj||j�S|jS(smatcher corresponding the the repo's narrowspec

        If `match` is given, then that will be intersected with the narrow
        matcher.

        If `includeexact` is True, then any exact matches from `match` will
        be included even if they're outside the narrowspec.
        (	R�R�R�texactt_roott_cwdtfilestunionmatchertintersectmatchers(R9Rtincludeexacttemtnm((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR[�s	!cC@s'tj|||�|jdt�dS(Ntclearfilecache(Rtsavet
invalidateRR(R9tnewincludestnewexcludes((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
setnarrowpats�scC@s�|dkrtj|�St|tj�r/|St|t�r�gtj|jt	|���D]"}||j
jkr]||^q]Sy�t|t�r�|j
j
|�}|}n�|dkr�t}t}n}|dkr�|j
j�}|j
j|�}nM|dkr1|jj�}|j�j
j|�}nt	|�dkr�y|}|j
j|�}WqHtjk
r�t|�}�qHtk
r�|j�r�||j�jj�kr�td�}tj|t|���nt|�}�qHXnRt	|�dkr)t|�}|j
j|�}ntjd|t |�f��tj!|||�SWn�tj"tjfk
r�tj#td�tj$|���nVt%tfk
r�tj&td	�tj$|���ntj'k
r�tj|�SXdS(
Ntnullttipt.is*working directory has unknown parent '%s'!i(s$unsupported changeid '%s' of type %ssfiltered revision '%s'sunknown revision '%s'((R5R
t
workingctxRtbasectxtsliceR"txrangetindicesRMRtfilteredrevstintR�RRR�R�Rtp1R8RtFilteredLookupErrorRR�R�tparentsRR�RRRtR;t	changectxtFilteredIndexErrortFilteredRepoLookupErrorR�t
IndexErrortRepoLookupErrortWdirUnsupported(R9tchangeidtiR�R�Rz((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt__getitem__�sd
" 		

cC@s,y||tSWntjk
r'tSXdS(s�True if the given changeid exists

        error.AmbiguousPrefixLookupError is raised if an ambiguous node
        specified.
        N(RRRR�RQ(R9R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt__contains__
s
cC@stS(N(RR(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt__nonzero__scC@s|j�}t|j�S(N(R8RMR(R9RX((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt__len__scC@s
t|j�S(N(titerR(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt__iter__ scG@s.tj||�}tjd|�}||�S(s�Find revisions matching a revset.

        The revset is specified as a string ``expr`` that may contain
        %-formatting to escape certain types. See ``revsetlang.formatspec``.

        Revset aliases from the configuration are not expanded. To expand
        user aliases, consider calling ``scmutil.revrange()`` or
        ``repo.anyrevs([expr], user=True)``.

        Returns a revset.abstractsmartset, which is a list-like interface
        that contains integer revisions.
        N(R&t
formatspecR%RR5(R9texprR_R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytrevs#s
cg@s*x#|j||�D]}||VqWdS(sVFind revisions matching a revset and emit changectx instances.

        This is a convenience wrapper around ``revs()`` that iterates the
        result and is a generator of changectx instances.

        Revset aliases from the configuration are not expanded. To expand
        user aliases, consider calling ``scmutil.revrange()``.
        N(R�(R9R�R_RS((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�4s	cC@sU|r3tj|j|dtj|�d|�}ntjd|d|�}||�S(s<Find revisions matching one of the given revsets.

        Revset aliases from the configuration are not expanded by default. To
        expand user aliases, specify ``user=True``. To provide some local
        definitions overriding user aliases, set ``localalias`` to
        ``{name: definitionstring}``.
        Rdt
localaliasN(R%tmatchanyR�tlookupfnR5(R9tspecstuserR�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytanyrevs@scC@sd|jS(Nsfile:(R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�PscK@stj|j||||�S(s�Call a hook, passing this repo instance.

        This a convenience method to aid invoking hooks. Extensions likely
        won't call this unless they have registered a custom hook or are
        replacing code that is expected to call a hook.
        (RR�(R9RStthrowR_((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRSscC@s;dtfd��Y}|�}|j�\|_|_|S(sMReturns a tagscache object that contains various tags related
        caches.t	tagscachecB@seZd�ZRS(cS@s$d|_|_d|_|_dS(N(R5R+ttagtypest
nodetagscachettagslist(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRDds(R?R@RD(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�cs(RZt	_findtagsR+R�(R9R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
_tagscache\s	cC@s�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(
RR�R�R�R+t	iteritemsR�RR�t
ValueError(R9ttR+ttttktv((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR+sscC@s�tj|j|�}td�|D��}tj|j|||�i}xB|j�D]4\}\}}|tkrW||tj|�<qWqWW|j	j
�|d<tg|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.cs@s|]}|dfVqdS(tglobalN((R�ttag((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pys	<genexpr>�sR�(ttagsmodtfindglobaltagsR�tdictt
readlocaltagsR�RRttolocalRR�(R9talltagsR�R+RSR�thistR=((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��s4cC@s|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�RP(R9ttagname((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyttagtype�s	cC@s�|jjs�g}xB|j�j�D].\}}|j|jj|�||f�q%Wgt|�D]\}}}||f^qd|j_n|jjS(s)return a list of tags ordered by revision(R�R�R+R�RRR�R(R9tlR�R�RS((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��s&7cC@s�|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�R�R+R�t
setdefaultRt
itervaluestsortRP(R9R�R�R�R�R+((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytnodetags�scC@s|jj|�S(s;return the list of bookmarks pointing to the specified node(R�R(R9R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
nodebookmarks�scC@stj|�|j|jS(skreturns a dictionary {branch: [branchheads]} with branchheads
        ordered by increasing revision number(RtupdatecacheRiRa(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�s
cC@s+|js$tj|j��|_n|jS(N(RjRtrevbranchcacheR8(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�s	cC@sQy|j�j|�SWn3tk
rL|sMtjtd�|��qMnXdS(s�return the tip node for a given branch

        If ignoremissing is True, then this method will not raise an error.
        This is helpful for callers that only expect None for a missing branch
        (e.g. namespace).

        sunknown branch '%s'N(Rt	branchtiptKeyErrorRR�R(R9tbrancht
ignoremissing((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�s
cC@stj||�j�S(N(R't	revsymbolR�(R9R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRd�scC@s,||j�kr|Stj||�j�S(N(RR'RR(R9R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytlookupbranch�sc	C@sk|j}|j}|j}g}xC|D];}|j|�}|dkpR||k}|j|�q(W|S(N(RtnodemapR�RPR5R(	R9R�tclR�R�R�R�RStresp((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRe�s			
cC@s|S(N((R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��scC@s|jjdddt�S(NR tpublisht	untrusted(R�RDRR(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
publishing�scC@s4|j�stS|j�s tS|jd�jjS(Ntvisible(R�RQRRRR�RR�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcancopys
cC@s|j|jkrdSdS(s2the type of shared repository (None if not shared)R)N(R�RHR5(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�scG@s|jj|j||�S(N(R/treljoinR�(R9R�tinsidef((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytwjoinscC@s�|jj���|jj||�}||}|rxG|D]<}||kr<|||kr<|jj|||�q<q<Wn|tkr�xZt|jj�j��D]:\}}||kr�||kr�|jjd|�q�q�WnWdQXdS(N(	Rtparentchanget
setparentsR�RRtcopiesRR5(R9R�tp2R#tpctxR�ts((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR"s

!(cC@stj||||d|�S(sechangeid can be a changeset revision, node, or tag.
           fileid can be a file revision or node.R�(R
tfilectx(R9RHR�tfileidR�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR'$scC@s
|jj�S(N(Rtgetcwd(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR)*scC@s|jj||�S(N(Rtpathto(R9R�tcwd((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR*-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!RMc[@stj||�S(N(R1tfilter(R&tcR`((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�?RMic@s
�||�S(N((R&R.R`(toldfn(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�CRM(RkR�tconfigitemsR�RR�R5RlR�RLRMtlstripR"t
getargspecR(
R9R-RtpattcmdtmfRtparamsRStfilterfn((R/s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_loadfilter0s*c
C@slxe|D]]\}}}||�r|jjd||f�|||d|jd|d|�}PqqW|S(Nsfiltering %s through %s
R�R:tfilename(R�tdebug(R9t
filterpatsR9tdataR5RR4((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_filterHs$cC@s
|jd�S(Ntencode(R8(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_encodefilterpatsQscC@s
|jd�S(Ntdecode(R8(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_decodefilterpatsUscC@s||j|<dS(N(Rl(R9RSR-((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
adddatafilterYscC@sO|jj|�r'|jj|�}n|jj|�}|j|j||�S(N(R`tislinktreadlinkR�R=R?(R9R9R<((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytwread\scK@s�|j|j||�}d|kr:|jj||�nW|jj||d||�d|kr{|jj|tt�n|jj|tt�t|�S(s�write ``data`` into ``filename`` in the working directory

        This returns length of written (maybe decoded) data.
        Rtbackgroundclosetx(	R=RAR`tsymlinkR�tsetflagsRQRRRM(R9R9R<tflagsRFR`((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytwwritecscC@s|j|j||�S(N(R=RA(R9R9R<((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
wwritedatatscC@s8|jr|j�}nd}|r4|j�r4|SdS(s4return the current transaction or None if non existsN(RmR5trunning(R9ttr((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcurrenttransactionws	c@s\�jjdd�s*�jjdd�rW�j�j�dkrWtjd��qWn�j���dk	r�jd��S�j	j
d�r�tjtd�dtd	���nd
t
j
�tj�f}ttj|�j��}d|}�jdd
td�d|��j��g�j�D]!\}}||t|�f^q/}|re|}	n�jj}	i�jd6�j	d6}
tj���d���jjdd�}�dkr�|r��jj����fd��n����fd�}��fd�}
tj|	�j	|
ddt|��j j!d|d|
dt"d���t#���j$d<t%��j$d<i�j$d<i�j$d <|�j&d<�j'd!�j j(����fd"�}�j'd#|��j)d$�j*�����fd%�}�j+d&|��j)d'�j,�tj���_-t.j/�����S((NR_sall-warningsscheck-locksstransaction requires lockingRStjournalsabandoned transaction foundR#s(run 'hg recover' to clean up transactions%.40f#%fsTXN:t
pretxnopenR�ttxnnamettxnidRCR)cS@sdS(N(R5(RG((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��RMR>shook-track-tagststripc@s���}tj|j|��}|jj�}tj|j||�}tj|j|||�}|r�d|jd<|jdddt��}tj	||�WdQXndS(Nt1t	tag_movedschanges/tags.changestwt
atomictemp(
R�t	fnoderevsR�RtheadrevstdifftagsthookargsR/RRt	writediff(ttr2R:t	oldfnodestnewheadst	newfnodestchangestchangesfile(toldheadstreporef(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt	tracktags�s	
c		@s��|���}|jjdd�r>tj||��ntj|jd�r�x�t�jdj��D]b\}\}}�j	j
�}|jtj
|||��|jddtd�tj|��qmWntj|jd�r�|j�j}x��jdj�D]w\}\}}�j	j
�}t|j|��}|jtj
|||��|jddtd�tj|��qWn|jd	dtd�tj�j	��d
S(swill run pre-closing hooksR>ssingle-head-per-branchspretxnclose-bookmarkRR�RRspretxnclose-phaseR tpretxncloseN(R�RDR'tenforcesingleheadRthashookRRbRR\R�R5RtpreparehookargsRRR"RxR8RRR�R (	R^R:RSR�R�R_RR�R�(tdescReRNRf(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytvalidate�s*
	,&c@sY��}|r"|jjd�n3tj�d�|jjdd�|jdt�dS(Nsjournal.narrowspecsjournal.dirstateR�(RR�R5Rt
restorebackupR�RR(RNtsuccessR:(ReR9(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt	releasefn�s	tundot	validatorRotcheckambigfilestorigrepolent
obsmarkersR Rs
flush-fncachec@s5|j�����fd�}��j|�dS(sMTo be run if transaction is successful, will schedule a hook run
            c
	@s���}tj|jd�r�t�jdj��}xm|D]b\}\}}�jj�}|jt	j
|||��|jddtd�tj
|��q>Wntj|jd�ri|j�j}t�jdj��}x�|D]w\}\}}�jj�}t|j|��}	|jtj
|	||��|jddtd�tj
|��q�Wn|jddtd�tj
���dS(Nstxnclose-bookmarkRR�RRstxnclose-phaseR ttxnclose(RRiR�RRbRR\R�R5RRjRQR"RxR8RRR�R (
R:t	bmchangesRSR�R�R_RtphasemvR�R�(RkR\ReRN(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pythookfunc*s&	N(R\t
_afterlock(R^Rx(RkReRN(R\s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyttxnclosehook!s	s
txnclose-hooks-warm-cachec@s/��jddtd�tj|j��dS(s0To be run if transaction is aborted
            ttxnabortR�RRN(RRQR"RxR\(R^(RkRe(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyttxnaborthookGss
txnabort-hooksrefresh-filecachestats(0R�RDRxRnR5RRtROtnestRWR�R�RtrandomttimeRthashlibtsha1tdigestRRRt
_writejournalt
_journalfilestundonameR�R/RR�RRZR,t
aftertransR)RRERMRbR�R\taddfinalizeR�taddpostcloset_buildcacheupdatertaddabortt_refreshfilecachestatsRmR'tregistersummarycallback(R9RktreporttidbasethaRSR/RGtrenamestrptvfsmaptshouldtracktagsRlRoRzR|((RkRdReR9RNRfs9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR,�sj

4	"	(		


 cC@sL|jdf|jdf|jdf|jdf|jdf|jdffS(NRPsjournal.dirstatesjournal.branchsjournal.descsjournal.bookmarkssjournal.phaseroots(RWR/(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�TscC@s/g|j�D]\}}|t|�f^q
S(N(R�R�(R9R/RG((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt	undofiles\scC@s�|jjdd�tj|d�|jjdtj|jj���|jjddt	|�|f�|jjd|jj
d��|jjd|jj
d	��dS(
Nsjournal.dirstatesjournal.narrowspecsjournal.branchsjournal.descs%d
%s
sjournal.bookmarksRsjournal.phaserootsR�(Rt
savebackupR5RR/R�Rt	fromlocalRRMR�RW(R9Rk((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�_scC@s�|j���|jjd�r�|jjtd��i|jd6|jd6}tj|j|d|jj	dt
�|j�tS|jj	td��t
SWdQXdS(NRPs%rolling back interrupted transaction
RMRCRrs%no interrupted transaction available
(RRWR�R�tstatusRR/R,trollbackR�RER�RRRQ(R9R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytrecoverls



cC@s�d}}}zm|j�}|j�}|jjd�r`tj|d�}|j|||�S|jjt	d��dSWdt
|||�XdS(NRpR�s"no rollback information available
i(R5twlockRRWR�Rt	_rollbackR�R�Rtrelease(R9tdryruntforceR�Rtdsguard((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�{scC@sV|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�i|jd6|jd6}tj|j|d|jdt�|jjd�r�|jjdddt�n|jjd�r�|jjdddt�n|j�|d|jjkp|d|jjk}
|
rH|j�tj|d�|j
jdd�y/|jjd�}|j
jtj |��Wn1t	k
r�|jtd�|j
j!��nXt"g|dj�D]}|j#�^q��}t|�dkr|jtd�|�n|jtd�|�t$j%j&||d	j'��n|j(�dS(Ns	undo.desciiiis8repository tip rolled back to revision %d (undo %s: %s)
s4repository tip rolled back to revision %d (undo %s)
s!rolling back unknown transaction
R�R�tcommits;rollback of last commit while not checked out may lose dataR#suse -f to forceRCRMRpRrsundo.bookmarksRt
checkambigsundo.phaserootsR�sundo.narrowspecs
undo.dirstatesundo.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
()R�R/R�R�R�R5RMtverboseRR�RR�R�RR�t
destroyingRWR,R�R�RER�trenameRRR�RRRoRRmt	setbranchRRRRR�tmergemodt
mergestatetcleanR�t	destroyed(R9R�R�R�R�R_toldlenRktdetailtoldtipRzR�R�t
parentgoneRtp((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��sj	"

		

'




/ 
c@s"tj|���fd�}|S(s�called during transaction to build the callback updating cache

        Lives on the repository to help extension who might want to augment
        this logic. For this purpose, the created transaction is passed to the
        method.
        c@s��}|j|�dS(N(tupdatecaches(RNR:(Re(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytupdater�s	(RR�(R9tnewtransactionR�((Res9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��scC@s�|dk	r(|jjd�dkr(dS|dksM|jdt|�krv|jjd�tj|j	d��n|r�|j
�}x|jD]}|j|�q�W|j
�x%|dj�D]}|j�q�WndS(s�warm appropriate caches

        If this function is called after a transaction closed. The transaction
        will be available in the 'tr' argument. This can be used to selectively
        update caches relevant to the changes in that transaction.

        If 'full' is set, make sure all caches the function knows about have
        up-to-date data. Even the ones usually loaded more lazily.
        R�RTNRssupdating the branch cache
R�R�(R5R\RPRbRMR�R:RRR�RRt
branchinfoR�R�R(R9RNtfulltrbcRSR�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��s$%
cC@sMdt|�kr|jd=n|j�jj�|j�|jj�dS(NR�(R]t__dict__R8RitcleartinvalidatevolatilesetsRr(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytinvalidatecachess


cC@s|jj�tj|�dS(N(RpR�Rtclearobscaches(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�
s
cC@sht|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).RN(R^RROtdelattrtAttributeErrorR8(R9R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytinvalidatedirstates	
cC@s�|j�}x�t|jj��D]z}|dkr:q"n|dkrd|j�rd|jjrdq"n|rw|j|=nyt||�Wq"tk
r�q"Xq"W|j	�|j�s�|j
j	�ndS(s9Invalidates both store and non-store parts other than dirstate

        If a transaction is running, invalidation of store is omitted,
        because discarding in-memory changes might cause inconsistency
        (e.g. incomplete fncache causes unintentional failure, but
        redundant one doesn't).
        RRN(R8tlistROtkeysRORt_delayedR�R�R�R)(R9R�R8R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�s"


cC@s|j�|j�dS(syFully invalidates both store and non-store parts, causing the
        subsequent operation to reread any outside changes.N(R�R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
invalidateallAs
cC@s^xW|jj�D]F\}}tj|�}|dks||jkrLqn|j�qWdS(s>Reload stats of cached files so that they are flagged as validRN(RORR"RuR�trefresh(R9RNR�tce((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�Hs
c	C@s�d}	|dk	r'tjj|�}	nd}
d}|rf|jjdd�}
|jjdd�}n|jjdd�}tj|j|||
|d|d|d|d	|d
|	d|�}
|
S(NiR�ttimeoutstimeout.warnssignal-safe-lockRot	acquirefnRktinheritcheckert
parentlockt
signalsafe(	R5RtenvironRPR�R3RDtlockmodttrylock(R9R/tlocknametwaitRoR�RkR�tparentenvvarR�R�twarntimeoutR�R((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_lockQs 	cC@sZxS|j|jfD]8}|o%|�}|r|jr|jj|�PqqW|�dS(s�add a callback to be run when the repository is fully unlocked

        The callback will be executed when the outermost lock is released
        (with wlock being higher level than 'lock').N(RoRntheldtpostreleaseR(R9R�R�R((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRyiscC@ss|j|j�}|dk	r,|j�|S|j|jd|d|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.)

        If both 'lock' and 'wlock' must be acquired, ensure you always acquires
        'wlock' first to avoid a dead-lock hazard.Rs
repository %sN(RxRnR5RR�RWR�RR�RR�(R9R�R((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRvs
cC@s(|j�dk	r$tjd��ndS(Ns8wlock cannot be inherited in the middle of a transaction(ROR5Rt LockInheritanceContractViolation(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_wlockchecktransaction�sc@s��jo�j�}|dk	r8|jr8|j�|S|r��jjdd�sh�jjdd�r��j�j�dk	r��jjd�q�n�fd�}�j	�j
d||�jtd��j
d�jd	d
�}tj|��_|S(s8Lock 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.

        If both 'lock' and 'wlock' must be acquired, ensure you always acquires
        'wlock' first to avoid a dead-lock hazard.R_sall-warningsscheck-lockss"wlock" acquired after "lock"c@sD�jj�r�jj�n�jjd��jdj�dS(NR(RtpendingparentchangeR�R�R5ROR�((R9(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytunlock�sR�sworking directory of %sR�R�tHG_WLOCK_LOCKERN(RoR5R�RR�RDRxRnRwR�R/R�RR�R�RR�(R9R�RR�((R9s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��s 

		cC@s7|dkrdS|�}|dks/|jr3dS|S(s3Returns the lock if it's held, or None if it's not.N(R5R�(R9tlockrefR((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRx�s	cC@s|j|j�S(s4Returns the wlock if it's held, or None if it's not.(RxRo(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcurrentwlock�scC@s�|j�}|j|t�}|j|t�}	t|tj�r�|j�}
|
||	gkr�|jjd|�|j	|�|j	�kr�|j
|�n|
Sn|j|�}i}|j�}
|
r�|
d|kr�|
d}|j|�}|	}|r?|	tks|dkr?||kr<||}|}q<q?n|r�|jjd||t|�f�||d<t|�|d<t|}}	q#|jjtd�||f�nn|tkr�|	t}}	nR|	tkr#|j||	�}||kr|	t}}	q#|	|kr#t}	q#n|j�}|	tksS|j||�sS|r||j
|�|j||||||	�S||kr�|j	|�|j	�kr�|j
|�n|S(sK
        commit an individual file as part of a larger transaction
        sreusing %s filelog entry
is %s: copy %s:%s
R�tcopyrevs8warning: can't find ancestor for '%s' copied from '%s'!
N(RHRPRRR
R'tfilenodeR�R:RJRRXtrenamedR5RR�RtcommonancestorsheadsR<tcmpRF(R9tfctxt	manifest1t	manifest2tlinkrevRNt
changelistRKtfparent1tfparent2R�tflogtmetaR�tcfnametcrevt
newfparenttfparentancestorsttext((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt_filecommit�sX

#
$
'c
C@s,|j�s|j�r(t|j|j|j�}x�|j�D]�}|jj|�}|dksB||ksB||j	kr�qBn||j
kr�||td��n||kr�|d}x\|D]}	|	j|�r�Pq�q�W||td��qB||jkrB||td��qBqBWndS(s2check for commit arguments that aren't committableR�sfile not found!RVsno match under directory!sfile not tracked!N(
tisexactR{R�tmodifiedtaddedtremovedR�Rt	normalizeR�tdeletedRRL(
R9twctxtvdirsRR�tfailtmatchedR�tdR5((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytcheckcommitpatterns	s '

RMc @s+|dkri}nd�}|s<tj�jd�}n|s`g}	|	j|_||_nd}
}}zt�j�}
�j�}�d}
t	|
j
��dk}|r�|r�|j�r�tjt
d���n�jd|d|�}|r|jj|j�ntj�j|
||d|�\}}}|s]�j|
|	|||�ntj�|||||�}|
j�|
j�j�kp�|jd�p�|p�|j�p��jjd	d
�}|s�dS|r|j�rtjt
d���ntjj ��}t!j"|�|r@|�||�|_#n||j#k}�j$|j#�}|r�xvt%|�D]h}|
j&|�}�jjt
d�tj'|��|j(|j#||�}||d
|f||<qtWtj)�|�n�j*j
�\}}t+|�|t,kr)t+|�p,d}}yD�j-ddt.d|d|��j/d�}�j0|t.��Wn-|r��jj1t
d�|�n�nXt2j3�||g��|j4��|j5�|j6�Wdt7j8|||
�Xt+��||��fd�}�j9|��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.
        cS@stjd||f��dS(Ns%s: %s(RR�(R�Rz((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�6	sRMisBcannot partially commit a merge (do not specify files or patterns)RR�R�RoR�tallowemptycommits&cannot commit merge with missing filesscommitting subrepository %s
it	precommitR�tparent1tparent2R�s!note: commit message saved in %s
Nc@s8�jj��r4�jdd|d|d|�ndS(NR�R�R�R�(RthasnodeR(R�R�R�(R�R9(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt
commithook�	s(:R5R�R�R�RtexplicitdirtbadR�RRMR�RR�RR�R�textendR�R*R�R�R�R
tworkingcommitctxRR�RPR�RDR�R�R�R�Rtcheckunresolvedt_texttsavecommitmessageRR�t
subrelpathR�t
writestateRRRRRRR,t	commitctxR�RR5t
markcommittedtresetRoR�R�Ry( R9R�R�tdateRR�teditortextraR�R�R�RRNR�RR�tsubst
commitsubstnewstatetcctxR�tmsteditedtmsgfnR&R�tsrR�R$thookp1thookp2R�((R�R9s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�*	s�			
$!
+	

!
c
C@s�d}|j�|j�}}|j�}|j�}z�|jd�}tj|�}|j�r�|j	j
d�|j�}	|j�}
n@|j�r�|j�}|j�}|j
�}
|
j�}|j�}|j�}g}g}t|j��}t|�}|j	jtd��x<t|j�|j��D]}|j	j|d�yo||}|dkr�|j|�nE|j|�|j||||||�||<|j||j��Wq@tk
r�}|j	jtd�|��q@tk
r]}t|dtj �}|s:|rW|tj krW|j	jtd�|�n�q@Xq@Wgt|�D]$}||ks�||kro|^qo}g|D]}||kr�|^q�}x|D]
}||=q�W||}
d}|
s|j!|t"j#||j���}n|
r3|r3|j	j
d�n|
s?|r�|j	jtd��|
j$|||j�|j�||d	|j%��}	q�|j	j
d
�|j�}	n"|j	j
d�|j�}	g}
|j	jtd��|j&j'|�|j&j(|	|
|j)�||j*�|j*�||j+�|j,�j
��	}|j-�|r^|j-�pad
}}|j.ddt/dt-|�d|d|�t0j1|j	|�}|r�t2j3||||g�n|j4�|SWd|r�|j5�n|j5�XdS(s�Add a new revision to current repository.
        Revision information is passed via the context argument.

        ctx.files() should list all files involved in this commit, i.e.
        modified/added/removed files. On merge, it may be wider than the
        ctx.files() to be committed, since any file nodes derived directly
        from p1 or p2 are excluded from the committed ctx.files().
        R�sreusing known manifest
scommitting files:
s
strouble committing %s!
R�sInot reusing manifest (no file change in changelog, but manifest differs)
scommitting manifest
Rs;reusing manifest form p1 (listed files actually unchanged)
s*reusing manifest from p1 (no file change)
scommitting changelog
RMtpretxncommitR�R�R�R�N(6R5R�R$R�RR,RtproxytmanifestnodeR�R:R�tmanifestctxR�R�R�R�RMtnoteRRR�R�RR�tsetflagRJR�R�R�RWR�R�tdiffR't
matchfilesR�R[RtdelayupdateRFtdescriptionR�RR
RRRRR*tnewcommitphaseR tregisternewRoR�(R9R�RRNR�R$R�RttrptmnR�tm1ctxtm2ctxtmctxR�tm1tm2R�tchangedR�R�R�R�tinstterrcodetdroptmdR�txp1txp2ttargetphase((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�	s�#

7%

'
!%$

cC@s&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(R]R�R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�
scC@s5|jj|�|jj�|j�|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.
        N(R�t
filterunknownR�R�R�(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�%
s

R�cC@s ||j||||||�S(s3a convenience method that calls node1.status(node2)(R�(R9tnode1tnode2RtignoredR�tunknowntlistsubrepos((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�E
scC@s|jj|�dS(s�Add a callback to run within the wlock, at the point at which status
        fixups happen.

        On status completion, callback(wctx, status) will be called with the
        wlock held, unless the dirstate has changed from underneath or the wlock
        couldn't be grabbed.

        Callbacks should not capture and use a cached copy of the dirstate --
        it might change in the meanwhile. Instead, they should access the
        dirstate via wctx.repo().dirstate.

        This list is emptied out after each status run -- extensions should
        make sure it adds to this list each time dirstate.status is called.
        Extensions should also make sure they don't call this for statuses
        that don't involve the dirstate.
        N(RqR(R9tps((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytaddpostdsstatusL
scC@s|jS(sAUsed by workingctx to get the list of post-dirstate-status hooks.(Rq(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytpostdsstatusb
scC@s|j2dS(s7Used by workingctx to clear post-dirstate-status hooks.N(Rq(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytclearpostdsstatusf
scC@su|dkrG|j}t|j��}g|D]}|j|�^q.S|jj|�}t|d|jjdt�S(NR�treverse(	R5RtreversedRZR�R�RR�RR(R9tstartRRZR�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�j
s	 cC@s�|dkr|dj�}n|j�}||kr;gStt|j|d|���}|dk	r�t|jj|g|�d�}g|D]}||kr�|^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.
        tclosediN(	R5RRR�R>tbranchheadsR�Rtnodesbetween(R9RR?R@R�tbheadstfbheadsth((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRAt
s!"(cC@s�|s|jj�g}ng}x�|D]z}|}xktr�|jj|�}|dtkso|dtkr�|j|||d|df�Pn|d}q7Wq(W|S(Nii(RR�RRR�RR(R9R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��
s
	 !c
C@s�g}x�|D]�\}}|gd}}}d}xh||kr�|tkr�|jj|�d}	||kr�|j|�|d}n|	}|d7}q6W|j|�q
W|S(Niii(RRR�R(
R9R�RSttoptbottomR�RR�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��
s

cC@sdS(s�Extensions can override this function if additional checks have
        to be performed before pushing, or call it if they override push
        command.
        N((R9tpushop((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt	checkpush�
RMcC@s
tj�S(s�Return util.hooks consists of a pushop with repo, remote, outgoing
        methods, which are called before pushing changesets.
        (R.thooks(R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytprepushoutgoinghooks�
sc	@sCy��j�}i}|dk	r4|j|j�ntj|�}�|d<�|d<�|d<�|d<�jddt|�WnZtj	k
r�}�j
jtd�|�|j
r��j
jtd�|j
�ntSX�j
jd	��f�tj�������������fd
�}�j|��S(NR�R�R�R�t
prepushkeyR�spushkey-abort: %s
s(%s)
spushing key for "%s:%s"
c@s/�jdd�d�d�d�d��dS(NR!R�R�R�R�R�(R((R�R�R�R�R�R9(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytrunhook�
s$(ROR5R5R\R"RxRRRRt	HookAbortR�t	write_errRR#RQR:R!R�Ry(	R9R�R�R�R�RNR\R�RM((R�R�R�R�R�R9s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR!�
s*



	 
cC@s\|jddtd|�|jjd|�tj||�}|jdd|d|�|S(NtprelistkeysR�R�slisting keys for "%s"
R�tvalues(RRRR�R:R!R�(R9R�RQ((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��
s
cC@s2d||tj|�tj|�tj|�fS(s+used to test argument passing over the wires%s %s %s %s %s(R"R�(R9R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��
scC@sR|jdd�}z|j|�Wd|j�X|j|jt|j�d�S(Nslast-message.txttwbi(R/R�RoR*RSRMR�(R9R�tfp((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR�
s
N(�R?R@RAR4RItsupportedformatsRRyR5RDRbRgRoR�R�R�tpropertyR�R�R�RmR8R�RBR�R�RLR�R�RR�RR�R�RtFILENAMER�R�RQR[R�R�R�R�t__bool__R�R�R�R�R�R�RRYR�R+R�RR�RR
RRcRRRdRReR�RRR�R RR"R'R)R*R8R=RVR?RARBRERKRLROR,R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RyRRRR�R�RxR�R�R�R�RR�R�R�R:R;R<R�RAR�R�RIRKR!R�R�R(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR0s	

	z	#						&						?										#		
																				�		
	I		
		"	
	
	$				X	nx 					
					c@s2g|D]}t|�^q��fd�}|S(Nc@sSxL�D]D\}}}|j|�y|j||�Wqtk
rJqXqWdS(N(t	tryunlinkR�R�(R/tsrctdest(trenamefiles(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyta�
s

(R(R�R�R\((R[s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��
s
cC@s:tjj|�\}}tjj||jddd��S(NRPRpi(tosRHtsplitRItreplace(RR�RS((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR��
scC@s>tj|�}|r+t||d|�nt||d|�S(Nt
createoptsR�(R.turllocalpathtcreaterepositoryR(R�RHtcreateR�R`t	localpath((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytinstance�
scC@stS(N(RR(RH((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytislocalscC@s;t|pi�}d|kr7|jdd�|d<n|S(s�Populate the default creation options for a repository.

    A dictionary of explicitly requested creation options can be passed
    in. Missing keys will be populated.
    tbackendR;snew-repo-backend(RRH(R�R`((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytdefaultcreateoptsscC@s�d|krOt|dj�}|jd�r>|jd�n
|jd�|Sd|krmtjd��n|ddkr�tjtd�|d��ndh}|jd	d
�r|jd�|jd	d�r|jd
�|jd	d�r	|jd�q	qn|j	dd�}|t
jkrUtjtd�|dtd���n|dkru|jd|�ntj
|�r�|jd�n|jdd�r�|jd�n|jd	d�r�|jt�n|j	dd�}|dkr |jd�|jd�|jt�n|jd	d�rB|jd�n|jd�rd|jtj�n|jd�r�|jd�n|S(s�Determine the set of requirements for a new local repository.

    Extensions can wrap this function to specify custom requirements for
    new repositories.
    t
sharedrepotsharedrelativeR�R�RgsFbackend key not present in createopts; was defaultcreateopts() called?R2sCunable to determine repository requirements for storage backend: %sR0tusestoreR)t
usefncacheR(R)R>sformat.compressionsNcompression engine %s defined by experimental.format.compression not availableR#s;run "hg debuginstall" to list available compression enginestzlibsexp-compression-%sR9R/s
sparse-revlogR8s*enable-unstable-format-and-corrupt-my-datasinternal-phasetnarrowfilesR(R�R�RPRFRRtR�RRDRHR.RR'tgdinitconfigRItremovetdiscardR4R#RN(R�R`R�RBR8((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytnewreporequirementssV
	



c@s5dddddddh��fd�|j�D�S(	s%Filters a dict of repo creation options against options that are known.

    Receives a dict of repo creation options and returns a dict of those
    options that we don't know how to handle.

    This function is called as part of repository creation. If the
    returned dict contains any items, repository creation will not
    be allowed, as it means there was a request to create a repository
    with options not recognized by loaded code.

    Extensions can wrap this function to filter out creation options
    they know how to handle.
    RgRRnRiRjtshareditemstshallowfilestorec@s+i|]!\}}|�kr||�qS(((R�R�R�(Re(s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pys
<dictcomp>ps	(R(R�R`((Res9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytfilterknowncreateoptsXs	c
C@sIt|d|�}t||�}t|t�sBtjd��n|rtjtd�djt	|��dtd���nt
|d|�}tj|dt
dt
�}tj|jd	��}|j�r�tjtd
�|��nd|krv|dj}|jd�rvytjj||j�}Wqsttfk
ro}tjtd
�dtj|���qsXqvn|j�s�|j�n|jdt
�d|kr�d|kr�|jd�|jdd�ntj||�d|kr|j d|�n|jd�rEdjt	|d��d}	|j d|	�ndS(s�Create a new repository in a vfs.

    ``path`` path to the new repo's working directory.
    ``createopts`` options for the new repository.

    The following keys for ``createopts`` are recognized:

    backend
       The storage backend to use.
    lfs
       Repository will be created with ``lfs`` requirement. The lfs extension
       will automatically be loaded when the repository is accessed.
    narrowfiles
       Set up repository to support narrow file storage.
    sharedrepo
       Repository object from which storage should be shared.
    sharedrelative
       Boolean indicating if the path to the shared repo should be
       stored as relative. By default, the pointer to the "parent" repo
       is stored as an absolute path.
    shareditems
       Set of items to share to the new repository (in addition to storage).
    shallowfilestore
       Indicates that storage for files should be shallow (not all ancestor
       revisions are known).
    R`s-filterknowncreateopts() did not return a dictsBunable to create repository because of unknown creation option: %ss, R#s#is a required extension not loaded?R�R�s.hgsrepository %s already existsRiRjscannot calculate relative patht
notindexedR)s
00changelog.is9 dummy changelog to prevent using the old repo layoutR�Rss
R�N(!RhRuRRRRtR�RRIRRrR�R/RRR�R�R�RPR]RHtrelpathR�R�R�R2R�tmakedirstmakedirtmkdirRR'R�R�(
R�RHR`tunknownoptsR�R�R�R�R	R�((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRbrsD


	
cC@s7|j�dtfd��Y}tj|d|�dS(s9Poison a repository instance so it can no longer be used.tpoisonedrepositorycB@seZd�Zd�ZRS(cS@s/|dkrtj||�Stjd��dS(NRos/repo instances should not be used after unshare(RZt__getattribute__RRt(R9titem((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR}�scS@sdS(N((R9((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyRo�s(R?R@R}Ro(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyR|�s	R�N(RoRZR[(R:R|((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pytpoisonrepository�s

(�t
__future__RR�R�R]R~R{RRti18nRR�RRRRRRMRRR	R
RRR
RRRRRRRRRRR�RRR�RR�RRRRRR R!R"R#R$R%R&R'R(R)R*R*R+R�R,R-R.R/R�tutilsR0R1R2trevlogutilsR3RJR�turlerrR�R�REt	filecacheR4RBRLRUt
propertycacheRVRYR^RcR�tunionR�timplementertipeercommandexecutorRZRit
ipeercommandsRmR�tipeerlegacycommandsR�R4RIRR5RR�R�R�R�R�RR6RTtilocalrepositoryfilestorageRURYR^tilocalrepositorymainRRR�R�ReRfRhRrRuRbR(((s9/usr/lib64/python2.7/site-packages/mercurial/localrepo.pyt<module>s�(�+				

	
				*			�							A				��������				G	[