-=[ Mr. Bumblebee ]=-
_Indonesia_

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

σ
ΨLοNc
@@sΪdZddlmZddlZddlZddlmZddlZddlm	Z	e	e
ƒdƒddd	d
ddd
dddg
Zd„Zd„Z
d„Zd„Zeƒad„Zd„Zd„ZdS(sLists of ignore files, etc.i(tabsolute_importN(tStringIO(tlazy_importsQ
from bzrlib import (
    atomicfile,
    config,
    globbing,
    trace,
    )
s*.as*.os*.py[co]s*.sos	*.sw[nop]s*~s.#*s[#]*#t__pycache__sbzr-orphanscC@stƒ}|jƒ}y|jdƒjdƒ}Wn†tk
rΉ|jdƒ}g}xat|ƒD]O\}}y|j|jdƒƒWqctk
r±tjd|dƒqcXqcWnXxO|D]G}|j	dƒ}|sΑ|j
dƒrςqΑn|jtj
|ƒƒqΑW|S(sοRead in all of the lines in the file and turn it into an ignore list
    
    Continue in the case of utf8 decoding errors, and emit a warning when 
    such and error is found. Optimise for the common case -- no decoding 
    errors.
    tutf8s
sutf-8sA.bzrignore: On Line #%d, malformed utf8 character. Ignoring line.is
t#(tsettreadtdecodetsplittUnicodeDecodeErrort	enumeratetappendttracetwarningtrstript
startswithtaddtglobbingtnormalize_pattern(tftignoredtignore_filet
unicode_linestlinestline_numbertline((s2/usr/lib/python2.7/dist-packages/bzrlib/ignores.pytparse_ignore_file6s(	


cC@sΧtjƒ}ttƒ}yt|dƒ}Wn‰ttfk
rΆ}t|ddƒ}|t	j
fkrm‚nyttƒWn4ttfk
r±}|j	t	jfkr²‚q²nX|SXzt
|ƒSWd|jƒXdS(s9Get the list of user ignored files, possibly creating it.trbterrnoN(tconfigtuser_ignore_config_filenameRt
USER_DEFAULTStopentIOErrortOSErrortgetattrtNoneRtENOENTt_set_user_ignorestEPERMRtclose(tpathtpatternsRteterr((s2/usr/lib/python2.7/dist-packages/bzrlib/ignores.pytget_user_ignoresYs"
cC@sftjƒ}tjƒt|dƒ}z/x(|D] }|j|jdƒdƒq/WWd|jƒXdS(s7Fill out the user ignore file with the given patterns

    This may raise an error if it doesn't have permission to
    write to the user ignore file.
    This is mostly used for testing, since it would be
    bad form to rewrite a user's ignore list.
    bzrlib only writes this file if it does not exist.
    twbRs
N(RRtensure_config_dir_existsR!twritetencodeR)(R+tignore_pathRtpattern((s2/usr/lib/python2.7/dist-packages/bzrlib/ignores.pyR'ts	

"cC@sΈtƒ}g}xF|D]>}tj|ƒ}||kr|j|ƒ|j|ƒqqW|sbgSttjƒdƒ}z/x(|D] }|j|j	dƒdƒqWWd|j
ƒX|S(sžAdd entries to the user's ignore list if not present.

    :param new_ignores: A list of ignore patterns
    :return: The list of ignores that were added
    tabRs
N(R.RRRRR!RRR1R2R)(tnew_ignoresRtto_addtignoreRR4((s2/usr/lib/python2.7/dist-packages/bzrlib/ignores.pytadd_unique_user_ignores‰s	


"cC@stjt|ƒƒdS(s~Add some ignore patterns that only exists in memory.

    This is used by some plugins that want bzr to ignore files,
    but don't want to change a users ignore list.
    (Such as a conversion script that needs to ignore temporary files,
    but does not want to modify the project's ignore list.)

    :param ignores: A list or generator of ignore patterns.
    :return: None
    N(t_runtime_ignorestupdateR(tignores((s2/usr/lib/python2.7/dist-packages/bzrlib/ignores.pytadd_runtime_ignores§scC@stS(s'Get the current set of runtime ignores.(R:(((s2/usr/lib/python2.7/dist-packages/bzrlib/ignores.pytget_runtime_ignoresΆsc	C@sΑ|jtjƒ}|j|ƒršt|dƒ}zY|jƒ}t|ddƒ}t|ƒt	krp|d}n|dkrˆt
j}nWd|jƒXnd}t
j}t
|ƒ}zt|ƒ}Wd|jƒXtj|dƒ}z’|j|j|jdƒƒƒt|ƒdkr9|jdƒr9|j|ƒnx@|D]8}||kr@|j|jdƒƒ|j|ƒq@q@W|jƒWd|jƒX|jtjƒs½|jtjgƒndS(	s@Add more ignore patterns to the ignore file in a tree.
    If ignore file does not exist then it will be created.
    The ignore file will be automatically added under version control.

    :param tree: Working tree to update the ignore list.
    :param name_pattern_list: List of ignore patterns.
    :return: None
    trUtnewlinesiNtR/s
sutf-8(tabspathtbzrlibtIGNORE_FILENAMEthas_filenameR!RR$R%ttypettupletostlinesepR)RRt
atomicfilet
AtomicFileR1tjoinR	tlentendswithR2tcommittpath2idR(	ttreetname_pattern_listtifnRt
file_contentstnewlinetsioR<R4((s2/usr/lib/python2.7/dist-packages/bzrlib/ignores.pyttree_ignores_add_patterns»s<

	"
(t__doc__t
__future__RRRHt	cStringIORRCtbzrlib.lazy_importRtglobalsR RR.R'R9RR:R=R>RW(((s2/usr/lib/python2.7/dist-packages/bzrlib/ignores.pyt<module>s4			#						

Copyright © 2017 || Recoded By Mr.Bumblebee