-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
¦îNc@@sïddlmZddlmZeeƒdƒdddgZdddddd	dd
„Zdd„Zy ddl	m
ZmZ
mZWn-ek
r¸dd
lmZmZ
mZnXd„ZedkrëejeejdƒƒndS(i(tabsolute_import(tlazy_imports1
import os
import sys
import time
import difflib
tPatienceSequenceMatchertunified_difftunified_diff_filestis
c	c@sÞ|dkrtj}n|r1dt|ƒ}n|rJdt|ƒ}nt}	x‡|d||ƒj|ƒD]j}
|	s¥d|||fVd|||fVt}	n|
dd|
dd|
dd|
dd	f\}}}
}d
|d|||
d||
|fVxÈ|
D]À\}}}}
}|dkrZx|||!D]}d|VqAWqn|d
ksr|dkr–x!|||!D]}d|Vq€Wn|d
ks®|dkrx!||
|!D]}d|Vq¼WqqWqlWdS(sŽ
    Compare two sequences of lines; generate the delta as a unified diff.

    Unified diffs are a compact way of showing line changes and a few
    lines of context.  The number of context lines is set by 'n' which
    defaults to three.

    By default, the diff control lines (those with ---, +++, or @@) are
    created with a trailing newline.  This is helpful so that inputs
    created from file.readlines() result in diffs that are suitable for
    file.writelines() since both the inputs and outputs have trailing
    newlines.

    For inputs that do not have trailing newlines, set the lineterm
    argument to "" so that the output will be uniformly newline free.

    The unidiff format normally has a header for filenames and modification
    times.  Any or all of these may be specified using strings for
    'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.  The modification
    times are normally expressed in the format returned by time.ctime().

    Example:

    >>> for line in unified_diff('one two three four'.split(),
    ...             'zero one tree four'.split(), 'Original', 'Current',
    ...             'Sat Jan 26 23:30:50 1991', 'Fri Jun 06 10:20:52 2003',
    ...             lineterm=''):
    ...     print line
    --- Original Sat Jan 26 23:30:50 1991
    +++ Current Fri Jun 06 10:20:52 2003
    @@ -1,4 +1,4 @@
    +zero
     one
    -two
    -three
    +tree
     four
    s	s
--- %s%s%ss
+++ %s%s%siiiÿÿÿÿiiis@@ -%d,%d +%d,%d @@%stequalt treplacetdeletet-tinsertt+N(tNonetdifflibtSequenceMatchertstrtFalsetget_grouped_opcodestTrue(tatbtfromfilettofiletfromfiledatet
tofiledatetntlinetermtsequencematchertstartedtgroupti1ti2tj1tj2ttagtline((s7/usr/lib/python2.7/dist-packages/bzrlib/patiencediff.pyR#s2)"	>(
c	C@sÅ||krgS|dkr4tj}tjƒ}n!t|dƒ}tj|ƒj}|dkrytj}tjƒ}n!t|dƒ}tj|ƒj}t|jƒ|jƒd|d|d|ƒS(s%Generate the diff for two files.
    R
trbRRR(	tsyststdinttimetopentoststattst_mtimeRt	readlines(RRRtfile_attime_atfile_bttime_b((s7/usr/lib/python2.7/dist-packages/bzrlib/patiencediff.pyRis		(tunique_lcs_ctrecurse_matches_ctPatienceSequenceMatcher_c(t
unique_lcs_pytrecurse_matches_pytPatienceSequenceMatcher_pycC@sddl}|jddƒ}|jdddddd	d
dd
dd
ƒ|jdddddd	ddd
ddƒitd
6tjd6}|j|ƒ\}}||j}t|ƒdkrÈdGHdSx5t	|d|dd|ƒD]}t
jj|ƒqæWdS(NitusagesA%prog [options] file_a file_b
Files can be "-" to read from stdins
--patiencetdesttmatchertactiontstore_consttconsttpatiencetdefaultthelps%Use the patience difference algorithms	--difflibRsUse python's difflib algorithmis#You must supply 2 filenames to diffiÿÿÿÿiR(
toptparsetOptionParsert
add_optionRRRt
parse_argsR:tlenRR&tstdouttwrite(targsRAtpt
algorithmstoptsR:R$((s7/usr/lib/python2.7/dist-packages/bzrlib/patiencediff.pytmain‘s


$t__main__iN(t
__future__Rtbzrlib.lazy_importRtglobalst__all__R
RRtbzrlib._patiencediff_cR2t
unique_lcsR3trecurse_matchesR4RtImportErrortbzrlib._patiencediff_pyR5R6R7RLt__name__R&texittargv(((s7/usr/lib/python2.7/dist-packages/bzrlib/patiencediff.pyt<module>s			D 
 	

Copyright © 2017 || Recoded By Mr.Bumblebee