-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyc


#{YPc@@sdZddlmZddlmZddlZddlZddlmZee	dddl
mZmZddl
mZmZmZdd	lmZdd
lmZddlmZddlmZmZdd
lmZmZmZmZmZddl m!Z!m"Z"ddl#m$Z$ddl%m&Z&m'Z'ddl(m)Z)m*Z*m+Z+de)fdYZ,de-j.fdYZ/de,fdYZ0de,fdYZ1de0fdYZ2de0fdYZ3de+fdYZ4d e4fd!YZ5d"e4fd#YZ6d$e4fd%YZ7d&e'fd'YZ8d(e&fd)YZ9e&j:e9d*e;fd+YZ<d,e;fd-YZ=d.e;fd/YZ>dS(0sWorkingTree4 format and implementation.

WorkingTree4 provides the dirstate based working tree logic.

To get a WorkingTree, call bzrdir.open_workingtree() or
WorkingTree.open(dir).
i(tabsolute_import(tStringION(tlazy_importsF
import errno
import stat

from bzrlib import (
    bzrdir,
    cache_utf8,
    config,
    conflicts as _mod_conflicts,
    controldir,
    debug,
    dirstate,
    errors,
    filters as _mod_filters,
    generate_ids,
    osutils,
    revision as _mod_revision,
    revisiontree,
    trace,
    transform,
    views,
    )
(tneeds_read_locktneeds_write_lock(t	InventorytROOT_IDt
entry_factory(tLogicalLockResult(t
LockableFiles(tLockDir(tMutableTreetneeds_tree_write_lock(t	file_kindtisdirtpathjointrealpathtsafe_unicode(t
deprecated_intdeprecated_method(tLocalTransport(t	InterTreet
InventoryTree(tInventoryWorkingTreetWorkingTreetWorkingTreeFormatMetaDirtDirStateWorkingTreecB@s5eZdEdEdEdZedZdZdZedZdZ	dZ
edEdEdZdZ
d	Zd
ZdZdZd
ZedZdZdEdEdZdEdEdZdZeedFdZeeddZeedZedZdEdZ dEdZ!edZ"dZ#dZ$ed Z%d!Z&dEd"Z'd#Z(ed$Z)d%Z*d&Z+d'Z,d(Z-ed)Z.d*Z/d+Z0d,Z1d-Z2ee3d.Z4d/Z5d0Z6ed1Z7ge8d2Z9e8d3Z:e8d4Z;d5Z<ed6Z=ed7Z>ee3d8Z?ee3d9Z@d:ZAd;ZBed<ZCd=ZDed>ZEee3d?ZFed@ZGdAZHedBZIedCZJedEdDZKRS(GcC@s||_||_t|}tjd|||_t||_||_|jj	|_	d|_d|_d|_
|j|jd|_|j|_tj|_dS(s'Construct a WorkingTree for basedir.

        If the branch is not supplied, it is opened automatically.
        If the branch is supplied, it must be the branch for this basedir.
        (branch.base is not cross checked, because for remote branches that
        would be meaningless).
        sopening working tree %rN(t_formattbzrdirRttracetmuttert_branchRtbasedirt_control_filest
_transporttNonet_dirtyt	_dirstatet
_inventoryt"_setup_directory_is_tree_referencet_detect_case_handlingt_rules_searchert_make_viewstviewstdirstatet_process_entryt
_iter_changes(tselfR tbranchR!Rt_bzrdir((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt__init__Zs 							

	cC@s|j}xt|||D]\}}}|jd}|j|r|dkr|j|tkr|jdtj|qqn|dkrtj|}n|j	|||ddqW|j
dtdS(sSee MutableTree._add.t/ttreset_inventoryN(tcurrent_dirstatetziptstriptpath2idRtset_path_idtgenerate_idstgen_file_idR#taddt_make_dirtytTrue(R/tfilestidstkindststatetftfile_idtkind((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_add~s"!cC@sd|jfgS(s=Return the references needed to perform a check of this tree.ttrees(t
last_revision(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_get_check_refsscC@s.t|_|r*|jdk	r*d|_ndS(sMake the tree state dirty.

        :param reset_inventory: True if the cached inventory should be removed
            (presuming there is one).
        N(R?R$R&R#(R/R5((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR>s	cC@s|j|dS(N(t_add_reference(R/tsub_tree((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
add_referencescC@sz|jdkrt}nt}|j}|jdk	rQtj|jnAy|j	Wn&tj
k
rtj|jnX|jWd|rd|_nX|jj
|jj
dS(sBreak a lock if one is present from another instance.

        Uses the ui factory to ask for confirmation if the lock may be from
        an active process.

        This will probe the repository for its lock as well.
        N(R%R#R?tFalset_current_dirstatet_lock_tokenterrorst
LockActiveR t
lock_writetLockContentiontunlockR!t
break_lockR0(R/tclearRC((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRVs 
	

cC@sdtj|||\}}}|jrW|dkrW|dk	rW|jdkrWd}n|||fS(Nt	directorystree-reference(Rt_comparison_datat_repo_supports_tree_referenceR#RF(R/tentrytpathRFt
executablet
stat_value((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRYs
	cO@s/tj|||||}|jdt|S(NR5(RtcommitR>R?(R/tmessagetrevpropstargstkwargstresult((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR_scC@s|j|jS(sReturn the current dirstate object.

        This is not part of the tree interface and only exposed for ease of
        testing.

        :raises errors.NotWriteLocked: when not in a lock.
        (t_must_be_lockedRO(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR6s
cC@s_|jdk	r|jS|jjdjd}tjj||j|j	|_|jS(sInternal function that does not check lock status.

        This is needed for break_lock which also needs the dirstate.
        R,N(
R%R#Rtget_workingtree_transportt
local_abspathR,tDirStateton_filet_sha1_providert_worth_saving_limit(R/t
local_path((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyROs	cC@s|jrt|SdSdS(sA function that returns a SHA1Provider suitable for this tree.

        :return: None if content filtering is not supported by this tree.
          Otherwise, a SHA1Provider is returned that sha's the canonical
          form of files, i.e. after read filters are applied.
        N(tsupports_content_filteringtContentFilterAwareSHA1ProviderR#(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRjs
cC@s|j}|jdS(szHow many hash changes are ok before we must save the dirstate.

        :return: an integer. -1 means never save.
        s"bzr.workingtree.worth_saving_limit(tget_config_stacktget(R/tconf((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRksc	C@st|}t}|j}xf|D]^}tjj|jd\}}|j||d\}}}}|s(|j|q(q(W|S(sMFilter out paths that are versioned.

        :return: set of paths.
        tutf8i(	tsortedtsetR6tosR\tsplittencodet_get_block_entry_indexR=(	R/tpathsRdRCR\tdirnametbasenamet_tpath_is_versioned((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytfilter_unversioned_files
s	
!cC@sJ|jjdkr$tj|n|jjd|_t|_	dS(sWrite all cached data to disk.twN(
R!t
_lock_modeRQtNotWriteLockedR6tsaveR#R&RNR$(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytflushs
	cC@sGx@t|D]2\}}||dkr
|j|||<q
q
WdS(sSee MutableTree._gather_kinds.N(t	enumerateR#t_kind(R/R@RBtposRD((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
_gather_kinds&scC@s|j}|j|jdd\}}|d}|dddks[t|ntd|}tjj}t}t	j
}|j}	i|jd6}
x|j
dD]}|d}y|
|}
Wntk
rqnXx|dD]\}}|d\}}}}}|dkr#qn|d}||d}|d}||}|||||
j}|d
kr||_n|dkr||
|d|jd<nd|d
kr|jstj|j|jjn|pd|_n|dkrtd|n||	kr9td||	|fn||
jkr^td|fn||	|<||
j|<qWqW||_dS(sCreate and set self.inventory from the dirstate object.

        This is relatively expensive: we have to walk the entire dirstate.
        Ideally we would not, and can deprecate this function.
        R\R4iitdtroot_iditatrtfileRXR3stree-referencetsymlinksunknown kind %rs%file_id %s already in inventory as %ssname %r already in parentN(RR(R6t_read_dirblocks_if_neededt
_get_entrytAssertionErrorRR,Rht_minikind_to_kindRt
cache_utf8t_utf8_decodet_byidtroott
_dirblockstKeyErrorRER]R8RZRQtUnsupportedOperationt_generate_inventoryR0t
repositoryR#treference_revisiontchildrenR&(R/RCtroot_keyt
current_entryt
current_idtinvtminikind_to_kindtfactorytutf8_decodetinv_byidt
parent_iestblockRzt	parent_ietkeyR[tminikindtlink_or_sha1tsizeR]tstattnametname_unicodeRERFt	inv_entry((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR-sb

		





	
cC@sm|dkr*|dkr*tjdn|j}|dk	rT|jd}n|jdd|d|S(sGet the dirstate row for file_id or path.

        If either file_id or path is supplied, it is used as the key to lookup.
        If both are supplied, the fastest lookup is used, and an error is
        raised if they do not both point at the same row.

        :param file_id: An optional unicode file_id to be looked up.
        :param path: An optional unicode path to be looked up.
        :return: The dirstate row tuple for path/file_id, or (None, None)
        smust supply file_id or pathRritfileid_utf8t	path_utf8N(R#RQtBzrErrorR6RwR(R/RER\RC((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRsscC@s|jd|d|}|ddkr=tj||n|dkrtt|dd|ddjd}n|j|}|j}|dkrytj	|}Wqt
k
r}|jtjkrdSqXnt
j|||d|}|ddddkr||dkru|j||\}	}
ztj|	}Wd|	jX|j||||
f|S|SndS(NRER\iiRrR^RD(RR#RQtNoSuchIdRtdecodetabspathR6tosutilstlstattOSErrorterrnotENOENTR,tupdate_entrytget_file_with_stattsha_filetcloset_observed_sha1(R/RER\R^R[tfile_abspathRCteRtfile_objt	statvaluetsha1((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
get_file_sha1s4+
	cC@sSdtjkr"tjddn|jdk	r8|jS|j|j|jS(sAGet the inventory for the tree. This is only valid within a lock.tevilis7accessing .inventory forces a size of tree translation.N(tdebugtdebug_flagsRtmutter_callsiteR&R#ReR(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_get_root_inventorys	


iiicC@s|jS(N(troot_inventory(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_get_inventorystdocsInventory of this TreesRoot inventory of this treecC@s|jjS(slSee Tree.get_parent_ids.

        This implementation requests the ids list from the dirstate file.
        (R6tget_parent_ids(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@s|j||jS(N(tget_nested_treeRI(R/RER\((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytget_reference_revisionscC@s4|dkr|j|}ntj|j|S(N(R#tid2pathRtopenR(R/RER\((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@s|jddddS(s Return the id of this trees rootR\R4ii(R(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytget_root_idscC@sj|j}|jd|\}}|dkr4tStjt|j|djd|djdS(NREiRri(	R6RR#RNRtlexistsRR R(R/RERCtrowtparents((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pythas_ids	cC@s.|j}|jd|\}}|dk	S(NRE(R6RR#(R/RERCRR((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
has_or_had_idscC@st|j}|jd|}|dkrEtjd|d|ntj|dd|dd}|jdS(sConvert a file-id to a path.REttreeiiRrN(NN(R6RR#RQRRRR(R/RERCR[R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs"cC@s2|jd|}|dkr"tS|dddS(NR\iii(NN(RR#RN(R/R\tstat_resultR[((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt,_is_executable_from_path_and_stat_from_basisscC@s|jsD|jd|d|}|dkr4tS|dddS|j|sf|j|}ntj|j|j	}t
tj|otj
|@SdS(s|Test if a file is executable or not.

        Note: The caller is expected to take a read-lock before calling this.
        RER\iiiN(NN(t_supports_executableRR#RNReRRRRtst_modetboolRtS_ISREGtS_IEXEC(R/RER\R[tmode((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
is_executables
cC@se|jt}xK|jjD]7\}}|dddkrLq&n|j|dq&W|S(sSee Tree.iter_all_file_idsiRRi(RR(ReRtR6t
_iter_entriesR=(R/RdRttree_details((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytall_file_idss
	cC@sg}x|jjD]x\}}|dddkr?qnt|j|djd|djd}tj|r|j|dqqWt|S(sIterate through file_ids for this tree.

        file_ids are in a WorkingTree if they are in the working inventory
        and the working file exists.
        iRRRrii(RR(	R6RRR RRRtappendtiter(R/RdRRR\((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt__iter__
s/cc@s|js
dSx|jjD]\}}|dddkrFq n|dsVq nt|djd|djd}y+|j|dkr||dfVnWq tjk
rq q Xq WdS(	NiRRiRrstree-referencei(RR(RZR6RRRRRQt
NoSuchFile(R/RRtrelpath((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytiter_referencess	
)cC@sG|\}}|j}|jd|d|}|j|||dS(sSee MutableTree._observed_sha1.RER\N(R6RR(R/RER\t.3RRRCR[((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR/s	cC@s;|j|}|dkr.td|n|j|S(sReturn the kind of a file.

        This is always the actual kind that's on disk, regardless of what it
        was added as.

        Note: The caller is expected to take a read-lock before calling this.
        spath for id {%s} is None!N(RR#RR(R/RER((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRF5s
cC@s}|j|}t|}|jry|dkry|jd|}|ddk	ry|ddddkrvd}qvqyn|S(NRXR\iittstree-reference(RR
RZRR#(R/RRRFR[((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRCscC@s+|jj}|r |dStjSdS(sSee Mutable.last_revision.iN(R6Rt
_mod_revisiont
NULL_REVISION(R/t
parent_ids((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_last_revisionMscC@s|jjyo|jjyD|j}|jsB|jnt|jjjdt|_	Wn|jj
nXWn|jj
nXt|j
S(siSee Branch.lock_read, and WorkingTree.unlock.

        :return: A bzrlib.lock.LogicalLockResult.
        tsupports_tree_reference(R0t	lock_readR!R6RPtgetattrRRRNRZRUR(R/RC((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRVs"

	


cC@syo|jjyD|j}|js5|jnt|jjjdt|_	Wn|jj
nXWn|jj
nXt|j
S(s1This should be called after the branch is locked.R(R!RSR6RPRR0RRRNRZRUR(R/RC((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_lock_self_writeos 
	


cC@s|jj|jS(stSee MutableTree.lock_tree_write, and WorkingTree.unlock.

        :return: A bzrlib.lock.LogicalLockResult.
        (R0RR(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytlock_tree_writes
cC@s|jj|jS(soSee MutableTree.lock_write, and WorkingTree.unlock.

        :return: A bzrlib.lock.LogicalLockResult.
        (R0RSR(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRSs
c+@sg}|s|S|jt|tr7tn|jd}tjj|\}}j}j	||d\}	}
}}|st
jd|t
j|nj
|	d|
}
j|	|
|}j
|}|j|}t|s%t
jd|t
j|n|
ddddkr^t
jd|t
j|n|jdk	rt}|j|
dd}|}nt}gfdx|D]}|jd}tj|\}tj|\}}|jd|}|dkr=t
j||t
jd|n|ddt|}t||}|jd|}|d krt
j||d	n||krt
j||d
n|j|}|j|}|rt}nt}|ra|s.t
j||t
jd|ddq|rt
j||t
jd
||fqn*|rpt}n|st
j||ngfd}|r#|j||j|ytjWn,t k
r} t
j||| dnXj!fdnyJ|rt}|j"j|j!fdnj	||d\}!}"}}#j
|!d}$|$|"}%|%\}&}'|'d}(|df|&dd!})|(d}*|%d|d|*d|(dd|(dd|(dd|(dd|d|)d|	|*dkrl	fd		||)|nWn|nX|j!||fj#|j$dtqW|S(!sSee WorkingTree.move().RriR4iRic

@s	j||dj	fd	j|ddddd|		j||d\}
}|d|
j	fd	dS(
Nic
@s.jdddddS(NR]tfingerprinttpacked_statRR(tupdate_minimal((R]Rtfrom_keytfrom_path_utf8RRRRC(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt<lambda>s	R]RRRRic@s
jS(N(t_make_absent((t	new_entryRC(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs(RRRt_find_entry_index(t	old_entryRRR]RRRtto_blocktto_keytto_path_utf8tadded_entry_indexR|(t	rollbacksRC(R]RRRRRRRs8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytmove_ones

%	R\sTarget is already versioned.s Source and target are identical.textras!New file has not been created yetRyc@sod}xAtD]3}y|Wqtk
rE}tj}qXqW|rk|d|d|dndS(s)A single rename has failed, roll it back.iiiN(R#treversedt	Exceptiontsystexc_info(RtrollbackR(R(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytrollback_renamesc@stjS(N(Rtrename((tfrom_rel_abst
to_rel_abs(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRsc@sjS(N(R((tcurrent_parenttfrom_idt	from_tailR(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR$siRRR]RRiRRRRc@s|dkrtdn|df}j|\}}|sFdSj|}j|d|dd\}}}	}	j|||}j|}
x'|dD]}|dd|kstn|dd}||dd|ddf}tj|dd|dd}
tj||dd}|d}|dkrUqn|d|
d	|d
|dd|dd
|dd|dd|
d|d|	|dkr|
||qqWdS(s0Recursively update all entries in this dirblock.R4srenaming root not supportedNiiitarRRR]iRRiRRRRR(Rt_find_block_index_from_keyRRxt
_ensure_blockRR(tfrom_dirRtto_dir_utf8Rtfrom_block_idxtpresentt
from_blocktto_block_indextto_entry_indexR|RR[tcur_detailsRRR(RRCtupdate_dirblock(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR;sB
)
"




	R5N(NN(NN(%R6t
isinstancet
basestringt
ValueErrorRwRuR\Rvt
_get_id_indexRxRQtBzrMoveFailedErrortNotVersionedErrorRRRRt
NotADirectoryR&R#R?RRNRRRthas_filenameRtBzrRenameFailedErrortPathsDoNotExisttRenameFailedFilesExistRRRt	parent_idt_mark_modifiedR>(+R/t
from_pathstto_dirtafterRdRtto_entry_dirnametto_basenametid_indextto_entry_block_indextto_entry_entry_indextdir_presentt
entry_presenttto_entryRRtto_abstupdate_inventoryt	to_dir_idt	to_dir_ietfrom_relt
from_rel_utf8tfrom_dirnametfrom_tail_utf8t
from_entrytto_reltto_rel_utf8t
item_to_entrytfrom_missingt
to_missingt	move_fileR
Rtold_block_indextold_entry_indextfile_presentt	old_blockRRtold_entry_detailsRRR((
RRRRRRRRCRRs8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytmoves!
	

	!	
	!






1
cC@s"|jjstj|ndS(N(R!t_lock_countRQtObjectNotLocked(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRevscC@s
t|_dS(s3Initialize the state in this tree to be a new tree.N(R?R$(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt	_new_treezscC@svt|tr9|gkr'dg}ntj|}n|jd}|jd|}|dkrjdS|ddS(s$Return the id for path in this tree.R4R3R\iiN(NN(R tlistRRR8RR#(R/R\R[((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR9~scC@s(|dkrdS|j}xH|D]@}t|toD|j|ks#tt|j|||Sq#Wdgg|D]}d|j|j^qt}t	}x$|D]}|j
|jdqW|}|j}	t
r|	jtjjkrd|kr|j}
n	|j}
|
||d|S(sSee Tree.paths2ids().

        This specialisation fast-paths the case where all the trees are in the
        dirstate.
        iiRrR4trequire_versionedN(R#RR tDirStateRevisionTreet_revision_idtsuperRt	paths2idstindexRtR=RwR6RNt_dirblock_stateR,Rht
NOT_IN_MEMORYt_paths2ids_using_bisectt_paths2ids_in_memory(R/RyRHRQRRtsearch_indexest
paths_utf8R\RCRU((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRUs(
	0	
	c@s|jjfd}|rt}x|D]|}||}|sZt}Pnt}xA|D]9}	x0D](}
|	d|
ddkrtt}PqtqtWqgW|s8t}Pq8q8W|stjg|D]}|jd^qqntj|t	t	fd}xr
j
}
j|
||
}|sbq+nx|D]}	||	qiW|
ddf}j|\}}xf|t
jkr	tj|
j|dr	x#j|dD]}	||	qW|d7}qWq+WS(Nc
@stjj|\}}||df}j|\}}|sFgSg}j|d}j||\}}	xS|t|kr||ddd!|dd!kr|j|||d7}qxW|S(sLReturn a list with all the entries that match path for all ids.
            R4iii(RuR\RvRRRtlenR(
R\RzR{Rtblock_indexRRdRtentry_indexR|(RC(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_entries_for_paths"iiRsutf-8c@sxD]}|d|ddkrbtj|d|dsj|d|dqq|d|ddkrj|ddqqWdS(sLook at search_indexes within entry.

            If a specific tree's details are relocated, add the relocation
            target to search_paths if not searched already. If it is absent, do
            nothing. Otherwise add the id to found_ids.
            iiRRiN(Rt
is_inside_anyR=(R[RV(t	found_idsR[tsearch_pathstsearched_paths(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR-s
R4(R6RR?RNRQtPathsNotVersionedErrorRRtminimum_path_selectionRttpopR=RR]Rt	is_inside(R/RyR[RQR`t
all_versionedR\tpath_entriestfound_versionedR[RVtpR-tcurrent_roottroot_entriestinitial_keyR^R|((RbR[RcRdRCs8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRZsT



+		
	

cC@s|j}t}td|D}|j|}|rtd|D}xK|D]@}	|	|kr]tjg|D]}
|
jd^q|q]q]WnxS|jD]E\}}x6|D].}
||
ddkr|j|dqqWqW|S(	Ncs@s|]}tj|VqdS(N(RRv(t.0Rl((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pys	<genexpr>	scs@s|]}|d VqdS(iN((Rptdir_name_id((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pys	<genexpr>
ssutf-8iRRi(RR(	R6RtRst_bisect_recursiveRQReRt	iteritemsR=(R/RyR[RQRCRbtsplit_pathstfoundtfound_dir_namestdir_nameRlRqt
trees_infoRV((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRYs	
/
cC@s|jS(srRead the working inventory.

        This is a meaningless operation for dirstate, but we obey it anyhow.
        (R(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytread_working_inventoryscC@sv|j}|j}||kr9tj||n||jkr`tj||nt|||jjS(sbSee Tree.revision_tree.

        WorkingTree4 supplies revision_trees for any basis tree.
        (R6RRQtNoSuchRevisionInTreet
get_ghostsRRR0R(R/trevision_idR,R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
revision_tree s	cC@st|j}|tjdfkrRt|dkrBtdn|jgn|j|g|ddtdS(s-Change the last revision in the working tree.isDsetting the last parent to none with a pending merge is unsupported.itallow_leftmost_as_ghostN(RRRR#R]Rtset_parent_idsR?(R/tnew_revisionR((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytset_last_revision/scC@sg}x`|D]X}y|jjj|}Wn#tjtjfk
rQd}nX|j||fq
W|j|d|dS(sSet the parent ids to revision_ids.

        See also set_parent_trees. This api will try to retrieve the tree data
        for each element of revision_ids from the trees repository. If you have
        tree data already available, it is more efficient to use
        set_parent_trees rather than set_parent_ids. set_parent_ids is however
        an easier API to use.

        :param revision_ids: The revision_ids to set as the parent ids of this
            working tree. Any of these may be ghosts.
        R~N(	R0RR}RQtNoSuchRevisiontRevisionNotPresentR#Rtset_parent_trees(R/trevision_idsR~RHR|trevtree((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR=s


cC@sh|j}t|dkrV|rV|dddkrVtj|ddqVng}g}g|D]\}}|^qi}|jjj}	|	j|}
t	}x|D]\}}t|dkr||ks||
krqqnt
j||dk	r |j||fn2|j||jjj
t
jf|j||j|qWt}t|dkr8|r8|jjjjr8t|ddtjr8|jr8|d\}}
|jd}y|jjj
|}Wntjk
r	q8X|
jj|j}|j||t}n|sT|j|d|n|jdtdS(sSet the parents of the working tree.

        :param parents_list: A list of (revision_id, tree) tuples.
            If tree is None, then that element is treated as an unreachable
            parent tree - i.e. a ghost.
        iitghostsR5N(R6R]R#RQtGhostRevisionUnusableHereR0Rt	get_graphtheadsRtRtcheck_not_reserved_idRR}RR=RNRtfast_deltasR trevisiontreetInventoryRevisionTreeRRRt_make_deltatupdate_basis_by_deltaR?RR>(R/tparents_listR~R,t
real_treesRtrev_idRRtgraphRtaccepted_revisionstupdatedtrev_treetbasis_idt
basis_treetdelta((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRXsT		
	
		cC@sH|j}|jd||jtjjkrD|jdtndS(sSee WorkingTree.set_root_id.R4R5N(R6R:RWR,RhtIN_MEMORY_MODIFIEDR>R?(R/RERC((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_set_root_idscC@s|jj||S(sGet a sha digest from the tree's stat cache.

        The default implementation assumes no stat cache is present.

        :param path: The path.
        :param stat_result: The stat result being looked up.
        (R6tsha1_from_stat(R/R\R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_sha_from_statscC@s|jS(N(RZ(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@s|jjdkr|j|jjdkrG|jrG|jqGn|jdk	rs|jj|jj	nd|_d|_
nz|jj	SWd|jj	XdS(s<Unlock in format 4 trees needs to write the entire dirstate.iRN(R!RMt_cleanupRR$RR%R#RRUR&R0(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRUs
	
	cC@s/|s
dS|j}|jt|}t}xU|jddD]B\}}|dddkrG|d|krGtjdqGqGWd}x|t|jkr|j|}t}	xa|D]Y}
|dj|
rt|dt|
ks|dt|
dkrt	}	PqqW|	rd}x~|t|dkr|d|}|dddd	krz|d7}q1|j
|dd|j|s1|d7}q1q1W|d7}qnd}x|t|dkr|d|}|dddd
ks|dd|kr(|d7}qn|dddd
kri|jt
|dd|ddn|j|s|d7}n|j|ddqW|d7}qW|rtj|t|jn|jdt|jdk	r+x6|D]+}
|jj|
r|jj|
qqWndS(s*Remove the file ids in file_ids from the current versioned set.

        When a file_id is unversioned, all of its children are automatically
        unversioned.

        :param file_ids: The file ids to stop versioning.
        :raises: NoSuchId if any fileid is not currently versioned.
        NiiRRis-Unversioning the / is not currently supportedR3RRR5(RR(RR(R6RRtRRQRR]RNt
startswithR?tdiscardRR=RtremoveRRtnextR>R&R#Rtremove_recursive_id(R/tfile_idsRCtids_to_unversiontpaths_to_unversionRtdetailsR^Rtdelete_blockR\R_R[RE((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt	unversionsf

	




)
!
cC@s*|jtt|j|||dS(sSee WorkingTree.rename_oneN(RRTRt
rename_one(R/R<RAR/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs
cC@s-|j}|j||jdtdS(s%See MutableTree.apply_inventory_deltaR5N(R6tupdate_by_deltaR>R?(R/tchangesRC((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytapply_inventory_delta$s
cC@s8|j|krtn|jj||dS(s&See MutableTree.update_basis_by_delta.N(RIRR6R(R/t	new_revidR((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR+scC@s|jjdS(N(R%t	_validate(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR1scC@so|jrtdn|jdk	}d|_|j|j}|j||ra||_n|jdS(s)Write inventory as the current inventory.sUattempting to write an inventory when the dirstate is dirty will lose pending changesN(R$RR&R#RRRR(R/Rt
had_inventoryR((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_write_inventory5s		
cC@s|dkr|j}n|sB|jjjtj}g}n,t||jjj|}|dd}|j	}|j
|j|gdS(sReset the state of the working tree.

        This does a hard-reset to a last-known-good state. This is a way to
        fix if something got corrupted (like the .bzr/checkout/dirstate file)
        iiN(R#RR0RR}RRR7trevision_treesR6tset_state_from_scratchR(R/Rt	base_treeRHRC((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytreset_stateIs	N(iii(Lt__name__t
__module__R#R2RRGRJR>RMRVRYRR_R6RORjRkR~RRRRRRRRRtpropertyt	inventoryRRRRRRRRRRRRRRRRFRRRRRRSRNRLReROR9R?RURZRYRyR}RRRRRRRURRRRRRR(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRXs 		
	%	
		
					F!						
		
				
							
 Z	?		
	V	RncB@s#eZdZdZdZRS(cC@s
||_dS(N(R(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR2ascC@s;|jj|jjtj|}tj||dS(s!See dirstate.SHA1Provider.sha1().i(Rt_content_filter_stackRRRt_mod_filterstinternal_size_sha_file_byname(R/Rtfilters((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRds	cC@s|jj|jjtj|}t|dd}zGtj|j}|rlt	j
||}ntj|d}Wd|jX||fS(s*See dirstate.SHA1Provider.stat_and_sha1().trbiiN(
RRRRRRRutfstattfilenoRtfiltered_input_filet
size_sha_fileR(R/RRRRR((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
stat_and_sha1js	(RRR2RR(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRn_s		t#ContentFilteringDirStateWorkingTreecB@seZdZdZRS(sDirstate working tree that supports content filtering.

    The dirstate holds the hash and size of the canonical form of the file, 
    and most methods must return that.
    cC@s7|jj||}|j||}dd||fS(NR(R%Rt!_is_executable_from_path_and_statR#(R/R\Rt
dirstate_sha1R]((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_file_content_summarys(RRt__doc__R(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRystWorkingTree4cB@seZdZRS(s_This is the Format 4 working tree.

    This differs from WorkingTree by:
     - Having a consolidated internal dirstate, stored in a
       randomly-accessible sorted file on disk.
     - Not having a regular inventory attribute.  One can be synthesized
       on demand but this is expensive and should be avoided.

    This is new in bzr 0.15.
    (RRR(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs
tWorkingTree5cB@seZdZRS(sThis is the Format 5 working tree.

    This differs from WorkingTree4 by:
     - Supporting content filtering.

    This is new in bzr 1.11.
    (RRR(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRstWorkingTree6cB@seZdZdZRS(sThis is the Format 6 working tree.

    This differs from WorkingTree5 by:
     - Supporting a current view that may mask the set of files in a tree
       impacted by most user operations.

    This is new in bzr 1.14.
    cC@s
tj|S(N(R+tPathBasedViews(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR*s(RRRR*(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRstDirStateWorkingTreeFormatcB@szeZeZeZeZdZdZddde
dZdZe
dZ
dZdZdZeeZRS(	tlockcC@s%|jd}t||j|jS(N(RfR#R	t_lock_file_namet_lock_class(R/ta_bzrdirt	transport((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_open_control_filessc	C@st|jts*tj|jjn|j|}|j|}|j|j	|j
d|jd|j|dk	r|}n|j}|dkr|j}n|jd}	tjj|	}
|
j~
|j|jjd|d|d|d|}|j|jz|j||dtjfkr|jjrv|jtj n
|jt!|j"nd}|dk	ry|j#|}Wqtj$k
rqXn|dkr|jj#|}n|tjkrg}
n||fg}
|j%z|j&|
dt'|j"|j(}|dk	rs|j||j"n|j)rt*}nt'}t+j,|||d	|d
|xt-j.dD]}||qWWd|jXWd|j|jX|S(
sSee WorkingTreeFormat.initialize().

        :param revision_id: allows creating a working tree at a different
            revision than the branch is at.
        :param accelerator_tree: A tree which can be used for retrieving file
            contents more quickly than the revision tree, i.e. a workingtree.
            The revision tree will be used for cases where accelerator_tree's
            content is different.
        :param hardlink: If true, hard-link files from accelerator_tree,
            where possible.

        These trees get an initial random root id, if their repository supports
        rich root data, TREE_ROOT otherwise.
        tformatRR,t.RR1R!R~thardlinktdelta_from_treetpost_build_treeN(/R RRRQtNotLocalUrltbaseRfRtcreate_lockRSt	put_bytest	as_stringt_get_file_modeR#topen_branchRIRgR,Rht
initializeRUt_tree_classtroot_transportRORt_init_custom_control_filesRRRtsupports_rich_rootRR;tgen_root_idRRR}RRRR?RRmRNt	transformt
build_treeRthooks(R/RR|tfrom_branchtaccelerator_treeRRt
control_filesR0RlRCtwttbasisRt
basis_root_idRthook((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs|


	
	




	



	
cC@sdS(sSubclasses with custom control files should override this method.

        The working tree and control files are locked for writing when this
        method is called.

        :param wt: the WorkingTree object
        N((R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR'scC@sX|stnt|jts9tj|jjn|j||j|}|S(sReturn the WorkingTree object for a_bzrdir

        _found is a private parameter, do not use it. It is used to indicate
               if format probing has already been done.
        (	tNotImplementedErrorR RRRQRRt_openR(R/Rt_foundR((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR0s	c
C@s7|j|jjdd|jd|d|d|S(sOpen the tree itself.

        :param a_bzrdir: the dir for the tree.
        :param control_files: the control files for the tree.
        RR0RR1R!(RRRgR(R/RR((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR>s
cC@s
|jS(N(t_get_matchingbzrdir(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt__get_matchingbzrdirJscC@stjjdS(s0Overrideable method to get a bzrdir for testing.sdevelopment-subtree(t
controldirtformat_registrytmake_bzrdir(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRMs	N(RRR?tmissing_parent_conflictstsupports_versioned_directoriesR
RRRR#RNRRRRt._DirStateWorkingTreeFormat__get_matchingbzrdirRRt_matchingbzrdir(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs	`					tWorkingTreeFormat4cB@s2eZdZeZeZedZdZ	RS(ssThe first consolidated dirstate working tree format.

    This format:
        - exists within a metadir controlling .bzr
        - includes an explicit version marker for the workingtree control
          files, separate from the ControlDir format
        - modifies the hash cache format
        - is new in bzr 0.15
        - uses a LockDir to guard access to it.
    cC@sdS(s*See WorkingTreeFormat.get_format_string().s(Bazaar Working Tree Format 4 (bzr 0.15)
((tcls((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytget_format_stringfscC@sdS(s/See WorkingTreeFormat.get_format_description().sWorking tree format 4((R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytget_format_descriptionks(
RRRRNtupgrade_recommendedRRtclassmethodRR(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRVs

tWorkingTreeFormat5cB@s;eZdZeZeZedZdZ	dZ
RS(s5WorkingTree format supporting content filtering.
    cC@sdS(s*See WorkingTreeFormat.get_format_string().s(Bazaar Working Tree Format 5 (bzr 1.11)
((R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRxscC@sdS(s/See WorkingTreeFormat.get_format_description().sWorking tree format 5((R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR}scC@stS(N(R?(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRms(RRRRNRRRRRRRm(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRps	tWorkingTreeFormat6cB@sVeZdZeZeZedZdZ	dZ
dZdZdZ
RS(s)WorkingTree format supporting views.
    cC@sdS(s*See WorkingTreeFormat.get_format_string().s(Bazaar Working Tree Format 6 (bzr 1.14)
((R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@sdS(s/See WorkingTreeFormat.get_format_description().sWorking tree format 6((R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@s&|jjddd|jjdS(sASubclasses with custom control files should override this method.R+R4RN(R"RRR(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@stS(N(R?(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRmscC@stS(N(R?(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytsupports_viewsscC@stjjdS(s0Overrideable method to get a bzrdir for testing.sdevelopment-subtree(RRR(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs(RRRRNRRRRRRRRmRR(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs				RRcB@seZdZdZdZejdZdZdZ	dZ
dZdZd	Z
d
Zd-d-dZdZd-d
Zd-d-dZedZd-dZdZd-dZd-dZdZd-dZdZdZeeddZe e!d.dZ"ee"ddZ#dZ$dZ%d Z&d!Z'd"Z(d-d#Z)d$Z*e+d-e,d%Z-d&Z.d'Z/ed(Z0d)Z1ed*Z2d+d,Z3RS(/sA revision tree pulling the inventory from a dirstate.
    
    Note that this is one of the historical (ie revision) trees cached in the
    dirstate for easy access, not the workingtree.
    cC@sR||_||_||_d|_d|_t|_t|j	dt|_
dS(NiR(R%RSt_repositoryR#R&t_lockedRNt_dirstate_lockedRRRZ(R/R,R|R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR2s							cC@sd|jj|j|jfS(Ns<%s of %s in %s>(t	__class__RRSR%(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt__repr__scC@sQ||j|f}|jjj|}g|D]\}}|d|f^q1S(sSee Tree.annotate_iteri(tget_file_revisionRttextstannotate(R/REtdefault_revisionttext_keytannotationsRtline((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
annotate_iterscC@s,|dkrdtdfS|j|jdfS(sSee Tree._comparison_data.N(R#RNRFR](R/R[R\((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRYs
cC@s|jS(N(t	text_size(R/R[R^((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
_file_sizesc@s#|jtfd|DS(sQFilter out paths that are not versioned.

        :return: set of paths.
        c3@s!|]}|s|VqdS(N((RpRl(tpred(s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pys	<genexpr>s(R'Rt(R/Ry((Rs8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR~s	cC@s
|jdS(NR4(R9(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@sh|jd|}|dkr9tjd|d|ntj|dd|dd}|jdS(sConvert a file-id to a path.RERiiRrN(NN(RR#RQRRRR(R/RER[R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs
"cC@s&|jstgStt|jS(N(RZRRTRRR(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs	
cC@s|jjj|jdS(s9Return the index in the dirstate referenced by this tree.i(R%RRVRS(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt_get_parent_indexscC@sp|dkr*|dkr*tjdn|dk	rH|jd}n|j}|jj|d|d|S(sGet the dirstate row for file_id or path.

        If either file_id or path is supplied, it is used as the key to lookup.
        If both are supplied, the fastest lookup is used, and an error is
        raised if they do not both point at the same row.

        :param file_id: An optional unicode file_id to be looked up.
        :param path: An optional unicode path to be looked up.
        :return: The dirstate row tuple for path/file_id, or (None, None)
        smust supply file_id or pathRrRRN(R#RQRRwRR%R(R/RER\tparent_index((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@s|jstdn|jj|j|jjkrbtd|j|jjfn|jjj|jd}|jj|dd\}}|d}||ddkrtntd	|d
|j}||d|j	_
tjj
}t}tj}|j}	i|j	d6}
x|jjdD]}|d}y|
|}
Wntk
rnq:nXx|dD]\}}||\}}}}}|dkrqzn|d}||d}|d}||}|||||
j}||_
|dkr+||_||_||_nz|dkrU||
|d|jd<nP|dkrw||d|_n.|dkr|pd|_ntd|||	krtd||	|fn||
jkrtd|fn||	|<||
j|<qzWq:W||_dS(s!Create and set self.inventory from the dirstate object.

        (So this is only called the first time the inventory is requested for
        this tree; it then remains in memory until it's out of date.)

        This is relatively expensive: we have to walk the entire dirstate.
        s?cannot generate inventory of an unlocked dirstate revision trees!parent %s has disappeared from %siRR4iiRRR|iRRRRXR3Rstree-references.cannot convert entry %r into an InventoryEntrys%file_id %s already in inventory as %ssname %r already in parentN(RR(RRR%RRSRRVRRRtrevisionR,RhRRRRRRRRER]Rt	text_sha1R8tsymlink_targetR#RRR&(R/RRRRRRRRRRRRzRRR[RRRR]trevidRRRERFR((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRst	

		





			

cC@s|j|d|}|dkr6tj||n|j}|d|d}y|jj|}Wn,tjk
rtj|j	|nX|j
S(suReturn the modification time for this record.

        We return the timestamp of the last-changed revision.
        R\iiN(NN(RR#RQRRRtget_revisionRtFileTimestampUnavailableRt	timestamp(R/RER\R[Rtlast_changed_revisiontrev((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytget_file_mtimeOscC@sN|jd|d|}|j}|d|}|ddkrJ|dSdS(NRER\iiRD(RRR#(R/RER\R^R[Rtparent_details((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR`scC@s |j|\}}||jS(N(t_unpack_file_idR(R/RERtinv_file_id((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRhscC@st|j|S(N(Rt
get_file_text(R/RER\((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytget_filemscC@s |j|\}}||jS(sSee Tree.get_file_size(R#R(R/RERR$((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
get_file_sizepscC@sxd}xP|j|dfgD]6\}}|dk	rFtdndj|}qW|dkrttdn|S(Ns*iter_files_bytes returned too many entriesR4s2iter_files_bytes did not return the requested data(R#titer_files_bytesRtjoin(R/RER\tcontentR|tcontent_iter((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR%us%cC@s |j|\}}||jS(N(R#R(R/RER\RR$((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@s|j}g}xf|D]^\}}|j|}|dkrUtj||n|j||d|d|fqW|jj|S(seSee Tree.iter_files_bytes.

        This version is implemented on top of Repository.iter_files_bytesiiN(NN(RRR#RQRRRR((R/t
desired_filesRtrepo_desired_filesREt
identifierR[((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR(scC@sc|jd|}|j}|d|ddkr:dS|d|d}|jd}|SdS(NREiitlRr(RRR#R(R/RER\R[Rttarget((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytget_symlink_targetscC@s|jS(s%Return the revision id for this tree.(RS(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytget_revision_idscC@s1|jdk	r|jS|j|j|jS(N(R&R#ReR(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs


RsInventory of this TreeiiicC@s|jS(N(R(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@s|jj|jjS(s5The parents of a tree in the dirstate are not cached.(RRRSR(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRscC@st|j|S(N(RR9(R/tfilename((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR'scC@s_|jd|d}|dkr=tjd|d|n|j}tjj||dS(NREiRi(RR#RQRRR,RhR(R/RER[R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRFs
cC@s
|j|S(sSee Tree.stored_kind(RF(R/RE((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytstored_kindscC@s|j|\}}|dkr%dS||}|j}|dkr]||j|j|jfS|dkr||dd|jfS|dddfSdS(sSee Tree.path_content_summary.tmissingRRN(R5NNN(t_path2inv_file_idR#RFRR]RR(R/R\RR$R[RF((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytpath_content_summarys
	cC@s9|j|\}}||}|jdkr2tS|jS(NR(R#RFRNR](R/RER\RR$tie((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs

cC@s|jS(N(R(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt	is_lockedsc	c@s|dkr|j}d}n%|j|\}}|dkrCdS|jd|d|}|jdk	r|r|dkr|jnx.|D]&\}}|d|j|j|fVqWdS(NRt	recursivetV(R#RR6titer_entriesRRRFRE(	R/tinclude_rootRR:Rtfrom_dir_idtentriesR\R[((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt
list_filess		"
cC@s`|jsD|jj|jjdkrD|jjt|_qDn|jd7_t|j	S(sbLock the tree for a set of operations.

        :return: A bzrlib.lock.LogicalLockResult.
        iN(
RRRR%RPR#R?RRRU(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs	

cC@s|jstj|ndS(N(RRQRN(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRes	cC@sgt|tr9|gkr'dg}ntj|}n|jd|}|dkr[dS|ddS(s$Return the id for path in this tree.R4R\iiN(NN(R RPRRRR#(R/R\R[((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR9scC@s`|jd8_|js\d|_d|_|jrL|jjt|_n|jjndS(s6Unlock, freeing any cache memory used during the lock.iiN(RR#R&RR%RURNR(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRUs				
cC@s|jS(N(RZ(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRsR4cc@s9d}|j}|j|}|dkr6g}n||fg}x|r4g}|j\}}|ry|d}	nd}	||}
xL|
jD]>\}}|	|}
|j|
||jd|j|jfqW||
jf|fVxBt|D]4}|d|kr|j|d|dfqqWqHWdS(NRXR3R4iii(	RR9R#Rgtsorted_childrenRRFRER(R/tprefixt
_directoryRttop_idtpendingtdirblockRREtrelrootR[Rtchildttoppathtdir((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytwalkdirss*		


N(iii(4RRRR2R
RtCURRENT_REVISIONRRYRR~RRRRR#RRR!RRRR&R'R%RR(R1R2RRRRRRRRR'RFR4R7RR9RNR?R@RReR9RURRK(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRRsV										N		
													
	
	tInterDirStateTreecB@seZdZdZedZedZedZe	Z
e	ZedZe
ddgee
dZedZRS(	sFast path optimiser for changes_from with dirstate trees.

    This is used only when both trees are in the dirstate working file, and
    the source is any parent within the dirstate, and the destination is
    the current working tree of the same dirstate.
    cC@sEtt|j||tj||sAtd||fndS(Nsinvalid source %r and target %r(RTRMR2t
is_compatibleR	(R/tsourceR0((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR2KscC@sE|jd}|jj|j||j|g|j|fS(s3Change the source tree into a parent of the target.srecord tree(R_R0tfetchRR(ROR0R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytmake_source_parent_treePscC@s&|j||}tj|d_|S(Ni(RQR,tProcessEntryPythonR.(tklasst	test_caseROR0Rd((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt'make_source_parent_tree_python_dirstateXscC@sPddlm}|j|ddlm}|j||}||d_|S(Ni(t!compiled_dirstate_helpers_feature(t
ProcessEntryCi(t#bzrlib.tests.test__dirstate_helpersRVtrequireFeaturetbzrlib._dirstate_helpers_pyxRWRQR.(RSRTROR0RVRWRd((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt)make_source_parent_tree_compiled_dirstate^s

cC@s
tdS(N(R(RSRTROR0((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt!_test_mutable_trees_to_test_treeslsc	C@s|s|gkr:tt|j|||||d|S|jj}|jj|kpm|jjtjkst	d|jj|j|jfnd}|jjtjkrd}	|f}
nV|jj|krt	d|jj|fnd|j|jj}	|	|f}
|rZt}x$|D]}|j
|jdq1W|}ntdg}|jj}
|
j|r`g}x|D]}|
j|}|s|j|jdqnt}xA|D]9}x0|
D](}|d|dd	krt}PqqWqW|s|j|jdqqWt|dkr`tj|q`ntj|}tjd
k}|jj||||
|	|||j}|jS(sAReturn the changes from source to target.

        :return: An iterator that yields tuples. See InterTree.iter_changes
            for details.
        :param specific_files: An optional list of file paths to restrict the
            comparison to. When mapping filenames to ids, all matches in all
            trees (including optional extra_trees) are used, and all children of
            matched directories are included.
        :param include_unchanged: An optional boolean requesting the inclusion of
            unchanged entries in the result.
        :param extra_trees: An optional list of additional trees to use when
            mapping the contents of specific_files (paths) to file_ids.
        :param require_versioned: If True, all files in specific_files must be
            versioned in one of source, target, extra_trees or
            PathsNotVersionedError is raised.
        :param want_unversioned: Should unversioned files be returned in the
            output. An unversioned file is defined as one with (False, False)
            for the versioned pair.
        twant_unversioneds]revision {%s} is not stored in {%s}, but %s can only be used for trees stored in the dirstateis=Failure: source._revision_id: %s not in target.parent_ids(%s)iRrR4sutf-8Rtwin32N(RTRMtiter_changesR0RRORSRRRR#RVRtR=RwR6RR`RRRNR?R]RQReRRfR
tplatformR.(R/tinclude_unchangedtspecific_filestpbtextra_treesRQR]Rttarget_indextsource_indextindicestspecific_files_utf8R\RCt
not_versionedRjRkR[RVtsearch_specific_filestuse_filesystem_for_execR_((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR_rsf
"	
	



	cC@s^t|tstSt|tjtfs/tS|jtjkpS|j|j	ksZtSt
S(N(R RRNRtRevisionTreeRRRSRRRR?(ROR0((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRNsN(RRRR2tstaticmethodRQRRUR[Rt_matching_from_tree_formatt_matching_to_tree_formatR\RNR#R?R_RN(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRMAs				\t
Converter3to4cB@s;eZdZdZdZdZdZdZRS(s:Perform an in-place upgrade of format 3 to format 4 trees.cC@st|_dS(N(Rt
target_format(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR2scC@sW|jjz5|j|j||j||j|Wd|jjXdS(N(R!RSRytcreate_dirstate_datat
update_formattremove_xml_filesRU(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pytconverts



cC@sH|jjdjd}tjj||}|j|jdS(s(Create the dirstate based data for tree.R,N(	RRfR#RgR,Rht	from_treeRRU(R/RRlRC((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRrs
	
cC@s^|jjd}xEdddddgD].}y|j|Wq(tjk
rUq(Xq(WdS(sRemove the oldformat 3 data.sbasis-inventory-cacheRs
last-revisionspending-mergess
stat-cacheN(RRfR#tdeleteRQR(R/RRR\((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRtscC@s/|jjd|jjd|jjdS(sChange the format marker.RRN(R"RRqRRR(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs
	s(RRRR2RuRrRtRs(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRps		
		t
Converter4to5cB@s)eZdZdZdZdZRS(s:Perform an in-place upgrade of format 4 to format 5 trees.cC@st|_dS(N(RRq(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR2	scC@s3|jjz|j|Wd|jjXdS(N(R!RSRsRU(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRu	s
cC@s/|jjd|jjd|jjdS(sChange the format marker.RRN(R"RRqRRR(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs!	s(RRRR2RuRs(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRx	s		
tConverter4or5to6cB@s2eZdZdZdZdZdZRS(s?Perform an in-place upgrade of format 4 or 5 to format 6 trees.cC@st|_dS(N(RRq(R/((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyR2+	scC@s@|jjz|j||j|Wd|jjXdS(N(R!RStinit_custom_control_filesRsRU(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRu.	s


cC@s&|jjddd|jjdS(s Initialize custom control files.R+R4RN(R"RRR(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRz9	scC@s/|jjd|jjd|jjdS(sChange the format marker.RRN(R"RRqRRR(R/R((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRs>	s(RRRR2RuRzRs(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyRy(	s
			(?Rt
__future__Rt	cStringIORRuR
tbzrlib.lazy_importRtglobalstbzrlib.decoratorsRRtbzrlib.inventoryRRRtbzrlib.lockRtbzrlib.lockable_filesR	tbzrlib.lockdirR
tbzrlib.mutabletreeRRtbzrlib.osutilsR
RRRRtbzrlib.symbol_versioningRRtbzrlib.transport.localRtbzrlib.treeRRtbzrlib.workingtreeRRRRR,tSHA1ProviderRnRRRRRRRRRRRMtregister_optimisertobjectRpRxRy(((s8/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.pyt<module>sP	(

"
-

Copyright © 2017 || Recoded By Mr.Bumblebee