HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/scmutil.pyc

x7_c@@sddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZddlmZmZmZmZmZmZmZmZmZejdkr
ddlmZndd	lmZejZej Z d
e!fdYZ"dZ#dd
Z%dZ&dZ'dZ(dZ)de*fdYZ+dZ,de*fdYZ-de-fdYZ.e.Z/de*fdYZ0de-e0fdYZ1e1Z2de-e0fdYZ3e4de4dZ5d Z6da7d!Z8d"Z9d#d$Z:d%Z;d&Z<d'Z=d(Z>d)Z?dKde4d*dd+Z@dLde4d*dd,Zd-ZAdd.ZBd/ZCdddd0ZDd1d2ZEd3ZFd4ZGd5ZHe4dd6ZId7ZJd8ZKd9e*fd:YZLd;e*fd<YZMd=e*fd>YZNdd?ZOd@ZPdAZQdBZRdCe*fdDYZSdEeSfdFYZTdGe*fdHYZUdIeSfdJYZVdS(Mi(tabsolute_importNi(t_(twdirrev(	tencodingterrortmatchtosutiltpathutiltphasestrevsettsimilartutiltnt(t
scmwindows(tscmposixtstatuscB@seZdZd
ZdZedZedZedZedZ	edZ
edZedZd	Z
RS(sNamed tuple with a list of files per status. The 'deleted', 'unknown'
       and 'ignored' properties are only relevant to the working copy.
    c	C@s%tj||||||||fS(N(ttuplet__new__(tclstmodifiedtaddedtremovedtdeletedtunknowntignoredtclean((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR2scC@s|dS(sfiles that have been modifiedi((tself((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR7scC@s|dS(sfiles that have been addedi((R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR<scC@s|dS(sfiles that have been removedi((R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRAscC@s|dS(sofiles that are in the dirstate, but have been deleted from the
           working copy (aka "missing")
        i((R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRFscC@s|dS(s.files not in the dirstate that are not ignoredi((R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRMscC@s|dS(s<files not in the dirstate that are ignored (by _dirignore())i((R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRRscC@s|dS(s!files that have not been modifiedi((R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRWscO@sd|S(NsX<status modified=%r, added=%r, removed=%r, deleted=%r, unknown=%r, ignored=%r, clean=%r>((Rtargstkwargs((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt__repr__\s((t__name__t
__module__t__doc__t	__slots__RtpropertyRRRRRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR+s	cc@stj|j|}|jtj|j|t}x7|jD],}||jkrD||=|j|qDqDWx4t|jD] \}}||j|fVqWx%|D]}||j	||fVqWdS(sfind subrepos in ctx1 or ctx2N(
tdicttfromkeystsubstatetupdatetsettaddtsortedt	iteritemstsubtnullsub(tctx1tctx2tsubpathstmissingtsubpathtctx((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytitersubrepos`s	
cC@sg}|rnx_|D]T}||kr+qn||}|jtjkr|jr|j|qqWn|r|jtdt|n|jtddS(sjReport no changes for push/pull, excluded is None or a list of
    nodes excluded from the push/pull.
    s0no changes found (ignored %d secret changesets)
sno changes found
N(tphaseRtsecrettextincttappendRRtlen(tuitrepotexcludedt
secretlisttnR2((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytnochangesfoundys

"cC@s|dkr(tjtd|nx6dD].}||kr/tjtd	|q/q/Wy#t|tjtd
Wntk
rnXdS(
Nttipt.tnullsthe name '%s' is reservedt:ss
s
s%r cannot be used in a namescannot use an integer as a name(R?R@RA(RBss
s
(RtAbortRtintt
ValueError(R:tlbltkindtc((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
checknewlabels
 

cC@s8d|ksd|kr4tjtd|ndS(sFCheck that the filename f is an acceptable filename for a tracked files
s
s)'\n' and '\r' disallowed in filenames: %rN(RRCR(tf((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
checkfilenamescC@st|t|\}}|s(|rtj|}|rd||f}|retj|n|jtd|qndS(sECheck if filename f is portable and warn or abort depending on configs%s: %rswarning: %s
N(RKtcheckportabilityalertRtcheckwinfilenameRRCtwarnR(R9RJtabortRNtmsg((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
checkportables
cC@s|jddd}|j}tj|}tjdkpH|dk}|pZ|dk}|dkr|p~|p~|dkrtjt	d|n||fS(	s_check if the user's config requests nothing, a warning, or abort for
    non-portable filenamesR9tportablefilenamesRNRROtignores,ui.portablefilenames value is invalid ('%s')N(
tconfigtlowerRt	parsebooltostnametNoneRtConfigErrorR(R9tvaltlvaltbvalRORN((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRLs%tcasecollisionauditorcB@seZdZdZRS(cC@s^||_||_dj|j}ttj|jd|_||_	t|_
dS(Ns(t_uit_aborttjoint_mapR'RRUtsplitt
_loweredfilest	_dirstatet	_newfiles(RR9ROtdirstatetallfiles((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt__init__s		!	cC@s||jkrdStj|}||jkr||jkrtd|}|jrktj|n|j	j
td|n|jj||jj|dS(Ns&possible case-folding collision for %sswarning: %s
(RfRRURdReRR`RRCR_RNR((RRJtflRP((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt__call__s	(RRRiRk(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR^s	c@s|j}|jsdSd}tfd|jD}|r~tj}x|D]}|jd|qTW|j}n|S(sbuild hash of filtered revisions in the current repoview.

    Multiple caches perform up-to-date validation by checking that the
    tiprev and tipnode stored in the cache file match the current repository.
    However, this is not sufficient for validating repoviews because the set
    of revisions in the view may change without the repository tiprev and
    tipnode changing.

    This function hashes all the revs filtered from the view and returns
    that SHA-1 digest.
    c3@s!|]}|kr|VqdS(N((t.0tr(tmaxrev(s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pys	<genexpr>ss%s;N(t	changelogtfilteredrevsRYR)thashlibtsha1R&tdigest(R:Rntcltkeytrevststrev((Rns5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytfilteredhashs		
tabstractvfscB@seZdZdZdZddZejdZdZ	ddZ
edZd	ed
Z
dZdZd
ZdZd/dZdZd/dZd/dZd/dZd/dZdZdZd/dZd/dZd/dZd/edZd/d/dZ dZ!d/dZ"ddd/ed Z#d/d/d/d!Z$d"Z%ed#Z&d$Z'd/d%Z(d/eed&Z)d'Z*d/d(Z+d/d)Z,d/ed*Z-d/d/d+Z.d/d/d,Z/e0j1d-d.Z2RS(0s+Abstract base class; cannot be instantiatedcO@s tdtt|dS(s7Prevent instantiation; don't call this from subclasses.sattempted instantiating N(tNotImplementedErrortstrttype(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRiscC@sCy|j|SWn+tk
r>}|jtjkr?q?nXdS(s3gracefully return an empty string for missing filest(treadtIOErrorterrnotENOENT(Rtpathtinst((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyttryreads
trbcC@sIy|j|d|SWn+tk
rD}|jtjkrEqEnXgS(s2gracefully return an empty array for missing filestmode(t	readlinesRRR(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyttryreadliness
cC@s|jS(sOpen ``path`` file, which is relative to vfs root.

        Newly created directories are marked as "not to be indexed by
        the content indexing service", if ``notindexed`` is specified
        for "write" mode access.
        (Rk(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytopenscC@s&||d}|jSWdQXdS(NR(R(RRtfp((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR
scC@s)||d|}|jSWdQXdS(NR(R(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s/||dd|}|j|SWdQXdS(Ntwbtbackgroundclose(twrite(RRtdataRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRsRcC@s2||d|d|}|j|SWdQXdS(NRt
notindexed(t
writelines(RRRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s)||d}|j|SWdQXdS(Ntab(R(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR7scC@stjj|S(sreturn base element of a path (as os.path.basename would do)

        This exists to allow handling of strange encoding if needed.(RWRtbasename(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR!scC@stj|j||S(N(RWtchmodRa(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR'scC@stjj|S(sreturn dirname element of a path (as os.path.dirname would do)

        This exists to allow handling of strange encoding if needed.(RWRtdirname(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR*scC@stjj|j|S(N(RWRtexistsRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR0scC@s
tj|S(N(Rtfstat(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR3scC@stjj|j|S(N(RWRtisdirRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR6scC@stjj|j|S(N(RWRtisfileRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR9scC@stjj|j|S(N(RWRtislinkRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR<scC@sMy|j|}Wntk
r'tSX|j}tj|pLtj|S(shreturn whether path is a regular file or a symlink

        Unlike isfile, this doesn't follow symlinks.(tlstattOSErrortFalsetst_modetstattS_ISREGtS_ISLNK(RRtstR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytisfileorlink?s
	cG@stjj|S(sjoin various elements of a path together (as os.path.join would do)

        The vfs base is not injected so that path stay relative. This exists
        to allow handling of strange encoding if needed.(RWRRa(Rtpaths((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytreljoinJscC@stjj|S(ssplit top-most element of a path (as os.path.split would do)

        This exists to allow handling of strange encoding if needed.(RWRRc(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRcQscC@stjj|j|S(N(RWRtlexistsRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRWscC@stj|j|S(N(RWRRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRZscC@stj|j|S(N(RWtlistdirRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR]scC@stj|j||S(N(RtmakedirRa(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR`scC@stj|j||S(N(RtmakedirsRa(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRcscC@stj||j|S(N(RtmakelockRa(RtinfoR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRfscC@stj|j|S(N(RWtmkdirRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRisR~ttmpc		C@sutjd|d|d|j|d|\}}tj|\}}|rg|tjj||fS||fSdS(Ntsuffixtprefixtdirttext(ttempfiletmkstempRaRRcRWR(	RRRRRtfdRXtdnametfname((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRlscC@stj|j|||S(N(RRRa(RRRtskip((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytreaddiruscC@stj|j|S(N(RtreadlockRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRxsc	C@s|j|}|o!tj|}|r|jrtj|j||}tj|}|j|r|jjdd@}tj|||fn|Stj|j||S(sRename from src to dst

        checkambig argument is used with util.filestat, and is useful
        only if destination file is guarded by any lock
        (e.g. repo.lock or repo.wlock).
        ii(	RaRtfilestatRtrenametisambigtst_mtimeRWtutime(	Rtsrctdstt
checkambigtdstpathtoldstattrettnewstattadvanced((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR{scC@stj|j|S(N(RWtreadlinkRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@stj|j|S(s@Remove a leaf directory and all empty intermediate ones
        (Rt
removedirsRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s:|rd}nd}tj|j|d|d|S(sqRemove a directory tree recursively

        If ``forcibly``, this tries to remove READ-ONLY files, too.
        cS@st|tjk	rntj|}|jtj@dkr@ntj|tj|jtjBtj|dS(Ni(RWtremoveRRtS_IWRITERtS_IMODE(tfunctionRtexcinfoRw((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytonerrors#t
ignore_errorsRN(RYtshutiltrmtreeRa(RRRtforciblyR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs

cC@stj|j|||S(N(RtsetflagsRa(RRtltx((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@stj|j|S(N(RWRRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@stj|j|S(N(RtunlinkRa(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@stj|j||S(N(Rt
unlinkpathRa(RRt
ignoremissing((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@stj|j||S(N(RWRRa(RRtt((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscc@sxtjj|jd}ttj|}xAtj|j|d|D]!\}}}||||fVqOWdS(s/Yield (dirpath, dirs, files) tuple for each directories under path

        ``dirpath`` is relative one from the root of this vfs. This
        uses ``os.sep`` as path separator, even you specify POSIX
        style ``path``.

        "The root of this vfs" is represented as empty ``dirpath``.
        RN(	RWRtnormpathRaRYR8Rtnormasprefixtwalk(RRRtroott	prefixlentdirpathtdirstfiles((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs	.ic	c@szt|d|}t|ddr<tjtdnt|d|&}z||_|VWdd|_XWdQXdS(sAllow files to be closed asynchronously.

        When this context manager is active, ``backgroundclose`` can be passed
        to ``__call__``/``open`` to result in the file possibly being closed
        asynchronously, on a background thread.
        tvfst_backgroundfileclosers-can only have 1 active background file closert
expectedcountN(tgetattrRYRRCRtbackgroundfilecloserR(RR9RRtbfc((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytbackgroundclosings
		N(3RRR RiRRRt
propertycacheRRRRRRR7RRRRYRRRRRRRRcRRRtTrueRRRRRRRRRRRRRRRRRt
contextlibtcontextmanagerR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRzsV				
													RcB@seZdZeeeedZedZejdZe	j
dZe	j
dZdZ
deeeeedZd	Zd
ZRS(skOperate files relative to a base directory

    This class is used to hide the details of COW semantics and
    remote file access from higher level code.

    'cacheaudited' should be enabled only if (a) vfs object is short-lived, or
    (b) the base directory is managed by hg and considered sort-of append-only.
    See pathutil.pathauditor() for details.
    cC@sd|rtj|}n|r3tjj|}n||_||_||_d|_	d|_
dS(N(Rt
expandpathRWRtrealpathtbaset
_cacheauditedt	mustauditRYt
createmodet_trustnlink(RRtaudittcacheauditedRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRis				cC@s|jS(N(t_audit(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s@||_|r0tj|jd|j|_ntj|_dS(Ntcached(RRtpathauditorRRRRtalways(Rtonoff((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs
	cC@stj|jS(N(Rt	checklinkR(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt_cansymlinkscC@stj|jS(N(Rt	checkexecR(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt_chmodscC@s8|jdks|jrdStj||jd@dS(Ni(RRYRRWR(RRX((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt_fixfilemode
sRmcC@s|jr=tj|}|r=tjd||fq=n|j||j|}	|ryd|kry|d7}nd}
|dkrtj|	\}}|r|rtj||j	|tj
|	||j	d|Sy`d|krtj|	d}
n:tj|	)tj
|	}
|
d	kr7d
}
nWdQXWnMttfk
r}
|
jtjkrnnd}
tj||j	|nX|
dkr|jdkr|
d	kptj|	|_n|
d	ks|jrtjtj|	|	qqqntj|	|}|
dkr3|j|	n|rp|dkratjtd|nt|}n|r|jstjtd
nt||j}n|S(sOpen ``path`` file, which is relative to vfs root.

        Newly created directories are marked as "not to be indexed by
        the content indexing service", if ``notindexed`` is specified
        for "write" mode access.

        If ``backgroundclose`` is passed, the file may be closed asynchronously.
        It can only be used if the ``self.backgroundclosing()`` context manager
        is active. This should only be specified if the following criteria hold:

        1. There is a potential for writing thousands of files. Unless you
           are writing thousands of files, the performance benefits of
           asynchronously closing files is not realized.
        2. Files are opened exactly once for the ``backgroundclosing``
           active duration and are therefore free of race conditions between
           closing a file on a background thread and reopening it. (If the
           file were opened multiple times, there could be unflushed data
           because the original file handle hasn't been flushed/closed yet.)

        ``checkambig`` argument is passed to atomictemplfile (valid
        only for writing), and is useful only if target file is
        guarded by any lock (e.g. repo.lock or repo.wlock).
        s%s: %rtbiRmRRtwiiiNs>implementation error: mode %s is not valid for checkambig=TruesSbackgroundclose can only be used when a backgroundclosing context manager is active(RmR(RmR(RRtcheckosfilenameRRCRRaRcRRtatomictempfileRt	posixfiletnlinksRRRRRRYt
checknlinkRt
mktempcopyRRtcheckambigatclosingRtdelayclosedfile(RRRRt
atomictempRRRRmRJtnlinkRRteR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRks^	


	!%
	cC@s|j||j|}ytj|Wntk
r@nXtjtjj||j	|j
rytj||Wqtk
r}t|jt
d||jf|qXn|j||dS(Nscould not symlink to %r: %s(RRaRWRRRRRRRRtsymlinkRRtstrerrorR(RRRtlinknameterr((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR
es

	cG@s*|rtjj|j||S|jSdS(N(RWRRaR(RRtinsidef((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRaxs(RRR RRRiR"RtsetterRRRRRRkR
Ra(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs					U	tauditvfscB@sSeZdZedZejdZedZejdZRS(cC@s
||_dS(N(R(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRiscC@s
|jjS(N(RR(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s||j_dS(N(RR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s
|jjS(N(Rtoptions(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s||j_dS(N(RR(Rtvalue((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs(RRRiR"RRR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs
	t	filtervfscB@s)eZdZdZdZdZRS(s4Wrapper vfs for filtering filenames with a function.cC@stj||||_dS(N(RRit_filter(RRtfilter((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRiscO@s|j|j|||S(N(RR(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRkscG@sB|r.|jj|j|jj||S|jj|SdS(N(RRaRR(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRas((RRR RiRkRa(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs		treadonlyvfscB@s,eZdZdZddZdZRS(s#Wrapper vfs preventing any writing.cC@stj||dS(N(RRi(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRisRmcO@s:|dkr$tjtdn|j||||S(NRmRsthis vfs is read only(RmR(RRCRR(RRRRtkw((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRkscG@s|jj||S(N(RRa(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRas(RRR RiRkRa(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs	c#@sfd}ttjdd|rHdk	rHfd}nt}|dkrv|rvg}||nx:tjdtd|D]\}}}|jd|kr|Vtjj|dd}	tjj	tjj|	dr|	Vn|r|j
dqg|(q|rg}
xy|D]q}tjj||}|||r0tjj|rx/t|t|D]}
|
VqWq|
j
|q0q0W|
|(qqWdS(	syield every hg repository under path, always recursively.
    The recurse flag will only control recursion into repo working dirsc@s|jkr|ndS(N(tfilename(R(R(s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
errhandlerstsamestatc@sZt}tj|}x'|D]}||rt}PqqW|sU|j|n|S(N(RRWRRR7(tdirlstRRtdirstatt
lstdirstat(R(s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytadddirs
ttopdownRs.hgtpatchesN(RRWRRYRRRtsortRaRRRt	walkreposR7(Rt	followsymt	seen_dirstrecurseRR!RRRtqroottnewdirstdRthgname((RRs5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR%s8+
!

cC@sg}tjjtjd}tjj|rxNtj|D]:\}}|jdr@|j	tjj||q@q@Wn|j
t|j
tg|D]}tjj
|^q}|S(s+return default os-specific hgrc search paths	default.ds.rc(RWRRaRtdatapathRRRtendswithR7textendtsystemrcpatht
userrcpathR(RtdefaultpathRJRG((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytosrcpaths&%cC@stdkrdtjkrgaxtjdjtjD]}|sMq;ntj|}tj	j
|rx[tj|D]:\}}|j
dr~tjtj	j||q~q~Wq;tj|q;WqtantS(sreturn hgrc search path. if env var HGRCPATH is set, use it.
    for each item in path, if directory, use files ending in .rc,
    else use item.
    make HGRCPATH empty to only look in .hg/hgrc of current repo.
    if no HGRCPATH, use default os-specific path.tHGRCPATHs.rcN(t_rcpathRYRtenvironRWRctpathsepRRRRRRR.R7RaR3(tpRJRG((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytrcpaths &cC@s|dkrtS|S(s^Return integer for a given revision that can be used in comparison or
    arithmetic operationN(RYR(Rx((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytintrevsR@cC@sY|r|dkr||St||g}|sKtjtdn||jS(Nisempty revision set(trevrangeRRCRtlast(R:trevspectdefaultR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt	revsinglescC@s#tj|}|o"|ddkS(Nitrangetrangepret	rangeposttrangeall(R@RARBRC(R	tparse(R=ttree((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt	_pairspecsc@sv|sjjdfSt|}|s;d}}nf|jrb|j}|j}n?|jr|j}|j}n|j}|j	}|dkrt
jtdn||krt
|dkrtfd|Drt
jtdn||krZt
|dkrZt|drZj|dfSj|j|fS(Nsempty revision rangeic3@s!|]}t|gVqdS(N(R;(RlRm(R:(s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pys	<genexpr>4ss#empty revision on one side of rangeii(Rgtp1RYR;tisascendingtmintmaxtisdescendingtfirstR<RRCRR8tallRFtlookup(R:RvRRLtsecond((R:s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytrevpairs*
/cC@sjg}x?|D]7}t|tr7tjd|}n|j|q
Wtj|j||}||S(sExecute 1 to many revsets and return the union.

    This is the preferred mechanism for executing revsets using user-specified
    config options, such as revset aliases.

    The revsets specified by ``specs`` will be executed via a chained ``OR``
    expression. If ``specs`` is empty, an empty result is returned.

    ``specs`` can contain integers, in which case they are assumed to be
    revision numbers.

    It is assumed the revsets are already formatted. If you have arguments
    that need to be expanded in the revset, call ``revset.formatspec()``
    and pass the result as an element of ``specs``.

    Specifying a single revset is allowed.

    Returns a ``revset.abstractsmartset`` which is a list-like interface over
    integer revisions.
    srev(%d)(t
isinstanceRDR	t
formatspecR7tmatchanyR9(R:tspecstallspecstspectm((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR;=s
cC@sn|j}t|dkr"|S|jjr@|d|dgS|djt|jdkrjgS|S(sReturn list of meaningful (or all if debug) parentrevs for rev.

    For merges (two non-nullrev revisions) both parents are meaningful.
    Otherwise the first parent revision is considered meaningful if it
    is not the preceding revision.
    iiRA(tparentsR8R9t	debugflagRxR:(R:R2RX((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytmeaningfulparentsZs&cC@stjst|Sg}x|D]}tj|d\}}|dkrytj|}Wntjk
r||g}nX|r|j	|q qn|j
|q W|S(siExpand bare globs when running on windows.
    On posix we assume it already has already been done by sh.N(Rtexpandglobstlisttmatchmodt	_patsplitRYtglobtreRR/R7(tpatsRtkindpatRGtpattglobbed((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
expandpatsjs	



	trelpathc	@s|d	krg}n|d
kr*i}n|rR|dkrRt|pIg}nfd}|d
kry|}nj||jd|jd|d|jdd|jrg}n|fS(sReturn a matcher and the patterns that were used.
    The matcher will warn about bad matches, unless an alternate badfn callback
    is provided.R~Rfc@s-jjjdj||fdS(Ns%s: %s
(R:R9RNtrel(RJRP(R2RW(s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytbadstincludetexcludetlistsubrepostsubrepostbadfn(R~N(RYReRtgetR(R2RatoptsRdR>RmRh((R2RWs5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytmatchandpats}s			!	cC@s t|||||d|dS(s2Return a matcher that will warn about bad matches.Rmi(Rp(R2RaRoRdR>Rm((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@stj|j|jS(s8Return a matcher that will efficiently match everything.(R]RRtgetcwd(R:((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytmatchallscC@s"tj|j|j|d|S(sAReturn a matcher that will efficiently match exactly these files.Rm(R]texactRRq(R:RRm((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
matchfilesscC@s|jddd}|dkr)|dStjj|d|j}|j||}|jj|}|jj	|s|j
td|tj
|n|dS(scustomize where .orig files are created

    Fetch user defined path from config file: [ui] origbackuppath = <path>
    Fall back to default (filepath) if not specified
    R9torigbackuppaths.origtstartscreating directory: %s
N(RTRYRWRRfRtwjoinRRRtnoteRRR(R9R:tfilepathRutfilepathfromroottfullorigpatht
origbackupdir((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytorigpathsc@s|dkri}n||dkr9|jd}n|dkrct|jdpZd}nd}fd}|d}xt|jD]}	tj|	}
|jdsj|	st|
j	r|j
|	}y(|j|
|||rd}nWqKtj
k
rG|jjtd||	qKXqqWgfd}tj|}
t||
\}}}}}t||}|j}|j|xt|D]v}|jjsj|r||krtd	j|}ntd
j|}|jj|qqWt||||||}|st|||||nx$D]}|j	krdSqW|S(Ntdry_runt
similarityic@stjj|S(N(RWRRa(RJ(R(s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt<lambda>sRlis#skipping missing subrepository: %s
c@s6|jkr%j||nj|dS(N(RRhR7(RJRP(RWtrejected(s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRmss
adding %s
sremoving %s
(RYRntfloatR)R%R]t
subdirmatcherRstanyRR+t	addremoveRtLookupErrorR9RRtbadmatcht_interestingfilesR'tcopyR&tverbosetuipatht_findrenamest_markchanges(R:tmatcherRRoR~RRRatwctxR1tsubmatchR+RmRRRRRt	forgottent
unknownsetttoprinttabsRtrenamesRJ((RWRRs5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRsT	
0

	
gc@s2t||dfd}gt||\}}}}}|jjrt||}	|	j}
|
j|xVt|
D]E}||	krtd|}ntd|}|jj	|qWnt
|||||||}
t|||||
x$D]}||jkrdSqWdS(s[Assert that files have somehow been operated upon. files are relative to
    the repo root.Rmc@s
j|S(N(R7(Rty(R(s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRss
adding %s
sremoving %s
ii(
RtRR9RR'RR&R)RRRRR(R:RRRWRRRRRRRRRRRJ((Rs5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytmarktoucheds&
	
cC@s_gggggf\}}}}}tj|jdt}|d}|j}	|	j|t|jtt	dt	}
x|
j
D]\}}|	|}
|
dkr|j|r|j|q|
dkr|r|j|q|
dkr	|r	|j|q|
dkr,|r,|j|q|
dkr|j|qqW|||||fS(sWalk dirstate with matcher, looking for files that addremove would care
    about.

    This is different from dirstate.status because it doesn't care about
    whether files are modified or clean.Rtfullt?RmtaN(
RRRRRYRgRR)R%RR*tcheckR7(R:RRRRRRt
audit_pathR2RgtwalkresultsRRtdstate((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs&$
		
c	C@si}|dkrxtj||||D]\}}}|jjsf|j|sf|j|r|jjtd|j||j||dfn|||<q+Wn|S(s.Find renames from removed files to added ones.is7recording removal of %s as rename to %s (%d%% similar)
id(R
tfindrenamesR9RRsRRRg(	R:RRRRRtoldtnewtscore((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR)scC@sh|d}|jL|j||j|x*|jD]\}}|j||q>WWdQXdS(smMarks the files in unknown as added, the files in deleted as removed,
    and the files in renames as copied.N(RYtwlocktforgetR(R*R(R:RRRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR8s



cC@s|jj|p|}||krT|j|dkr|r|jj|qn|j|dkr||kr|js|jtd|j|||j||fn|j|dkr|r|j|gqn|s|j||ndS(sUpdate the dirstate to reflect the intent of copying src to dst. For
    different reasons it might not end with dst being marked as copied from src.
    tmnRsF%s has not been committed yet, so no copy data will be stored for %s.
s?rN(	RgtcopiedtnormallookuptquietRNRtpathtoR(R(R9R:RRRtdryruntcwdtorigsrc((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytdirstatecopyBs	)cC@st|jdj}g}xZ|D]R}||kr(|sR|djrjtjtdn|j|q(q(W|j|rtjtddj	|dtdn|S(shReads and parses .hg/requires and checks if all entries found
    are in the list of supported features.trequiresis.hg/requires file is corrupts:repository requires features unknown to this Mercurial: %st thintsJsee https://mercurial-scm.org/wiki/MissingRequirement for more information(
R'Rt
splitlinestisalnumRtRequirementErrorRR7R$Ra(topenert	supportedtrequirementstmissingsRm((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytreadrequiresUs

	cC@sD|dd/}x%t|D]}|jd|qWWdQXdS(NRRs%s
(R)R(RRRRm((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
writerequireshstfilecachesubentrycB@s;eZdZdZdZdZedZRS(cC@sd||_d|_d|_|r`tj|j|_|jrT|jj|_q`d|_ndS(N(RRYt	cachestatt
_cacheableRRt	cacheable(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRins				cC@s(|jr$tj|j|_ndS(N(RRRRR(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytrefresh|scC@s|jdk	r|jStS(N(RRYR(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@sz|jstStj|j}|rV|jdkrV|j|_|jsVtSn|j|krr||_tStSdS(N(	RRRRRRRYRR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytchangeds		cC@sCytj|SWn+tk
r>}|jtjkr?q?nXdS(N(RRRRR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs
(RRRiRRRtstaticmethodR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRms
				tfilecacheentrycB@s&eZedZdZdZRS(cC@s7g|_x'|D]}|jjt||qWdS(N(t_entriesR7R(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRis	
cC@s(x!|jD]}|jr
tSq
WtS(strue if any entry has changed(RRRR(Rtentry((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s"x|jD]}|jq
WdS(N(RR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs(RRRRiRR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs	t	filecachecB@sGeZdZdZdZdZddZdZdZ	RS(sYA property like decorator that tracks files under .hg/ for updates.

    Records stat info when called in _filecache.

    On subsequent calls, compares old stat info with new info, and recreates the
    object when any of the files changes, updating the new stat info in
    _filecache.

    Mercurial either atomic renames or appends for files under .hg,
    so to ensure the cache is reliable we need the filesystem to be able
    to tell us if a file has been replaced. If it can't, we fallback to
    recreating the object on every call (essentially the same behavior as
    propertycache).

    cG@s
||_dS(N(R(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRiscC@s
|j|S(sUsed to compute the runtime path of a cached file.

        Users should subclass filecache and provide their own version of this
        function to call the appropriate join function on 'obj' (an instance
        of the class that its member function was decorated).
        (Ra(RtobjR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRascC@s||_|j|_|S(N(tfuncRRX(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRks	cC@s|dkr|S|j|jkrQ|j|jksCt|j|j|jS|jj|j}|r|jr|j||_qnYg|j	D]}|j
||^q}t|t}|j||_||j|j<|j|j|j<|jS(N(
RYRXt__dict__t
_filecachetAssertionErrorRnRRRRRaRR(RRR}RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt__get__s!(cC@s|j|jkr\g|jD]}|j||^q}t|t}||j|j<n|j|j}||_||j|j<dS(N(RXRRRaRRRR(RRRRRtce((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt__set__s(	cC@s8y|j|j=Wn tk
r3t|jnXdS(N(RRXtKeyErrortAttributeError(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
__delete__s
N(
RRR RiRaRkRYRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs					
c
O@sr|dkrtjdn|dkr3i}n|j-}|||<|jj|d|||SWdQXdS(Ns%lock can only be inherited while heldR6(RYRt LockInheritanceContractViolationtinheritR9tsystem(R:tlocktenvvartcmdR6RRtlocker((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt_locksubs	
cO@st||jd|||S(srun cmd as a subprocess that allows inheriting repo's wlock

    This can only be called while the wlock is held. This takes all the
    arguments that ui.system does, and returns the exit code of the
    subprocess.tHG_WLOCK_LOCKER(Rtcurrentwlock(R:RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytwlocksubscC@s(|jddtp'|jddtS(sIhelper function to know if a repo should be created as general delta
    tformattgeneraldeltatusegeneraldelta(t
configboolRR(R9((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytgdinitconfigscC@s|jddtS(sBhelper function to know if incoming delta should be optimised
    RR(RR(R9((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt
gddeltaconfigst
closewrapbasecB@sMeZdZdZdZdZdZdZdZdZ	RS(saBase class of wrapper, which hooks closing

    Do not instantiate outside of the vfs layer.
    cC@stj|d|dS(Nt_origfh(tobjectt__setattr__(Rtfh((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRi)scC@st|j|S(N(RR(Rtattr((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt__getattr__,scC@st|j||S(N(tsetattrR(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR/scC@st|j|S(N(tdelattrR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt__delattr__2scC@s
|jjS(N(Rt	__enter__(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR5scC@s tdtt|dS(Nsattempted instantiating (R{R|R}(Rtexc_typet	exc_valuetexc_tb((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt__exit__8scC@s tdtt|dS(Nsattempted instantiating (R{R|R}(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pytclose;s(
RRR RiRRRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR$s						R	cB@s)eZdZdZdZdZRS(sfProxy for a file object whose close is delayed.

    Do not instantiate outside of the vfs layer.
    cC@s-tt|j|tj|d|dS(Nt_closer(tsuperR	RiRR(RRtcloser((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRiCscC@s|jj|jdS(N(RRR(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRGscC@s|jj|jdS(N(RRR(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRJs(RRR RiRR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR	>s		RcB@s>eZdZddZdZdZdZdZRS(sCCoordinates background closing of file handles on multiple threads.ic
C@s,t|_t|_g|_d|_tjdk}|jdd|}|sRdS|j	ddd}|dkr||krdS|j	ddd}|j	dd	d
}|j
d|tjd||_
t|_xIt|D];}tjd
|jdd}	|jj|	|	jqWdS(NRtworkerRtbackgroundcloseminfilecountiitbackgroundclosemaxqueueitbackgroundclosethreadcountis0starting %d threads for background file closing
tmaxsizettargetRXtbackgroundcloser(Rt_runningt_enteredt_threadsRYt_threadexceptionRWRXRt	configinttdebugRtqueuet_queueRR@t	threadingtThreadt_workerR7Rv(
RR9RtdefaultenabledtenabledtminfilecounttmaxqueuetthreadcounttiR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRiOs,							cC@s
t|_|S(N(RR(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRws	cC@s+t|_x|jD]}|jqWdS(N(RRRRa(RRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyR{s	cC@sxztr|yL|jjdtdd}y|jWntk
rS}||_nXWqtjk
rx|jsyPqyqXqWdS(sMain routine for worker thread.tblockttimeoutg?N(	RRRnRt	ExceptionRRtemptyR(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs		cC@s||js!tjtdn|jrE|j}d|_|n|js\|jdS|jj	|dt
dddS(sSchedule a file for closing.s1can only call close() when context manager activeNRR
(RRRCRRRYRRRtputR(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs						
(RRR RiRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRMs(			RcB@s2eZdZdZdZdZdZRS(s"Proxy for a file object, to avoid ambiguity of file stat

    See also util.filestat for detail about "ambiguity of file stat".

    This proxy is useful only if the target file is guarded by any
    lock (e.g. repo.lock or repo.wlock)

    Do not instantiate outside of the vfs layer.
    cC@s9tt|j|tj|dtj|jdS(Nt_oldstat(RRRiRRRRRX(RR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRiscC@sp|j}|jrltj|jj}|j|rl|jjdd@}tj	|jj||fqlndS(Nii(
RRRRRRXRRRWR(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt_checkambigs		cC@s$|jj||||jdS(N(RRR(RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRscC@s|jj|jdS(N(RRR(R((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs
(RRR RiRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyRs
					(((Wt
__future__RRRR_RqRWR`RRRRti18nRtnodeRR~RRRR]RRRR	R
RRXR
tscmplatformRR0R1RRR3RYR>RIRKRQRLRR^RyRzRRRRtfilteropenerRRR%R3R5R9R:R?RFRPR;RZReRpRrRtR}RRRRRRRRRRRRRRRRR	RR(((s5/usr/lib/python2.7/dist-packages/mercurial/scmutil.pyt<module>s@		5					
	0	
										8			
		7O
				[