-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
¦îNc@@sªddlmZddlZddlZddlmZmZddlmZddl	m
Z
dZeZ
ejdkr‚eZ
ndd	„Zded
„Zd„ZdS(i(tabsolute_importN(tPopentPIPE(tNoDiff3(tcheck_text_pathtrestructuredtexttnttcC@s‡t|dt|ƒdtdtdtdtƒ}|j|ƒ\}}|jƒ}|dkrztd|d|ƒƒ‚n|||fS(sSpawn a process, and wait for the result

    If the process is killed, an exception is raised

    :param args: The command line, the first entry should be the program name
    :param input: [optional] The text to send the process on stdin
    :return: (stdout, stderr, status)
    tbufsizetstdintstdouttstderrt	close_fdsis%s killed by signal %i(RtlenRt
_do_close_fdstcommunicatetwaitt	Exception(targstinputtprocessR
Rtstatus((s0/usr/lib/python2.7/dist-packages/bzrlib/patch.pytwrite_to_cmd$s	!cC@svdddddg}|r+|jdƒn|dk	rM|jd|fƒn|j|ƒt||ƒ\}}}|S(	s6Apply a patch to a file, to produce another output file.  This is should
    be suitable for our limited purposes.

    :param patch_contents: The contents of the patch to apply
    :type patch_contents: str
    :param filename: the name of the file to apply the patch to
    :type filename: str
    :param output_filename: The filename to produce.  If None, file is     modified in-place
    :type output_filename: str or NoneType
    :param reverse: If true, apply the patch in reverse
    :type reverse: bool
    :return: 0 on success, 1 if some hunks failed
    tpatchs-fs-ss--posixs--binarys	--reverses-oN(tappendtNonetextendR(tpatch_contentstfilenametoutput_filenametreverseRR
RR((s0/usr/lib/python2.7/dist-packages/bzrlib/patch.pyR6s
cC@s
d„}t|ƒt|ƒt|ƒdddg}||dƒ||dƒ||dƒ|j|||fƒyt|ƒ\}}}Wn1tk
r¿}	|	jtjkr¹t‚qÀ‚nX|dkrÛt|ƒ‚nt|d
ƒ}
z|
j	|ƒWd|
j
ƒX|S(NcS@s|jd|fƒdS(Ns-L(R(Rtlabel((s0/usr/lib/python2.7/dist-packages/bzrlib/patch.pyt	add_labelPstdiff3s-Es--mergetTREEtANCESTORsMERGE-SOURCEiitwb(ii(RRRtOSErrorterrnotENOENTRRtopentwritetclose(tout_filet	mine_patht
older_patht
yours_pathR RtoutputRRtetf((s0/usr/lib/python2.7/dist-packages/bzrlib/patch.pyR!Os,	





	(t
__future__RR&tost
subprocessRRt
bzrlib.errorsRtbzrlib.textfileRt
__docformat__tTrueRtnametFalseRRRR!(((s0/usr/lib/python2.7/dist-packages/bzrlib/patch.pyt<module>s	

Copyright © 2017 || Recoded By Mr.Bumblebee