-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
¹àíNc@@s–ddlmZddlmZddlmZdefd„ƒYZde	e	d„Z
defd„ƒYZd	„Ze	e	e	d
de
d„ZdS(
i(tabsolute_import(tosutils(tis_quiett	TreeDeltacB@sVeZdZd„Zd„Zd„Zd„Zd„Zd„Ze	e	e	d„Z
RS(s»Describes changes from one tree to another.

    Contains seven lists:

    added
        (path, id, kind)
    removed
        (path, id, kind)
    renamed
        (oldpath, newpath, id, kind, text_modified, meta_modified)
    kind_changed
        (path, id, old_kind, new_kind)
    modified
        (path, id, kind, text_modified, meta_modified)
    unchanged
        (path, id, kind)
    unversioned
        (path, None, kind)

    Each id is listed only once.

    Files that are both modified and renamed are listed only in
    renamed, with the text_modified flag true. The text_modified
    applies either to the content of the file or the target of the
    symbolic link, depending of the kind of file.

    Files are only considered renamed if their name has changed or
    their parent directory has changed.  Renaming a directory
    does not count as renaming all its contents.

    The lists are normally sorted when the delta is created.
    cC@sLg|_g|_g|_g|_g|_g|_g|_g|_dS(N(taddedtremovedtrenamedtkind_changedtmodifiedt	unchangedtunversionedtmissing(tself((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt__init__:s							cC@st|tƒstS|j|jkoŽ|j|jkoŽ|j|jkoŽ|j|jkoŽ|j|jkoŽ|j|jkoŽ|j	|j	kS(N(
t
isinstanceRtFalseRRRRR	RR
(Rtother((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt__eq__DscC@s||kS(N((RR((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt__ne__OscC@s2d|j|j|j|j|j|j|jfS(NsgTreeDelta(added=%r, removed=%r, renamed=%r, kind_changed=%r, modified=%r, unchanged=%r, unversioned=%r)(RRRRRR	R
(R((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt__repr__RscC@s1t|jp-|jp-|jp-|jp-|jƒS(N(tboolRRRRR(R((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pythas_changedYs
			cC@sœxE|j|j|jfD]+}x"|D]}|d|kr&tSq&WqWx%|jD]}|d|krRtSqRWx%|jD]}|d|krztSqzWtS(s1Return True if file_id is modified by this delta.ii(RRRtTrueRRR(Rtfile_idtltv((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyttouches_file_id`s
cC@s8ddl}|jƒ}t|||||ƒ|jƒS(Ni(tStringIOtreport_deltatgetvalue(Rtshow_idstshow_unchangedtshort_statusRtoutput((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pytget_changes_as_textns(t__name__t
__module__t__doc__R
RRRRRRR"(((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyRs 	
					c
@sÕtƒ}xw|j|||d|d|d|ƒD]N\}	}
}‰}}
‰}ˆttfkrˆ|jj|
ddˆdfƒq1n|r¡d	|kr¡q1nt‡‡fd†tdƒDƒƒ}|d|dkr2|dtkr|j	j|
d|	ˆdfƒq|j
j|
d|	ˆdfƒq1|dtkrf|jj|
d|	ˆdfƒq1|
d|
dksŽ|d|dkrÍ|jj|
d|
d|	ˆd||d|dkfƒq1ˆdˆdkr|j
j|
d|	ˆdˆdfƒq1|s&|d|dkr^|jj|
d|	ˆd||d|dkfƒq1|jj|
d|	ˆdfƒq1W|j
jƒ|j	jƒ|jjƒ|jjƒ|jjƒ|jjƒ|S(
s2Worker function that implements Tree.changes_from.textra_treestrequire_versionedtwant_unversionedic3@s)|]}ˆ|o ˆ|dk	VqdS(N(tNone(t.0tx(tkindt	versioned(s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pys	<genexpr>‡siiN(NN(Rtiter_changesRR
tappendR)ttupletrangeRRRRRRRR	tsort(told_treetnew_treetwant_unchangedtspecific_filestinclude_rootR&R'R(tdeltaRtpathtcontent_changet	parent_idtnamet
executablet
fully_present((R,R-s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt_compare_treesvsP	%!$$$(+%





t_ChangeReportercB@s2eZdZdeddded„Zd„ZRS(s Report changes between two treesc@sQˆdk	r9|dk	r'tdƒ‚n‡fd†}n||_|jdkrpddlm}|j|_n||_idd6dd6d	d
6dd6d
d6dd6|_idd6dd6dd6dd6|_||_	|rït
j|_nd„|_|dkrd|_g|_
n1|d|_|d|_
|jd|jfƒdS(s;Constructor

        :param output: a function with the signature of trace.note, i.e.
            accepts a format and parameters.
        :param supress_root_add: If true, adding the root will be ignored
            (i.e. when a tree has just been initted)
        :param output_file: If supplied, a file-like object to write to.
            Only one of output and output_file may be supplied.
        :param unversioned_filter: A filter function to be called on
            unversioned files. This should return True to ignore a path.
            By default, no filtering takes place.
        :param view_info: A tuple of view_name,view_files if only
            items inside a view are to be reported on, or None for
            no view filtering.
        :param classify: Add special symbols to indicate file kind.
        s*Cannot specify both output and output_filec@sˆj||dƒdS(Ns
(twrite(tfmttargs(toutput_file(s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyR!Èsi(ttracetKskind changedt R	tNtcreatedtMRtDtdeletedt!Rt+Rt-Rt?R
cS@sdS(Nt((R,((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt<lambda>ßsis8Operating on whole tree but only reporting on '%s' view.N(R)tBzrErrorR!tbzrlibREtnotetsuppress_root_addtmodified_mapt
versioned_maptunversioned_filterRtkind_markert	view_namet
view_files(RR!RVRDRYt	view_infotclassifyRE((RDs0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyR
²s<		



		

	cC@sñtƒr
dS|ddkr6|dkr6|jr6dS|jr]tj|j|dƒr]dS|dkr›|jdk	r’|j|dƒr’dSnd}n|dkr|s¹|dkr|rÎ|\}}	n|d|d}}	|ddk	r
||j|dƒ7}n|d	7}n/|d
kr9d}|d}	nd}|d}	|rXd}
n
|j|}
|dkr‹|	|j|dƒ7}	n*|ddk	rµ|	|j|dƒ7}	n|rÄd
}nd}|j	d|
|j
||||	ƒdS(sUReport one change to a file

        :param file_id: The file_id of the file
        :param path: The old and new paths as generated by Tree.iter_changes.
        :param versioned: may be 'added', 'removed', 'unchanged', or
            'unversioned.
        :param renamed: may be True or False
        :param modified: may be 'created', 'deleted', 'kind changed',
            'modified' or 'unchanged'.
        :param exe_change: True if the execute bit has changed
        :param kind: A pair of file kinds, as generated by Tree.iter_changes.
            None indicates no file present.
        NiRQRR
R	skind changedis => RtRRLt*RGs%s%s%s %s%s(RRVR\Rt
is_inside_anyRYR)RZRXR!RW(RRtpathsR-RRt
exe_changeR,told_pathR9trenametexe((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pytreportésJ	%	


	
	N(R#R$R%R)RR
Rg(((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyR@¯s
	5c	C@s‰idttf6dttf6dttf6dttf6}xH|D]@\}}}}}}}	}
t}d
|kr®d
|kr®|d|dks¥|d|dkr®t}nt}|	d|	dkr|	dd
krád}
qX|	dd
krúd}
qXd	}
nU|rd
}
n|	dd
kr+d}
nd}
|	ddkrX|
d|
dk}n||}|j|||||
||	ƒqAWd
S(sÀReport the changes from a change iterator.

    This is essentially a translation from low-level to medium-level changes.
    Further processing may be required to produce a human-readable output.
    Unfortunately, some tree-changing operations are very complex
    :change_iterator: an iterator or sequence of changes in the format
        generated by Tree.iter_changes
    :param reporter: The _ChangeReporter that will report the changes.
    R	RRR
iiRIRLskind changedRRtfileN(RRR)Rg(tchange_iteratortreportertversioned_change_mapRR9R:R-R;R<R,R=RcRRtversioned_change((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pytreport_changes0s8



"(						
RQc	@svd‡fd†‰‡‡‡fd†}‡fd†}	‡‡‡fd†‰ddd‡‡‡‡‡‡fd†}
|
|jdd	ƒ|
|jd
dƒ|
|jdd
ƒg‰g|jD]0\}}}
}}}||
||||f^q»}|
|ddddd|ƒ|
|jddddd|	ƒ|
|jˆddƒ|r_|
|jddƒn|
|jddƒdS(s†Output this delta in status-like form to to_file.

    :param to_file: A file-like object where the output is displayed.

    :param delta: A TreeDelta containing the changes to be displayed

    :param short_status: Single-line status if True.

    :param show_ids: Output the file ids if True.

    :param show_unchanged: Output the unchanged files if True.

    :param indent: Added at the beginning of all output lines (for merged
        revisions).

    :param filter: A callable receiving a path and a file id and
        returning True if the path should be displayed.

    :param classify: Add special symbols to indicate file kind.
    c@sSˆs
|S|dkr#|d7}n|dkr<|d7}n|rO|d7}n|S(Nt	directoryt/tsymlinkt@R`((R9R,t
meta_modified(R^(s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt
decorate_pathus


c@sj|\}}}}}}ˆ|||ƒ}ˆjd|ƒ|sG|rfˆj|||||fƒndS(Ns => %s(RAR/(titemtoldpathRR,t
text_modifiedRrtnewpathtdec_new_path(Rstextra_modifiedtto_file(s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pytshow_more_renamed€sc@s-|\}}}}ˆjd||fƒdS(Ns (%s => %s)(RA(RtR9Rtold_kindtnew_kind(Rz(s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pytshow_more_kind_changed‰sc@sAˆ|||ƒ}ˆr,ˆj||ƒnˆj||ƒdS(N(RA(R9RR,Rrtdefault_formattwith_file_id_formattdec_path(RsRRz(s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt	show_pathss%ss%-30sc
@s3|r/t}ˆr|}nd}ˆ|d}xý|D]ò}|d \}	}
}ˆdk	rqˆ|	|
ƒrqq6n|rˆrˆjˆ|dƒt}nd}t|ƒdkrÂ|d}nˆj|ƒˆ|	|
||||ƒ|dk	r||ƒnˆrˆjd|
ƒnˆjdƒq6WndS(	NRQs  is:
iis %ss
(RR)RARtlen(
tfilestlong_status_nametshort_status_letterRR€t	show_moretheader_showntprefixRtR9RR,Rr(tfiltertindentR RR‚Rz(s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt	show_list•s0	
	



RRKRtARRMRR_R€R‡skind changedRFRRJR	tStunknownRGN(	R)RRRRRRR	R
(RzR8R RRR‹RŠR^R{R~RŒtptnptitkttmtmmR((	R^RsRyRŠR‹R RR‚Rzs0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyR^s*		!=N(t
__future__RRTRtbzrlib.traceRtobjectRR)RR?R@RmRR(((s0/usr/lib/python2.7/dist-packages/bzrlib/delta.pyt<module>s^7	.

Copyright © 2017 || Recoded By Mr.Bumblebee