-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
®“COc@@sšdZddlmZddlZddlZddlmZmZddlm	Z	de
fd„ƒYZdefd	„ƒYZd
efd„ƒYZ
dS(s3Helper functions for adding files to working trees.i(tabsolute_importN(tosutilstui(tgettextt	AddActioncB@s8eZdZddd„Zejd„Zdd„ZRS(s=A class which defines what action to take when adding a file.cC@sI||_|dkr$tj|_nt|_|dk	rE||_ndS(s*Initialize an action which prints added files to an output stream.

        :param to_file: The stream to write into. This is expected to take
            Unicode paths. If not supplied, it will default to ``sys.stdout``.
        :param should_print: If False, printing will be suppressed.
        N(t_to_filetNonetsyststdouttFalsetshould_print(tselftto_fileR
((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyt__init__!s		cC@s*|jr&|jjd||ƒƒndS(sèAdd path to inventory.

        The default action does nothing.

        :param inv: The inventory we are working with.
        :param path: The FastPath being added
        :param kind: The kind of the object being added.
        s
adding %s
N(R
RtwriteR(Rtinvt	parent_ietpathtkindt_quote((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyt__call__/s		cC@stS(sÈTest whether the given file should be skipped or not.
        
        The default action never skips. Note this is only called during
        recursive adds
        
        :param tree: The tree we are working in
        :param path: The path being added
        :param kind: The kind of object being added.
        :param stat: Stat result for this file, if available already
        :return bool. True if the file should be skipped (not added)
        (R	(RttreeRRt
stat_value((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyt	skip_file<sN(	t__name__t
__module__t__doc__RR
RtquotefnRR(((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyRs
tAddWithSkipLargeActioncB@s eZdZdZdd„ZRS(sCA class that can decide to skip a file if it's considered too largecC@s¾|dkrtSd}|jdkrF|jƒ}|j|ƒ|_n|dkrgtjj|ƒ}n	|j}|jdkrº||jkrºt	j
jtdƒj
|||jƒƒtStS(Ntfilesadd.maximum_file_sizeis+skipping {0} (larger than {1} of {2} bytes)(R	t_maxSizeRtget_config_stacktgettosRtgetsizetst_sizeRt
ui_factorytshow_warningRtformattTrue(RRRRRtopt_nametconfigt	file_size((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyRPs		N(RRRRRR(((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyRKstAddFromBaseActioncB@s/eZdZddd„Zd„Zd„ZRS(s:This class will try to extract file ids from another tree.cC@s5tt|ƒjd|d|ƒ||_||_dS(NRR
(tsuperR+R
t	base_treet	base_path(RR-R.RR
((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyR
fs	cC@sr|j||ƒ\}}|dk	rM|jrn|jjd||fƒqnn!tt|ƒj||||ƒ}|S(Nsadding %s w/ file id from %s
(t_get_base_file_idRR
RRR,R+R(RRRRRtfile_idR.((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyRls	cC@s•|jj|jƒrjtj|jj|jƒtj|ƒƒ}|jj|ƒ}|dk	rj||fSntj|j	|ƒ}|jj|ƒ|fS(sóLook for a file id in the base branch.

        First, if the base tree has the parent directory,
        we look for a file with the same name in that directory.
        Else, we look for an entry in the base tree with the same path.
        N(
R-thas_idR0Rtpathjointid2pathtbasenametpath2idRR.(RRRR.tbase_idtfull_base_path((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyR/{s
N(RRRRR
RR/(((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyR+cs	(Rt
__future__RRR!tbzrlibRRtbzrlib.i18nRtobjectRRR+(((s./usr/lib/python2.7/dist-packages/bzrlib/add.pyt<module>s-

Copyright © 2017 || Recoded By Mr.Bumblebee