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/context.pyc

Xc@@s	ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZm
Z
mZddlmZmZmZmZmZmZmZmZmZmZmZmZmZejZddZ ej!d	j"Z#d
e$fdYZ%e&e&dZ'd
e%fdYZ(de$fdYZ)de)fdYZ*de%fdYZ+de+fdYZ,de)fdYZ-de-fdYZ.de,fdYZ/dZ0de+fdYZ1d e-fd!YZ2dS("i(tabsolute_importNi(t_(tbinthextnullidtnullrevtshorttwdirid(
tencodingterrortfilesettmatchtmdifftobsoletetpatchtphasestrepoviewtrevlogtscmutiltsubrepotutilt!is[^\x21-\x7f]tbasectxcB@seZdZddZdZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZedZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&e'd%Z(d&Z)d'Z*gd/d/d(e,d/d)Z-d/d/d*Z.d+Z/d,Z0e,e'e'd-Z1d/d/e,e,e,e,d.Z2RS(0sIA basectx object represents the common logic for its children:
    changectx: read-only context that is already present in the repo,
    workingctx: a context that represents the working directory and can
                be committed,
    memctx: a context that represents changes in-memory and can also
            be committed.tcO@sJt|tr|Stt|j|}||_t|_t|_|S(N(	t
isinstanceRtsupert__new__t_repoRt_revRt_node(tclstrepotchangeidtargstkwargsto((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR8s			cC@st|jS(N(Rtnode(tself((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__str__DscC@s
|jS(N(trev(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__int__GscC@sdt|jt|fS(Ns<%s %s>(ttypet__name__tstr(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__repr__JscC@sEy,t|t|ko*|j|jkSWntk
r@tSXdS(N(R)RtAttributeErrortFalse(R%tother((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__eq__Ms,
cC@s||kS(N((R%R/((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__ne__SscC@s
||jkS(N(t	_manifest(R%tkey((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__contains__VscC@s
|j|S(N(tfilectx(R%R3((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__getitem__YscC@s
t|jS(N(titerR2(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__iter__\scC@s|jj|S(sgenerate a new manifest filtered by the match argument

        This method is for internal use only and mainly exists to provide an
        object oriented way for other contexts to customize the manifest
        generation.
        (tmanifesttmatches(R%Rts((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_manifestmatches_scC@s%|p$tj|jj|jjS(sreturn match.always if match is none

        This internal method provides a way for child objects to override the
        match operator.
        (tmatchmodtalwaysRtroottgetcwd(R%R/R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_matchstatushscC@sS|jdk	r7|j|jkr7|jn|j||}|j||}gg}	}
g}g}|j|j|j}
}}t|
}|j|d|}x|j	D]\}}||krqn|dkr|j
|qn|\\}}\}}|dkr0|
j
|q|dkrL|j
|q||krh|	j
|q|tkr|	j
|q||j||r|	j
|q|j
|qW|r4g|D]}||kr|^q}g|D]}||kr|^q}g|D]}||kr|^q}nt
j|	|
||
|||S(s.build a status with respect to another contexttcleanN(R'tNoneR9R<tdeletedtunknowntignoredtsettdifft	iteritemstappendt_newnodetcmpRtstatus(R%R/R;Rtlistignoredt	listcleantlistunknowntmf1tmf2tmodifiedtaddedtremovedRBRDRERFt
deletedsettdtfntvaluetnode1tflag1tnode2tflag2((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_buildstatuspsD	*


%%(cC@stj||jjS(N(RtstateRtui(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytsubstatescC@s|j|dS(Ni(Ra(R%tsubpath((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytsubrevscC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR'scC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR$scC@st|jS(N(RR$(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jS(N(R2(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR9scC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@stj|jS(N(Rt
phasenamestphase(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytphasestrscC@s|jtjkS(N(ReRtpublic(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytmutablescC@stj||S(N(R
t
getfileset(R%texpr((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRiscC@s|jtj|jdkS(s!True if the changeset is obsoleteR
(R'tobsmodtgetrevsR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR
scC@s|jtj|jdkS(s True if the changeset is extincttextinct(R'RkRlR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRmscC@s|jtj|jdkS(s;True if the changeset is not obsolete but it's ancestor aretunstable(R'RkRlR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRnscC@s|jtj|jdkS(sTrue if the changeset try to be a successor of a public changeset

        Only non-public and non-obsolete changesets may be bumped.
        tbumped(R'RkRlR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRoscC@s|jtj|jdkS(sIs a successors of a changeset with multiple possible successors set

        Only non-public and non-obsolete changesets may be divergent.
        t	divergent(R'RkRlR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRpscC@s"|jp!|jp!|jS(s=True if the changeset is either unstable, bumped or divergent(RnRoRp(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyttroubledscC@s^g}|jr"|jdn|jr>|jdn|jrZ|jdn|S(sreturn the list of troubles affecting this changesets.

        Troubles are returned as strings. possible values are:
        - unstable,
        - bumped,
        - divergent.
        RnRoRp(RnRJRoRp(R%ttroubles((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRrscC@s|jS(s)return contexts for each parent changeset(t_parents(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytparentsscC@s|jdS(Ni(Rs(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytp1scC@s3|j}t|dkr#|dSt|jtS(Nii(Rstlent	changectxRR(R%Rt((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytp2s	cC@s
d|jkrey!|j||jj|fSWqetk
ratj|j|tdqeXnd|jks||jkr||j	kr|j	||j	j|fSn|j
jj|j
j|\}}|stj|j|tdn||fS(NR2snot found in manifestt_manifestdelta(t__dict__R2tflagstKeyErrorR	tManifestLookupErrorRRtfilesRyRR9tfindt
_changeset(R%tpathR$tflag((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt	_fileinfos!
!
$cC@s|j|dS(Ni(R(R%R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytfilenode
scC@s1y|j|dSWntjk
r,dSXdS(NiR(RR	tLookupError(R%R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR{scC@stj||d|S(s>return a subrepo for the stored revision of path, never wdir()tallowcreate(R(R%RR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytsubscC@stj|||S(N(Rtnullsubrepo(R%Rtpctx((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytnullsubscC@stj||dtS(s]return a subrepo for the stored revision, or wdir if this is a wdir
        context.
        t	allowwdir(RtTrue(R%R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt
workingsubstglobcC@sI|j}tj|j|j||||d|jd|d|d|S(Ntauditortctxtlistsubrepostbadfn(RR=RR?R@tnofsauditor(R%tpatstincludetexcludetdefaultRRtr((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR#s
	cK@sq|dkr|j}n|dk	r7|j|}ntj|jj|}tj|j||d|d|S(s;Returns a diff generator for the given contexts and matcherRtoptsN(RCRuRRtdiffoptsR`RH(R%tctx2RRR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRH+scC@s
|jjS(N(R2tdirs(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR4scC@s|jj|S(N(R2thasdir(R%tdir((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR7scC@stS(N(R.(R%tmissingtmergetbranch((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytdirty:sc
@s|}|j|}t}	t|trNt|trNt}	||}}n|j||}tjggggggg}
|j||
||||}
|	rtj|
j	|
j
|
jggg|
j}
n|rxtj
||D]\}y|j}Wntk
r&d}nXtj|}
|j|d|
d|d|d|dt}x:t|
|D])\}}|jfd|DqvWqWnx|
D]}|jqW|
S(sreturn status of files between two nodes or node and working
        directory.

        If other is None, compare this node with working directory.

        returns (modified, added, removed, deleted, unknown, ignored, clean)
        RRFRBRERc3@s|]}d|fVqdS(s%s/%sN((t.0tf(Rb(s5/usr/lib/python2.7/dist-packages/mercurial/context.pys	<genexpr>usN(RR.RRwRRARRMR^RSRURTRBtitersubreposRcR|RCR=t
subdirmatchertziptextendtsort(R%R/RRNRORPRtctx1RtreversedRRtrev2tsubmatchR;trfilestsfilestl((Rbs5/usr/lib/python2.7/dist-packages/mercurial/context.pyRM=s:

!	!

	(
N(3R*t
__module__t__doc__RR&R(R,R0R1R4R6R8R<RAR^t
propertycacheRaRcR'R$RR9RRfRhRiR
RmRnRoRpRqRrRtRuRxRRR{RRRRRCR.RRHRRRRM(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR1s^												6																												c

@shfd}
|	dkr$i}	n|r@tj||	d<nt|||||
|||	|	}|S(Nc@s\j|\}}}|dkr(dS|\}}t|||d|d|d|d|S(Ntislinktisexectcopiedtmemctx(tgetfileRCt
memfilectx(RRRtdatatmodeRRR(tstore(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt
getfilectxsR(RCRt	fromlocalR(RRtttexttusertdateRR~RteditortextraRR((Rs5/usr/lib/python2.7/dist-packages/mercurial/context.pyt
makememctx}s	RwcB@s.eZdZddZdZdZedZedZedZ	edZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdddZedZdZdZ dZ!RS(sA changecontext object makes access to data related to a particular
    changeset convenient. It represents a read-only context already present in
    the repo.RcC@st|trdS|dkr(d}n||_yt|tre|jj||_||_dSt|trt	|}n|dkrt
|_t|_dS|dkr|jj|_|jj
|j|_dS|dks||jjkr4|jj|_|jjj
|j|_dSt|dkry&||_|jj
||_dSWqtjk
rqtk
rqXnyt|}t	||krtnt|j}|dkr||7}n|dks||krtn||_|jj||_dSWn0tjk
rHntttfk
ranXt|dkry/t||_|jj
|j|_dSWqtjk
rqttfk
rqXny8|jj|||_|jj
|j|_dSWn:tk
r!n*tjk
r7ntjk
rJnX|jjj ||_|jdk	r|jj
|j|_dS||jjj"krt#d	}tj$|t%|ny1t|dkrt&|rt'|}nWntk
rnXWntjtjtjfk
r|j(j)d
rt#d|}t#d}tj|d
|nt#d}|||j(f;}tj|ntk
rnXtjt#d|dS(s+changeid is a revision number, node, or tagNRt.tnullttipiii(s*working directory has unknown parent '%s'!tvisibleshidden revision '%s's'use --hidden to access hidden revisionsthints+filtered revision '%s' (not in '%s' subset)sunknown revision '%s'(*RRRtintt	changelogR$RRtlongR+RRRR'tdirstateRut
unfilteredRvR	tFilteredRepoLookupErrorRt
ValueErrortFilteredIndexErrort
OverflowErrort
IndexErrorRtFilteredLookupErrort	TypeErrortnamest
singlenodeR|tRepoLookupErrort
_partialmatchRCRtRtAbortRtnonasciiRt
filternamet
startswith(R%RR RRtmsgR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__init__s					!	
	
		



cC@s0yt|jSWntk
r+t|SXdS(N(thashRR-tid(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__hash__s
cC@s
|jtkS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt__nonzero__
scC@s|jjj|jS(N(RRtchangelogrevisionR'(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR
scC@s|jj|jjjS(N(RtmanifestlogRR9tread(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR2scC@s |jj}|jj|jS(N(RR9RRt	readdelta(R%tmfnode((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRyscC@s\|j}|jj|j\}}|tkr@t||gSt||t||gS(N(RRt
parentrevsRRRw(R%RRuRx((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRss
	cC@s1|j}|j|j|j|j|j|jfS(N(RR9RRR~tdescriptionR(R%tc((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt	changeset"s	cC@s
|jjS(N(RR9(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytmanifestnode,scC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR/scC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR1scC@s
|jjS(N(RR~(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR~3scC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR5scC@stj|jjjdS(NR(RttolocalRRtget(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR7scC@sd|jjkS(Ntclose(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytclosesbranch9scC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR;scC@s|jj|jS(N(RtnodetagsR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyttags=scC@s|jj|jS(N(Rt
nodebookmarksR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt	bookmarks?scC@s|jjj|j|jS(N(Rt_phasecacheReR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyReAscC@s|jtj|jdkS(NR(RRt
filterrevsR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pythiddenCscC@s;|jjj|j}g|D]}t|j|^qS(s(return contexts for each child changeset(RRtchildrenRRw(R%Rtx((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRFscc@s;x4|jjj|jgD]}t|j|VqWdS(N(RRt	ancestorsRRw(R%ta((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRKs"cc@s;x4|jjj|jgD]}t|j|VqWdS(N(RRtdescendantsRRw(R%RW((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyROs"c	C@s@|dkr|j|}nt|j|d|d|d|S(s&get a file context from this changesettfileidRwtfilelogN(RCRR5R(R%RRR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR5Ssc@sx|j}|d	kr(|jdj}n|jjj|j|}|sRtnt|dkrq|dnx|jjj	dddgD]R}yt
|j|}Wntjk
rqnX|j
|krPqqW|jjj|j||rh|jjjtdtt|jt|fdjfdt|Dnt
|jS(
sreturn the "best" ancestor context of self and c2

        If there are multiple candidates, it will show a message and check
        merge.preferancestor configuration before falling back to the
        revlog ancestor.iiRtpreferancestort*s(note: using %s as ancestor of %s and %s
Rc3@s1|]'}|krtdt|VqdS(s:      alternatively, use --config merge.preferancestor=%s
N(RR(Rtn(tanc(s5/usr/lib/python2.7/dist-packages/mercurial/context.pys	<genexpr>ysN(RRCRsRRtcommonancestorsheadsRRvR`t
configlistRwR	RR$tancestorRMRRtjointsorted(R%tc2twarntn2tcahsRR((Rs5/usr/lib/python2.7/dist-packages/mercurial/context.pyRZs0		
%	"cC@s|jjj|j|jS(s-True if other is descendant of this changeset(RRt
descendantR(R%R/((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR
~sc@s4fd}tj|}jj|S(sGenerates matching file names.c@sAtfdjDr#dSjtddS(Nc3@s.|]$}|kp%j|dVqdS(t/N(R(RR;(RX(s5/usr/lib/python2.7/dist-packages/mercurial/context.pys	<genexpr>ssno such file in rev %s(tanyRatbadR(RXR(RR%(RXs5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs(R=tbadmatchR2twalk(R%RRtm((RR%s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|j|S(N(R(R%R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR:sN("R*RRRRRRRR2RyRsRRRRR~RRRRRRReRRRRRCR5R.RR
RR:(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRws:r			
															$		tbasefilectxcB@seZdZdZedZedZedZedZedZ	dZ
dZd	Zd
Z
dZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"d Z#d!Z$d"Z%d#Z&d$Z'e(Z)d%Z*e(d&Z+d'Z,d(Z-d)Z.d*Z/d+Z0e(e(d.d,Z2e(d-Z3RS(/sKA filecontext object represents the common logic for its children:
    filectx: read-only access to a filerevision that is already present
             in the repo,
    workingfilectx: a filecontext that represents files from the working
                    directory,
    memfilectx: a filecontext that represents files in-memory.cO@stt|j|S(N(RRR(RRRR!R"((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jj|jS(N(Rtfilet_path(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_filelogscC@szd|jkr|jSd|jkr2|jjSd|jkrc|j|j|j|j|jS|jj	|j
SdS(Nt	_changeidt
_changectxt_descendantrev(RzRRR't_adjustlinkrevRRt	_filenodeRtlinkrevt_filerev(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs
cC@s9d|jkr"|jj|jS|jj|jSdS(Nt_fileid(RzRtlookupRRRR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jj|jS(N(RR'R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt	_repopathscC@s+y|jtSWntjk
r&tSXdS(N(RRR	RR.(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs
cC@sd|j|jfS(Ns%s@%s(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR&scC@sdt|jt|fS(Ns<%s %s>(R)R*R+(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR,scC@s9yt|j|jfSWntk
r4t|SXdS(N(RRRR-R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs
cC@sWy>t|t|ko<|j|jko<|j|jkSWntk
rRtSXdS(N(R)RRR-R.(R%R/((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR0s
*
cC@s||kS(N((R%R/((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR1scC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytfilerevscC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jj|jS(N(RR{R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR{scC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR'scC@s|jj|jS(N(RRR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|jjS(N(RR$(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR$scC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|jjS(N(RR~(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR~scC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|jjS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|jjS(N(RRe(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRescC@s
|jjS(N(RRf(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRfscC@s
|jjS(N(RR9(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR9scC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRwscC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s0ytj|jSWntk
r+tSXdS(N(RtbinaryRtIOErrorR.(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytisbinarys
cC@sd|jkS(NR(R{(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@sd|jkS(NR(R{(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@stS(swhether this filectx represents a file not in self._changectx

        This is mainly for merge code to detect change/delete conflicts. This is
        expected to be True for all subclasses of basectx.(R.(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytisabsentscC@s|jr|j|S|jdkrM|jjse|jd|jkse|j|jkr|jj|j|jSt	S(sVcompare with other file context

        returns True if different than fctx.
        iN(
t
_customcmpRLRRCRt_encodefilterpatstsizeRRR(R%tfctx((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRLs	
cC@s`|j}|jj}|j}|j|}	|j|	}
t|dd}d}|dkrg|jdjD]}
|
j^qw}t	}n	|g}|dkr|j
||
d|}}n|
|kr\|dkr|j
||
d|}nxZ|D]O}|j|}||dkr|||djj
|krU|SqqWn|
S(sEreturn the first ancestor of <srcrev> introducing <fnode>

        If the linkrev of the file revision does not point to an ancestor of
        srcrev, we'll walk down the ancestors until we find one introducing
        this file revision.

        :repo: a localrepository object (used to access changelog and manifest)
        :path: the file path
        :fnode: the nodeid of the file revision
        :filelog: the filelog of this path
        :srcrev: the changeset revision we search ancestors from
        :inclusive: if true, the src revision will also be checked
        t_ancestrycontextt	inclusiveiiN(RRRRR'RtgetattrRCRtRRRtreadfastR(R%RRtfnodetsrcrevR,Rtcltmfltfrtlkrt	memberanctiteranctptrevsRtac((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR+s.		,		
#cC@s~|j}t|}d|kp-d|k}|sI|j|krS|jS|j|j|j|j|jdtS(sreturn the rev of the changeset which introduced this file revision

        This method is different from linkrev because it take into account the
        changeset the filectx was created from. It ensures the returned
        revision is one of its ancestors. This prevents bugs from
        'linkrev-shadowing' when a file revision is used by multiple
        changesets.
        RRR,(RtvarsR'RRRRR(R%R4tattrstnoctx((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytintrorev\s	
cC@st|j|d|d|}dt|ksBdt|kri|j|_t|dd|_n6dt|kr|j|_t|dd|_n|S(s@create parent filectx keeping ancestry info for _adjustlinkrev()RRRRR+RN(R5RR:R'RR-RCR+(R%RRRR*((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_parentfilectxms$c
C@s|j}|j}|jj|j}g|D]!}|tkr.|||f^q.}|j|j}|r|jd|d|d|jj|dfng|D]$\}}}	|j	|||	^qS(Nii(
RRRtRRtrenamedtinsertRRR>(
R%RtflRtR$tplRRR/R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRt}s		.	4cC@s|jdS(Ni(Rt(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRuscC@sH|j}t|dkr&|dSt|j|jddd|jS(NiiRiR(RtRvR5RRR(R%R7((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRxsc@sd|r!fd}nfd}fd}tjfdfd}}j}j|krjjd|}nt|dd
d
kr6jj	}	|d
kr|	j
g|jD]}
|
j^qd	t}n|	j
|gd	t}||_
n|g}i}
id
|6}x|r|j}||
kryqUn||}||
|<xD|D]<}
|j|
dd
||
<|
|
kr|j|
qqWqUW|g|(i}x|r|d}||kr|jqnt}|
|}x0|D](}
|
|kr0t}|j|
q0q0W|r|j||j|}xR|D]J}
|||
|}||
d
kr||
=||
=q||
cd
8<qW|||<|
|=qqWt||d||d
jtS(sRreturns a list of tuples of ((ctx, number), line) for each line
        in the file, where ctx is the filectx of the node where
        that line was last changed; if linenumber parameter is true, number is
        the line number at the first appearance in the managed file, otherwise,
        number has a fixed value of False.
        cS@s9|jdr|jdS|jdtt|S(Ns
(tendswithtcountRtbool(R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytliness
c@s6gtd|dD]}||f^q|fS(Ni(txrange(RR'ti(RF(s5/usr/lib/python2.7/dist-packages/mercurial/context.pytdecoratesc@s|tfg||fS(N(R.(RR'(RF(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRIsc@srtj|d|dd}xK|D]C\\}}}}}|dkr'|d||!|d||+q'q'W|S(NiRt=i(Rt	allblocks(tparenttchildtblocksta1ta2tb1tb2tt(R(s5/usr/lib/python2.7/dist-packages/mercurial/context.pytpairs
 #c@sjj|S(N(RR(R(R%(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt<lambda>sc@s|j|j}sMg|D]$}|j|jkr |^q }nx5|D]-}d|jkrT|j|_qTqTW|S(NR(RRtRRzR(RRBR7(tfollowtgetlog(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRts4
R R+R,iiiN(RtlrucachefuncR=R'R5RR-RCRRRRtRR+tpopRRJR.RRt
splitlines(R%RVt
linenumberRRIRTRttbaseR=R1R7R9tvisittpcachetneededRRBthisttreadytcurr((RRVRWRFR%s5/usr/lib/python2.7/dist-packages/mercurial/context.pytannotatesp		+	
	


	







cc@si}|}|rd}nd}xetrx4|j| D]"}|||j|jf<q;W|skPn|jt|}|Vq$WdS(Ni(RCRRtRRRYtmax(R%tfollowfirstR]RtcutRL((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs		 N(4R*RRRRRRRRR!RR&R,RR0R1R"RR{RR'RR$RRRR~RRRReRfR9RwRRR%RRR&R.R'RLRR=R>RtRuRxRCRcR(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs^																																1					uR5cB@sbeZdZdddddZedZddZdZdZ	dZ
dZRS(	saA filecontext object makes access to data related to a particular
       filerevision convenient.cC@s||_||_|dk	sO|dk	sO|dk	sOtd|||f|dk	rg||_n|dk	r||_n|dk	r||_n|dk	r||_ndS(sechangeid can be a changeset revision, node, or tag.
           fileid can be a file revision or node.s.bad args: changeid=%r, fileid=%r, changectx=%rN(RRRCtAssertionErrorRRRR(R%RRR RRRw((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR"s		cC@sHyt|j|jSWn*tjk
rCt|jj|jSXdS(N(RwRRR	RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR9sc	C@s(t|j|jd|d|jd|S(sMopens an arbitrary revision of the file without
        opening a new filelogRRR (R5RRR(R%RR ((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR5PscC@sy|jj|jSWngtjk
r|jjjddddkrOdStjt	dt
|jdt	dnXdS(	NtcensortpolicytaborttignoreRscensored node: %sRs"set censor.policy to ignore errors(RRRR	tCensoredNodeErrorRR`tconfigRRR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRVs!cC@s|jj|jS(N(RR)R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR)_scC@s|jj|j}|s|S|j|jkr;|S|j}|j}xK|jjD]:}y||j|krdSWq`t
jk
rq`Xq`W|S(s#check if file was actually renamed in this changeset revision

        If rename logged in file revision, we report copy for changeset only
        if file revisions linkrev points back to the changeset in question
        or both changeset parents contain different file revisions.
        N(RR?RR'RRRRtRRCR	R(R%R?tnameR/R7((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR?bs	c	C@sJ|jj|j}g|D]*}t|j|jd|d|j^qS(NRR(RRRR5RR(R%RR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR{sN(R*RRRCRRRR5RR)R?R(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR5s				tcommittablectxcB@sdeZdZdd#d#d#d#dZdZdZdZedZ	edZ
edZed	Zed
Z
dZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"d Z#d!Z$d"Z%RS($sA committablectx object provides common functionality for a context that
    wants the ability to commit, e.g. workingctx or memctx.RcC@s||_d|_d|_||_|r?tj||_n|rQ||_n|rc||_	ni|_
|r|j|_
nd|j
krytj
|jjj}Wn&tk
rtjtdnX||j
d<n|j
ddkrd|j
d<ndS(NRsbranch name not in UTF-8!RR(RRCRRt_textRt	parsedatet_datet_usert_statust_extratcopyRRRRtUnicodeDecodeErrorR	RR(R%RRRRRtchangesR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs*					
cC@st|jddS(Nit+(R+Rs(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR&scC@stS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRsc@s|jjjj|j}t|dkrX|djfd}nY|\}}|j|}|j|j|jfd}|S(Niic@s||}j|S(N(R{(R(t	copiesgettman(s5/usr/lib/python2.7/dist-packages/mercurial/context.pytfuncsc@sr||}j|j|j|}}}||krN|S||kr^|S||krn|SdS(NR(R{(Rtfl1tfl2tfla(Rztm1tm2tma(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR|s/(RRtcopiesRRtRvR9R(R%RtR|RuRxtpa((RzRRRR{s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_buildflagfuncs&cC@s|jjj|jS(N(RRtflagfuncR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt	_flagfuncsc
@sl|j}|djj}t|dkra|jjfd}nfd}|jjj}|j}xd|j	j
fd|j	jffD]}\}}xn|D]f}|j||}	||	j|	t
|||<y|j|||Wqtk
r(qXqWqWx4|j	j|j	jD]}||krH||=qHqHW|S(s{generate a manifest corresponding to the values in self._status

        This reuse the file nodeid from parent, but we append an extra letter
        when modified. Modified files get an extra 'm' while added files get
        an extra 'a'. This is used by manifests merge to see that files
        are different and by update logic to avoid deleting newly added files.
        iic@s|krSS(N((R(tman1tman2(s5/usr/lib/python2.7/dist-packages/mercurial/context.pytgetmansc@sS(N((R(R(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRUsRR(RtR9RvRvRxRRRRRtRTRSRRtsetflagtOSErrorRDRU(
R%RtR{RRtffRHRRtorig((RRs5/usr/lib/python2.7/dist-packages/mercurial/context.pyR2s*		1
 
cC@s
|jjS(N(RRM(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRtscC@s|jjjS(N(RR`tusername(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRsscC@s
tjS(N(Rtmakedate(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRrscC@sdS(N(RC(R%Rb((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRcscC@sdS(N(RC(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jp|jjjS(N(RsRR`R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jS(N(Rr(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jS(N(Rp(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s$t|jj|jj|jjS(N(RRtRSRTRU(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR~scC@s
|jjS(N(RtRS(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRS	scC@s
|jjS(N(RtRT(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRTscC@s
|jjS(N(RtRU(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRU
scC@s
|jjS(N(RtRD(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRDscC@stj|jdS(NR(RRRu(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
d|jkS(NR(Ru(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jS(N(Ru(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@sgS(N((R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s4g}x'|jD]}|j|jqW|S(N(RtRR(R%tbR7((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s9tj}x)|jD]}t||j}qW|S(N(RtdraftRtRdRe(R%ReR7((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRe!s	cC@stS(N(R.(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR'scC@sgS(N((R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR*scC@sed|jkr;y|jj|SWq;tk
r7dSXny|j|SWntk
r`dSXdS(NR2R(RzR2R{R|RR(R%R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR{-s

cC@s|jdj|S(s1return the "best" ancestor context of self and c2i(RsR(R%R	((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR9scC@s+t|jjj|t|jttS(sGenerates matching file names.(RRRRRaRR.(R%R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR=scC@st|jjj|S(N(RRRR:(R%R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR:Bscc@sjx|jD]}|Vq
WxJ|jjjg|jD]}|j^q2D]}t|j|VqKWdS(N(RsRRRR'Rw(R%R7R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyREs
	)cC@s|jjjx1|j|jD]}|jjj|q'Wx'|jD]}|jjj|qQW|jjj||jjj	|jjj
|jjdS(sQPerform post-commit cleanup necessary after committing this ctx

        Specifically, this updates backing stores this working context
        wraps to reflect the fact that the changes reflected by this
        workingctx have been committed.  For example, it marks
        modified and added files as normal in the dirstate.

        N(RRtbeginparentchangeRSRTtnormalRUtdropt
setparentstendparentchangetwritetcurrenttransaction(R%R$R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt
markcommittedLs
N(&R*RRRCRR&RRRRR2RtRsRrRcRRRRR~RSRTRURDRRRRRReRRR{RRR:RR(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRosF			 '																							t
workingctxcB@seZdZddddddZdZdZdZedZ	ddZ
eeedZ
dd	Zdd
ZdZdZgddd
eddZdZdZdZdeeedZdZdZRS(syA workingctx object makes access to data related to
    the current working directory convenient.
    date - any valid date string or (unixtime, offset), or None.
    user - username string, or None.
    extra - a dictionary of extra values, or None.
    changes - a list of file lists as returned by localrepo.status()
               or None to use the repository status.
    RcC@s)tt|j||||||dS(N(RRR(R%RRRRRRx((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRlscc@s9|jj}x&|D]}||dkr|VqqWdS(NR(RR(R%RWR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR8ps
cC@s|jj|dkS(Ns?r(RR(R%R3((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR4vscC@s
ttS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRyscC@sR|jjj}|dtkr/|d }ng|D]}t|j|^q6S(Nii(RRRtRRw(R%R7R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs|s
cC@st|j|d|d|S(s-get a file context from the working directoryRR(tworkingfilectxR(R%RR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR5scC@sx0t|jD]}|j|jrtSqW|rE|jp|ri|j|jjkp|jp|j	p|j
p|o|jS(s-check whether a working directory is modified(RRaRRRRxRRuRSRTRURD(R%RRRR;((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs$$c
@sfd}|jj|jj|jj}}g}|jjj}xf|D]^}tj|||y||}	Wn>tk
r|j	t
d|||j|qTnX|	jdkr|j	t
d|d|	jd||fnt
j|	jp%t
j|	jsU|j	t
d|||j|qT||dkr|j	t
d	||qT||d
kr|j|qT|j|qTW|SWdQXdS(Nc@stjj|S(N(tosRR(R(tprefix(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRUss%s does not exist!
iso%s: up to %d MB of RAM may be required to manage this file
(use 'hg revert %s' to cancel the pending addition)
ii@Bs:%s not added: only files and symlinks supported currently
tamns%s already tracked!
R(RtwlockR`RtwvfstlstatRt
checkportableRR
RRJtst_sizetstattS_ISREGtst_modetS_ISLNKtnormallookuptadd(
R%tlistRRR`tdstrejectedRRtst((Rs5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs4


%$ c	@sfd}|jjg}x|D]}||jjkrw|jjjtd|||j|q,|jj|dkr|jjj|q,|jjj|q,W|SWdQXdS(Nc@stjj|S(N(RRR(R(R(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRUss%s not tracked!
R(	RRRR`R
RRJtremoveR(R%R~RRRR((Rs5/usr/lib/python2.7/dist-packages/mercurial/context.pytforgets
#c	C@s|j}|jjx|D]}|jj|dkr_|jjjtd|q#||dkr}|d|p|d|}|j}|jj|||j	|jjj
|q#WWdQXdS(NRs%s not removed!
ii(RtRRRR`R
RRtwwriteR{R(R%RtpctxsRR*RS((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytundeletes
 ,cC@s1y|jjj|}WnItk
rd}|jtjkrCn|jjjtd|dSXt	j
|jpt	j|js|jjjtd|n|jj
s|jj|dkr|jjj|n,|jj|dkr|jjj|n|jjj||WdQXdS(Ns%s does not exist!
s1copy failed: %s is not a file or a symbolic link
t?R(RRRRterrnotENOENTR`R
RRRRRRRRRRv(R%tsourcetdestRterr((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRvs $RcC@s|j}tj|jsUtj|j|j|||||j|d|d|Stj|j|j||||d|jd|d|d|S(NRRRR(	RRtfscasesensitiveR?R=ticasefsmatcherR@RR(R%RRRRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs	cC@s|s|jjjr|Sg}x|D]}|j|dkr||j}|dkst|dksd|kstj|r|jjj	d|q'qn|j
|q'W|S(NRRis
s*ignoring suspect symlink placeholder "%s"
(RRt
_checklinkR{RRvRR#R`tdebugRJ(R%R~tsaneRRW((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_filtersuspectsymlinks
9	cC@s+|sggfSg}g}|jd}xrt|D]d}||ks}|j||j|ks}||j||r|j|q6|j|q6W|r!yc|jjtK|jjj	}x|D]}||qW|jjj
|jjWdQXWq!tj
k
rq!Xn||fS(Ni(RsRR{RLRJRRR.RRRRR	t	LockError(R%R~RStfixupRRR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_checklookups(

*
&cC@s|jdj||}x;|j|jD])}t||<|j||j|q*Wx'|jD]}||kra||=qaqaW|S(sSlow path for workingctx

        The fast path is when we compare the working directory to its parent
        which means this function is comparing with a non-parent; therefore we
        need to build a manifest and return what matches.
        R(RR<RSRTRKRR{RU(R%RR;tmfR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR<(s
c
C@s=|||}}}|p8tj|jj|jj}g}d|kr_t|j}n|jjj|||||\}	}
|	r|j	|	\}}|
j
j||r|r|
jj|qn|jr9|
j
s|
js|
jr-tj|
j
|
j|
j|
jggg|_q9|
|_n|
S(s7Gets the status from the dirstate -- internal use only.s.hgsub(R=R>RR?R@RRaRRMRRSRRBRERFRRTRURDRt(
R%RRFRBRERNRORPtsubreposRLR;t	modified2R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt_dirstatestatus8s$'cC@so|j||||}|j|j|j(||jdkrktt|j||||||}n|S(sCbuild a status with respect to another context

        This includes logic for maintaining the fast path of status when
        comparing the working directory against its parent, which is to skip
        building a new manifest if self (working directory) is not comparing
        against its parent (repo['.']).
        R(RRRSRRRR^(R%R/R;RRNRORP((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR^Ws	c@sVtt}|j|}jdkrRfd}||_n|S(soverride the match method with a filter for directory patterns

        We use inheritance to customize the match.bad method only in cases of
        workingctx since it belongs only to the working directory when
        comparing against the parent changeset.

        If we aren't comparing against the working directory's parent, then we
        just use the default match object sent to us.
        Rc@sO|krKj|rKjjjdjjj||fndS(Ns%s: %s
(RRR`R
Rtpathto(RR(R/R%(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRxs(RRRARR(R%R/Rt	superselfR((R/R%s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRAks
N(R*RRRCRR8R4RRRsR5R.RRRRRRvRRRR<RR^RA(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRcs,			 				$			tcommittablefilectxcB@sAeZdZdddZdZdZdZdZRS(sA committablefilectx provides common functionality for a file context
    that wants the ability to commit, e.g. workingfilectx or memfilectx.cC@sY||_||_d|_d|_|_|dk	rC||_n|rU||_ndS(N(RRRCRRRRR(R%RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs			cC@stS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
|jS(N(R'(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@sd}|j}|j}|jj}|j}|rI|dg}n|||d||fg}x1|dD]%}|j|||||fqsWg|D]6\}}	}
|	tkr|j|d|	d|
^qS(s5return parent filectxs, following copies if necessarycS@s|jj|tS(N(R2RR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRsiiRRN(N(	RRRRsR?RCRJRR>(R%RRRAtpclR?RBtpcR7RR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRts			#cC@sgS(N((R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRsN(	R*RRRCRRRRtR(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs			RcB@sneZdZd
d
dZedZdZdZdZ	dZ
dZedZ
d	ZRS(suA workingfilectx object makes access to data related to a particular
       file in the working directory convenient.cC@s#tt|j||||dS(N(RRR(R%RRRR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
t|jS(N(RR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jj|jS(N(RtwreadR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@sE|jjj|j}|s"dS||jjdjj|t	fS(Ni(
RRRRRCRRsR2RR(R%trp((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR?scC@s|jjj|jjS(N(RRRRR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR)scC@sq|jj\}}y#|jjj|jj|fSWn2tk
rl}|jtj	krbn||fSXdS(N(
RRRRRRtst_mtimeRRR(R%RSttzR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs#cC@s
|j|S(sVcompare with other file context

        returns True if different than fctx.
        (RL(R%R*((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRLscC@s#tj|jj|j|dS(s+wraps unlink for a repo's working directoryN(Rt
unlinkpathRtwjoinR(R%t
ignoremissing((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|jj|j||dS(swraps repo.wwriteN(RRR(R%RR{((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRsN(R*RRRCRRRRR?R)RRLR.RR(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs							tworkingcommitctxcB@sGeZdZdddddZdeeedZedZRS(sA workingcommitctx object makes access to data related to
    the revision being committed convenient.

    This hides changes in the working directory, if they aren't
    committed in this context.
    RcC@s)tt|j||||||dS(N(RRR(R%RRxRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s|p$tj|jj|jj}|r[g|jD]}||jkr7|^q7}ng}tjg|j	j
D]}||rt|^qtg|j	jD]}||r|^qg|j	jD]}||r|^qggg|S(sReturn matched files only in ``self._status``

        Uncommitted files appear "clean" via this context, even if
        they aren't actually so in the working directory.
        (
R=R>RR?R@R2t_changedsetRRMRtRSRTRU(R%RRFRBRER((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs'..((cC@s<t|jj}|j|jj|j|jj|S(s8Return the set of files changed in this context
        (RGRtRStupdateRTRU(R%tchanged((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRsN(	R*RRRCRR.RRR(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs
	c@sifd}|S(sCreate a filectxfn that caches based on the path.

    We can't use util.cachefunc because it uses all arguments as the cache
    key and this creates a cycle since the arguments include the repo and
    memctx.
    c@s-|kr%||||<n|S(N((RRR(tcacheR|(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs((R|R((RR|s5/usr/lib/python2.7/dist-packages/mercurial/context.pytmakecachingfilectxfnsRcB@s\eZdZeZdddedZddZdZ	e
dZe
dZRS(s;Use memctx to perform in-memory commits via localrepo.commitctx().

    Revision information is supplied at initialization time while
    related files data and is made available through a callback
    mechanism.  'repo' is the current localrepo, 'parents' is a
    sequence of two parent revisions identifiers (pass None for every
    missing parent), 'text' is the commit message and 'files' lists
    names of files touched by the revision (normalized and relative to
    repository root).

    filectxfn(repo, memctx, path) is a callable receiving the
    repository, the current memctx object and the normalized path of
    requested file, relative to repository root. It is fired by the
    commit function for every file in 'files', but calls order is
    undefined. If the file is available in the revision being
    committed (updated or added), filectxfn returns a memfilectx
    object. If the file was removed, filectxfn raises an
    IOError. Moved files are represented by marking the source file
    removed and the new file added with copy information (see
    memfilectx).

    user receives the committer name and defaults to current
    repository username, date is the commit date in any format
    supported by util.parsedate() and defaults to current date, extra
    is a dictionary of metadata or is left empty.
    c
@sktt|j|||||d|_d|_g|D]}
|
pJt^q;}|\}}g||fD]}
t|j|
^ql|_	t
t|}||_i|_
tsfd}
|
|_nt|_|r|j|_n	i|_|jjdddkr3d|jd<n|	rg|	|j|g|_|jj|jndS(Nc@sc|}|j}|r)|d}nt|||jd|jd|jd|d|S(NiRRRR(R?RRRR(RRRR*R(t	filectxfn(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRAs

RRR(RRRRCRRRRwRRsRRGt_filesRatcallablet
_filectxfnRRvRuRRptsavecommitmessage(R%RRtRR~RRRRRR7RuRxR((Rs5/usr/lib/python2.7/dist-packages/mercurial/context.pyR3s*"		.		
	cC@s|j|j||S(spget a file context from the working directory

        Returns None if file doesn't exist and should be removed.(RR(R%RR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR5\scC@s|jj|S(scommit context to the repo(Rt	commitctx(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pytcommitbscC@s*|jd}|jj}x|jjD]}t}t}||j}t|dkr|dj}t|dkr|dj}qnt	j
||j||||<q,Wx7|jjD])}t	j
||jtt||<qWx*|jj
D]}||kr||=qqW|S(s;generate a manifest based on the return values of filectxfnii(RsR9RvRtRSRRtRvRRRRRTRU(R%RR{Rtp1nodetp2nodeR7((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR2fs"
''c@s|jj|jd}|jtkrR|jfd}nfd}ggg}}}xT|jD]I}||s|j|q||r|j|q|j|qWtj|||ggggS(sHCalculate exact status from ``files`` specified at construction
        ic@s|kp|kS(N((R(RR(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRUsc@s
|kS(N((R(R(s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRUs(	RuR9RsR$RRRJRRM(R%RxtmanagingRSRTRUR((RRs5/usr/lib/python2.7/dist-packages/mercurial/context.pyRts

N(
R*RRRt_returnnoneformissingfilesRCR.RR5RRR2Rt(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs(	RcB@s\eZdZeedddZdZdZdZdZ	edZ
dZRS(	spmemfilectx represents an in-memory file to commit.

    See memctx and committablefilectx for more details.
    cC@srtt|j||d|||_|r4dp7d|rCdpFd|_d|_|rn|tf|_ndS(sQ
        path is the normalized file path relative to repository root.
        data is the file content as a string.
        islink is True if the file is a symbolic link.
        isexec is True if the file is executable.
        copied is the source file path if current file was copied in the
        revision being committed, or None.RRRN(RRRRCt_datat_flagst_copiedR(R%RRRRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs		%	cC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@st|jS(N(RvR(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR)scC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR{scC@s|jS(N(R(R%((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyR?scC@s|j|j=dS(s+wraps unlink for a repo's working directoryN(RR(R%R((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRscC@s
||_dS(swraps repo.wwriteN(R(R%RR{((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRsN(R*RRR.RCRRR)R{R?RR(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyRs				(3t
__future__RRRtreRti18nRR$RRRRRRRRR	R
RR=RR
RkRRRRRRRRRKtcompiletsearchRtobjectRRCRRwRR5RoRRRRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/context.pyt<module>s6.X	
Nb-.&